/* ════ Bühne — Szenen-Scrolling der Startseite (Richtung B „Erst formen. Dann zünden.“) ════
   Aufbau: .buehne ist so hoch wie die Zeitachse (in vh, von buehne.js gesetzt),
   .buehne__sticky bleibt als Vollbild stehen. Darin liegen je Station ein Video, das WebGL-Canvas
   (Standbilder + Brücken), Abdunklung, die Texte der sechs Stationen und die Bedienung.
   Farben und Schriften kommen aus styles.css (--bg, --accent, --display, --mono).
   Seit 17.10.2026 mit den Bausteinen aus dem SABESUS-Bau (Vorlader, Qualitäts-Abzeichen, Weiter-Knöpfe,
   Ladelinie, Notbremse), umgefärbt auf Signal-Orange: --b-hell und --b-tief sind die Lichttöne dazu. */

/* position:sticky klebt nur, wenn kein Vorfahre scrollt: overflow-x:hidden auf html/body
   (styles.css) macht body zum Scroll-Container. clip schneidet genauso ab, ohne das. */
html, body { overflow-x: clip; }

/* Auf der Seite mit Bühne schwebt die Navigation über dem Bild, statt Platz darüber zu belegen */
body.hat-buehne .nav { position: fixed; top: 0; left: 0; right: 0; }

/* Lichtfarben seitenweit (nicht nur in .buehne): Der Vorlader hängt direkt am <body>, außerhalb der Bühne – mit den Farben nur
   in .buehne fehlten ihm Füllung und Leuchtpunkt der Fortschrittslinie (Ferdinand 19.10.2026: „Preloader funktioniert nicht“) */
:root {
  --b-hell: #ff7a4f;                 /* helle Seite der Glut: Linien, Pfeile, Punkte */
  --b-tief: #b52a07;                 /* dunkle Seite: Anfang von Verläufen */
  --b-weiss: #fff0e8;                /* Glanzpunkt */
}
.buehne {
  /* linke Kante = Logo-Kante der Navigation (.container: höchstens 1480 px breit, mittig, Innenabstand --gutter) */
  --b-kante: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  position: relative;
  height: calc(var(--buehne-len, 1610) * 1vh);
  height: calc(var(--buehne-len, 1610) * 1svh);
  background: var(--bg);
}
.buehne__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--bg);
}
.buehne__video, .buehne__canvas, .buehne__fb {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
/* Je Clip-Station ein Video; sichtbar ist nur das der aktuellen Station (is-aktiv, von buehne.js gesetzt) */
/* opacity .99 statt 1 (17.10.2026, Ferdinand: „grauer Layer vor den Videos“): Mit voller Deckkraft und ohne Effekt darüber reicht
   Chrome unter Windows das Video als Overlay direkt an die Grafikkarte durch; manche Treiber setzen dabei den Farbbereich falsch
   um (Schwarz wird Grau). Vorher verhinderte das zufällig der Prototyp-Schalter mit backdrop-filter. Nicht auf 1 zurückstellen. */
.buehne__video { object-fit: cover; object-position: 50% 50%; background: var(--bg); visibility: hidden; opacity: .99; }
/* Dasselbe zweite Mittel, das im Prototyp zufällig wirkte (Schalter mit backdrop-filter über dem Video): ein winziges, unsichtbares
   Feld mit Unschärfe-Effekt über dem Video zwingt Chrome, das Video selbst zusammenzusetzen statt es der Grafikkarte als Overlay zu
   geben (dort wurde bei Ferdinand Schwarz zu Grau; opacity allein reichte nicht). 4 × 4 px unten rechts, nicht zu sehen. */
.buehne__sticky::before {
  content: ''; position: absolute; right: 0; bottom: 0; z-index: 3; width: 4px; height: 4px; pointer-events: none;
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}
.buehne__video.is-aktiv { visibility: visible; }
.buehne__canvas { opacity: 0; }
.buehne.is-canvas .buehne__canvas, .buehne.is-uebergabe .buehne__canvas { opacity: 1; }   /* Übergabe: Standbild liegt noch über dem schon sichtbaren Video */
.buehne.is-canvas .buehne__video, .buehne.is-canvas .buehne__video.is-aktiv { visibility: hidden; }

/* Ersatz ohne WebGL: zwei Bildebenen, die überblenden */
.buehne__fb { object-fit: cover; opacity: 0; display: none; }
.buehne.no-gl .buehne__fb { display: block; }
/* Die Bildebenen liegen über dem Video. Sichtbar nur, wo sonst die Zeichenfläche zu sehen wäre (Brücke, Standbild, Übergabe);
   vorher blieben sie nach dem ersten Übergang mit dem Standbild über dem laufenden Video liegen: Zeit lief, Bild stand
   (Ferdinand 01.12.2026, Firefox ohne WebGL am Laptop, alle drei Bühnen, auch die alte Scroll-Bühne) */
.buehne.no-gl:not(.is-canvas):not(.is-uebergabe) .buehne__fb { visibility: hidden; }
.buehne.no-gl .buehne__canvas { display: none; }

/* Abdunklung für Lesbarkeit: oben (Navigation), links (Text), unten */
.buehne__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(1,1,11,.62) 0%, rgba(1,1,11,0) 20%),
    linear-gradient(90deg, rgba(1,1,11,.72) 0%, rgba(1,1,11,.34) 36%, rgba(1,1,11,0) 62%),
    linear-gradient(0deg, rgba(1,1,11,.78) 0%, rgba(1,1,11,0) 34%);
}
/* weicher Übergang in den Seiteninhalt nach der Bühne */
.buehne::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
  background: linear-gradient(180deg, rgba(1,1,11,0), var(--bg));
  pointer-events: none;
}

