/* =============================================================
   Justus John — „Die Übersetzungsmaschine"
   Design system + Startseite + Akt 1
   Ästhetik: Papierweiß, Tinte, ein Terrakotta-Akzent — wie die
   technischen Zeichnungen eines Architekturbüros.
   ============================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
/* KEIN overflow-x auf html: zusammen mit dem Overlay-Freeze
   (body.step-open overflow hidden) springt die Scroll-Position sonst
   auf 0 — horizontal clippt bereits body { overflow-x: clip } */
html { -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; } /* schlägt eigene display-Regeln (z.B. .cform) */
::selection { background: rgba(181,71,11,.22); }

/* Erste Ansicht bis zum Boot verstecken — die Intro-Animation baut Nav und
   Hero selbst auf; ohne das blitzt die statische Seite vorher kurz auf.
   Klasse kommt aus dem Inline-Script im <head> (vor dem ersten Paint),
   boot() in main.js entfernt sie. visibility statt display, damit
   SplitType beim Boot korrekte Maße misst. */
html.preboot .mainnav,
html.preboot .hero__inner,
html.preboot .scrollcue { visibility: hidden; }

/* ---------- Design tokens ---------- */
:root {
  /* eine Akzentfarbe, sparsam eingesetzt (Terrakotta) + Tinte + Ocker
     für Datenvisualisierung — Rest ist Papier und Schwarz */
  --accent:   #b5470b;
  --ink:      #161513;
  --ochre:    #a3780a;
  /* Alt-Aliase (werden von wenigen Regeln noch referenziert) */
  --red:    var(--accent);
  --orange: var(--accent);
  --gold:   var(--ochre);
  --brand-gradient: var(--accent);
  --brand-gradient-soft: var(--accent);

  /* surfaces (warmes Papierweiß) */
  --bg:        #faf9f7;
  --bg-2:      #f4f2ee;
  --panel:     #ffffff;
  --panel-2:   #f6f4f0;
  --line:      rgba(22, 21, 19, .16);
  --line-2:    rgba(22, 21, 19, .09);

  /* text */
  --fg:        #161513;
  --fg-dim:    #44413c;
  --muted:     #6f6a62;
  --muted-2:   #9b958c;

  /* code syntax — zurückhaltend, wie gedruckte Spezifikation */
  --tok-comment: #9b958c;
  --tok-kw:      #b5470b;
  --tok-fn:      #161513;
  --tok-str:     #5f7036;
  --tok-num:     #6d5a8e;
  --tok-var:     #2e2c28;
  --tok-punc:    #8d867c;
  --tok-op:      #b5470b;

  /* type */
  --font-plain: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --radius: 16px;

  /* navigation (Haupt-Nav + andockende Sub-Nav) */
  --nav-h: 58px;      /* Höhe der Haupt-Nav */
  --nav-top: 14px;    /* Abstand vom oberen Rand */
  --nav-w: 1080px;    /* gemeinsame Breite beider Leisten */
  --nav-glass: rgba(250, 249, 247, .72);
  --nav-glass-border: rgba(22, 21, 19, .12);
}

/* ---------- Base ---------- */
html { scroll-behavior: auto; scrollbar-width: none; } /* Firefox: Leiste aus */
/* native Scrollleiste ausblenden — die obere Fortschrittslinie ersetzt sie */
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: clip; /* clip (nicht hidden) — bricht position:sticky nicht */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { position: relative; z-index: 1; }

/* ---------- Code token colors ---------- */
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-kw   { color: var(--tok-kw); }
.tok-fn   { color: var(--tok-fn); }
.tok-str  { color: var(--tok-str); }
.tok-num  { color: var(--tok-num); }
.tok-var  { color: var(--tok-var); }
.tok-punc { color: var(--tok-punc); }
.tok-op   { color: var(--tok-op); }

/* ===================== Cinematic overlays =====================
   Auf Papierweiß entfallen Grain, Vignette und Glow — die Fläche
   bleibt ruhig und sauber. */
.grain, .vignette, .glow { display: none; }

/* scroll progress — Tintenlinie ganz oben, wächst von links nach rechts
   (ersetzt die native Scrollleiste) */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; pointer-events: none;
  background: var(--line-2);
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--ink);
}

/* „Weiterscrollen"-Hinweis (nach Menü-Sprung auf eine Leistung oder „So läuft's").
   Minimal-editorial: Kapitälchen-Label + dünne Terrakotta-Linie, die nach unten
   läuft. Nutzt dieselben Keyframes wie der Hero-Scroll-Cue. */
.scrollhint {
  position: fixed; left: 50%; bottom: clamp(24px, 5.5vh, 52px);
  transform: translateX(-50%) translateY(12px); z-index: 95; pointer-events: none;
  display: inline-flex; flex-direction: column; align-items: center; gap: 13px;
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  opacity: 0; visibility: hidden;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), visibility .6s;
}
.scrollhint.is-shown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.scrollhint__label { text-indent: .18em; animation: cue-breathe 2.6s ease-in-out infinite; }
.scrollhint__line {
  width: 1px; height: 44px; transform-origin: top;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: cue-run 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .scrollhint__label, .scrollhint__line { animation: none; }
  .scrollhint { transition: opacity .25s ease, visibility .25s; }
}

/* ===================== Navigation: frei schwebend =====================
   Kein Container, keine Pill: Wortmarke links, [menü] rechts, dazwischen
   ein Kommentar mit dem aktuellen Abschnitt. Das Vollbild-Menü
   (Dateibaum) ist die eigentliche Navigation. */

/* Brand — nur der Name, gesetzt in der Serifen */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__text { font-family: var(--font-plain); font-size: 22px; letter-spacing: .01em; line-height: 1; color: var(--fg); }

.mainnav {
  position: fixed; inset: var(--nav-top) 0 auto 0; z-index: 80;
  padding: 0 clamp(20px, 4vw, 48px); pointer-events: none;
}
/* weicher Verlauf nach unten statt Container — hält die Zeile über bewegtem Inhalt lesbar */
.mainnav::before {
  content: ''; position: absolute; left: 0; right: 0;
  top: calc(-1 * var(--nav-top)); height: calc(var(--nav-top) + var(--nav-h) + 42px);
  background: linear-gradient(to bottom, rgba(250,249,247,.92) 0%, rgba(250,249,247,.5) 55%, transparent 100%);
  pointer-events: none;
}
.mainnav__inner {
  position: relative; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
  /* nur echte Elemente fangen Klicks — die leere Leisten-Fläche lässt
     durch (z.B. zur Zündschnur, die bei flachen Fenstern darunter hängt) */
  pointer-events: none;
}
.mainnav__inner a, .mainnav__inner button, .mainnav__lang { pointer-events: auto; }
/* Anker-Sprünge nicht unter der Leiste landen lassen */
.akt, .refs, .game, #kontakt { scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 20px); }

/* Sektions-Anzeige in der Mitte — kleine Kapitälchen-Zeile */
.mainnav__crumb {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; white-space: nowrap;
  color: var(--muted);
  opacity: 0; transition: opacity .35s ease;
}
.mainnav__crumb.has { opacity: 1; }

/* DE/EN-Umschalter — teilt sich die Mitte mit dem Breadcrumb: sichtbar
   nur ganz oben (dort ist der Crumb noch leer), verschwindet beim
   Scrollen (Klasse setzt buildNav) */
.mainnav__lang {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  transition: opacity .35s ease;
}
.mainnav__lang .is-on { color: var(--fg); }
.mainnav__lang a { color: var(--muted-2); padding: 6px 2px; transition: color .25s ease; }
.mainnav__lang a:hover { color: var(--fg); }
/* Trennpunkt immer ZWISCHEN den beiden (das zweite Element trägt ihn —
   welche Sprache Link und welche aktiv ist, wechselt je Seite) */
.mainnav__lang > :last-child::before { content: '·'; margin-right: 12px; color: var(--muted-2); }
.mainnav__lang.is-hidden { opacity: 0; pointer-events: none; }

.mainnav__right { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); }
/* CTA als schlichter Textlink — der echte CTA ist das Finale */
.mainnav__cta {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500; letter-spacing: .01em;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color .25s ease, color .25s ease;
}
.mainnav__cta:hover { border-color: var(--fg); }
.mainnav__menu {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500; letter-spacing: .01em;
  color: var(--muted); padding: 6px 0;
  transition: color .25s ease;
}
.mainnav__menu:hover { color: var(--fg); }

/* ---- Vollbild-Menü: das Inhaltsverzeichnis der Seite ---- */
.navmenu {
  position: fixed; inset: 0; z-index: 75;
  display: grid; align-content: center; justify-content: center;
  padding: calc(var(--nav-top) + var(--nav-h) + 24px) 24px 40px;
  background: rgba(250,249,247,.94);
  backdrop-filter: blur(22px) saturate(1.05); -webkit-backdrop-filter: blur(22px) saturate(1.05);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s var(--ease-out), visibility .35s;
}
.navmenu.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
body.menu-open { overflow: hidden; }
.navmenu__tree { display: grid; gap: 2px; font-family: var(--font-sans); }
.navmenu__dir {
  font-size: 12.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px; padding-left: 12px;
}
.navmenu__tree a {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px; border-radius: 10px;
  font-family: var(--font-plain);
  font-size: clamp(22px, 2.8vw, 30px); color: var(--fg-dim);
  transition: color .25s ease, background .25s ease;
}
.navmenu__tree a:hover, .navmenu__tree a:active { background: rgba(22,21,19,.04); color: var(--fg); }
.navmenu__child { padding-left: 12px !important; }
.navmenu__ln {
  flex: none; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  color: var(--muted-2); letter-spacing: .08em;
}
.navmenu__tree a.is-active { color: var(--fg); }
.navmenu__tree a.is-active .navmenu__ln { color: var(--accent); }
.navmenu__item { margin-top: 2px; }
.navmenu__cta { margin-top: 26px; color: var(--accent) !important; }
.navmenu__cta:hover { background: none !important; }
/* sanftes Nachrücken der Einträge beim Öffnen */
.navmenu__tree > * { opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .4s var(--ease-out); }
.navmenu.is-open .navmenu__tree > * { opacity: 1; transform: translateY(0); }
.navmenu.is-open .navmenu__tree > *:nth-child(2) { transition-delay: .03s; }
.navmenu.is-open .navmenu__tree > *:nth-child(3) { transition-delay: .06s; }
.navmenu.is-open .navmenu__tree > *:nth-child(4) { transition-delay: .09s; }
.navmenu.is-open .navmenu__tree > *:nth-child(5) { transition-delay: .12s; }
.navmenu.is-open .navmenu__tree > *:nth-child(6) { transition-delay: .15s; }
.navmenu.is-open .navmenu__tree > *:nth-child(7) { transition-delay: .18s; }
.navmenu.is-open .navmenu__tree > *:nth-child(8) { transition-delay: .21s; }
.navmenu.is-open .navmenu__tree > *:nth-child(9) { transition-delay: .24s; }

/* Crumb bleibt auf allen Breiten sichtbar (Orientierung „01 · …");
   auf Schmalem kleiner und notfalls mit Ellipse gekappt */
