/* ==========================================================================
   Incoming Sprachschule — Website-Prototyp
   Basis + Komponenten: Werte 1:1 aus dem Designsystem v1.1 (design-system.html).
   Prototyp-Ergänzungen (Kopf, Hero, Fortschritt, Akkordeon) am Ende —
   ausschließlich mit Tokens aus tokens.css, kein Hex, keine Zwischentöne.
   ========================================================================== */

/* ============================================================== BASIS === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--tinte);
  font-family: var(--text); font-size: var(--t-body); line-height: var(--lh-text);
}
:where(a) { color: inherit; }
:focus-visible { outline: 2px solid var(--tinte); outline-offset: 3px; border-radius: 2px; }

.bahn { max-width: var(--breite); margin-inline: auto; padding-inline: var(--s5); }

.d-xl {
  font-family: var(--display); font-variation-settings: "wdth" 118; font-weight: 700;
  font-size: var(--t-display-xl); line-height: 1.03; letter-spacing: -.03em; margin: 0;
}
.d-l {
  font-family: var(--display); font-variation-settings: "wdth" 112; font-weight: 600;
  font-size: var(--t-display); line-height: 1.08; letter-spacing: -.025em; margin: 0;
}
.d-m {
  font-family: var(--display); font-variation-settings: "wdth" 106; font-weight: 600;
  font-size: var(--t-h2); line-height: 1.2; letter-spacing: -.015em; margin: 0;
}
.marke {
  font-family: var(--daten); font-size: var(--t-label); font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase; color: var(--nebel); margin: 0 0 var(--s3);
}
.lauf { max-width: 62ch; margin: 0; }
.lauf--nebel { color: var(--nebel); }
.klein { font-size: var(--t-klein); }
.daten { font-family: var(--daten); font-size: var(--t-klein); font-variant-numeric: tabular-nums; }

.abschnitt { padding-block: var(--s9); border-bottom: 1px solid var(--linie); }
.abschnitt__kopf { margin-bottom: var(--s7); }
.abschnitt:last-of-type { border-bottom: 0; }

.gitter { display: grid; gap: var(--s5); }
@media (min-width: 760px) {
  .gitter--2 { grid-template-columns: repeat(2, 1fr); }
  .gitter--3 { grid-template-columns: repeat(3, 1fr); }
}

/* Nur für Screenreader — Text vorhanden, unsichtbar */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; margin: -1px;
}

/* ============================================================= LEITER === */
.leiter {
  display: flex; align-items: flex-end; gap: var(--s3);
  border-bottom: 1px solid var(--linie); padding-bottom: var(--s2);
}
.stufe {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--s2);
  background: none; border: 0; padding: 0 0 var(--s2); cursor: pointer;
  font-family: var(--daten); font-size: var(--t-klein); color: var(--nebel);
  transition: color var(--tempo) var(--kurve);
}
.stufe__balken {
  width: 100%; background: var(--linie); border-radius: 2px 2px 0 0;
  transition: background var(--tempo) var(--kurve);
}
.stufe[data-hoehe="1"] .stufe__balken { height: 26px; }
.stufe[data-hoehe="2"] .stufe__balken { height: 48px; }
.stufe[data-hoehe="3"] .stufe__balken { height: 74px; }
.stufe[data-hoehe="4"] .stufe__balken { height: 104px; }
.stufe:hover .stufe__balken { background: var(--nebel); }
.stufe[aria-pressed="true"] { color: var(--tinte); font-weight: 500; }
.stufe[aria-pressed="true"] .stufe__balken { background: var(--tinte); }
.leiter__fuss {
  display: flex; justify-content: space-between; gap: var(--s4);
  margin-top: var(--s3); color: var(--nebel); font-size: var(--t-klein); flex-wrap: wrap;
}

