/* Gespraechsnavigator, Design-System.
   Farben und Typografie stammen aus dem Styleguide. Keine externen Einbindungen:
   keine Google Fonts, keine CDNs. Fuer die Produktion werden die Schriften lokal
   eingebunden, siehe die auskommentierten @font-face-Bloecke unten. */

/* ------------------------------------------------------------------ Fonts
   Lokal gehostet, keine externen Requests. Beide Schriften stehen unter der
   SIL Open Font License (OFL) und liegen als Variable Fonts in assets/fonts/.
   Eine Datei deckt jeweils den ganzen Schnittbereich ab. Ein System-Font-
   Fallback greift, falls eine Datei fehlt (siehe --font-* weiter unten). */
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4.woff2") format("woff2");
}

:root {
  --bg: #FBF8F2;
  --white: #FFFFFF;
  --ink: #2B2A26;
  --ink-muted: #55503F;
  --ink-faint: #776E5C; /* WCAG AA: 4.75:1 auf Sand, 5.04:1 auf Weiss (Kleintext, Labels) */
  --accent: #2E635B;
  --accent-dark: #1F4842;
  --terra: #C0714B;
  --terra-ink: #8A4F2E;
  --terra-bg: #FAF3ED;
  --sand: #F1EADC;
  --line: #E6DECF;
  --card-line: #D8CEBB;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 680px;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
::selection { background: #DCE8E4; }

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

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; text-wrap: pretty; }

/* ------------------------------------------------------------------ Skip-Link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------------ Layout */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 24px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.wrap--home { gap: 56px; }
.wrap--wide { max-width: 760px; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 15px;
  font-weight: 600;
}
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.kicker {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

/* ------------------------------------------------------------------ Baum-Navigation (Zurueck / Von vorn) */
.treenav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 28px;
  font-size: 16px;
}
.treenav a { font-weight: 600; text-decoration: none; }
.treenav .vonvorn { color: var(--ink-faint); font-weight: 400; }
.treenav .vonvorn:hover { color: var(--ink-muted); }

/* ------------------------------------------------------------------ Ueberschriften-Groessen */
.h-hero { font-size: 34px; margin: 0; }
.h-page { font-size: 30px; margin: 0; }
.h-section { font-size: 26px; margin: 0; }
.h-sub { font-size: 22px; margin: 0; }
@media (min-width: 720px) {
  .h-hero { font-size: 44px; }
}

.lead { margin: 0; color: var(--ink-muted); max-width: 58ch; text-wrap: pretty; }
.fine { margin: 0; font-size: 15px; color: var(--ink-faint); }

.stack { display: flex; flex-direction: column; }
.stack-8 { gap: 8px; }
.stack-12 { gap: 12px; }
.stack-14 { gap: 14px; }
.stack-18 { gap: 18px; }
.stack-24 { gap: 24px; }

/* ------------------------------------------------------------------ Antwortkarten */
.cards { display: flex; flex-direction: column; gap: 12px; }
.card {
  display: block;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 18px 20px;
  min-height: 64px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(46, 99, 91, 0.12);
  color: var(--ink);
}
.card-label { display: block; font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.card-sub { display: block; font-size: 15px; color: var(--ink-muted); margin-top: 4px; }

.card--hinweis { background: var(--terra-bg); border-color: var(--terra); }
.card--hinweis:hover { border-color: var(--terra); box-shadow: 0 2px 10px rgba(192, 113, 75, 0.16); }
.card--hinweis:focus-visible { outline-color: var(--terra); }
.card--hinweis .card-sub { color: var(--terra-ink); }

/* ------------------------------------------------------------------ Themenkarten (Startseite) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile {
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 160ms ease;
}
.tile:hover { border-color: var(--accent); }
.tile-title { font-weight: 700; color: var(--accent); }
.tile-text { font-size: 15px; color: var(--ink-muted); }

/* ------------------------------------------------------------------ Ergebnisbloecke */
.blocks { display: flex; flex-direction: column; gap: 14px; }
.block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.block h2 { font-family: var(--font-sans); font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0; line-height: 1.3; }
.block p { margin: 0; color: var(--ink); }

.block--hilfe { background: var(--terra-bg); border-color: var(--terra); }
.block--hilfe h2 { color: var(--terra-ink); }

/* ------------------------------------------------------------------ Vertiefen und Entlastung */
.vertiefen {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vertiefen ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.vertiefen a { font-weight: 600; }

.entlastung {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.entlastung .satz-fett { margin: 0; font-family: var(--font-serif); font-size: 20px; line-height: 1.4; }
.entlastung .satz { margin: 0; font-size: 16px; color: var(--ink-muted); }

.callout { background: var(--sand); border-radius: 12px; padding: 16px 20px; font-size: 15px; color: var(--ink-muted); }

.btn-primary {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

/* ------------------------------------------------------------------ Wissens-Prosa */
.prose { display: flex; flex-direction: column; gap: 18px; }
.prose h2 { font-size: 22px; margin: 8px 0 0; }
.prose p { margin: 0; max-width: 62ch; }

/* ------------------------------------------------------------------ Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-faint);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink-faint); }

/* ------------------------------------------------------------------ Platzhalter sichtbar machen (nur Arbeitsstand)
   Hebt [PLATZHALTER]-Texte im Entwurf hervor. Vor dem Launch entfernen. */
.entwurf mark.ph {
  background: #FBECA8;
  color: #5C4A00;
  padding: 0 3px;
  border-radius: 3px;
}

/* ------------------------------------------------------------------ Druck (Ergebnisseiten)
   Leute drucken sich Ergebnisse vor Familienfeiern aus. */
@media print {
  :root { --bg: #fff; }
  body { background: #fff; font-size: 12pt; }
  .site-nav, .treenav, .site-footer, .skip, .btn-primary { display: none !important; }
  .card, .block, .vertiefen, .entlastung, .tile { box-shadow: none; border-color: #999; break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  .wrap { padding: 0; gap: 18px; }
}

/* ------------------------------------------------------------------ Reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