/* ── Texte der Stationen ─────────────────────────────── */
.buehne__station {
  position: absolute;
  left: var(--b-kante);
  bottom: clamp(84px, 14vh, 160px);
  max-width: min(1100px, 90vw);
  opacity: var(--o, 0);
  transform: translate3d(0, calc((1 - var(--o, 0)) * 26px), 0);
  /* --o ist 0 oder 1 (buehne.js, Text folgt dem Film); die Überblendung läuft über eine feste Zeit, nie halb stehen bleibend */
  transition: opacity var(--o-dauer, .9s) cubic-bezier(.33, 0, .2, 1), transform var(--o-dauer, .9s) cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
  will-change: opacity, transform;
}
.buehne__station.is-live { pointer-events: auto; }
.buehne__eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500;
  color: var(--accent);
  text-shadow: 0 0 2px rgba(1,1,11,.9), 0 0 14px rgba(1,1,11,.85);   /* bleibt auch über hellen Bildstellen lesbar */
}
.buehne__eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--accent); flex: none; }
/* Finale: hinter der Überzeile leuchtet die Atmosphäre orange – Schrift weiß, der Strich bleibt orange (17.10.2026) */
.buehne__station--finale .buehne__eyebrow { color: var(--fg); }
.buehne__title {
  margin: 18px 0 0;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(40px, 6vw, 104px); line-height: .9; letter-spacing: -0.035em;
  color: var(--fg);
  text-shadow: 0 2px 28px rgba(1,1,11,.55);
  text-wrap: balance;
  hyphens: manual;   /* Trennstellen stehen als &shy; im HTML („Bestands-aufnahme“ passt am Handy sonst nicht in eine Zeile) */
}
.buehne__title em { font-style: normal; color: var(--accent); }
/* Auftakt: die große Zeile der bisherigen Startseite, „Turbo“ als Umrissschrift */
.buehne__station--auftakt { max-width: 92vw; }
/* Abstand nach oben relativ zur Schriftgröße: die Ü-Punkte von „ZÜNDE“ ragen über die Versalhöhe und lagen sonst
   in der Zeile „Zeilarn / Rottal-Inn — DE“ (Ferdinand 17.10.2026) */