/* =========================================================== KNÖPFE ===== */
.knopf {
  display: inline-flex; align-items: center; gap: var(--s2); font: inherit; font-weight: 500;
  cursor: pointer; padding: var(--s3) var(--s5); border-radius: var(--r-pille);
  border: 1px solid var(--tinte); background: var(--tinte); color: var(--grund);
  text-decoration: none;
  transition: background var(--tempo) var(--kurve), color var(--tempo) var(--kurve), border-color var(--tempo) var(--kurve);
}
.knopf:hover { background: var(--artikel, var(--tinte)); border-color: var(--artikel, var(--tinte)); color: var(--grund); }
.knopf--zweit { background: transparent; color: var(--tinte); }
.knopf--zweit:hover { background: transparent; color: var(--artikel, var(--tinte)); }
.knopf--still { border-color: transparent; background: transparent; color: var(--nebel); padding-inline: var(--s2); }
.knopf--still:hover { background: transparent; color: var(--tinte); }
.knopf[disabled] { opacity: .45; cursor: not-allowed; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* ============================================================ KARTE ===== */
.karte {
  border: 1px solid var(--linie); border-top: 3px solid var(--artikel, var(--tinte));
  border-radius: var(--r-gross); padding: var(--s5); background: var(--grund); display: grid; gap: var(--s3);
}
.karte__kopf { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.marker {
  font-family: var(--daten); font-size: var(--t-label); letter-spacing: .09em;
  text-transform: uppercase; color: var(--artikel, var(--nebel)); font-weight: 500;
}
.plakette {
  font-family: var(--daten); font-size: var(--t-label); letter-spacing: .06em;
  padding: 2px var(--s2); border-radius: var(--r-pille);
  border: 1px solid var(--artikel, var(--linie)); color: var(--artikel, var(--nebel)); white-space: nowrap;
}
.karte__fakten { display: grid; gap: var(--s1); margin: 0; padding: 0; list-style: none; }
.karte__fakt {
  display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t-klein);
  border-bottom: 1px dotted var(--linie); padding-block: var(--s1);
}
.karte__wert { font-family: var(--daten); font-variant-numeric: tabular-nums; }
.traeger { font-size: var(--t-klein); color: var(--das); display: flex; gap: var(--s2); margin: 0; }
.traeger::before { content: "✓"; font-family: var(--daten); }

/* =========================================================== FORMULAR === */
.feld { display: grid; gap: var(--s2); margin-bottom: var(--s5); }
.feld__label { font-size: var(--t-klein); font-weight: 500; }
.feld__hilfe { font-size: var(--t-klein); color: var(--nebel); }
.feld__eingabe {
  font: inherit; font-size: var(--t-body); padding: var(--s3) var(--s4);
  border: 1px solid var(--linie); border-radius: var(--r-klein);
  background: var(--grund); color: var(--tinte); width: 100%;
  transition: border-color var(--tempo) var(--kurve);
}
.feld__eingabe:focus { border-color: var(--tinte); outline: 2px solid var(--tinte); outline-offset: 1px; }
.feld--fehler .feld__eingabe { border-color: var(--die); }
.feld__fehler { font-size: var(--t-klein); color: var(--die); display: flex; gap: var(--s2); }
.feld__fehler::before { content: "×"; font-family: var(--daten); }

/* ============================================================ HINWEIS === */
.hinweis {
  border: 1px solid var(--linie); border-left: 3px solid var(--artikel, var(--tinte));
  border-radius: var(--r-klein); padding: var(--s4); background: var(--artikel-flaeche, transparent);
}
.hinweis__titel { font-weight: 600; margin: 0 0 var(--s1); }
.hinweis__text { margin: 0; font-size: var(--t-klein); color: var(--nebel); }

.leer {
  border: 1px dashed var(--linie); border-radius: var(--r-gross);
  padding: var(--s7) var(--s5); text-align: center; display: grid; gap: var(--s4); justify-items: center;
}

/* ============================================================= TÜREN ==== */
.tuer {
  border: 1px solid var(--linie); border-radius: var(--r-gross); padding: var(--s6);
  display: grid; gap: var(--s3); align-content: start;
}
.tuer__titel { margin: 0; }

/* ==================================================== SYSTEMZUSTAND ===== */
/* Fallback „System gerade nicht erreichbar" — Teil des Systems, kein Randfall. */
.systemzustand {
  display: flex; align-items: flex-start; gap: var(--s4);
  border: 1px solid var(--linie); border-radius: var(--r-gross);
  padding: var(--s5); background: color-mix(in srgb, var(--linie) 18%, var(--grund));
}
.systemzustand__punkt {
  flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: var(--r-pille);
  background: var(--nebel);
}
.systemzustand--wartet .systemzustand__punkt { background: var(--die); }
.systemzustand--laeuft .systemzustand__punkt { background: var(--das); }
.systemzustand__inhalt { display: grid; gap: var(--s1); }
.systemzustand__titel { font-weight: 600; margin: 0; }
.systemzustand__text { margin: 0; font-size: var(--t-klein); color: var(--nebel); }
.systemzustand__meta { font-family: var(--daten); font-size: var(--t-label); color: var(--nebel); letter-spacing: .06em; }

/* ============================================================ TABELLE === */
.regeln { width: 100%; border-collapse: collapse; font-size: var(--t-klein); }
.regeln th {
  text-align: left; font-family: var(--daten); font-size: var(--t-label);
  letter-spacing: .09em; text-transform: uppercase; color: var(--nebel); font-weight: 500;
  padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--linie);
}
.regeln td { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--linie); vertical-align: top; }

