/* regen.css · GUSS Drop 04 „Nachtregen“ (Beispiel). Nacht, nasses Grau, ein Rot an der Ampel. */
@font-face {
  font-family: 'Mona Sans';
  src: url('../fonts/mona-sans-wdth.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --nacht: #07090c;
  --nacht-2: #0d1116;
  --schrift: #e9edf2;
  --leise: #9aa4b1;
  --linie: rgb(233 237 242 / 0.16);
  --ampel: #ff3d2e;
  --rand: clamp(20px, 5.2vw, 84px);
  --kurve: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--nacht); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--nacht);
  color: var(--schrift);
  font-family: 'Mona Sans', system-ui, sans-serif;
  font-stretch: 100%;
  font-weight: 420;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
h1, h2, p { margin: 0; }

.sprung {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  padding: 10px 14px; background: var(--schrift); color: var(--nacht); text-decoration: none; border-radius: 999px;
}
.sprung:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--schrift); outline-offset: 3px; }

/* ---------- Kopf ---------- */
.kopf {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--rand);
  pointer-events: none;
}
.kopf > * { pointer-events: auto; }
.marke {
  font-stretch: 125%; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.16em;
  text-decoration: none;
}

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 1.6em;
  border: 0; border-radius: 999px;
  background: var(--schrift); color: #0a0d12;
  font: inherit; font-stretch: 112%; font-weight: 640; font-size: 1rem; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 220ms var(--kurve), background-color 220ms var(--kurve), box-shadow 220ms var(--kurve);
  box-shadow: 0 0 0 0 rgb(233 237 242 / 0);
}
.knopf:hover { background: #ffffff; box-shadow: 0 0 34px 0 rgb(220 232 255 / 0.18); }
.knopf:active { transform: scale(0.97); }
.knopf-klein {
  min-height: 40px; padding: 0 1.15em; font-size: 0.9rem;
  background: rgb(7 9 12 / 0.55); color: var(--schrift);
  box-shadow: inset 0 0 0 1px rgb(233 237 242 / 0.4);
}
.knopf-klein:hover { background: rgb(233 237 242 / 0.12); box-shadow: inset 0 0 0 1px rgb(233 237 242 / 0.7); }

/* ---------- Bühne und Fahrt ---------- */
.fahrt { position: relative; }
.buehne {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden;
  background: var(--nacht) url('../bilder/halt-0-quer.webp') center / cover no-repeat;
}
.buehne canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 1400ms ease;
}
.buehne.lebt canvas { opacity: 1; }
.buehne.sofort canvas { transition: none; }
.buehne.standbild canvas { display: none; }
@media (max-aspect-ratio: 20/21) {
  .buehne { background-image: url('../bilder/halt-0-hoch.webp'); }
}
.buehne::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 0% 100%, rgb(5 7 10 / 0.72) 0%, rgb(5 7 10 / 0.35) 38%, rgb(5 7 10 / 0) 62%),
    linear-gradient(to bottom, rgb(5 7 10 / 0.45) 0, rgb(5 7 10 / 0) 110px);
}
.stationen { position: relative; margin-top: -100vh; margin-top: -100dvh; z-index: 2; }
.station { position: relative; }

.strasse {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: flex-end;
  padding: 0 var(--rand) clamp(40px, 9vh, 96px);
}
.strasse-text { max-width: min(46rem, 62vw); }
h1 {
  font-stretch: 122%; font-weight: 760;
  font-size: clamp(2.5rem, 5.6vw, 5.9rem);
  line-height: 0.98; letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.45);
}
.unterzeile {
  margin-top: 1.25rem; max-width: 34rem;
  color: #d3dae3; font-size: clamp(1.02rem, 1.15vw, 1.18rem);
  text-shadow: 0 1px 16px rgb(0 0 0 / 0.6);
}
.handlung { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem; }
.zusage { color: var(--leise); font-size: 0.94rem; max-width: 19rem; line-height: 1.4; }