.buehne__station--auftakt .buehne__title { font-size: clamp(60px, 10.4vw, 168px); line-height: .86; margin-top: .32em; }
.buehne__title .turbo { display: inline-block; color: transparent; -webkit-text-stroke: 2px var(--fg); }
.buehne__text {
  margin-top: 20px; max-width: 52ch;
  color: rgba(255,255,255,.78); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55;
}
.buehne__station--auftakt .buehne__text {
  max-width: 22ch;
  color: var(--fg); font-size: clamp(20px, 1.8vw, 28px); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em;
}
.buehne__cta { margin-top: 28px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.buehne__cta .mono-sm { color: rgba(255,255,255,.72); }

/* ── Stationspunkte rechts ───────────────────────────── */
.buehne__dots {
  position: absolute; right: clamp(16px, 2.2vw, 40px); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; align-items: flex-end;
}
.buehne__dots button {
  position: relative; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px;
  background: rgba(255,255,255,.34); cursor: pointer;
  transition: height .35s ease, background-color .35s ease;
}
.buehne__dots button::before { content: ''; position: absolute; inset: -8px; }   /* größere Trefferfläche */
.buehne__dots button.is-active { height: 28px; background: var(--accent); }
.buehne__dots button span {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.9); opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.buehne__dots button:hover span, .buehne__dots button:focus-visible span { opacity: 1; }
.buehne__dots button:focus-visible { outline: 2px solid var(--b-hell); outline-offset: 4px; }

/* ── Scroll-Hinweis, KI-Etikett ──────────────────────── */
.buehne__hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7);
  transition: opacity .4s ease;
}
.buehne__hint::after {
  content: ''; width: 1px; height: 34px;
  background: linear-gradient(180deg, var(--accent), rgba(254,61,17,0));
  animation: buehneHint 1.8s ease-in-out infinite;
}
.buehne.is-gescrollt .buehne__hint { opacity: 0; }
@keyframes buehneHint { 0% { transform: scaleY(.2); transform-origin: top; } 60% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(.2); transform-origin: bottom; } }
.buehne__ki {
  position: absolute; right: clamp(16px, 2.2vw, 40px); bottom: 22px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: rgba(255,255,255,.62);
}

/* ── Weiter-Knopf (erscheint mit dem Stationstext, buehne.js gleitet zur nächsten Station) ──
   Ein leiser Textknopf unter den Aktionen: Pfeil nach unten, Name der nächsten Station, darunter eine Haarlinie,
   über die sich beim Erscheinen von links die Glutlinie zieht; danach läuft in Abständen ein heller Funke über sie. */