/* ==========================================================================
   PROTOTYP-ERGÄNZUNGEN — nur Tokens, keine neuen Werte
   ========================================================================== */

/* --- Sprunglink (BFSG): sichtbar bei Fokus ------------------------------ */
.sprung {
  position: absolute; left: var(--s4); top: calc(-1 * var(--s9));
  z-index: 40; background: var(--tinte); color: var(--grund);
  padding: var(--s2) var(--s4); border-radius: var(--r-klein); text-decoration: none;
  transition: top var(--tempo) var(--kurve);
}
.sprung:focus-visible { top: var(--s4); }

/* --- Kopf: Logo links, Navigation rechts -------------------------------- */
.kopf { border-bottom: 1px solid var(--linie); background: var(--grund); position: sticky; top: 0; z-index: 20; }
.kopf__zeile { display: flex; align-items: center; gap: var(--s5); padding-block: var(--s3); flex-wrap: wrap; }
.kopf__marke { display: flex; align-items: center; gap: var(--s3); text-decoration: none; }
.kopf__marke img { height: 36px; width: auto; display: block; }
.kopf__name {
  font-family: var(--display); font-variation-settings: "wdth" 118; font-weight: 700;
  letter-spacing: -.02em; font-size: var(--t-body); color: var(--tinte);
}
.kopf__nav { margin-left: auto; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.kopf__nav a:not(.knopf) {
  font-size: var(--t-klein); color: var(--nebel); text-decoration: none;
  padding: var(--s2) var(--s3); border-radius: var(--r-klein);
  transition: color var(--tempo) var(--kurve);
}
.kopf__nav a:not(.knopf):hover { color: var(--tinte); }
.kopf__nav a[aria-current="page"] { color: var(--tinte); font-weight: 600; }
.kopf__aktion { margin-left: var(--s2); font-size: var(--t-klein); padding: var(--s2) var(--s4); }

/* --- Fuß: Leitsatz + rechtliche Seiten ----------------------------------- */
.fuss { border-top: 1px solid var(--linie); margin-top: var(--s9); }
.fuss__inhalt {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s5);
  flex-wrap: wrap; padding-block: var(--s7); color: var(--nebel); font-size: var(--t-klein);
}
.fuss__inhalt p { margin: 0; }
.fuss__nav { display: flex; gap: var(--s4); flex-wrap: wrap; }
.fuss__nav a { color: var(--nebel); text-decoration: none; }
.fuss__nav a:hover { color: var(--tinte); text-decoration: underline; text-decoration-color: var(--linie); }