@media (max-width: 900px) {
  .mainnav__crumb {
    font-size: 11px; letter-spacing: .16em;
    max-width: 38vw; overflow: hidden; text-overflow: ellipsis;
  }
}
@media (max-width: 600px) {
  :root { --nav-h: 52px; --nav-top: 10px; }
  .brand__text { font-size: 16px; }
  .mainnav__cta { display: none; }
  .mainnav__crumb { font-size: 10px; max-width: 48vw; }
}

/* ===================== Sprachbanner ===================== */
/* Dezente Papier-Glas-Pille unten mittig — nur für Erstbesucher, deren
   Browsersprache nicht zur Seite passt (buildLangbar zeigt/versteckt) */
.langbar {
  position: fixed; left: 50%; bottom: max(18px, 3vh); transform: translateX(-50%);
  width: max-content;
  z-index: 85;
  display: flex; align-items: center; gap: 14px;
  max-width: min(92vw, 480px);
  padding: 10px 12px 10px 18px;
  background: rgba(250,249,247,.92);
  backdrop-filter: blur(16px) saturate(1.05); -webkit-backdrop-filter: blur(16px) saturate(1.05);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px -22px rgba(22,21,19,.35);
  opacity: 0; translate: 0 10px;
  transition: opacity .5s var(--ease-out), translate .5s var(--ease-out);
}
.langbar.is-on { opacity: 1; translate: 0 0; }
.langbar__txt { font-family: var(--font-sans); font-size: 13.5px; color: var(--fg-dim); }
.langbar__go {
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  color: var(--accent); white-space: nowrap;
  border-bottom: 1px solid rgba(181,71,11,.4); padding-bottom: 1px;
  transition: border-color .25s ease;
}
.langbar__go:hover { border-color: var(--accent); }
.langbar__close {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  font-size: 19px; line-height: 1; color: var(--muted);
  transition: color .25s ease, background .25s ease;
}
.langbar__close:hover { color: var(--fg); background: rgba(22,21,19,.05); }
@media (max-width: 480px) { .langbar__txt { font-size: 12.5px; } .langbar { gap: 10px; } }
/* Banner und Scrollcue teilen sich die untere Mitte des Heros —
   solange das Banner steht, weicht der Cue (buildLangbar setzt die Klasse) */
body.langbar-open .scrollcue { opacity: 0 !important; pointer-events: none; transition: opacity .4s ease; }

/* ===================== Zündschnur + Story-Overlay ===================== */
/* Die Schnur hängt vom oberen Rand, sichtbar nur am Finale (buildFuse
   toggelt .is-on). Ziehen = kleine Physik am Button, der Funke läuft
   die Schnur hoch (.is-lit), dann öffnet das Overlay. */
.fuse {
  /* Desktop: zwischen Breadcrumb (Mitte) und „Menü" (rechts) */
  position: fixed; top: 0; right: clamp(96px, 30vw, 440px); z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .5s ease;
}
@media (max-width: 720px) { .fuse { right: 28px; } }
.fuse.is-on { opacity: 1; pointer-events: auto; }
.fuse.is-hidden, body.menu-open .fuse { opacity: 0; pointer-events: none; }
.fuse__pull {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 16px 10px; cursor: grab; touch-action: none;
  transition: transform .55s cubic-bezier(.2, 1.8, .3, 1);
  animation: fuse-sway 6s ease-in-out infinite;
  transform-origin: top center;
}
.fuse__pull:hover, .fuse__pull:focus-visible { animation-play-state: paused; }
.fuse__pull.is-drag { transition: none; animation: none; cursor: grabbing; }
@keyframes fuse-sway { 0%, 100% { rotate: .8deg; } 50% { rotate: -.8deg; } }
.fuse__cord {
  position: relative; width: 1px; height: clamp(84px, 14vh, 140px);
  background: linear-gradient(to bottom, transparent, var(--line) 16%, rgba(22,21,19,.45));
}
.fuse__spark {
  position: absolute; left: 50%; bottom: -2px;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 9px 2px rgba(181,71,11,.55);
  opacity: 0;
}
.fuse.is-lit .fuse__spark { animation: fuse-burn .5s ease-in forwards; }
@keyframes fuse-burn { 0% { opacity: 1; bottom: -2px; } 100% { opacity: 1; bottom: 100%; } }
.fuse__weight {
  width: 9px; height: 13px;
  border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  background: var(--ink); transition: background .3s ease;
}
.fuse__pull:hover .fuse__weight { background: var(--accent); }
.fuse__label {
  margin-top: 9px;
  font-family: var(--font-sans); font-size: 10px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap;
}

/* Overlay: dieselbe Papier-Glas-Vokabel wie das Vollbild-Menü */
.step {
  position: fixed; inset: 0; z-index: 96;
  background: rgba(250,249,247,.96);
  backdrop-filter: blur(18px) saturate(1.05); -webkit-backdrop-filter: blur(18px) saturate(1.05);
  overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--nav-top) + var(--nav-h) + 5vh) 6vw 12vh;
}
body.step-open { overflow: hidden; }
.step__inner { max-width: 600px; margin: 0 auto; }
.step__pre {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.step__h {
  margin: 14px 0 30px;
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; letter-spacing: -.01em;
  color: var(--fg);
}
/* das „Zünden": die Headline glimmt beim Öffnen kurz terrakotta nach */
.step:not([hidden]) .step__h { animation: step-glow 1.5s ease-out; }
@keyframes step-glow {
  0% { color: var(--accent); text-shadow: 0 0 24px rgba(181,71,11,.35); }
  100% { color: var(--fg); text-shadow: none; }
}
.step p {
  margin: 0 0 18px; max-width: 60ch;
  font-family: var(--font-sans); font-size: 15.5px; line-height: 1.75;
  color: var(--fg-dim);
}
.step:not([hidden]) .step__inner > * { animation: step-in .7s var(--ease-out) backwards; }
.step:not([hidden]) .step__inner > *:nth-child(2) { animation-delay: .06s; }
.step:not([hidden]) .step__inner > *:nth-child(3) { animation-delay: .16s; }
.step:not([hidden]) .step__inner > *:nth-child(4) { animation-delay: .24s; }
.step:not([hidden]) .step__inner > *:nth-child(5) { animation-delay: .32s; }
.step:not([hidden]) .step__inner > *:nth-child(6) { animation-delay: .40s; }
.step:not([hidden]) .step__inner > *:nth-child(7) { animation-delay: .48s; }
.step:not([hidden]) .step__inner > *:nth-child(8) { animation-delay: .56s; }
@keyframes step-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.step__cta { margin-top: 30px; font-size: 15.5px; }
.step__cta button {
  font-family: var(--font-plain); font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  color: var(--accent); border-bottom: 1px solid rgba(181,71,11,.4);
  padding-bottom: 2px; transition: border-color .25s ease;
}
.step__cta button:hover { border-color: var(--accent); }
.step__close {
  position: fixed; top: calc(var(--nav-top) + 6px); right: clamp(20px, 4vw, 48px);
  z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  font-size: 26px; line-height: 1; color: var(--fg-dim);
  transition: color .25s ease, background .25s ease;
}
.step__close:hover { color: var(--fg); background: rgba(22,21,19,.05); }

/* ===================== Shared: caret ===================== */
.caret, .request__caret {
  display: inline-block;
  width: .58ch; height: 1.05em;
  background: var(--accent);
  border-radius: 1px;
  transform: translateY(.14em);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

/* ===================== STARTSEITE / HERO ===================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12vh 6vw;
  text-align: center;
}
.hero__inner { max-width: min(92vw, 46rem); }
.hero__plain {
  font-family: var(--font-plain);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.6vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--fg);
}
/* SplitType emits <span> nodes — force inline-block so transforms apply.
   nowrap on words prevents ugly mid-word breaks. */
.hero__plain .char { display: inline-block; will-change: transform, opacity; }
.hero__plain .word { display: inline-block; white-space: nowrap; }
.hero__code {
  margin-top: clamp(18px, 3vw, 30px);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  letter-spacing: -.01em;
  /* die GANZE Zeile ist ein Kommentar (alles ab //) — einheitlich kursiv
     und grau, nur dunkler als --tok-comment, sonst zu schwach im Hero.
     Nicht aufhellen: braucht ≥4.5:1 auf --bg (WCAG AA, hier 4.8:1) */
  color: #746e63; font-style: italic;
  display: inline-flex; align-items: baseline; gap: .1ch;
}
.hero__code .tok-comment { margin-right: .4ch; color: inherit; }
.hero__typed { white-space: pre; }
/* Klartext-Unterzeile unter dem Claim: erklärt in einem Satz, was es hier
   geschäftlich gibt — erscheint erst nach dem Tippen (buildHero) */
.hero__sub {
  margin: clamp(64px, 13vh, 124px) auto 0;
  max-width: 36em;
  font-family: var(--font-sans); font-size: clamp(13.5px, 1.5vw, 15px);
  line-height: 1.65; color: var(--muted);
  opacity: 0; /* JS */
}
body.reduced .hero__sub { opacity: 1; }

/* scroll cue — thematic, pulsing */
.scrollcue {
  position: absolute; left: 50%; bottom: clamp(26px, 5vh, 54px); transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  /* bewusst eine Stufe leiser als die Sektions-Labels: der Hinweis ist das
     unwichtigste Element im Hero und darf nicht die lauteste Stimme sein */
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  opacity: 0; /* revealed by JS */
}
.scrollcue__glyph { text-indent: .18em; animation: cue-breathe 2.6s ease-in-out infinite; white-space: nowrap; }
.scrollcue__line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(22,21,19,.7), transparent);
  animation: cue-run 2.6s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue-breathe {
  0%,100% { opacity: .55; transform: translateY(0); }
  50%     { opacity: 1;   transform: translateY(3px); }
}
@keyframes cue-run {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(10px); opacity: 0; }
}

/* ===================== AKT (shared) ===================== */
.akt { position: relative; }
.akt__index {
  position: absolute; top: 0; left: clamp(16px, 2.4vw, 34px);
  z-index: 5; padding-top: clamp(80px, 12vh, 120px);
  display: flex; align-items: baseline; gap: 12px; pointer-events: none;
}
.akt__no {
  font-family: var(--font-sans); font-weight: 600; font-size: 13px; letter-spacing: .1em;
  color: var(--accent);
}
.akt__label {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted-2);
}

/* ---- shared pinned stage (all acts) ---- */
.akt__pin { height: 100svh; overflow: hidden; }
.stage {
  position: relative; height: 100%; width: 100%;
  display: grid; place-items: center;
  perspective: 1100px;
  padding: 0 6vw;
}
/* every phase layer occupies the same centred cell */
.stage > * {
  grid-area: 1 / 1;
  width: 100%; max-width: 760px;
  justify-self: center;
}