/* ---------- Der Gang: Luft zwischen den Halten, Texte neben den Stücken ---------- */
.luft { height: 70vh; height: 70dvh; }
.luft.kurz { height: 40vh; height: 40dvh; }
.laterne, .aushalten, .ampel, .schluss {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center;
  padding: 90px var(--rand) 60px;
}
.laterne.rechts { justify-content: flex-end; }
.stueck-text { max-width: 24rem; }
.zeigen { transition: opacity 900ms var(--kurve), transform 900ms var(--kurve); }
.js .zeigen { opacity: 0; transform: translateY(18px); }
.js .zeigen.da { opacity: 1; transform: none; }
.station h2 {
  font-stretch: 118%; font-weight: 740; font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1; letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.55);
  text-wrap: balance;
}
.preis {
  margin-top: 0.6rem; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 1.15rem; letter-spacing: 0.02em;
  color: var(--schrift);
}
.satz { margin-top: 1.1rem; color: #d3dae3; text-shadow: 0 1px 14px rgb(0 0 0 / 0.75); }
.wert {
  margin-top: 1.2rem; padding-top: 0.9rem; border-top: 1px solid var(--linie);
  font-family: 'Geist Mono', ui-monospace, monospace; font-size: 0.95rem;
}
.wert span { color: var(--leise); margin-right: 0.6em; }
.tipp { margin-top: 1.6rem; color: var(--leise); font-size: 0.92rem; }
.tipp-finger { display: none; }

/* Was es aushält: drei Werte untereinander, Zahl groß, Satz daneben */
.aushalten-text { max-width: 40rem; }
.fakten { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.4rem; }
.fakten li { display: grid; grid-template-columns: 11rem 1fr; gap: 0.4rem 1.4rem; align-items: baseline; }
.fakten b {
  font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.01em; color: var(--schrift); white-space: nowrap;
}
.fakten span { color: #d3dae3; text-shadow: 0 1px 14px rgb(0 0 0 / 0.8); max-width: 26rem; }
.klein { margin-top: 1.6rem; color: #7c8694; font-size: 0.85rem; }

/* Ampel: Countdown und Früher Zugang */
.ampel-text { max-width: 36rem; }
.zaehler { margin-top: 1.4rem; display: flex; gap: 1.6rem; color: var(--leise); font-size: 0.9rem; }
.zaehler span { display: grid; gap: 0.1rem; }
.zaehler b {
  font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 500; font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--ampel); line-height: 1; font-variant-numeric: tabular-nums;
  transition: color 700ms var(--kurve);
}
html:not(.js) .zaehler { display: none; }
.gruen .zaehler b { color: #3ddc84; }
.termin { margin-top: 1.2rem; color: #d3dae3; max-width: 30rem; text-shadow: 0 1px 14px rgb(0 0 0 / 0.8); }

/* Schluss */
.schluss { justify-content: center; text-align: center; }
.schluss-text { max-width: 40rem; display: grid; justify-items: center; gap: 1.2rem; }
.schluss h2 { font-size: clamp(2.6rem, 5.4vw, 5.2rem); font-stretch: 122%; font-weight: 760; }
.schluss p { color: #d3dae3; text-shadow: 0 1px 14px rgb(0 0 0 / 0.8); }

.formular { margin-top: 2.2rem; display: grid; gap: 0.55rem; }
.formular label { font-size: 0.92rem; color: #c9d1db; }
.feldreihe { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.feldreihe input {
  flex: 1 1 16rem; min-height: 52px; padding: 0 1.1rem;
  border-radius: 999px; border: 1px solid rgb(233 237 242 / 0.35);
  background: rgb(233 237 242 / 0.05); color: var(--schrift);
  font: inherit; font-size: 1rem;
}
.feldreihe input::placeholder { color: #7c8694; }
.feldreihe input:focus-visible { outline: 2px solid var(--schrift); outline-offset: 2px; border-color: transparent; }
.feldreihe input[aria-invalid='true'] { border-color: var(--ampel); }
.meldung { min-height: 1.5em; font-size: 0.95rem; color: #c9d1db; }
.meldung[data-art='fehler'] { color: #ff8a80; }

/* ---------- Fuß ---------- */
.fuss {
  position: relative; z-index: 3; background: var(--nacht);
  padding: 40px var(--rand) 28px; border-top: 1px solid rgb(233 237 242 / 0.08);
  color: var(--leise); font-size: 0.88rem; line-height: 1.7;
  display: grid; gap: 0.35rem;
}
.fuss-links { display: flex; gap: 1.2rem; }
.fuss-links a { color: #c9d1db; }
.fuss-hinweis { color: #7c8694; }
.fuss-zeile { margin-top: 1.4rem; width: 100%; max-width: none; text-align: center; color: #6f7986; font-size: 0.8rem; }
.fuss-zeile a { color: #9aa4b1; }

/* ---------- Hinweis zur Bedienung ---------- */
.hinweis {
  position: fixed; right: var(--rand); bottom: 26px; z-index: 15;
  color: rgb(233 237 242 / 0.62); font-size: 0.82rem; letter-spacing: 0.01em;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.hinweis.gesehen { opacity: 0; }
/* der Satz steht gleich da; nur wenn die Seite beim Standbild bleibt (keine Lampe), verschwindet er */
html[data-buehne='bildmodus'] .hinweis { opacity: 0; }

/* ---------- Handy ---------- */
@media (pointer: coarse) {
  .tipp-maus { display: none; }
  .tipp-finger { display: inline; }
}
@media (max-width: 760px) {
  .kopf { height: 58px; }
  .strasse { padding-bottom: 34px; }
  .strasse-text { max-width: 100%; }
  h1 { font-size: clamp(2.35rem, 11vw, 3.4rem); font-stretch: 116%; }
  .unterzeile { font-size: 1rem; }
  .handlung { margin-top: 1.5rem; }
  .knopf { width: 100%; }
  .knopf-klein { width: auto; }
  .laterne, .laterne.rechts, .aushalten, .ampel { align-items: flex-end; justify-content: flex-start; padding-bottom: 36px; }
  .stueck-text, .aushalten-text, .ampel-text { max-width: 100%; }
  .station h2 { font-size: 2.2rem; }
  .fakten li { grid-template-columns: 1fr; }
  .zaehler { gap: 1.1rem; }
  .hinweis { left: var(--rand); right: auto; bottom: auto; top: 70px; font-size: 0.78rem; }
  .buehne::after {
    background:
      linear-gradient(to top, rgb(5 7 10 / 0.82) 0%, rgb(5 7 10 / 0.4) 32%, rgb(5 7 10 / 0) 52%),
      linear-gradient(to bottom, rgb(5 7 10 / 0.5) 0, rgb(5 7 10 / 0) 96px);
  }
}

/* ---------- Ruhige Fassung ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .zeigen { opacity: 1; transform: none; }
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Rechtliches ---------- */
.kopf-statisch { position: static; }
.recht-text { max-width: 44rem; padding: 40px var(--rand) 80px; }
.recht-text h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.recht-text h2 { margin-top: 2.6rem; font-stretch: 118%; font-weight: 720; font-size: 1.6rem; }
.recht-text p { margin-top: 1rem; color: #c9d1db; }

/* ---------- Auftritt der Schrift: einmal, ruhig, von unten ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* sofort beim ersten Bild, unabhängig vom Laden der Szene und ohne auf JavaScript zu warten; nach 0,3 s fertig */
  .strasse-text > * { animation: auftritt 220ms var(--kurve) both; }
  .strasse-text > :nth-child(2) { animation-delay: 40ms; }
  .strasse-text > :nth-child(3) { animation-delay: 70ms; }
}
@keyframes auftritt {
  from { opacity: 0; transform: translateY(8px); }
}

/* ---------- Ton ---------- */
.kopf-rechts { display: flex; align-items: center; gap: 0.6rem; }
.ton {
  min-height: 40px; padding: 0 0.9em; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: rgb(233 237 242 / 0.78);
  font: inherit; font-size: 0.88rem; font-stretch: 108%;
  transition: color 200ms var(--kurve), background-color 200ms var(--kurve);
}
.ton:hover { color: var(--schrift); background: rgb(233 237 242 / 0.08); }
.ton[aria-pressed='true'] { color: var(--schrift); }
html:not(.js) .ton { display: none; }

/* ---------- Browser-Flächen im Ton der Seite ---------- */
::selection { background: rgb(255 61 46 / 0.55); color: #fff; }
html { scrollbar-color: #2a313b var(--nacht); accent-color: var(--schrift); }
input { caret-color: var(--ampel); }
a { text-underline-offset: 0.18em; }

/* weicher dunkler Grund hinter den Texten über der Szene */
.stueck-text, .aushalten-text, .ampel-text, .schluss-text { position: relative; isolation: isolate; }
.stueck-text::before, .aushalten-text::before, .ampel-text::before, .schluss-text::before {
  content: ''; position: absolute; inset: -3.5rem -4.5rem; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(5 7 10 / 0.62), rgb(5 7 10 / 0.32) 55%, rgb(5 7 10 / 0));
}

/* schmaler Kopf am Handy: alles in einer Zeile */
@media (max-width: 480px) {
  .kopf { padding: 0 16px; }
  .marke { font-size: 1rem; letter-spacing: 0.12em; }
  .kopf-rechts { gap: 0.2rem; }
  .ton { padding: 0 0.55em; font-size: 0.82rem; }
  .knopf-klein { padding: 0 0.95em; font-size: 0.84rem; min-height: 38px; }
}
.stationen { overflow-x: clip; }
html, body { overflow-x: clip; }

/* ---------- Standbilder (scharf vorab gerendert): Ladebild und Fassung für sehr schwache Grafik ---------- */
.standbilder { position: absolute; inset: 0; }
.standbilder > div {
  position: absolute; inset: 0; background: center / cover no-repeat;
  opacity: 0; transition: opacity 700ms ease;
}
.standbilder > div.an { opacity: 1; }
.messwerte {
  position: fixed; left: 12px; bottom: 12px; z-index: 40; margin: 0; padding: 6px 10px; border-radius: 6px;
  background: rgb(0 0 0 / 0.72); color: #cfe; font: 12px/1.4 'Geist Mono', ui-monospace, monospace; pointer-events: none;
}

/* lebt die Szene, werden Standbild-Ebenen darunter nicht mehr gezeichnet (spart dem Browser ganze Bildschirmflächen je Bild) */
.buehne.verdeckt { background-image: none !important; }
/* lebt die Szene allein, rechnet sie die Abdunkelung selbst ins Bild (spart auf schwacher Grafik eine ganze Ebene je Bild) */
.buehne.verdeckt::after { display: none; }
.buehne.verdeckt .standbilder { display: none; }

/* Seitenfuß auf eigener Grafikebene: Rutscht der Fuß am Seitenende über die feste Bühne, legt Chrome (Windows, NVIDIA, 125 %)
   die Fläche der Bühne neu an und zeigt oben einen Streifen fremden Grafikspeicher (lp-205, 29.10.2026). Eigene Ebene verhindert das. */
.fuss { transform: translateZ(0); }