/* --- Hero: Animation über ruhiger Video-Fläche --------------------------- */
.hero {
  position: relative; overflow: hidden; background: var(--grund);
  border-bottom: 1px solid var(--linie);
  min-height: 78vh; display: grid; place-items: center; padding: var(--s9) var(--s6);
}
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .18; /* Video tritt hinter den Grund zurück — Text bleibt ≥ 4.5:1 */
  pointer-events: none;
}
.hero__inhalt {
  position: relative; display: flex; flex-direction: column; align-items: center;
  gap: var(--s7); text-align: center;
}
.hero__buehne {
  min-height: calc(var(--t-display-xl) * 1.03);
  display: flex; align-items: center; justify-content: center;
}
.hero__wortgruppe {
  display: flex; align-items: baseline; gap: var(--s4);
  transition: transform var(--tempo) var(--kurve), opacity var(--tempo) var(--kurve);
}
.hero__wortgruppe[data-phase="raus"] { transform: translateX(calc(-1 * var(--s7))); opacity: 0; }
.hero__artikel {
  color: var(--artikel); opacity: 0; transform: translateX(calc(-1 * var(--s6)));
  transition: transform var(--tempo) var(--kurve), opacity var(--tempo) linear;
  will-change: transform;
}
.hero__wortgruppe[data-phase="artikel"] .hero__artikel,
.hero__wortgruppe[data-phase="raus"] .hero__artikel { opacity: 1; transform: translateX(0); }
.hero__wort { position: relative; display: inline-block; }
.hero__wort-grau {
  color: var(--nebel); display: inline-block; opacity: 0;
  transition: opacity var(--tempo) var(--kurve);
}
.hero__wortgruppe[data-phase="wort"] .hero__wort-grau,
.hero__wortgruppe[data-phase="artikel"] .hero__wort-grau,
.hero__wortgruppe[data-phase="raus"] .hero__wort-grau { opacity: 1; }
.hero__wort-farbe {
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none;
  color: var(--artikel); clip-path: inset(-14% 102% -14% -2%);
  transition: clip-path 320ms var(--kurve) var(--tempo);
}
.hero__wortgruppe[data-phase="artikel"] .hero__wort-farbe,
.hero__wortgruppe[data-phase="raus"] .hero__wort-farbe { clip-path: inset(-14% -6% -14% -2%); }
.hero__leitsatz {
  font-family: var(--text); font-size: var(--t-h2); line-height: var(--lh-text);
  color: var(--tinte); margin: 0; opacity: 0; transform: translateY(var(--s2));
  transition: opacity 320ms var(--kurve), transform 320ms var(--kurve);
}
.hero__leitsatz[data-da="true"] { opacity: 1; transform: translateY(0); }
.hero__statisch { display: none; flex-direction: column; align-items: center; gap: var(--s4); text-align: center; }
.hero__statisch p { margin: 0; }
.hero__statisch .hero__leitsatz-statisch {
  font-family: var(--text); font-size: var(--t-h2); line-height: var(--lh-text);
  color: var(--tinte); margin: var(--s4) 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
  .hero__buehne, .hero__leitsatz { display: none; }
  .hero__statisch { display: flex; }
}

/* --- Schritte (So läuft es ab) ------------------------------------------- */
.schritt { border: 1px solid var(--linie); border-radius: var(--r-gross); padding: var(--s6); display: grid; gap: var(--s3); align-content: start; }
.schritt__nummer { font-family: var(--daten); font-size: var(--t-klein); color: var(--nebel); font-variant-numeric: tabular-nums; }

/* --- Fortschritt (Einstufungstest) --------------------------------------- */
.fortschritt { display: grid; gap: var(--s2); margin-bottom: var(--s6); }
.fortschritt__text { font-family: var(--daten); font-size: var(--t-klein); color: var(--nebel); font-variant-numeric: tabular-nums; margin: 0; }
.fortschritt__bahn { height: 6px; border-radius: var(--r-pille); background: var(--linie); overflow: hidden; }
.fortschritt__stand { display: block; height: 100%; background: var(--tinte); border-radius: var(--r-pille); transition: width var(--tempo) var(--kurve); }

/* --- Antwort-Optionen (Einstufungstest) ----------------------------------- */
.wahl { display: grid; gap: var(--s2); }
.wahl__option {
  font: inherit; text-align: left; cursor: pointer;
  padding: var(--s3) var(--s4); border-radius: var(--r-klein);
  border: 1px solid var(--linie); background: var(--grund); color: var(--tinte);
  transition: border-color var(--tempo) var(--kurve), background var(--tempo) var(--kurve), color var(--tempo) var(--kurve);
}
.wahl__option:hover { border-color: var(--nebel); }
.wahl__option[aria-pressed="true"] { border-color: var(--tinte); background: var(--tinte); color: var(--grund); }