/* ---- Phase 1 · Request ---- */
.request {
  position: relative;
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .1em;
  text-align: center;
  transform-style: preserve-3d;
}
.request__mark {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--accent);
  align-self: center;
}
.request__text {
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(2rem, 6.2vw, 4.4rem);
  line-height: 1.05; letter-spacing: -.01em;
  color: var(--fg);
  transform-style: preserve-3d;
}
.request__text .word { display: inline-block; }
.request__text .char {
  display: inline-block;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.request__caret {
  position: absolute; top: 0; left: 0;
  align-self: auto;
  height: 1.05em; width: .5ch;
  transform: translate(0, 0);
}
.caret.is-hidden, .request__caret.is-hidden { animation: none; opacity: 0; }

/* ---- Phase 3 · Editor ---- */
.editor {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 30px 80px -36px rgba(22,21,19,.28);
  overflow: hidden;
  opacity: 0; /* JS controls */
}
.editor__chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(22,21,19,.12); }
.editor__tab {
  margin-left: 10px; font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim);
  padding: 3px 10px; border-radius: 7px; background: rgba(22,21,19,.05);
}
.editor__status {
  margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em;
  color: var(--muted); opacity: .9;
}
.editor__body { padding: 20px clamp(16px, 3vw, 28px) 24px; overflow: auto; }
.code {
  font-family: var(--font-mono);
  font-size: clamp(12.5px, 1.6vw, 15px);
  line-height: 1.85;
  color: var(--tok-var);
  white-space: pre;
  counter-reset: none;
}
.code .ln {
  display: block; position: relative; padding-left: 3ch;
  will-change: transform, opacity;
}
.code .ln::before {
  content: attr(data-ln);
  position: absolute; left: 0; width: 2ch; text-align: right;
  color: var(--muted-2); opacity: .55; font-size: .82em;
}

/* ===================== AKT 1 ===================== */

/* Stapelreihenfolge auf der Bühne: die fliegenden Buchstaben (chatmsg)
   müssen ÜBER dem Editor liegen, damit sie sichtbar hineinfliegen. */
.akt1__pin .chatmsg   { z-index: 5; pointer-events: none; }
/* Nachricht oben, Editor darunter — so fliegen die Buchstaben sichtbar
   von der Nachricht hinunter in den Code */
.akt1__pin .chatmsg   { align-self: start; margin-top: calc(var(--nav-top) + var(--nav-h) + 4svh); }
/* pointer-events none auch hier: der Editor ist reine Kulisse, und sein
   scrollbarer __body fing sonst Touch-Wischer ab (Seite scrollte nicht
   weiter, sobald der Finger über dem Editor lag — auch unsichtbar) */
.akt1__pin .editor    { z-index: 2; align-self: end; margin-bottom: 5svh; pointer-events: none; }
.akt1__pin .browser-wrap { z-index: 3; }
.akt1__pin .browser   { pointer-events: none; }
/* Desktop: die Wrapper reichen die Bühnenbreite nur durch (der innere
   Site-Inhalt ist absolut positioniert — ohne width: 100% kollabierte
   der Browser auf die Breite seiner Chrome-Zeile) */
/* Produkt-Shot auf ALLEN Breiten: der Browser rendert immer im festen
   1020×660-Desktop-Layout; der Wrapper nimmt im Layout exakt die SKALIERTE
   Größe ein, -scale spannt darin die Referenzfläche auf und skaliert von
   oben links. --bs setzt sizeBrowserScale() in buildAkt1 (Desktop-Kappe,
   mobil 94vw; CSS-Fallback: 1, im 720er-Block .36). Die transform von
   .browser selbst gehört GSAP — deshalb liegt die Skalierung am Wrapper. */
.browser-wrap {
  position: relative;
  width: calc(1020px * var(--bs, 1));
  height: calc(660px * var(--bs, 1));
  max-width: none; /* .stage > * kappt Kinder sonst bei 760px */
}
.browser-scale {
  position: absolute; top: 0; left: 0;
  width: 1020px; height: 660px;
  transform: scale(var(--bs, 1));
  transform-origin: top left;
}
.browser { margin: 0 auto; }
.akt1__pin .stichwort { z-index: 6; }

/* ---- Phase 1 · Die Kundennachricht ---- */
.chatmsg {
  max-width: 640px !important;
  display: flex; flex-direction: column; gap: 10px;
}
.chatmsg__head {
  display: flex; align-items: center; gap: 10px;
  padding-left: 4px;
}
.chatmsg__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: #faf9f7;
  background: var(--ink);
}
.chatmsg__who { font-size: 13.5px; font-weight: 600; color: var(--fg-dim); }
.chatmsg__who em { font-style: normal; font-weight: 400; color: var(--muted); }
.chatmsg__time { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-2); }
.chatmsg__bubble {
  position: relative;
  padding: clamp(20px, 3vw, 30px) clamp(22px, 3.4vw, 34px);
  transform-style: preserve-3d;
}
/* Der Bubble-Hintergrund ist eine eigene Schicht — sie löst sich auf,
   während die Buchstaben (Kinder von h2) weiterfliegen. */
.chatmsg__bubblebg {
  position: absolute; inset: 0; z-index: -1;
  border-radius: 22px; border-top-left-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -30px rgba(22,21,19,.3);
}
.chatmsg__bubblebg::before {
  content: ''; position: absolute; left: -7px; top: 14px;
  width: 14px; height: 14px;
  background: inherit; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transform: rotate(45deg); border-radius: 0 0 0 4px;
}
.chatmsg .request__text {
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(1.7rem, 4.4vw, 3.1rem);
  line-height: 1.12; letter-spacing: -.01em;
  color: var(--fg); text-align: left;
  transform-style: preserve-3d;
}
.chatmsg .request__text .word { display: inline-block; white-space: nowrap; }
.chatmsg .request__text .char {
  display: inline-block;
  transform-style: preserve-3d; backface-visibility: hidden;
  will-change: transform, opacity;
}
.chatmsg .request__caret { position: absolute; top: 0; left: 0; height: 1.05em; width: .5ch; }
.chatmsg__state {
  align-self: flex-end; padding-right: 6px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-2);
  opacity: 0; transform: translateY(4px);
  transition: opacity .5s ease, transform .5s var(--ease-out);
}
.chatmsg__state.is-on { opacity: 1; transform: none; color: var(--accent); }

/* ---- Phase 2 · Landepositionen im Code ---- */
.land-word { display: inline; }
.landc { display: inline; will-change: opacity; }

/* Editor-Status: „schreibt …" → „live" (zwei Schichten, Crossfade) */
.editor__status { position: relative; }
.editor__status .st-b {
  position: absolute; right: 0; top: 0; white-space: nowrap;
  color: #188038; opacity: 0;
}

/* ---- Phase 3 · Browser: die Website in der Website ---- */
.browser {
  width: 1020px;
  max-width: none !important;
  height: 660px;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 40px 110px -40px rgba(22,21,19,.35);
  overflow: hidden;
  opacity: 0; /* JS controls */
}
.browser__chrome {
  flex: none;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
}
.browser__url {
  margin: 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .01em;
  color: var(--fg-dim);
  padding: 5px 16px; border-radius: 8px;
  background: rgba(22,21,19,.05);
}
.browser__url svg { color: #188038; flex: none; }
.browser__viewport { flex: 1; min-height: 0; position: relative; }

/* Die innere Website — Theme über Custom Properties. Beim Scrubben
   interpoliert JS die Variablen stufenlos mit dem Sonnenaufgang im
   Video (.site--scrub); .site--light ist der fertige Endzustand
   (Reduced Motion). */
.site {
  --s-bg:     #20262c;               /* Nacht, blaugrau wie im Video */
  --s-fg:     #eae6de;
  --s-muted:  #98a0a8;
  --s-line:   rgba(255,255,255,.11);
  --s-card:   #272e35;
  --s-accent: #e2a94e;               /* warmes Fensterlicht */
  --s-hero-fg: #f1ede4;
  --s-lamp:   #4a5057;
  --s-lampglow: rgba(240,180,41,0);
  /* Schatten wandern mit dem Sonnenstand: nachts weich/ambient,
     am Morgen lang und warm aus Richtung der tiefen Sonne */
  --s-card-shadow: 0px 18px 44px -26px rgba(8,10,14,.62);
  --s-title-shadow: 0px 0px 0px rgba(122,92,40,0);
  --mt: 0; /* Montage-Fortschritt (Phase D.2): steuert die Bauplan-Umrisse */
  position: relative; /* Anker für die schwebende Pill */
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--s-bg); color: var(--s-fg);
  font-family: var(--font-sans);
  transition: background-color .65s ease, color .65s ease;
}
.site--light {
  --s-bg:     #f1ece3;               /* helles Morgenlicht */
  --s-fg:     #2c2721;
  --s-muted:  #8e8578;
  --s-line:   rgba(44,39,33,.14);
  --s-card:   #faf6ee;
  --s-accent: #b07a1c;
  --s-hero-fg: #332b1f;
  --s-lamp:   #f0b429;
  --s-lampglow: rgba(240,180,41,.8);
  --s-card-shadow: -26px 34px 44px -26px rgba(122,92,40,.38);
  --s-title-shadow: -12px 16px 22px rgba(122,92,40,.3);
}
/* JS treibt die Variablen pro Frame — CSS-Transitions würden dem
   Scroll nur hinterherschmieren */
.site--scrub, .site--scrub * { transition-duration: 0s !important; }
/* schwebende Glas-Pill — floated über dem Inhalt, theme-adaptiv (liest
   sich in Nacht wie Morgen). Wird beim inneren Scrollen kräftiger. */
/* Die Pill ist KONSTANT Tinte-Glas (kein --s-*): beim Sonnenaufgang
   kreuzen sich sonst Text- und Glas-Helligkeit in der Mitte (beide
   grau → unlesbar). Konstant dunkel liest sich in jeder Tageszeit
   und entspricht der Tinte-Button-Sprache der Hauptseite. */
