/* ============================================================================
   Rauert Peters Akademie -- Rechts- und Kontaktseiten
   Eigenes Stylesheet, weil diese Seiten dieselben Klassennamen wie die
   Startseite verwenden (.hero) und sich sonst gegenseitig überschreiben würden.
   Gestaltung folgt derselben Sprache: Navy/Gold, Cormorant/Inter.
   ========================================================================== */

@import url('fonts.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0B1F3A;
  --navy-mid: #162D52;
  --navy-light: #1E3D6E;
  --navy-deep: #060F1C;
  --gold: #B8992A;
  --gold-light: #D4B347;
  --gold-pale: #F5EDD0;
  --white: #FFFFFF;
  --off-white: #F8F7F4;
  --gray-100: #F0EEE9;
  --gray-300: #C8C4BC;
  --ink: #1B2230;
  --text-mid: #3D3A36;
  --muted: #6B665F;
  --on-dark: rgba(255, 255, 255, 0.74);
  --on-dark-soft: rgba(255, 255, 255, 0.58);

  --radius: 4px;
  --radius-sm: 3px;
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-text);
  background: var(--off-white);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(184, 153, 42, 0.65);
}
a:hover { color: var(--gold); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px;
  background: var(--gold); color: var(--navy);
  padding: 10px 18px; z-index: 99;
  font-weight: 600; text-decoration: none;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------- Kopfbereich */
.hero {
  background: var(--navy);
  color: #fff;
  padding: 76px 24px 56px;
  border-bottom: 3px solid var(--gold);
  position: relative;
  overflow: hidden;
}
/* Dezente Linien wie auf der Startseite, damit die Seiten zusammengehören */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent calc(66% - 0.5px), rgba(184,153,42,0.10) 66%, transparent calc(66% + 0.5px)),
    linear-gradient(90deg, transparent calc(80% - 0.5px), rgba(184,153,42,0.07) 80%, transparent calc(80% + 0.5px));
  pointer-events: none;
}
.hero-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: -0.005em;
  margin: 18px 0 16px;
}
.hero p { color: var(--on-dark); max-width: 64ch; font-weight: 400; }
.stand {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark-soft);
  letter-spacing: 0.06em;
}

/* ----------------------------------------------------- Sprungmarken-Leiste */
.toc {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 14px 24px;
  position: sticky; top: 0; z-index: 10;
}
.toc-inner { max-width: 900px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  font-size: 12.5px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--white);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.toc a:hover { border-color: var(--gold); color: var(--navy); background: #FFFDF7; }

/* --------------------------------------------------------------- Inhalt */
.wrap { max-width: 900px; margin: 0 auto; padding: 56px 24px 88px; }

.block {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 20px;
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.block.visible { opacity: 1; transform: none; }

.block-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.block h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.block h3 { font-size: 16px; font-weight: 600; color: var(--navy); margin: 26px 0 8px; }

.prose p { margin-bottom: 14px; color: var(--text-mid); }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 14px 20px; }
.prose li { margin-bottom: 6px; color: var(--text-mid); }
.prose strong { color: var(--navy); font-weight: 600; }

/* Abstände, die im Original als Inline-Stil im Markup standen.
   Als Attribut-Selektoren, damit die Content-Security-Policy streng
   bleiben kann (kein 'unsafe-inline'). */
[data-mb] { margin-bottom: 18px; }
[data-mt] { margin-top: 16px; }
[data-mt0] { margin-top: 0; }

/* Datenzeilen (Anbieterangaben, Kontaktdaten) */
.data { border-top: 1px solid var(--gray-100); margin-top: 12px; }
.data-row {
  display: flex; gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}
.data-label {
  flex: 0 0 200px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 4px;
}
.data-value { flex: 1; min-width: 220px; color: var(--text-mid); }

/* Hervorgehobene Karten (z. B. eingesetzte Dienste) */
.card {
  border: 1px solid var(--gray-100);
  border-left: 3px solid var(--gold);
  background: #FCFBF8;
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.card-name { font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 13px; color: var(--muted); }

.note {
  background: #FDF9EF;
  border: 1px solid #E8D6A4;
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 14.5px;
  color: #5A4A12;
  margin-top: 18px;
  line-height: 1.7;
}
.note strong { color: #3F340B; }

/* --------------------------------------------------------------- Formular */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-text);
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 153, 42, 0.14);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #B03A2E; background: #FDF6F5;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B665F' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.consent {
  grid-column: 1 / -1;
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13.5px; color: var(--muted); line-height: 1.6;
  cursor: pointer;
}
.consent input[type="checkbox"] {
  width: 17px; height: 17px; min-width: 17px;
  margin-top: 3px;
  accent-color: var(--gold);
  cursor: pointer;
}

.btn {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 15px 34px;
  font-family: var(--font-text);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(184,153,42,0.3); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }

/* Meldungen */
.msg { grid-column: 1 / -1; font-size: 14px; display: none; line-height: 1.6; }
.msg.err {
  display: block;
  color: #B03A2E;
  background: #FDF6F5;
  border: 1px solid #F0CFC9;
  border-left: 3px solid #B03A2E;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}
/* Hinweis, wenn der Versand technisch scheitert -- vorher wurde in diesem
   Fall trotzdem „Danke" gezeigt und die Anfrage war verloren. */
.msg.warn {
  display: block;
  color: var(--text-mid);
  background: #FDF9EF;
  border: 1px solid #E8D6A4;
  border-left: 3px solid var(--gold);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}
.msg a { color: var(--navy-light); font-weight: 600; }

.success { display: none; }
.success h3 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 400;
  color: var(--navy);
  margin-bottom: 10px;
}
.success p { color: var(--text-mid); }

/* Honigtopf gegen Bots */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------- Fußzeile */
footer { background: var(--navy-deep); color: var(--on-dark); padding: 44px 24px; }
.foot-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  font-size: 14px;
}
.foot-brand { font-family: var(--font-display); font-size: 19px; color: #fff; font-weight: 400; }
.foot-brand span { color: var(--gold); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--on-dark); text-decoration: none; }
footer a:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------- Breiten */
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 56px 20px 42px; }
  .block { padding: 26px 20px; }
  .block h2 { font-size: 25px; }
  .data-label { flex: 1 0 100%; }
  .wrap { padding: 40px 20px 64px; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
  .block { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- Druck */
@media print {
  .toc, .skip, footer { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.55; }
  .hero { background: none; color: #000; border-bottom: 1pt solid #000; padding: 0 0 12pt; }
  .hero::after { display: none; }
  .hero h1 { color: #000; font-size: 20pt; }
  .hero p, .kicker, .stand { color: #333; }
  .wrap { padding: 12pt 0; max-width: none; }
  .block {
    background: none; border: none; border-top: 0.5pt solid #999;
    padding: 10pt 0 0; margin-bottom: 14pt;
    opacity: 1 !important; transform: none !important;
    break-inside: avoid;
  }
  .block h2 { font-size: 14pt; color: #000; }
  .prose p, .prose li, .data-value { color: #000; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #555; }
}