/* --- Akkordeon (FAQ) ------------------------------------------------------ */
.akkordeon { border: 1px solid var(--linie); border-radius: var(--r-gross); overflow: hidden; }
.akkordeon details { border-bottom: 1px solid var(--linie); }
.akkordeon details:last-child { border-bottom: 0; }
.akkordeon summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: baseline; gap: var(--s4); padding: var(--s4) var(--s5);
  font-weight: 500; transition: background var(--tempo) var(--kurve);
}
.akkordeon summary::-webkit-details-marker { display: none; }
.akkordeon summary::after { content: "+"; font-family: var(--daten); color: var(--nebel); }
.akkordeon details[open] summary::after { content: "−"; }
.akkordeon summary:hover { background: color-mix(in srgb, var(--linie) 18%, var(--grund)); }
.akkordeon__inhalt { padding: 0 var(--s5) var(--s5); font-size: var(--t-klein); color: var(--nebel); max-width: 70ch; }
.akkordeon__inhalt p { margin: 0; }

/* --- Kontingent-Balken (Träger-Dashboard-Vorschau) ------------------------ */
.balken { display: flex; height: 14px; border-radius: var(--r-pille); overflow: hidden; background: var(--linie); }
.balken__belegt { background: var(--tinte); }
.balken__reserviert { background: var(--nebel); }

/* --- Statuspunkt (Sync) ---------------------------------------------------- */
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-pille); background: var(--nebel); }
.punkt--ok { background: var(--das); }

/* --- Dashboard-Tabelle ----------------------------------------------------- */
.tabelle { border: 1px solid var(--linie); border-radius: var(--r-gross); overflow: hidden; }
.tabelle table { width: 100%; border-collapse: collapse; font-size: var(--t-klein); }
.tabelle th {
  text-align: left; font-family: var(--daten); font-size: var(--t-label);
  letter-spacing: .09em; text-transform: uppercase; color: var(--nebel); font-weight: 500;
  padding: var(--s3) var(--s4); border-bottom: 1px solid var(--linie);
  background: color-mix(in srgb, var(--linie) 26%, var(--grund));
}
.tabelle td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }

/* --- Sanfte Scroll-Reveals (eine Bewegung, ein Tempo) ---------------------- */
[data-zeig] { opacity: 0; transform: translateY(var(--s3)); transition: opacity 320ms var(--kurve), transform 320ms var(--kurve); }
[data-zeig].zeig--da { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-zeig] { opacity: 1; transform: none; transition: none; }
}

/* --- Kopf-Variante: Logo mittig, Navigation beidseitig -------------------- */
.kopf__mitte { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4); padding-block: var(--s3); }
.kopf__seite { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.kopf__seite--links { justify-content: flex-end; }
.kopf__seite--rechts { justify-content: flex-start; }
.kopf__seite a:not(.knopf) { font-size: var(--t-klein); color: var(--nebel); text-decoration: none; padding: var(--s2) var(--s3); border-radius: var(--r-klein); transition: color var(--tempo) var(--kurve); }
.kopf__seite a:not(.knopf):hover { color: var(--tinte); }
.kopf__seite a[aria-current="page"] { color: var(--tinte); font-weight: 600; }
.kopf__marke--mitte img { height: 56px; width: auto; }
@media (max-width: 760px) {
  .kopf__mitte { grid-template-columns: 1fr; justify-items: center; row-gap: var(--s2); }
  .kopf__seite--links, .kopf__seite--rechts { justify-content: center; }
}

/* --- Fotos (Website-Bilder, füllen sich automatisch) ---------------------- */
.foto { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-klein); display: block; }
.foto--breit { aspect-ratio: 21 / 9; border-radius: var(--r-gross); margin-top: var(--s6); }

/* --- Sprachwahl (DE · EN · FR, dezent im Kopf) ----------------------------- */
/* Segment-Pille: ruhiger Rahmen, aktive Sprache als gefüllte Kapsel
   (identischer Stil wie .sprachwahl in src/styles/site.css). */
.sprachwahl {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--linie); border-radius: var(--r-pille);
  padding: 2px; background: var(--grund);
}
.sprachwahl button {
  border: 0; background: none; cursor: pointer; color: var(--nebel);
  font: inherit; font-size: var(--t-klein); font-weight: 500;
  letter-spacing: .04em; line-height: 1;
  padding: var(--s2) var(--s3); border-radius: var(--r-pille);
  transition: color var(--tempo) var(--kurve), background-color var(--tempo) var(--kurve);
}
.sprachwahl button:hover {
  color: var(--tinte);
  background: color-mix(in srgb, var(--tinte) 6%, var(--grund));
}
.sprachwahl button[aria-current="true"] {
  background: var(--tinte); color: var(--grund); font-weight: 600;
}