.site__pill {
  position: absolute; z-index: 4; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(8px, 1.6vw, 18px);
  max-width: calc(100% - 28px);
  padding: 7px 7px 7px 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 15px;
  /* gläsern: wenig Deckkraft, dafür kräftiger Blur + Lichtkante oben —
     der starke Blur trägt die Lesbarkeit, nicht die Füllfarbe */
  background: rgba(24,27,32,.52);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 8px 24px -12px rgba(10,12,16,.5);
  transition: background-color .5s var(--ease-out), box-shadow .5s var(--ease-out),
              border-color .5s var(--ease-out);
}
.site.is-scrolled .site__pill {
  background: rgba(23,26,31,.66);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 12px 30px -12px rgba(10,12,16,.6);
}
.site__brand { font-family: var(--font-plain); font-size: 16px; letter-spacing: .01em; color: var(--s-fg); white-space: nowrap; transition: color .65s ease; }
.site__pill .site__brand { color: #f2efe9; }
.site__links { display: flex; gap: 2px; }
.site__links span {
  padding: 7px 11px; border-radius: 10px;
  font-size: 13px; color: #c0c5cb; white-space: nowrap;
  transition: background-color .3s ease;
}
.site__links span.on { color: #f2efe9; background: rgba(255,255,255,.12); }
.site__cta {
  display: inline-flex; align-items: center; padding: 8px 15px;
  border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: #f2efe9; color: #22252a;
}
.site__body { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.site__scroll {
  position: absolute; left: 0; right: 0; top: 0;
  will-change: transform;
}

/* schmaler Banner-Header. Das Video (1280×720) wird auf ein
   21:9+-Fenster beschnitten: rechts fällt der Rand mit dem
   Gemini-Wasserzeichen (ab x≈1140) weg, oben etwas Himmel —
   width >100% + negativer top-Versatz wählen den Bildausschnitt. */
.site__hero { position: relative; overflow: hidden; aspect-ratio: 2.9 / 1; }
/* Fassaden-Platte: Video+Scrim fliegen bei der Montage als Einheit ein */
.site__heroslab { position: absolute; inset: 0; will-change: transform; }
.site__video {
  position: absolute; left: 0; top: -56%;
  width: 112.8%; height: auto;
}
/* Scrim: dunkler Verlauf unten, damit die helle Headline über dem Video
   in JEDER Tageszeit lesbar bleibt (Text bleibt konstant hell) */
.site__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(12,14,18,.62) 0%, rgba(12,14,18,.28) 26%, transparent 58%);
}
.site__hero-copy {
  position: absolute; left: 5.5%; right: 5.5%; bottom: 9%;
  display: flex; flex-direction: column; gap: 8px;
  color: #f6f3ee; /* konstant hell — liegt immer auf dem Scrim */
  text-shadow: 0 1px 18px rgba(0,0,0,.35);
}
.site__hero-copy .site__kicker { color: #f6f3ee; }
.site__kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  opacity: .78;
}
.site__title {
  font-family: var(--font-plain); font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.08; letter-spacing: -.01em;
}

/* Platzhalter-Inhalt */
.site__section { padding: clamp(36px, 5vw, 60px) 5.5%; border-bottom: 1px solid var(--s-line); transition: border-color .65s ease; }
.site__section .site__kicker { color: var(--s-accent); opacity: 1; transition: color .65s ease; }
.site__h {
  margin-top: 12px;
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(24px, 3.4vw, 38px); line-height: 1.14; letter-spacing: -.01em;
  text-shadow: var(--s-title-shadow);
}
.site__text {
  margin-top: 16px; max-width: 46ch;
  font-size: 13.5px; line-height: 1.65; color: var(--s-muted);
  transition: color .65s ease;
}
/* Kennzahlen als Maßketten: Dimension-Linie mit Endticks über jeder Zahl,
   wie in einer technischen Zeichnung */
.site__stats { margin-top: 30px; display: flex; gap: clamp(20px, 4.5vw, 52px); }
.stat { position: relative; display: flex; flex-direction: column; gap: 5px; padding-top: 13px; min-width: 86px; }
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 7px;
  --tick: color-mix(in srgb, var(--s-accent) 72%, transparent);
  border-top: 1px solid var(--tick);
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 1px 7px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right top / 1px 7px no-repeat;
}
.stat__n {
  font-family: var(--font-plain); font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stat__l {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--s-muted); transition: color .65s ease; white-space: nowrap;
}
/* Galerie: füllt beim Andocken den Viewport, Karten scrollen horizontal
   (Track wird per Timeline in X verschoben) */
.site__gallery {
  padding: clamp(28px, 4.5vw, 52px) 0 clamp(28px, 4.5vw, 52px) 5.5%;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  border-bottom: 1px solid var(--s-line); transition: border-color .65s ease;
}
.site__gallery-head { display: flex; align-items: baseline; gap: 14px; padding-right: 5.5%; }
.site__gallery-head .site__kicker { color: var(--s-accent); opacity: 1; }
.site__gallery-hint {
  margin-left: auto; font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em;
  color: var(--s-muted); transition: color .65s ease;
}
/* Padding + negative Margins: die Karten-Schatten bekommen Luft im
   Clip-Bereich (overflow schneidet erst an der Padding-Kante), ohne
   dass sich das Layout verschiebt — sonst harte Schattenkante */
.hscroll { overflow: hidden; perspective: 820px; padding: 44px 0 58px; margin: -44px 0 -58px; }
.hscroll__track {
  display: flex; gap: 16px; width: max-content; padding-right: 5.5%;
  will-change: transform; transform-style: preserve-3d;
}
.scard {
  flex: none; width: clamp(180px, 26vw, 240px);
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px; border-radius: 14px;
  background: var(--s-card); border: 1px solid var(--s-line);
  transform-style: preserve-3d; backface-visibility: hidden;
  box-shadow: var(--s-card-shadow);
  transition: background-color .65s ease, border-color .65s ease;
}
.scard__img { aspect-ratio: 4 / 3; border-radius: 9px; margin-bottom: 8px; background: #2a2f35 center / cover no-repeat; }
.si-a { background-image: url(../assets/stadthaus.webp); }
.si-b { background-image: url(../assets/quartier.webp); }
.si-c { background-image: url(../assets/buero.webp); }
.si-d { background-image: url(../assets/halle.webp); background-position: center 42%; }
.si-e { background-image: url(../assets/campus.webp); }
.scard__t { font-size: 13.5px; font-weight: 600; }
.scard__m { font-size: 12.5px; color: var(--s-muted); transition: color .65s ease; }

/* ---- Zeitstrahl-Lineal unter der Galerie: Index + Jahresmarken,
   Fortschritt und aktive Marke folgen dem horizontalen Scroll ---- */
.gtl { display: flex; align-items: center; gap: 18px; padding: 0 5.5% 16px 0; }
.gtl__idx {
  flex: none; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em;
  font-variant-numeric: tabular-nums; color: var(--s-muted); transition: color .65s ease;
}
.gtl__ruler {
  position: relative; flex: 1; height: 1px; background: var(--s-line);
  display: flex; justify-content: space-between;
}
.gtl__fill { position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--s-accent); }
.gtl__tick { position: relative; top: -3px; width: 1px; height: 7px; background: color-mix(in srgb, var(--s-fg) 34%, transparent); }
.gtl__tick.on { background: var(--s-accent); }
.gtl__tick::after {
  content: attr(data-y);
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--s-muted); transition: color .65s ease;
}
.gtl__tick:first-child::after { left: 0; transform: none; }
.gtl__tick:last-child::after { left: auto; right: 0; transform: none; }
.site__footer {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 22px 5.5% 26px;
}
.site__brand--sm { font-size: 14px; }
.site__copy { font-size: 12.5px; color: var(--s-muted); transition: color .65s ease; }

/* ---- Phase D.2 · Montage bei Nacht: die Seite wird sichtbar gebaut.
   Blueprint-Raster + Chip + Maß-Tags sind eigene Elemente (Opacity
   per Timeline); die gestrichelten Bauplan-Umrisse an Fassade und
   Galerie hängen an --mt (JS-getrieben, voll reversierbar). ---- */
.site__xgrid {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0; pointer-events: none;
  background:
    linear-gradient(color-mix(in srgb, var(--s-fg) 7%, transparent) 1px, transparent 1px) 0 0 / 100% 26px,
    linear-gradient(90deg, color-mix(in srgb, var(--s-fg) 7%, transparent) 1px, transparent 1px) 0 0 / 26px 100%;
}
.site__xtitle {
  /* top 68: unterhalb der Pill-Zone (top 14 + ~46px Höhe) — Chip, Fassade-Tag
     und Pill koexistieren in der Montage-Phase, oben kollidierten sie */
  position: absolute; z-index: 5; top: 68px; left: 18px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em;
  color: var(--s-muted);
  padding: 6px 10px; border: 1px solid var(--s-line); border-radius: 8px;
  background: color-mix(in srgb, var(--s-bg) 74%, transparent);
  opacity: 0; pointer-events: none;
}
/* Bauplan-Umrisse: markieren, wo die Bauteile landen */
.site__hero::before,
.site__gallery::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border: 1px dashed color-mix(in srgb, var(--s-accent) 60%, transparent);
  border-radius: 6px;
  opacity: var(--mt);
}
.site__gallery { position: relative; }
.site__xtag {
  position: absolute; z-index: 3; top: 10px; left: 12px;
}
/* das Fassaden-Tag sitzt rechts — links steht der Montage-Chip;
   top 64 hält es unter der einfliegenden Pill (siehe .site__xtitle) */
.site__hero .site__xtag { left: auto; right: 12px; top: 64px; }
.site__xtag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .07em; white-space: nowrap;
  color: var(--s-fg);
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--s-accent) 62%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--s-bg) 82%, transparent);
  opacity: 0; pointer-events: none;
}

/* ---- Phase 5 · Stichwort ---- */
.stichwort {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; opacity: 0; pointer-events: none;
}
.stichwort__pre {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted-2);
}
.stichwort__big {
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 6.4rem); line-height: 1; letter-spacing: -.015em;
  color: var(--fg);
}

/* ===================== RUHIGE ZONE ===================== */
.breath {
  min-height: 92svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(40px, 8vh, 90px);
  padding: 14vh 8vw; text-align: center;
}
.breath__text {
  font-family: var(--font-plain);
  font-size: clamp(1.6rem, 4.4vw, 3.2rem); line-height: 1.28; letter-spacing: -.01em;
  color: var(--fg-dim); max-width: 22ch;
}
.breath__text span { display: block; }
.breath__text em { font-style: italic; color: var(--fg); }
.breath__text span:first-child { color: var(--muted); font-size: .82em; margin-bottom: .4em; }
.breath__next {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
}
.breath__pre {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted-2);
}
.breath__act {
  font-family: var(--font-plain); font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  color: var(--fg);
}

/* ===================== Responsive ===================== */
@media (max-width: 720px) {
  .editor__body { max-height: 56svh; }
  .akt__index { display: none; }
  .chatmsg__who em { display: none; }
  /* Produkt-Shot-Geometrie ist jetzt GLOBAL (siehe .browser-wrap oben) —
     hier nur der CSS-Fallback für ~390px-Screens, falls JS --bs nicht setzt */
  .browser-wrap { --bs: .36; }
  /* Editor-Schatten kurz halten: der 80px-Desktop-Wurf ragte auf Handys
     unter die Pin-Kante und wurde als harte Linie gekappt */
  .editor { box-shadow: 0 10px 26px -18px rgba(22,21,19,.26); }
}
/* Die vw-Clamps der inneren Website rechnen mit dem ECHTEN Viewport; das
   Layout ist aber IMMER die 1020er-Referenz (Produkt-Shot) — deshalb fest
   auf die Werte, die sie am Desktop (1440) annehmen: */
.site__pill { gap: 18px; }
.site__title { font-size: 34px; }
.site__section { padding: 60px 5.5%; }
.site__h { font-size: 38px; }
.site__stats { gap: 52px; }
.stat__n { font-size: 30px; }
.site__gallery { padding: 52px 0 52px 5.5%; }
.scard { width: 240px; }
@media (max-width: 460px) {
  .code { font-size: 12.5px; }
  .stage { padding: 0 4vw; }
}

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .caret, .request__caret, .scrollcue__glyph, .scrollcue__line { animation: none !important; }
  .prompt__tap::before, .prompt__tap::after { animation: none !important; opacity: .35; transform: scale(.7); }
  .fuse__pull, .step:not([hidden]) .step__h, .step:not([hidden]) .step__inner > * { animation: none !important; }
}
/* JS adds body.reduced when the OS asks for reduced motion */
body.reduced .akt__pin { height: auto; overflow: visible; }
body.reduced .stage {
  display: block; padding: 12vh 6vw; perspective: none;
}
body.reduced .stage > * {
  position: static; grid-area: auto; margin: 0 auto clamp(48px, 10vh, 120px);
  opacity: 1 !important; transform: none !important; filter: none !important;
  pointer-events: auto !important;
}
body.reduced .request__caret,
body.reduced .caret { display: none; }
body.reduced .scrollcue { opacity: .8 !important; }