.buehne__weiter {
  position: relative; margin-top: 28px;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 2px 13px 0; border: 0; background: none;
  color: rgba(255,255,255,.86); font-family: var(--mono); font-size: 12.5px; font-weight: 500; line-height: 1;
  letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: color .3s ease;
}
.buehne__cta + .buehne__weiter { margin-top: 18px; }
.buehne__weiter svg { width: 16px; height: 16px; flex: none; color: var(--b-hell); }
.buehne__weiter::before, .buehne__weiter::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
}
.buehne__weiter::before { background: rgba(255,255,255,.14); }
.buehne__weiter::after {
  background: linear-gradient(90deg, var(--b-tief), var(--b-hell) 55%, rgba(254,61,17,.5) 82%, rgba(254,61,17,0));
  transform: scaleX(0); transform-origin: left center;
}
.buehne__weiter-glanz {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none;
  background: radial-gradient(closest-side, var(--b-weiss), rgba(255,122,79,.6) 45%, rgba(255,122,79,0)) no-repeat;
  background-size: 34px 3px; background-position: -40px 0; opacity: 0;
}
.buehne__station.is-live .buehne__weiter::after { animation: weiterLinie .9s cubic-bezier(.65,0,.35,1) .35s forwards; }
.buehne__station.is-live .buehne__weiter-glanz { animation: weiterGlanz 3.6s ease-in-out 1.5s infinite; }
.buehne__station.is-live .buehne__weiter svg { animation: weiterNicken 2.4s ease-in-out 1.4s infinite; }
@keyframes weiterLinie { to { transform: scaleX(1); } }
@keyframes weiterGlanz { 0% { background-position: -40px 0; opacity: 1; } 34% { background-position: calc(100% + 40px) 0; opacity: 1; } 35%, 100% { background-position: calc(100% + 40px) 0; opacity: 0; } }
@keyframes weiterNicken { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 3px; } }
.buehne__weiter:hover { color: #fff; }
.buehne__weiter:hover .buehne__weiter-glanz { animation-duration: 1.8s; }
.buehne__weiter:focus-visible { outline: 2px solid var(--b-hell); outline-offset: 4px; border-radius: 2px; }

/* ── Qualitäts-Abzeichen unten links (buehne.js baut es), Auswahl klappt nach oben auf ── */
.buehne__qualitaet { position: absolute; z-index: 5; left: var(--b-kante); bottom: 18px; }
.buehne__qknopf {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 12px 8px 11px; border-radius: 99px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(1,1,11,.5); color: rgba(255,255,255,.74); cursor: pointer;
  font-family: var(--mono); font-size: 11px; line-height: 1; letter-spacing: .1em; text-transform: uppercase;
  transition: border-color .3s ease, color .3s ease;
}
.buehne__qknopf:hover, .buehne__qualitaet.ist-offen .buehne__qknopf { border-color: rgba(254,61,17,.6); color: #fff; }
.buehne__qknopf:focus-visible { outline: 2px solid var(--b-hell); outline-offset: 3px; }
.buehne__qpunkt { width: 6px; height: 6px; border-radius: 99px; background: var(--accent); flex: none; }
.buehne__qknopf.ist-reduziert .buehne__qpunkt { background: transparent; box-shadow: inset 0 0 0 1px var(--accent); }
.buehne__qpfeil { width: 12px; height: 12px; flex: none; margin-left: -2px; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.buehne__qualitaet.ist-offen .buehne__qpfeil { transform: rotate(180deg); }
.buehne__qwahl {
  position: absolute; left: 0; bottom: calc(100% + 10px);
  width: min(320px, calc(100vw - 40px));
  padding: 18px 18px 8px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
  animation: qwahlAuf .35s cubic-bezier(.16,1,.3,1);
}
.buehne__qwahl::before {
  content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(254,61,17,.5) 38%, rgba(254,61,17,0) 88%);
}
.buehne__qwahl[hidden] { display: none; }
@keyframes qwahlAuf { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
.buehne__qtitel { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.buehne__qgrund { margin: 8px 0 14px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.72); }
.buehne__qgrund strong { font-weight: 600; color: #fff; }
.buehne__qliste { display: grid; border-top: 1px solid rgba(255,255,255,.08); }
.buehne__qliste button {
  position: relative; display: grid; gap: 3px; width: 100%; text-align: left;
  padding: 12px 0 12px 22px; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); background: none; cursor: pointer;
  font-family: var(--display); font-size: 15px; color: rgba(255,255,255,.86);
  transition: color .25s ease;
}
.buehne__qliste button:last-child { border-bottom: 0; }
.buehne__qliste button span { font-size: 13px; color: rgba(255,255,255,.55); }
.buehne__qliste button::before {
  content: ''; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.buehne__qliste button[aria-pressed="true"]::before { background: var(--accent); box-shadow: inset 0 0 0 1px var(--b-hell); }
.buehne__qliste button:hover { color: #fff; }
.buehne__qliste button:focus-visible { outline: 2px solid var(--b-hell); outline-offset: 2px; border-radius: 2px; }

/* ── Hinweis bei automatischer Umstellung (oben mittig unter der Navigation, verschwindet nach 6,5 s) ── */
.buehne__hinweis {
  position: absolute; z-index: 6; left: 50%; top: 112px; margin: 0;
  width: max-content; max-width: min(480px, calc(100vw - 40px));
  padding: 12px 18px; border-radius: var(--radius);
  background: rgba(14,14,24,.94); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.86); text-align: center; text-wrap: balance;
  opacity: 0; transform: translate3d(-50%, -8px, 0); pointer-events: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.16,1,.3,1);
}
.buehne__hinweis.ist-da { opacity: 1; transform: translate3d(-50%, 0, 0); }

/* ── Notbremse oder gesperrtes Autoplay: Knopf „Filme abspielen“ (nur sichtbar mit .ist-gebremst / .ist-gesperrt) ──
   Ohne Weichzeichner (er erscheint gerade auf Geräten, denen das Video schon zu viel ist). */
.buehne__filme {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: none; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(1,1,11,.6); color: #fff; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.buehne__filme svg { width: 12px; height: 12px; color: var(--accent); flex: none; }
.buehne__filme:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.buehne__filme:hover svg { color: var(--bg); }
.buehne__filme:focus-visible { outline: 2px solid var(--b-hell); outline-offset: 3px; }
.buehne.ist-gebremst .buehne__filme, .buehne.ist-gesperrt .buehne__filme { display: inline-flex; }
.buehne.ist-gebremst .buehne__hint, .buehne.ist-gesperrt .buehne__hint { display: none; }

/* ── Leichter Modus (schwache Geräte, buehne.js setzt .ist-leicht): keine teuren Schatten über dem Video ── */
.buehne.ist-leicht .buehne__title, .buehne.ist-leicht .buehne__eyebrow { text-shadow: none; }

/* ── Ladelinie an einer Station: Clip noch nicht ganz geladen, das erste Bild steht ──
   erscheint erst nach 0,5 s (kurze Wartezeiten bleiben unsichtbar) */
.buehne__sticky::after {
  content: ''; position: absolute; left: 50%; bottom: 74px; width: 140px; height: 1px; margin-left: -70px;
  background: linear-gradient(90deg, rgba(254,61,17,0), var(--b-hell) 50%, rgba(254,61,17,0)) no-repeat;
  background-size: 40% 100%;
  opacity: 0; transition: opacity .4s ease 0s; pointer-events: none;
}
.buehne.is-laedt .buehne__sticky::after { opacity: 1; transition-delay: .5s; animation: buehneLaedt 1.4s ease-in-out infinite; }
@keyframes buehneLaedt { 0% { background-position: -60% 0; } 100% { background-position: 160% 0; } }

/* ── Vorlader: Logo, Glutlinie als Fortschritt, Prozent, Qualitätszeile (buehne.js baut ihn bei jedem Aufruf) ── */
html.is-vorladen { overflow: hidden; }
.vorlader {
  position: fixed; inset: 0; z-index: 10001;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity 1.2s cubic-bezier(.16,1,.3,1), visibility 1.2s;
}
.vorlader.is-weg { opacity: 0; visibility: hidden; }
.vorlader__innen { display: grid; justify-items: center; gap: 34px; animation: vorladerAuf 1.2s cubic-bezier(.16,1,.3,1) both; }
@keyframes vorladerAuf { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
.vorlader.is-weg .vorlader__innen { transform: scale(.98); transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.vorlader__logo { width: clamp(170px, 20vw, 240px); height: auto; display: block; }
.vorlader__linie { --breite: min(260px, 62vw); position: relative; width: var(--breite); height: 1px; background: rgba(255,255,255,.1); }
.vorlader__linie::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(181,42,7,.5), var(--accent) 70%, var(--b-hell));
  transform: scaleX(var(--p, 0)); transform-origin: left center;
}
.vorlader__linie::after {
  content: ''; position: absolute; top: 50%; left: 0;
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 99px;
  background: var(--b-weiss); box-shadow: 0 0 6px 1px var(--b-hell), 0 0 24px 6px rgba(254,61,17,.45);
  transform: translateX(calc(var(--p, 0) * var(--breite)));
}
.vorlader__zahl {
  margin: 0; display: flex; gap: 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55);
}
.vorlader__prozent { min-width: 5ch; text-align: right; letter-spacing: .06em; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.vorlader__info {
  margin: -14px 0 0; max-width: 32ch; min-height: 1.5em; text-align: center;
  font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.55); text-wrap: balance;
}
.vorlader__info strong { font-weight: 600; color: rgba(255,255,255,.85); }

/* ── Kapitel-Bühne (seit 18.11.2026, buehne.js KAP): ein Bildschirm hoch, läuft von selbst, Kapitelleiste unten ──
   Leiste an --b-kante (Logo-Kante links, rechts gespiegelt), Farben Glut (--b-hell/--b-tief), drei Spalten: Qualitäts-Abzeichen,
   sechs Kapitel (Name + Lichtlinie, die sich mit der Verweildauer füllt), Pfeile und Pause. Kein Scroll-Hinweis, keine
   Stationspunkte rechts. ?scroll zeigt die alte Scroll-Bühne (ohne .ist-kapitel). */
.buehne.ist-kapitel { height: 100vh; height: 100svh; }
.buehne.ist-kapitel .buehne__dots, .buehne.ist-kapitel .buehne__hint { display: none; }
.buehne.ist-kapitel .buehne__sticky { touch-action: pan-y; }
/* Übergang in den Seiteninhalt: Der Verlauf von .buehne::after läge bei einer Bildschirmhöhe dauerhaft über der Leiste und
   dunkelte sie ab. Bei der Kapitel-Bühne liegt er in der Abdunklung, also unter Text und Leiste. */
.buehne.ist-kapitel::after { display: none; }
.buehne.ist-kapitel .buehne__scrim::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 150px;
  background: linear-gradient(180deg, rgba(1,1,11,0), var(--bg));
}
.buehne__kapitel {
  position: absolute; z-index: 5;
  left: var(--b-kante); right: var(--b-kante); bottom: 16px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: clamp(18px, 2.6vw, 48px);
}
.buehne__kapitel .buehne__qualitaet { position: relative; left: auto; bottom: auto; }
.buehne__kapitel .buehne__qknopf { min-height: 44px; padding-inline: 15px 14px; }   /* Tippfläche 44 px wie die Pfeile */
.buehne__kliste { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); }
.buehne__kap {
  position: relative; display: grid; gap: 9px; align-content: end;
  min-height: 46px; padding: 8px 0 10px; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 0; box-shadow: none; font: inherit;   /* styles.css gibt Knöpfen sonst Fläche und Rahmen */
  color: rgba(255,255,255,.66); transition: color .3s ease;
}
.buehne__kname {
  font-family: var(--mono); font-size: 12px; line-height: 1.1; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.buehne__klinie { position: relative; display: block; height: 2px; border-radius: 2px; background: rgba(255,255,255,.24); overflow: hidden; transition: background-color .3s ease; }
.buehne__klinie i {
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--b-tief), var(--b-hell));
  transform: scaleX(0); transform-origin: left center;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.buehne__kap.ist-gesehen { color: rgba(255,255,255,.8); }
.buehne__kap.ist-gesehen .buehne__klinie i { transform: scaleX(1); }
.buehne__kap.ist-aktiv { color: #fff; }
.buehne__kap.ist-aktiv .buehne__kname { font-weight: 500; }
.buehne__kap.ist-aktiv .buehne__klinie i { transition: none; }      /* buehne.js setzt die Füllung je Bild */
.buehne__kap:hover { color: #fff; }
.buehne__kap:hover .buehne__klinie { background: rgba(255,255,255,.3); }
.buehne__kap:focus-visible { outline: 2px solid var(--b-hell); outline-offset: 3px; border-radius: 2px; }
.buehne__ktasten { display: flex; gap: 8px; }
.buehne__ktaste {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.16); background: rgba(1,1,11,.45); color: rgba(255,255,255,.86);
  transition: border-color .3s ease, color .3s ease, background-color .3s ease, opacity .3s ease;
}
.buehne__ktaste svg { width: 16px; height: 16px; }
.buehne__ktaste:hover:not(:disabled) { border-color: rgba(255,122,79,.55); color: #fff; }
.buehne__ktaste:focus-visible { outline: 2px solid var(--b-hell); outline-offset: 3px; }
.buehne__ktaste:disabled { opacity: .32; cursor: default; }
.buehne__kspiel { display: none; color: var(--b-hell); }
.buehne.ist-pausiert .buehne__kpause { display: none; }
.buehne.ist-pausiert .buehne__kspiel { display: block; }
.buehne.ist-pausiert .buehne__ktaste[data-k="pause"] { border-color: rgba(255,122,79,.55); }
/* Text und Hinweise über der Leiste */
.buehne.ist-kapitel .buehne__station { bottom: clamp(96px, 15vh, 170px); }
.buehne.ist-kapitel .buehne__ki { bottom: 84px; right: var(--b-kante); }
.buehne.ist-kapitel .buehne__filme { left: auto; right: var(--b-kante); bottom: 118px; transform: none; }
.buehne.ist-kapitel .buehne__sticky::after { bottom: 86px; }                     /* Ladelinie über der Leiste */
/* Tablet und Handy quer: Kapitel ohne Namen (zu schmal), nur Lichtlinien mit voller Tippfläche */
@media (max-width: 1023px) {
  .buehne__kname { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .buehne__kap { min-height: 44px; padding: 21px 0; }
}

/* ── Seite, solange die Bühne im Bild ist ────────────── */
/* Navigation durchsichtig statt dunkler Balken */
body.buehne-on .nav {
  background: linear-gradient(180deg, rgba(1,1,11,.82), rgba(1,1,11,0)) no-repeat;   /* no-repeat: sonst kachelt der Verlauf in die 1px-Randlinie */
  backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent;
}
/* Die feste Leiste „Projekt starten“ am Handy würde die Texte der Bühne verdecken */
body.buehne-on .mobile-cta { transform: translateY(110%) !important; pointer-events: none !important; }

/* ── Schmal (Handy hochkant) ─────────────────────────── */
@media (max-width: 720px) {
  /* Rand = Logo-Kante: --b-kante rechnet mit --gutter (am Handy 14–32 px), der frühere feste Wert 20 px lag 2–7 px daneben (18.11.2026) */
  .buehne__station { left: var(--b-kante); right: var(--b-kante); bottom: 96px; max-width: none; }
  /* Hinweisfenster offen (consent.js setzt --cc-hoehe): Text rückt darüber und gleitet nach dem Schließen zurück */
  .buehne__station { transition: opacity var(--o-dauer, .9s) cubic-bezier(.33, 0, .2, 1), transform var(--o-dauer, .9s) cubic-bezier(.16, 1, .3, 1), bottom .6s cubic-bezier(.16, 1, .3, 1); }
  html.show--consent .buehne__station { bottom: max(96px, calc(var(--cc-hoehe, 0px) + 18px)); }
  .buehne__title { font-size: clamp(32px, 9.4vw, 52px); }
  .buehne__station--auftakt .buehne__title { font-size: clamp(54px, 17vw, 96px); }
  .buehne__title .turbo { -webkit-text-stroke-width: 1.5px; }
  .buehne__text { font-size: 15px; }
  .buehne__station--auftakt .buehne__text { font-size: 19px; }
  .buehne__scrim {
    background:
      linear-gradient(180deg, rgba(1,1,11,.62) 0%, rgba(1,1,11,0) 18%),
      linear-gradient(0deg, rgba(1,1,11,.92) 0%, rgba(1,1,11,.6) 36%, rgba(1,1,11,0) 64%);
  }
  .buehne__dots { right: 12px; gap: 12px; }
  .buehne__dots button span { display: none; }
  .buehne__hint { bottom: 18px; }
  .buehne__ki { right: 12px; bottom: 12px; }
  .buehne__qualitaet { left: var(--b-kante); bottom: 10px; }
  .buehne__hinweis { top: 84px; }
  .buehne__filme { left: auto; right: 12px; bottom: 42px; transform: none; padding: 11px 16px; }   /* über dem KI-Etikett, frei vom Stationstext */
  .buehne__weiter { margin-top: 22px; font-size: 12px; }
  .buehne__cta + .buehne__weiter { margin-top: 14px; }
}

/* ── Kapitel-Bühne am Handy hochkant: Leiste zweizeilig (oben die sechs Lichtlinien über die ganze Breite, darunter
   Abzeichen links und Pfeile/Pause rechts), Text darüber, KI-Etikett oben rechts unter der Navigation ── */
@media (max-width: 720px) {
  .buehne__kapitel {
    left: var(--b-kante); right: var(--b-kante); bottom: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "liste liste liste" "q . tasten";
    column-gap: 12px; row-gap: 2px;
  }
  .buehne__kliste { grid-area: liste; gap: 6px; }
  .buehne__kapitel .buehne__qualitaet { grid-area: q; }
  .buehne__ktasten { grid-area: tasten; gap: 6px; }
  .buehne.ist-kapitel .buehne__station { bottom: 112px; }
  html.show--consent .buehne.ist-kapitel .buehne__station { bottom: max(112px, calc(var(--cc-hoehe, 0px) + 18px)); }
  .buehne.ist-kapitel .buehne__ki { top: 86px; bottom: auto; right: var(--b-kante); }
  .buehne.ist-kapitel .buehne__filme { top: 116px; bottom: auto; right: var(--b-kante); }
  .buehne.ist-kapitel .buehne__sticky::after { bottom: 104px; }
}
/* Schmale Handys: Linien enger (Tippfläche bleibt 44 px breit); unter 300 px nur noch Anzeige, Blättern über Pfeile/Wischen */
@media (max-width: 359px) { .buehne__kliste { gap: 2px; } }
@media (max-width: 300px) { .buehne__kap { pointer-events: none; } }
/* Kurze Handys (z. B. 320 × 568): Weiter-Knopf im Text weglassen, die Leiste darunter übernimmt das Blättern; Text etwas
   kompakter, sonst reicht das Finale (Überzeile zweizeilig, zwei Knöpfe untereinander) unter die Navigation */
@media (max-width: 720px) and (max-height: 700px) {
  .buehne.ist-kapitel .buehne__weiter { display: none; }
  .buehne.ist-kapitel .buehne__cta { margin-top: 16px; gap: 10px; }
  .buehne.ist-kapitel .buehne__title { font-size: clamp(27px, 8.4vw, 52px); word-spacing: .08em; }
  .buehne.ist-kapitel .buehne__text { margin-top: 12px; font-size: 14px; line-height: 1.5; }
}

/* ── Kapitel-Bühne bei Handys quer und anderen niedrigen Querformaten (bis 500 px hoch, Ferdinand-Regel 15) ──
   Navigation, Text und Leiste rücken zusammen: Leiste einzeilig auch unter 720 px Breite, Text kleiner, Weiter-Knopf weg
   (die Leiste blättert), KI-Etikett oben rechts unter dem Menü-Knopf. Sonst rutschte der Auftakt unter die Navigation. */
@media (max-height: 500px) and (orientation: landscape) {
  .buehne__kapitel {
    left: var(--b-kante); right: var(--b-kante); bottom: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "q liste tasten"; gap: 16px;
  }
  .buehne__kliste { gap: 6px; }
  .buehne.ist-kapitel .buehne__station { left: var(--b-kante); right: auto; bottom: 68px; max-width: min(720px, 70vw); }
  .buehne.ist-kapitel .buehne__eyebrow { font-size: 11px; }
  .buehne.ist-kapitel .buehne__logo { height: 26px; margin-top: 10px; }
  .buehne.ist-kapitel .buehne__title, .buehne.ist-kapitel .buehne__station--auftakt .buehne__title { margin-top: 10px; font-size: clamp(24px, 7.4vh, 34px); }
  .buehne.ist-kapitel .buehne__text { margin-top: 8px; max-width: 64ch; font-size: 14px; line-height: 1.5; }
  .buehne.ist-kapitel .buehne__cta { margin-top: 12px; gap: 12px; }
  .buehne.ist-kapitel .buehne__cta .btn { padding-top: 14px; padding-bottom: 14px; }   /* 44 px Tippfläche */
  .buehne.ist-kapitel .buehne__weiter { display: none; }
  .buehne.ist-kapitel .buehne__ki { top: 78px; bottom: auto; right: var(--b-kante); }   /* unter dem Menü-Knopf, frei vom Text */
  .buehne.ist-kapitel .buehne__filme { top: 50%; bottom: auto; right: var(--b-kante); transform: translateY(-50%); }
  .buehne.ist-kapitel .buehne__sticky::after { bottom: 62px; }
  html.show--consent .buehne.ist-kapitel .buehne__station { bottom: 68px; }
}
/* Handy quer unter 720 px Breite: Knopf und Kapsel des Finales in einer Zeile */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 720px) {
  .buehne.ist-kapitel .buehne__station { max-width: 76vw; }
}
