/* ============================================================================
   FAQ — /faq/ · Dunkler Hero mit Live-Suche, sticky Kapitel-Navigation,
   Accordion-Karten, Mitnahme-Karten. Tokens aus colors_and_type.css,
   Gerüst und Muster (Hero-Verlauf, cta-onepager) aus site.css.
   ============================================================================ */

/* Screenreader-Label nutzt die vorhandene .visually-hidden aus site.css. */

/* ---------- Hero: Unterseiten-Verlauf Ocean→Deep Sea (die Startseite behält
   als einzige das Teal-Leuchten), Suche als Held, volle Bildschirmhöhe
   (min-height: auf kleinen Geräten darf er wachsen) ---------- */
.faq-hero {
  position: relative;
  background: linear-gradient(118deg, #2D4A5E 0%, #2D4A5E 26%, #18273A 102%);
  min-height: 100svh;
  display: flex; flex-direction: column;
}
.faq-hero-inner {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: calc(96px + env(safe-area-inset-top, 0px)) 40px 48px;
  box-sizing: border-box;
}
.faq-hero-eyebrow {
  margin: 0;
  font-size: 13.5px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(248,246,242,0.68);
}
.faq-hero-h1 {
  margin: 26px 0 0;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: clamp(40px, 3.4vw + 12px, 64px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: #F8F6F2;
}
.faq-hero-sub {
  margin: 24px 0 0;
  max-width: 38em;
  font-size: clamp(17px, 0.5vw + 12px, 21px);
  line-height: 1.6;
  color: rgba(248,246,242,0.84);
  text-wrap: pretty;
}
html.js .faq-hero-eyebrow[data-anim] { animation: sl-fade 500ms var(--ease-out) 0.15s both; }
html.js .faq-hero-h1[data-anim] { animation: sl-fade 600ms var(--ease-out) 0.25s both; }
html.js .faq-hero-sub[data-anim] { animation: sl-fade 500ms var(--ease-out) 0.5s both; }
html.js .faq-search[data-anim] { animation: sl-fade 500ms var(--ease-out) 0.65s both; }

/* ---------- Live-Suche (Feld als vertiefter Well auf Dunkel) ---------- */
.faq-search { margin-top: clamp(36px, 5vh, 52px); max-width: 640px; }
.faq-field { position: relative; }
.faq-field-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}
#faq-q {
  width: 100%; box-sizing: border-box;
  background: #14202F; /* surface.sunken-dark: vertiefte Inputs auf Dunkel */
  border: 1px solid rgba(248,246,242,0.44); /* border-input Dark-Layer, WCAG 1.4.11 */
  border-radius: var(--radius-md);
  padding: 14px 44px 14px 48px;
  font-family: var(--font-body);
  font-size: 16px; /* zwingend: verhindert iOS-Auto-Zoom */
  line-height: 1.5;
  color: #F8F6F2;
  transition: border-color var(--motion-fast) var(--ease-out);
}
#faq-q::placeholder { color: rgba(248,246,242,0.55); }
#faq-q:focus {
  border-color: #2FB6A8;
  outline: 2px solid #2FB6A8; outline-offset: 2px; /* focus-ring.outline-dark */
}
.faq-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: none; border: none; border-radius: 50%;
  color: rgba(248,246,242,0.68); cursor: pointer;
  transition: color var(--motion-fast) var(--ease-out);
}
.faq-clear[hidden] { display: none; } /* display:flex würde das hidden-Attribut sonst schlagen */
.faq-clear:hover { color: #F8F6F2; }
.faq-clear:focus-visible { outline: 2px solid #2FB6A8; outline-offset: 2px; }

.faq-count { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: rgba(248,246,242,0.68); }

.faq-suggest {
  margin: 18px 0 0;
  font-size: 15px; line-height: 1.8;
  color: rgba(248,246,242,0.68);
}
.faq-suggest-btn {
  background: none; border: none; padding: 0;
  font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: inherit;
  color: #2FB6A8; /* teal-on-dark */
  cursor: pointer;
}
.faq-suggest-btn:focus-visible { outline: 2px solid #2FB6A8; outline-offset: 2px; }
.faq-suggest-btn:hover .ul-hover, .faq-suggest-btn:focus-visible .ul-hover { background-size: 100% 1.5px; }
.faq-suggest-sep { margin: 0 10px; color: rgba(248,246,242,0.42); }

/* ---------- Fragen-Bereich: Kapitel-Navigation links, Karten rechts ---------- */
.faq-inner {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(48px, 6vh, 80px) 40px clamp(88px, 11vh, 144px);
  box-sizing: border-box;
}
.faq-toc { display: none; }
.faq-stand { margin: 0 0 28px; }

@media (min-width: 1000px) {
  .faq-inner {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    column-gap: clamp(48px, 6vw, 88px);
    align-items: start;
  }
  .faq-side { position: sticky; top: 104px; }
  .faq-toc { display: block; }
  .faq-toc-link {
    display: flex; align-items: baseline; gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line-default);
    text-decoration: none;
    font-family: var(--font-body); font-size: 15.5px; font-weight: 500;
    color: var(--fg-strong-muted);
    transition: color var(--motion-fast) var(--ease-out);
  }
  .faq-toc-link:last-of-type { border-bottom: 1px solid var(--line-default); }
  .faq-toc-num {
    flex: none; width: 46px;
    font-size: 12.5px; font-weight: 500;
    color: var(--fg-faint);
    transition: color var(--motion-fast) var(--ease-out);
  }
  .faq-toc-link:hover { color: #18273A; }
  .faq-toc-link:hover .ul-hover { background-size: 100% 1.5px; }
  .faq-toc-link:focus-visible { outline: 2px solid #0D9488; outline-offset: 2px; }
  .faq-toc-link.active { color: #0D9488; }
  .faq-toc-link.active .faq-toc-num { color: #0D9488; }
  .faq-toc-link.dim { opacity: 0.35; }
  .faq-stand { margin: 20px 0 0; }
  .faq-col > .faq-group:first-child { margin-top: 0; }
  .faq-col > .faq-group:first-child .faq-group-title { padding-top: 12px; }
}

/* ---------- Gruppen ---------- */
.faq-group { margin-top: clamp(44px, 6vh, 64px); scroll-margin-top: 96px; }
.faq-col > .faq-group:first-child { margin-top: 0; }
.faq-group-title { margin: 0; padding-top: 24px; border-top: 1px solid var(--line-default); }
.faq-cards { list-style: none; margin: 20px 0 0; padding: 0; }

/* ---------- Karten (Accordion) ---------- */
.faq-card {
  background: var(--color-surface-card); /* warmes Weiß, nie #FFFFFF */
  border: 1px solid var(--line-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--motion-fast) var(--ease-out);
  scroll-margin-top: 96px; /* Deeplink landet unter der fixen Nav */
}
.faq-card + .faq-card { margin-top: 14px; }
.faq-card.open { border-color: var(--line-strong); }

.faq-h { margin: 0; }
.faq-toggle {
  display: flex; align-items: center; gap: 14px;
  width: 100%; box-sizing: border-box;
  padding: 18px 20px;
  background: none; border: none; text-align: left; cursor: pointer;
}
.faq-toggle:focus-visible { outline: 2px solid #0D9488; outline-offset: 2px; border-radius: var(--radius-lg); }
.faq-num {
  flex: none; width: 34px;
  font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.4;
  color: var(--fg-faint);
  transition: color var(--motion-fast) var(--ease-out);
}
.faq-card.open .faq-num { color: #0D9488; } /* der eine Teal-Akzent (Muster .station-num) */
.faq-q {
  flex: 1;
  font-family: var(--font-headline); font-weight: 600;
  font-size: clamp(19px, 0.55vw + 14px, 24px);
  line-height: 1.25; letter-spacing: -0.02em;
  color: #18273A;
}
.faq-chev {
  flex: none;
  stroke: currentColor; color: var(--fg-muted); /* neutral — Zustands-Signal ist die Rotation */
  transition: transform var(--motion-base) var(--ease-out);
}
.faq-card.open .faq-chev { transform: rotate(180deg); }

/* Antwort: immer im DOM (GEO), Kollaps rein über CSS-Grid + Opacity.
   visibility nimmt die Inline-Links geschlossener Karten aus der Tab-Order. */
.faq-a {
  display: grid; grid-template-rows: 0fr;
  opacity: 0; visibility: hidden;
  transition: grid-template-rows var(--motion-base) var(--ease-out),
              opacity var(--motion-base) var(--ease-out),
              visibility 0s linear var(--motion-base);
}
.faq-card.open .faq-a {
  grid-template-rows: 1fr;
  opacity: 1; visibility: visible;
  transition: grid-template-rows var(--motion-base) var(--ease-out),
              opacity var(--motion-base) var(--ease-out),
              visibility 0s;
}
.faq-a-in { overflow: hidden; min-height: 0; }
/* Ohne JS bleibt jede Antwort offen und lesbar (Seiten-Prinzip: ohne JS voll
   nutzbar). Mit JS setzt boot.js html.js vor dem ersten Paint, dann greift der
   normale Kollaps oben. */
html:not(.js) .faq-a { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
.faq-a-p {
  margin: 0; padding: 0 20px 20px 68px; /* Einzug: 20 Kopf + 34 Nummer + 14 gap */
  max-width: 44em;
  font-size: clamp(16px, 0.35vw + 12px, 19px);
  line-height: 1.7;
  color: rgba(24,39,58,0.78);
  text-wrap: pretty;
}

/* ---------- Null-Treffer-Karte (Conversion-Moment) ---------- */
.faq-empty {
  margin-top: clamp(44px, 6vh, 64px);
  background: var(--color-surface-card);
  border: 1px solid var(--line-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(24px, 4vw, 40px);
}
.faq-empty-h {
  margin: 0;
  font-family: var(--font-headline); font-weight: 600;
  font-size: clamp(20px, 0.9vw + 12px, 26px);
  line-height: 1.25; letter-spacing: -0.02em;
  color: #18273A;
}
.faq-empty-p {
  margin: 12px 0 0; max-width: 44em;
  font-size: clamp(15.5px, 0.3vw + 12px, 18px);
  line-height: 1.7; color: rgba(24,39,58,0.78);
  text-wrap: pretty;
}
.faq-empty-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 24px; }

/* ---------- Mitnahme-Karten im CTA (OnePager + Pitch) ----------
   site.css setzt .cta-content .cta-onepager ab 1100px auf Grid-Spalte 2;
   hier übernimmt der Wrapper .cta-cards diese Rolle, die Karten selbst
   werden zurückgesetzt (faq.css lädt nach site.css und gewinnt). */
.faq-cta .cta-eyebrow { margin: 0; } /* p-Eigenmarge raus, sonst starten die Karten 14px über der Textkante */
.cta-cards {
  margin-top: clamp(36px, 5vh, 52px);
  display: flex; flex-direction: column; gap: 18px;
  max-width: 560px;
}
.cta-cards .cta-onepager { margin-top: 0; }
@media (min-width: 1100px) {
  /* Karten beginnen oben bündig mit dem CTA-Text (Zeile 1 = Eyebrow),
     so bleibt die ganze Sektion innerhalb eines Bildschirms */
  .cta-content .cta-cards {
    grid-column: 2; grid-row: 1 / span 5;
    align-self: start;
    margin-top: 0;
  }
  .cta-content .cta-cards .cta-onepager { grid-column: auto; grid-row: auto; margin-top: 0; }
}
/* Deck-Cover ist 16:9. height:auto + aspect-ratio hält das Verhältnis an jeder
   Breite; die Basis-Klasse erzwingt mobil sonst 92x130 (Hochformat = verzerrt).
   object-fit:cover ist das Sicherheitsnetz gegen Stauchung. */
.cta-pitch-thumb { height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Mobil ---------- */
@media (max-width: 700px) {
  .faq-hero-inner { padding: calc(88px + env(safe-area-inset-top, 0px)) 20px 40px; }
  .faq-hero-h1 { margin-top: 22px; }
  .faq-suggest-sep { margin: 0 7px; }
  .faq-inner { padding: 40px 20px 64px; }
  .faq-stand { margin: 0 0 24px; }
  .faq-toggle { padding: 16px; gap: 10px; }
  .faq-num { width: 26px; font-size: 13.5px; }
  .faq-q { font-size: 17.5px; }
  .faq-a-p { padding: 0 16px 16px 16px; } /* Einzug entfällt, volle Lesebreite */
  .faq-card + .faq-card { margin-top: 12px; }
}