/* Akt 1 ohne Motion: Browser wächst mit dem Inhalt, alles ist sichtbar */
body.reduced .browser { height: auto; }
body.reduced .browser-wrap { width: auto; height: auto; margin: 0 auto; }
body.reduced .browser-scale { position: static; transform: none; width: auto; height: auto; }
body.reduced .browser__viewport { overflow: visible; }
body.reduced .site__body { overflow: visible; }
body.reduced .site__scroll { position: static; }
/* ohne Motion: Galerie horizontal per Wischen (Pill bleibt absolut oben) */
body.reduced .hscroll { overflow-x: auto; padding: 0 0 24px; margin: 0; }
/* ohne Motion entfällt die Montage komplett */
body.reduced .site__xgrid,
body.reduced .site__xtitle,
body.reduced .site__xtag { display: none; }

/* =============================================================
   ACTS 2–5 · REFERENCES · GAME
   ============================================================= */

kbd {
  font-family: var(--font-mono); font-size: 12.5px;
  background: rgba(22,21,19,.05); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 6px; color: var(--fg-dim);
}

/* ---------------- AKT 3 · KI ---------------- */
.ai { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.ai__editor {
  width: min(620px, 90vw);
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 30px 80px -36px rgba(22,21,19,.28);
  opacity: 0;
}
.ai__line { position: relative; font-family: var(--font-mono); font-size: clamp(15px, 2.6vw, 21px); line-height: 1.5; }
/* Twin der getippten Zeile aus Wort-Spans (mobil): übernimmt bei der
   Tokenisierung unsichtbar deckungsgleich — dann kann jedes Wort einzeln
   verschwinden, wenn sein Chip abhebt (neural.js baut und schaltet ihn) */
.ai__twin { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; }
.ai__mark { color: var(--accent); margin-right: .6ch; font-weight: 600; }
.ai__typed { color: var(--fg); }
.ai__ghost { color: var(--muted-2); }
.ai__ghost.accepted { color: var(--accent); }
.ai__hint {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  opacity: 0;
}
/* ---- Transformer: Tokens → Embedding → Attention → FFN → Generierung ---- */
.stage > .ai { max-width: min(1000px, 94vw); }
.tf {
  position: relative;
  display: flex; gap: clamp(14px, 2.4vw, 28px); align-items: center;
  width: 100%; height: min(46svh, 400px);
}
/* Der Canvas liegt über dem GESAMTEN .tf (auch den Karten):
   Attention-Bögen, FFN-Block, Puls-Pfade und der autoregressive Loop */
.tf__canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tf__net { position: relative; flex: 1; height: 100%; min-width: 0; }
/* Token-Chips (per JS erzeugt): Wortstück + Token-ID */
.tf__tok {
  position: absolute; left: 0; top: 0;
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  opacity: 0; pointer-events: none; will-change: transform, opacity;
}
.tf__tok b {
  font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; color: var(--fg);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 7px; padding: 3px 8px; white-space: nowrap;
}
.tf__tok i { font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); }
/* Subword-Paar (Unter|nehmen): Akzent-Rand zeigt die Zusammengehörigkeit */
.tf__tok--sub b { border-color: rgba(181,71,11,.5); }
/* Embedding-Matrix (per JS befüllt): pro Token leuchtet eine Zeile auf */
.tf__mat {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  box-shadow: 0 18px 50px -28px rgba(22,21,19,.3);
  opacity: 0; pointer-events: none; will-change: transform, opacity;
}
.tf__mat .r { display: flex; gap: 3px; border-radius: 3px; padding: 1px; }
.tf__mat .c { width: 7px; height: 7px; border-radius: 2px; }
/* Embedding-Vektor: das Wort als Zahlensäule */
.tf__vec {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; pointer-events: none; will-change: transform, opacity;
}
.tf__vec .c { width: 11px; height: 9px; border-radius: 2px; }
/* Phasen-Beschriftung */
.tf__tag {
  position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--muted); white-space: nowrap; opacity: 0; pointer-events: none;
}
/* Layer-Zähler am FFN-Block */
.tf__layerchip {
  position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.tf__out {
  position: relative; z-index: 1;
  width: min(272px, 34%);
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.tf-card {
  position: relative;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px;
  background: var(--panel);
  box-shadow: 0 18px 50px -28px rgba(22,21,19,.25);
  opacity: 0; /* JS */
}
.tf-card__fn {
  display: block; min-height: 1.35em;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  color: var(--fg);
}
.tf-card__meta {
  display: block; margin-top: 2px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
}
/* Kandidaten-Stapel: das Modell „entscheidet" sich fürs nächste Token */
.tf__cands {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 3px;
  opacity: 0; pointer-events: none;
}
.tf__cands span {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 5px; padding: 2px 7px; white-space: nowrap;
  opacity: 0;
}
.tf__cands span em { font-style: normal; color: var(--muted-2); margin-left: 6px; }
.tf__cands .is-win { color: var(--accent); border-color: rgba(181,71,11,.5); }
.tf__cands .is-win em { color: rgba(181,71,11,.75); }
@media (max-width: 720px) {
  .tf { flex-direction: column; height: auto; gap: 8px; }
  /* Die Frage-Blase liegt mobil ÜBER dem Netz statt darüber im Fluss —
     sie verschwindet nach der Tokenisierung komplett (neural.js) und
     gibt so die volle Höhe frei */
  .stage > .ai { position: relative; }
  .ai__editor { position: absolute; top: calc(var(--nav-top) + var(--nav-h)); left: 0; right: 0; z-index: 5; }
  /* Netz nimmt, was der Viewport hergibt: feste svh-Anteile schnitten
     auf niedrigen Handys (Safari-Leisten!) die Karten unten ab. 240px
     sind für den Kartenblock + Abstände reserviert. */
  .tf__net {
    width: 100%; flex: none;
    height: calc(100svh - var(--nav-top) - var(--nav-h) - 288px);
    min-height: 230px; max-height: 470px;
  }
  /* Kartenschatten kurz halten: max. ~7px Wurf — bei 390×630 hat die letzte
     Karte nur ~13px Luft zur Pin-Kante, ein längerer Wurf wird vom nächsten
     Abteil gekappt und hinterlässt eine sichtbare Kante */
  .tf-card { box-shadow: 0 5px 12px -10px rgba(22,21,19,.28); }
  .tf__mat { padding: 7px; gap: 2px; }
  .tf__mat .r { gap: 2px; }
  .tf__mat .c { width: 3px; height: 3px; }
  .tf__vec .c { width: 7px; height: 5px; }
  .tf__tok b { font-size: 11px; padding: 2px 6px; }
  .tf__tok i { font-size: 10px; }
  .tf__out { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tf-card:last-child { grid-column: 1 / -1; }
  .tf-card { padding: 7px 10px; }
  .tf-card__fn { font-size: 12.5px; }
  .tf-card__meta { font-size: 11.5px; }
  .tf__cands { display: none; }
  .ai__editor { padding: 14px 16px; }
  /* zentriert plus Luft unter der fixen Nav-Leiste — sonst verschwindet
     die Frage-Blase oben darunter */
  .stage > .ai { padding-top: calc(var(--nav-top) + var(--nav-h)); }
}

/* ---------------- AKT 4 · Software-Lösungen (Explosionszeichnung) ----------------
   Eine kompakte App zieht sich in ihre vier Schichten auseinander:
   Oberfläche · Logik · Daten · Schnittstellen. Beschriftungen hängen
   als flache Callouts mit Maßlinien daneben; ein Terrakotta-Puls
   läuft einmal durch alle Schichten. */
.xp { position: relative; width: min(680px, 92vw); height: min(58svh, 470px); opacity: 0; /* JS */ }
.xp__stack { position: absolute; inset: 0; perspective: 1200px; }
.xp__plate {
  position: absolute; left: 50%; top: 50%;
  width: min(340px, 68vw); height: 150px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 26px 50px -30px rgba(22,21,19,.38);
  will-change: transform;
}
.xp__plate--ui { z-index: 4; }
.xp__plate--logic { z-index: 3; }
.xp__plate--data { z-index: 2; }
.xp__plate--if { z-index: 1; }
/* Oberflächen-Varianten (werden am Ende durchgeblättert) */
.xp__ui {
  position: absolute; inset: 0; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0;
}
.xp__ui.is-first { opacity: 1; }
.xp__btn { width: 86px; height: 20px; border-radius: 7px; background: var(--accent); }
.xp__row { display: block; width: var(--w, 100%); height: 10px; border-radius: 5px; background: rgba(22,21,19,.08); }
.xp__cal { display: flex; gap: 6px; flex: 1; }
.xp__cal i { flex: 1; border-radius: 6px; background: rgba(22,21,19,.06); border: 1px solid var(--line-2); }
.xp__cal i.on { background: rgba(181,71,11,.4); border-color: rgba(181,71,11,.4); }
.xp__cal i.on2 { background: rgba(22,21,19,.22); }
.xp__me { display: flex; align-items: center; gap: 10px; }
.xp__me i { width: 22px; height: 22px; border-radius: 50%; background: rgba(22,21,19,.16); }
.xp__me span { flex: 1; height: 10px; border-radius: 5px; background: rgba(181,71,11,.35); }
/* Offener Slot („Dein Projekt."): Rohbau-Umrisse statt Füllung —
   dieselbe gestrichelte Vokabel wie die Bauplan-Umrisse in Akt 3 */
.xp__btn--ghost { background: transparent; border: 1px dashed rgba(181,71,11,.55); }
.xp__row--ghost { background: transparent; border: 1px dashed rgba(22,21,19,.3); }
/* Logik: Wenn-dann-Regeln */
.xp__lg {
  position: absolute; inset: 0; padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 11px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-dim);
  white-space: nowrap;
}
.xp__lg b { font-weight: 500; color: var(--muted); }
/* Daten: Tabellenraster (Zellen per JS) */
.xp__grid {
  position: absolute; inset: 16px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px;
}
.xp__grid i { border-radius: 3px; background: rgba(22,21,19,.07); }
.xp__grid i.on { background: rgba(22,21,19,.2); }
/* Schnittstellen: Anschluss-Punkte */
.xp__ifs { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-evenly; }
.xp__if {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted);
}
.xp__if i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--fg-dim); background: var(--panel); }
/* Puls, der durch die Schichten fällt */
.xp__pulse {
  position: absolute; left: 50%; top: 50%; z-index: 6;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(181,71,11,.15);
  opacity: 0; pointer-events: none;
}
/* Callouts: Beschriftung + Maßlinie, flach neben dem Stapel */
.xp__co {
  position: absolute; top: 50%; left: calc(50% + min(200px, 37vw));
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; opacity: 0; pointer-events: none;
}
.xp__co::before { content: ''; width: 46px; height: 1px; background: var(--line); }
/* Bildunterschrift unter dem Stapel (Oberflächen-Namen → Schlusszeile) */
.xp__caption { position: absolute; left: 0; right: 0; bottom: -14px; height: 44px; pointer-events: none; }
.xp__caption span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-sans); font-size: 15px; color: var(--muted);
  white-space: nowrap; opacity: 0;
}
.xp__caption .xp__caption-final {
  font-family: var(--font-plain); font-size: clamp(20px, 2.8vw, 27px);
  color: var(--fg);
}
/* „Dein Projekt." ist die Wendung, kein Label — eine Stufe über den
   Captions, eine unter der Schlusszeile */
.xp__caption .xp__caption-your {
  font-family: var(--font-plain); font-size: clamp(17px, 2.3vw, 22px);
  color: var(--fg);
}
@media (max-width: 720px) {
  .xp { height: min(62svh, 470px); }
  .xp__plate, .xp__pulse { left: 50%; }
  .xp__plate { width: min(340px, 84vw); }
  /* Labels als Chip-Tags am Plattenrand (dieselbe Vokabel wie die
     Maß-Tags der Montage) — frei schwebende Maßlinien-Labels müssten
     hier zwangsläufig mit den Platten überlappen */
  .xp__co {
    left: auto; right: 2px; gap: 0;
    font-size: 10px; letter-spacing: .12em;
    background: var(--bg); border: 1px solid var(--line);
    border-radius: 7px; padding: 3px 8px;
  }
  .xp__co::before { display: none; }
  .xp__lg { font-size: 11px; padding: 12px 14px; }
  /* der Chip liegt rechts auf der Platte — der vierte Anschluss säße
     genau darunter */
  .xp__ifs { justify-content: flex-start; gap: 9vw; padding-left: 6vw; }
  .xp__if:last-child { display: none; }
}

/* ---------------- AKT 5 · App (Datenblatt einer App) ----------------
   Premium-Mockup komplett in CSS. Trick: alle inneren Maße in em bei
   .phone { font-size: 1px } — ein einziger font-size-Wert skaliert
   das ganze Gerät (Mobile: .82px). */
.app {
  position: relative;
  width: min(760px, 94vw); height: min(70svh, 660px);
  display: grid; place-items: center; perspective: 1100px;
  /* hebt das Gerät leicht über die Bühnen-Mitte, damit der Schatten
     unten nicht an der Pin-Kante (overflow hidden) abgeschnitten wird */
  padding-bottom: 34px;
}
/* --u: eine feste Skalier-Einheit. em skaliert nur solange ein Element
   NICHT seine eigene font-size in em setzt — für Boxen/Positionen von
   Elementen mit eigener em-font-size (Badges) darum calc(N*var(--u)). */
.phone { --u: 1px; font-size: var(--u); width: 296em; height: 610em; opacity: 0; will-change: transform; }
.phone__frame {
  position: relative; width: 100%; height: 100%;
  border-radius: 50em; background: #1d1c1a; padding: 9em;
  /* kompakter als früher (0 40/90/-36): der lange Wurf ragte auf flachen
     Viewports unter die Pin-Kante und wurde dort hart abgeschnitten */
  box-shadow: 0 24em 56em -30em rgba(22,21,19,.5);
}
/* feine Titankante */
.phone__frame::before {
  content: ''; position: absolute; inset: 2.5em; border-radius: 47em;
  border: 1px solid rgba(255,255,255,.18); pointer-events: none; z-index: 9;
}
.phone__key { position: absolute; width: 3em; border-radius: 2em; background: #1d1c1a; }
.phone__key--pwr { right: -3em; top: 190em; height: 74em; }
.phone__key--v1 { left: -3em; top: 150em; height: 44em; }
.phone__key--v2 { left: -3em; top: 204em; height: 44em; }
.phone__screen {
  position: absolute; inset: 9em; border-radius: 41em;
  background: #f7f5f1; overflow: hidden;
}
.phone__island {
  position: absolute; top: 13em; left: 50%; transform: translateX(-50%);
  width: 84em; height: 25em; border-radius: 14em; background: #131210; z-index: 8;
}
.phone__status {
  position: absolute; top: 16em; left: 26em; right: 24em; z-index: 7;
  display: flex; justify-content: space-between; align-items: center;
}
.phone__time { font-family: var(--font-sans); font-size: 13em; font-weight: 600; color: var(--fg); }
.phone__glyphs { display: flex; align-items: center; gap: 6em; }
.pg-bars { display: flex; align-items: flex-end; gap: 1.5em; }
.pg-bars b { width: 2.5em; border-radius: 1em; background: var(--fg); }
.pg-bars b:nth-child(1) { height: 4em; } .pg-bars b:nth-child(2) { height: 6em; }
.pg-bars b:nth-child(3) { height: 8em; } .pg-bars b:nth-child(4) { height: 10em; }
.pg-batt {
  width: 20em; height: 10em; border-radius: 3em;
  border: 1.5em solid rgba(22,21,19,.5); position: relative;
}
.pg-batt::after { content: ''; position: absolute; inset: 1.5em; right: 5em; border-radius: 1em; background: var(--fg); }
.phone__homebar {
  position: absolute; bottom: 7em; left: 50%; transform: translateX(-50%);
  width: 104em; height: 4em; border-radius: 2em; background: rgba(22,21,19,.4); z-index: 7;
}
/* neutrale App auf dem Screen */
.papp {
  position: absolute; inset: 0; padding: 58em 20em 28em;
  display: flex; flex-direction: column; gap: 13em;
}
.papp__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3em; }
.papp__title { width: 108em; height: 14em; border-radius: 7em; background: rgba(22,21,19,.85); }
.papp__dot { width: 26em; height: 26em; border-radius: 50%; background: rgba(22,21,19,.1); }
.papp__card {
  height: 96em; border-radius: 16em;
  background: #ffffff; border: 1px solid var(--line-2);
  box-shadow: 0 10em 26em -18em rgba(22,21,19,.3);
}
.papp__row { display: block; width: var(--w, 100%); height: 12em; border-radius: 6em; background: rgba(22,21,19,.08); }
.papp__tabs {
  margin-top: auto; display: flex; justify-content: space-around;
  padding: 12em 20em 6em; border-top: 1px solid var(--line-2);
}
.papp__tabs i { width: 8em; height: 8em; border-radius: 50%; background: rgba(22,21,19,.16); }
.papp__tabs i.on { background: var(--ink); }
/* Demo · Push */
.push {
  position: absolute; top: 46em; left: 12em; right: 12em; z-index: 6;
  display: flex; gap: 10em; align-items: center;
  background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 16em;
  padding: 11em 13em;
  box-shadow: 0 16em 36em -16em rgba(22,21,19,.4);
  opacity: 0; /* Startposition setzt JS per gsap.set */
}
.push__icon--mono {
  width: calc(24 * var(--u)); height: calc(24 * var(--u)); border-radius: calc(7 * var(--u)); flex: none;
  display: grid; place-items: center;
  font-size: 12em; line-height: 1;
  background: var(--ink); color: #faf9f7;
}
.push__body { display: flex; flex-direction: column; line-height: 1.35; }
.push__body strong { color: var(--fg); font-size: 12.5em; font-weight: 600; }
.push__body span { color: var(--muted); font-size: 11em; }
/* Demo · Offline */
.poff {
  position: absolute; top: calc(50 * var(--u)); left: 50%; transform: translateX(-50%); z-index: 5;
  font-family: var(--font-mono); font-size: 10em; letter-spacing: .04em; color: var(--fg-dim);
  background: #ffffff; border: 1px solid var(--line); border-radius: calc(20 * var(--u));
  padding: calc(5 * var(--u)) calc(11 * var(--u)); white-space: nowrap;
  opacity: 0;
}
/* Demo · Kamera (Scan-Sheet) */
.pscan {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56%;
  border-radius: 24em 24em 0 0; background: #171613; z-index: 6;
  display: grid; place-items: center;
  /* Startzustand (unter dem Screen) setzt JS per gsap.set — keine
     CSS-Transform, die mit GSAPs yPercent kollidiert */
}
.pscan__vf { position: relative; width: 128em; height: 128em; }
.pscan__vf i { position: absolute; width: 26em; height: 26em; border: 3em solid rgba(250,249,247,.85); }
.pscan__vf i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 8em 0 0 0; }
.pscan__vf i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 8em 0 0; }
.pscan__vf i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 8em; }
.pscan__vf i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 8em 0; }
.pscan__line { position: absolute; left: 8em; right: 8em; top: 12em; height: 2em; border-radius: 1em; background: var(--accent); }
.pscan__tag {
  position: absolute; left: 50%; bottom: calc(22 * var(--u)); transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10em; color: #faf9f7;
  background: rgba(255,255,255,.14); border-radius: calc(20 * var(--u)); padding: calc(5 * var(--u)) calc(12 * var(--u));
  white-space: nowrap; opacity: 0;
}
/* Demo · Standort (Karte) */
.pmap {
  position: absolute; inset: 0; z-index: 4; opacity: 0;
  background:
    linear-gradient(rgba(22,21,19,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,21,19,.06) 1px, transparent 1px),
    #efece6;
  background-size: 34em 34em;
}
.pmap__pin {
  position: absolute; left: 50%; top: 44%;
  width: 16em; height: 16em; border-radius: 50%;
  background: var(--accent); border: 3em solid #ffffff;
  box-shadow: 0 0 0 2em rgba(22,21,19,.15);
  transform: translate(-50%, -50%);
}
/* Finale · Homescreen */
.phome {
  position: absolute; inset: 0; z-index: 5; opacity: 0;
  padding: 66em 26em 60em;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20em 16em;
  align-content: start;
  background: #f7f5f1;
}
.phome i { aspect-ratio: 1; border-radius: 14em; background: rgba(22,21,19,.08); }
.phome i.is-app { background: var(--ink); }
/* Callouts mit Maßlinien (Datenblatt-Optik wie beim Software-Akt) */
.app__co {
  position: absolute; top: 50%;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; opacity: 0; pointer-events: none;
}
.app__co::before { content: ''; width: 46px; height: 1px; background: var(--line); }
.app__co--r { left: calc(50% + min(190px, 36vw)); }
.app__co--l { right: calc(50% + min(190px, 36vw)); flex-direction: row-reverse; }

/* ---------------- REFERENZEN ---------------- */
.refs { padding: clamp(90px, 15vh, 170px) 6vw; max-width: 1180px; margin: 0 auto; }
.refs__head { margin-bottom: clamp(30px, 5vh, 52px); }
.refs__pre {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.refs__title { font-family: var(--font-plain); font-size: clamp(2.1rem, 5.4vw, 3.6rem); color: var(--fg); margin-top: 10px; letter-spacing: -.01em; }
.refs__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ref-card {
  position: relative; height: 232px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 20px 50px -32px rgba(22,21,19,.25);
  opacity: 0; /* fades in on scroll */
}
.ref-card__front {
  position: absolute; inset: 0; padding: 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--g, var(--panel-2)); color: var(--fg);
  transition: opacity .4s ease;
}
.ref-card__tag {
  align-self: flex-start; margin-bottom: auto;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim);
  background: rgba(22,21,19,.06); padding: 5px 11px; border-radius: 20px;
}
.ref-card__name { font-family: var(--font-plain); font-size: 25px; line-height: 1.05; }
.ref-card__meta { font-size: 13px; opacity: .7; margin-top: 4px; }
.ref-card__code {
  position: absolute; inset: 0; padding: 22px; display: flex; align-items: center;
  background: var(--panel); opacity: 0; transition: opacity .3s ease;
}
.ref-card__code pre { font-family: var(--font-mono); font-size: 13px; line-height: 1.75; color: var(--tok-var); white-space: pre; }
.ref-card:hover .ref-card__front,
.ref-card:focus-visible .ref-card__front { opacity: 0; }
.ref-card:hover .ref-card__code,
.ref-card:focus-visible .ref-card__code { opacity: 1; }
.ref-card:hover { transform: translateY(-3px); transition: transform .4s var(--ease-out); }

/* ---------------- MINIGAME ---------------- */
.game { padding: clamp(70px, 12vh, 150px) 6vw clamp(90px, 15vh, 170px); max-width: 760px; margin: 0 auto; text-align: center; }
.game__head { margin-bottom: 8px; }
.game__pre {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
.game__title { font-family: var(--font-plain); font-size: clamp(2.1rem, 5.4vw, 3.6rem); color: var(--fg); margin-top: 10px; letter-spacing: -.01em; }
.game__desc { color: var(--muted); max-width: 48ch; margin: 14px auto 0; font-size: 15px; line-height: 1.6; }
.game__stage {
  position: relative; margin: 32px auto 0; width: min(420px, 92vw); aspect-ratio: 3 / 4;
  border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 30px 90px -40px rgba(22,21,19,.3);
  touch-action: manipulation; user-select: none;
}
.game__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.game__hud { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; z-index: 3; pointer-events: none; }
.game__pill { font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); background: rgba(255,255,255,.75); border: 1px solid var(--line); padding: 6px 13px; border-radius: 20px; }
.game__pill strong { color: var(--accent); margin-left: 5px; }
.game__cue {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 3; pointer-events: none; display: flex; gap: 7px; align-items: center;
  animation: cue-pulse 2.4s ease-in-out infinite; transition: opacity .5s ease;
}
.game__cue.is-gone { opacity: 0; animation: none; }
@keyframes cue-pulse { 0%, 100% { opacity: .5; } 50% { opacity: .9; } }
.game__overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(250,249,247,.9); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  text-align: center; padding: 26px;
}
.game__overlay[hidden] { display: none; }
.game__commit { font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); background: rgba(22,21,19,.04); border: 1px solid var(--line); padding: 6px 14px; border-radius: 8px; }
.game__btn { font-weight: 600; color: #faf9f7; padding: 13px 28px; border-radius: 12px; background: var(--ink); transition: transform .2s var(--ease-out), background .2s ease; }
.game__btn:hover { transform: translateY(-2px); background: #000; }
.game__keys { font-family: var(--font-mono); font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.game__error { font-family: var(--font-mono); color: #c0392b; font-size: 15px; }
.squiggle { text-decoration: underline wavy #c0392b; text-underline-offset: 4px; }
.game__pitch { font-family: var(--font-plain); font-size: clamp(1.4rem, 4vw, 1.9rem); color: var(--fg); max-width: 22ch; }
.game__final { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.game__final strong { color: var(--accent); }
.game__over-actions { display: flex; gap: 16px; align-items: center; }
.game__cta { font-size: 13.5px; color: var(--accent); border-bottom: 1px solid rgba(181,71,11,.4); padding-bottom: 2px; }

/* ---------------- ORACLE — Spiel gegen die KI ---------------- */
.game__desc { color: var(--muted); max-width: 44ch; margin: 14px auto 0; font-size: 15px; line-height: 1.6; }

/* „?" mit Hover-Tooltip: die ausführliche Erklärung, ohne Textwand */
.oracle__info {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-left: 8px; vertical-align: middle;
  border: 1px solid var(--line); border-radius: 50%; cursor: help;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--muted);
  transition: color .18s ease, border-color .18s ease;
}
.oracle__info:hover, .oracle__info:focus-visible { color: var(--fg); border-color: var(--fg); }
.oracle__tip {
  position: absolute; left: 50%; top: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: min(280px, 78vw); z-index: 20; pointer-events: none;
  background: var(--ink); color: #faf9f7;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 400;
  line-height: 1.5; letter-spacing: 0; text-transform: none; text-align: left;
  padding: 12px 14px; border-radius: 10px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.oracle__tip::before {
  content: ""; position: absolute; left: 50%; top: -5px; width: 10px; height: 10px;
  background: var(--ink); transform: translateX(-50%) rotate(45deg);
}
.oracle__info:hover .oracle__tip, .oracle__info:focus-visible .oracle__tip {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
/* Mobil: der Tooltip wird auf dem winzigen ?-Button zentriert und liefe rechts
   aus dem Viewport (der schmale Handy-Rand ließ sich dadurch seitlich schieben).
   body overflow-x:clip fängt den absoluten Tooltip nicht (html/body-Overflow-
   Propagation), darum hier an der Quelle: Tooltip im Header zentrieren = passt
   immer in den Viewport. Pfeil raus, weil er nicht mehr auf den Button zeigt. */
@media (max-width: 480px) {
  .game__head { position: relative; }
  .oracle__info { position: static; }
  .oracle__tip {
    left: 50%; right: auto; top: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    width: min(300px, calc(100vw - 32px));
  }
  .oracle__info:hover .oracle__tip, .oracle__info:focus-visible .oracle__tip {
    transform: translateX(-50%) translateY(0);
  }
  .oracle__tip::before { display: none; }
}

.game__stage.oracle__stage {
  aspect-ratio: auto; width: min(440px, 94vw); min-height: 480px;
  display: flex; flex-direction: column; align-items: stretch;
  justify-content: space-between; gap: clamp(12px, 2.4vh, 20px);
  padding: clamp(20px, 4.5vw, 30px); text-align: center;
}

.oracle__top { display: flex; justify-content: center; gap: 40px; }
.oracle__stat { display: flex; flex-direction: column; gap: 3px; }
.oracle__stat strong { font-family: var(--font-plain); font-size: clamp(1.7rem, 6vw, 2.3rem); color: var(--fg); line-height: 1; transition: color .25s ease; }
.oracle__stat strong.is-danger { color: var(--accent); }
.oracle__stat span { font-family: var(--font-sans); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.oracle__reveal { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; }
.oracle__arrow {
  font-family: var(--font-sans); font-weight: 700; line-height: 1;
  font-size: clamp(3.2rem, 15vw, 5rem); color: var(--muted-2);
  transition: color .3s var(--ease-out), transform .3s var(--ease-out);
}
.oracle__reveal[data-state="idle"]    .oracle__arrow { color: var(--muted-2); }
.oracle__reveal[data-state="caught"]  .oracle__arrow { color: var(--accent); transform: scale(1.06); }
.oracle__reveal[data-state="escaped"] .oracle__arrow { color: var(--ochre); transform: scale(1.06); }
.oracle__verdict { font-family: var(--font-mono); font-size: 13px; min-height: 1.3em; letter-spacing: .02em; color: var(--muted); }
.oracle__reveal[data-state="caught"]  .oracle__verdict { color: var(--accent); }
.oracle__reveal[data-state="escaped"] .oracle__verdict { color: var(--ochre); }

.oracle__dots { display: flex; justify-content: center; gap: 6px; min-height: 10px; flex-wrap: wrap; }
.oracle__dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--muted-2); }
.oracle__dot.is-hit { background: var(--accent); border-color: var(--accent); }

.oracle__curve { display: flex; flex-direction: column; gap: 6px; }
.oracle__curve svg { width: 100%; height: 34px; display: block; }
.oracle__mid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.oracle__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.oracle__curve-cap { font-family: var(--font-sans); font-size: 11px; color: var(--muted-2); letter-spacing: .02em; }

.oracle__choices { display: flex; gap: 12px; }
.oracle__btn {
  flex: 1; padding: 16px 10px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--fg); font-family: var(--font-sans);
  font-size: 15px; font-weight: 600; letter-spacing: .02em; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s var(--ease-out), background .18s ease, border-color .18s ease;
}
.oracle__btn span { font-size: 20px; line-height: 1; }
.oracle__btn:hover { border-color: var(--fg); transform: translateY(-1px); }
.oracle__btn:disabled { cursor: default; opacity: .5; transform: none; }
.oracle__btn.is-picked { background: var(--ink); color: #faf9f7; border-color: var(--ink); }

.oracle .game__cue { position: static; transform: none; }

/* Endstand: ersetzt Reveal + Buttons + Cue */
.oracle__stage.is-done .oracle__reveal,
.oracle__stage.is-done .oracle__choices,
.oracle__stage.is-done .game__cue { display: none; }
.oracle__result { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0; }
.oracle__result[hidden] { display: none; }
.oracle__result-head { font-family: var(--font-plain); font-size: clamp(1.5rem, 4.4vw, 2rem); color: var(--fg); line-height: 1.2; max-width: 22ch; }
.oracle__result-sub { font-family: var(--font-sans); font-size: 13.5px; line-height: 1.55; color: var(--muted); max-width: 34ch; }
.oracle__result-actions { display: flex; gap: 18px; align-items: center; margin-top: 4px; }
.oracle__again {
  font-weight: 600; color: #faf9f7; padding: 12px 26px; border-radius: 12px;
  background: var(--ink); cursor: pointer;
  transition: transform .2s var(--ease-out), background .2s ease;
}
.oracle__again:hover { transform: translateY(-2px); background: #000; }
.oracle__cta { font-size: 14px; color: var(--accent); border-bottom: 1px solid rgba(181,71,11,.4); padding-bottom: 2px; }

@media (prefers-reduced-motion: reduce) {
  .oracle__arrow, .oracle__btn, .oracle__again, .oracle__tip { transition: none; }
}

/* ---------------- ZEICHNEN gegen die KI ---------------- */
.game__stage.draw__stage {
  /* 100% (nicht 94vw): die .game-Sektion hat 6vw Seitenpadding, ein 94vw
     breites Feld ist damit breiter als sein Container → margin:auto kann es
     nicht mehr zentrieren, es dockte rechts an. 100% = Textspaltenbreite,
     sauber mittig unter Titel/Beschreibung. */
  aspect-ratio: auto; width: min(440px, 100%);
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(18px, 4vw, 26px); text-align: left;
}
.draw__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.draw__task { font-family: var(--font-sans); font-size: 14px; color: var(--muted); }
.draw__task strong { font-family: var(--font-plain); font-size: clamp(1.5rem, 5vw, 2rem); color: var(--fg); margin-left: 6px; }
.draw__score { font-family: var(--font-sans); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.draw__score strong { color: var(--accent); font-size: 15px; margin-right: 4px; }

.draw__timer { height: 4px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.draw__timer span { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 3px; }
.draw__timer span.is-low { background: #c0392b; }

.draw__canvas-wrap {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.draw__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  background: transparent; touch-action: none; cursor: crosshair;
}
.draw__net { width: 100%; margin-top: 4px; }
.draw__viz { width: 100%; height: 150px; display: block; }
.draw__hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-size: 14px; color: var(--muted-2);
  pointer-events: none; transition: opacity .3s ease;
}
.draw__hint.is-gone { opacity: 0; }
.draw__result {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border-radius: 16px;
}
.draw__result[hidden] { display: none; }
.draw__result-head { font-family: var(--font-plain); font-size: clamp(1.5rem, 5vw, 2rem); color: var(--fg); line-height: 1.2; }
.draw__result-head strong { color: var(--accent); }
.draw__result-head span { display: block; font-family: var(--font-sans); font-size: 13px; color: var(--muted); margin-top: 6px; }

.draw__guess { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 66px; text-align: center; }
/* --muted statt --muted-2: die 11px-Zeile braucht ≥4.5:1 auf --bg (WCAG AA) */
.draw__guess-label { font-family: var(--font-sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.draw__guess-word { font-family: var(--font-plain); font-size: clamp(1.5rem, 5vw, 2rem); color: var(--fg-dim); line-height: 1.1; transition: color .2s ease; }
.draw__guess[data-state="idle"] .draw__guess-word { color: var(--muted); }
.draw__guess[data-state="hot"] .draw__guess-word { color: var(--accent); }
.draw__guess-list { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; list-style: none; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

.draw__tools { display: flex; gap: 12px; }
.draw__tool {
  flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--fg); font-family: var(--font-sans);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .18s ease, transform .18s var(--ease-out);
}
.draw__tool:hover { border-color: var(--fg); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .draw__tool, .draw__hint, .draw__guess-word { transition: none; } }

/* ---------------- SO LÄUFT'S — Sticky-Stacking-Panels ---------------- */
.stack { position: relative; }
.stack__panel {
  position: sticky; top: 0; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 12vh 6vw; overflow: hidden;
}
.stack__panel--1 { background: var(--bg); color: var(--ink); }
.stack__panel--2 {
  background: var(--ink); color: #faf9f7;
  border-radius: 30px 30px 0 0; box-shadow: 0 -24px 60px -26px rgba(22,21,19,.55);
}
.stack__panel--3 {
  background: var(--accent); color: #fdf3ea;
  border-radius: 30px 30px 0 0; box-shadow: 0 -24px 60px -26px rgba(22,21,19,.45);
}
/* Nav über den dunklen Panels hell schalten (sonst unlesbar) */
.brand__text, .mainnav__crumb, .mainnav__menu, .mainnav__cta { transition: color .35s ease, border-color .35s ease; }
.mainnav.is-ondark .brand__text,
.mainnav.is-ondark .mainnav__crumb,
.mainnav.is-ondark .mainnav__menu { color: #faf9f7; }
.mainnav.is-ondark .mainnav__cta { color: #faf9f7; border-color: rgba(250,249,247,.45); }
.mainnav.is-ondark::before {
  background: linear-gradient(to bottom, rgba(22,21,19,.6) 0%, rgba(22,21,19,.3) 55%, transparent 100%);
}
.stack__inner { max-width: 900px; text-align: center; will-change: transform, opacity; }
.stack__num { display: block; margin-bottom: 16px; font-family: var(--font-mono); font-size: 15px; letter-spacing: .12em; color: var(--accent); }
.stack__panel--2 .stack__num { color: #e28a4f; }
/* hell statt dunkel: auf Terrakotta erreicht kein Dunkelton 4.5:1 (Schwarz maximal 4.4) */
.stack__panel--3 .stack__num { color: #fdf3ea; }
.stack__h {
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 6rem); line-height: 1.03; letter-spacing: -.02em;
}
.stack__p {
  margin: 26px auto 0; max-width: 30ch;
  font-family: var(--font-sans); font-size: clamp(1rem, 2.3vw, 1.35rem); line-height: 1.5; opacity: .82;
}
.stack__panel--3 .stack__p { opacity: .9; }

/* ---------------- FINALE / KONTAKT ---------------- */
.finale { position: relative; min-height: 100vh; min-height: 100dvh; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16vh 6vw; }

/* ---- Footer: Copyright + Rechtslinks, ruht am Fuß des Kontakts ---- */
.sitefooter {
  position: absolute; left: 0; right: 0; bottom: 18px;
  display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted);
}
.sitefooter__links { display: flex; gap: 20px; }
.sitefooter a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.sitefooter a:hover { color: var(--fg); border-color: currentColor; }

/* ---- Rechtsseiten (impressum.html, datenschutz.html) ---- */
.legal {
  max-width: 720px; margin: 0 auto;
  padding: clamp(96px, 16vh, 150px) 6vw 40px;
}
/* Zurück-Pfeil über der Überschrift: Kapitälchen-Label, der Pfeil
   gleitet beim Hover nach links (Gegenstück zu den →-CTAs) */
.legal__back {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: clamp(24px, 4.5vh, 40px);
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
  transition: color .25s ease;
}
.legal__back-arrow {
  font-size: 15px; line-height: 1;
  transition: transform .25s var(--ease-out);
}
.legal__back:hover { color: var(--fg); }
.legal__back:hover .legal__back-arrow { transform: translateX(-5px); }

.legal h1 {
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3rem); letter-spacing: -.01em;
  margin-bottom: 10px;
}
.legal h2 {
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 34px 0 8px;
}
.legal p, .legal address, .legal li { font-size: 15px; line-height: 1.7; color: var(--fg-dim); font-style: normal; }
.legal p { margin: 10px 0; }
.legal ul { margin: 10px 0; padding-left: 20px; }
.legal a { color: var(--accent); }
.legal__foot {
  max-width: 720px; margin: 0 auto; padding: 0 6vw 60px;
  display: flex; gap: 20px; font-size: 12.5px; color: var(--muted);
}
.legal__foot a { color: var(--muted); border-bottom: 1px solid transparent; transition: color .25s ease, border-color .25s ease; }
.legal__foot a:hover { color: var(--fg); border-color: currentColor; }
.legal__stand { margin-top: 36px; font-size: 13px; color: var(--muted); }
.finale__inner { width: 100%; max-width: 760px; text-align: center; }
.finale__pre {
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  margin-bottom: clamp(24px, 5vh, 44px);
}

/* Stufe 1 · Prompt */
.prompt__line {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: .3em;
  font-family: var(--font-plain); font-weight: 400;
  font-size: clamp(1.9rem, 5.4vw, 3.6rem); line-height: 1.16; letter-spacing: -.01em;
  color: var(--fg);
}
.prompt__prefix { white-space: nowrap; }
.prompt__field { position: relative; display: flex; flex: 1 1 8ch; min-width: 8ch; max-width: 100%; }
.prompt__input {
  width: 100%;
  font: inherit; padding: 0; margin: 0; border: 0; outline: 0; resize: none; overflow: hidden;
  background: transparent; color: var(--accent);
  caret-color: var(--accent);
  text-align: left;
}
.prompt__input::placeholder { color: var(--muted-2); }
/* Affordanz: solange nichts getippt wurde, atmet der Platzhalter leicht
   und Touch-Wellen pulsieren hinter der Lücke — beides verschwindet,
   sobald das Feld fokussiert oder gefüllt ist */
#promptInput:placeholder-shown:not(:focus)::placeholder { animation: prompt-breathe 2.6s ease-in-out infinite; }
@keyframes prompt-breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
/* Touch-Wellen: zwei konzentrische Ringe, die vom Klickpunkt auslaufen */
.prompt__tap {
  position: absolute; left: 4.5ch; top: 50%;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  pointer-events: none;
}
.prompt__tap::before, .prompt__tap::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid rgba(181,71,11,.5);
  opacity: 0; transform: scale(.25);
  animation: tapwave 2.8s ease-out infinite;
}
.prompt__tap::after { animation-delay: 1.4s; }
@keyframes tapwave {
  0% { transform: scale(.25); opacity: 0; }
  16% { opacity: .5; }
  70%, 100% { transform: scale(1); opacity: 0; }
}
.prompt:focus-within .prompt__tap,
.prompt:has(#promptInput:not(:placeholder-shown)) .prompt__tap { display: none; }
.prompt__caret { display: none; }
/* Kleiner Hinweis unterm Prompt — weg, sobald fokussiert oder getippt */
.prompt__cue {
  display: block; margin-top: 18px;
  font-family: var(--font-sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  opacity: .65; transition: opacity .35s ease;
}
.prompt:focus-within .prompt__cue,
.prompt:has(#promptInput:not(:placeholder-shown)) .prompt__cue { opacity: 0; }
.prompt__send {
  margin-top: clamp(28px, 5vh, 40px);
  font-weight: 600; color: #faf9f7; padding: 13px 28px; border-radius: 12px;
  background: var(--ink);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), background .2s ease;
}
.prompt__send.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.prompt__send:hover { background: #000; }

/* Stufe 2 · Formular */
.cform { max-width: 540px; margin: 0 auto; text-align: left; display: flex; flex-direction: column; gap: 16px; }
.cform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cfield { display: flex; flex-direction: column; gap: 8px; }
.cfield > span { font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em; color: var(--muted); }
.cfield input, .cfield textarea {
  font-family: var(--font-sans); font-size: 15px; color: var(--fg);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; outline: 0; resize: vertical; width: 100%;
  transition: border-color .25s ease, background .25s ease;
}
.cfield input::placeholder, .cfield textarea::placeholder { color: var(--muted-2); }
.cfield input:focus, .cfield textarea:focus { border-color: rgba(22,21,19,.45); }
.cfield textarea { min-height: 128px; line-height: 1.55; }
.cform__actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 4px; }
.cbtn { font-weight: 600; padding: 12px 24px; border-radius: 12px; transition: transform .2s var(--ease-out), background .2s ease, color .2s ease; }
.cbtn--ghost { color: var(--muted); }
.cbtn--ghost:hover { color: var(--fg); }
.cbtn--send { color: #faf9f7; background: var(--ink); }
.cbtn--send:hover { transform: translateY(-2px); background: #000; }
.cform__note { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-2); text-align: center; margin-top: 2px; }

/* Stufe 3 · Bestätigung */
.cdone { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cdone__check {
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: #faf9f7; font-size: 27px; font-weight: 700;
}
.cdone__title { font-family: var(--font-plain); font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--fg); }
.cdone__sub { color: var(--muted); max-width: 34ch; }

@media (max-width: 600px) {
  .cform__grid { grid-template-columns: 1fr; }
  /* Prompt untereinander: Präfix oben, Eingabe volle Breite (kein Zusammenrücken);
     zentriert, sonst klebt der Eingabetext am linken Viewport-Rand
     unter dem zentrierten Präfix */
  .prompt__line { flex-direction: column; align-items: stretch; gap: .1em; }
  .prompt__field { width: 100%; min-width: 0; flex: 1 1 auto; }
  .prompt__input { text-align: center; }
  /* zentrierter Text → Wellen mittig hinter den Platzhalter */
  .prompt__tap { left: 50%; }
}

/* ---------------- Responsive (new sections) ---------------- */
@media (max-width: 560px) {
  .refs { padding: 90px 6vw; }
  .ref-card { height: 200px; }
  .phone { --u: .78px; }
  /* Die Fähigkeits-Wörter bleiben seitlich wie am Desktop (Höhen setzt
     buildAkt5 enger), als Chip-Tags an den Bildschirmrändern — sie
     dürfen das Gerät überlappen, der Chip-Grund hält sie lesbar */
  .app__co {
    gap: 0; font-size: 10px; letter-spacing: .12em;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 7px; padding: 3px 9px;
  }
  .app__co::before { display: none; }
  .app__co--r { left: auto; right: 16px; }
  .app__co--l { right: auto; left: 4px; }
  .ai__editor, .ai__panel { padding: 18px; }
}

/* ---------------- Reduced motion: resolve inner states ---------------- */
body.reduced .ai__editor, body.reduced .ai__panel, body.reduced .ai__hint, body.reduced .reco { opacity: 1; }
body.reduced .xp { opacity: 1; }
body.reduced .xp__co { opacity: .9; }
body.reduced .phone { opacity: 1; margin: 0 auto; }
body.reduced .push { transform: translateY(0); opacity: 1; }
body.reduced .app__co { opacity: .9; }
body.reduced .ref-card { opacity: 1; }
