/* vendhead.de – Entwurf "Jeder Automat hat einen Puls."
   Mobile first: Grundregeln gelten für 360–430 px, darüber nur Erweiterungen.
   Animiert werden ausschließlich transform und opacity (Ausnahme: die Pulslinie
   selbst, stroke-dashoffset). */

@font-face {
  font-family: "Space Grotesk";
  src: url("SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --nacht:   #0e1116;
  --nacht-2: #131821;
  --nacht-3: #1a202b;
  --hell:    #f4f6f9;
  --papier:  #ffffff;
  --tinte:   #12161d;
  --text-d:  #e8ebf0;      /* Text auf dunkel */
  --leise-d: #a3acba;      /* Nebentext auf dunkel, AA auf #0e1116 */
  --leise-h: #4f5866;      /* Nebentext auf hell, AA auf #f4f6f9 */
  --linie-d: rgba(255,255,255,.10);
  --linie-h: #d8dde4;

  --blau:    #1677ff;
  --blau-h:  #5ea2ff;      /* Blau auf dunkel */
  --puls:    #ff5c4d;
  --puls-h:  #ff7b6e;
  --gruen:   #12b76a;
  --gruen-h: #3dd68c;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --display: "Space Grotesk", var(--sans);

  --rand: clamp(30px, 6vw, 96px);     /* linker Rand: hier läuft die Pulslinie */
  --rand-r: clamp(18px, 5vw, 80px);
  --max: 1240px;
  --kopf: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--kopf) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw + 12px, 18px);
  line-height: 1.6;
  color: var(--text-d);
  background: var(--nacht);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blau-h); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.springen {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--papier); color: var(--tinte); padding: 10px 14px; border-radius: 8px;
}
.springen:focus { top: 8px; }

/* ── Kopf / Navigation ─────────────────────────────────────── */
.kopf {
  position: sticky; top: 0; z-index: 100;
  height: var(--kopf);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--rand-r) 0 var(--rand);
  border-bottom: 1px solid var(--linie-d);
}
/* Unschärfe auf einer eigenen Ebene: backdrop-filter am Kopf selbst würde
   das fixierte Vollbildmenü in den Kopf einsperren. */
.kopf::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(14,17,22,.82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  transition: background-color .3s;
}
.marke { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.marke img { height: 22px; width: auto; }
.nav-breit { display: none; }
.nav-breit a, .nav-kontakt {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
  color: var(--leise-d); text-decoration: none; border-radius: 6px;
}
.nav-breit a:hover, .nav-breit a:focus-visible { color: var(--text-d); }
.nav-breit a[data-farbe="puls"]:hover  { color: var(--puls-h); }
.nav-breit a[data-farbe="gruen"]:hover { color: var(--gruen-h); }
.nav-breit a[data-farbe="blau"]:hover  { color: var(--blau-h); }
.nav-kontakt { display: none; color: var(--text-d); border: 1px solid rgba(255,255,255,.22); padding: 0 16px; border-radius: 999px; }
.nav-kontakt:hover { border-color: var(--blau-h); color: var(--blau-h); }

/* Über den hellen Stationen wird der Kopf hell */
.kopf { transition: border-color .3s; }
.kopf.hell { border-bottom-color: var(--linie-h); }
.kopf.hell::before { background: rgba(255,255,255,.86); }
.kopf.hell .menue-flaeche { background: var(--papier); color: var(--tinte); }
.kopf.hell .menue-flaeche a small { color: var(--leise-h); }
.kopf.hell .menue-flaeche a { border-color: var(--linie-h); }
.kopf.hell .nav-breit a { color: var(--leise-h); }
.kopf.hell .nav-breit a:hover { color: var(--tinte); }
.kopf.hell .nav-kontakt { color: var(--tinte); border-color: #b8c0cc; }
.kopf.hell .menue > summary span, .kopf.hell .menue > summary span::before, .kopf.hell .menue > summary span::after { background: var(--tinte); }
.kopf.hell .menue[open] > summary span { background: transparent; }
.kopf .marke .auf-hell { display: none; }
.kopf.hell .marke .auf-dunkel { display: none; }
.kopf.hell .marke .auf-hell { display: block; }
.kopf.hell .nav-breit::before, .kopf.hell .nav-breit::after { background: var(--linie-h); }

/* Mobil: Vollbildmenü über <details>, geht ohne JS */
.menue { position: static; }
.menue > summary {
  list-style: none; cursor: pointer;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  margin-right: -10px;
}
.menue > summary::-webkit-details-marker { display: none; }
.menue > summary span, .menue > summary span::before, .menue > summary span::after {
  display: block; width: 22px; height: 2px; background: var(--text-d); border-radius: 2px; position: relative;
  transition: transform .25s ease, opacity .2s;
}
.menue > summary span::before, .menue > summary span::after { content: ""; position: absolute; left: 0; }
.menue > summary span::before { transform: translateY(-7px); }
.menue > summary span::after  { transform: translateY(7px); }
.menue[open] > summary span { background: transparent; }
.menue[open] > summary span::before { transform: rotate(45deg); }
.menue[open] > summary span::after  { transform: rotate(-45deg); }
.menue-flaeche {
  position: fixed; inset: var(--kopf) 0 0 0; z-index: 99;
  background: var(--nacht);
  padding: 24px var(--rand-r) calc(32px + env(safe-area-inset-bottom)) var(--rand);
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.menue-flaeche a {
  display: flex; align-items: baseline; gap: 14px; min-height: 56px; padding: 8px 0;
  text-decoration: none; border-bottom: 1px solid var(--linie-d);
  font-family: var(--display); font-weight: 600; font-size: clamp(28px, 8vw, 40px); letter-spacing: -.02em; line-height: 1.2;
}
.menue-flaeche a small { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--leise-d); letter-spacing: .08em; }
.menue-flaeche a.k { margin-top: auto; border: 0; color: var(--blau-h); font-size: 22px; }
/* Klein unter „Kontakt": Impressum und Datenschutz, im Menü immer da. */
.menue-recht { display: flex; gap: 24px; padding-top: 12px; }
.menue-flaeche .menue-recht a { min-height: 44px; padding: 0; border: 0; font-family: var(--mono); font-weight: 400; font-size: 13px; letter-spacing: .04em; color: var(--leise-d); align-items: center; }
.kopf.hell .menue-flaeche .menue-recht a { color: var(--leise-h); }
.nav-recht { display: none; }
.menue[open] .menue-flaeche { animation: einblenden .25s ease both; }
@keyframes einblenden { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .menue { display: none; }
  .nav-breit { display: flex; align-items: center; gap: 2px; }
  .nav-breit::before, .nav-breit::after { content: ""; width: 1px; height: 18px; background: var(--linie-d); margin: 0 12px; }
  .nav-kontakt { display: inline-flex; }
  .kopf { justify-content: flex-start; }
  .nav-recht { display: flex; margin-left: auto; margin-right: 8px; }
  .nav-recht a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--leise-d); text-decoration: none; }
  .nav-recht a:hover, .nav-recht a:focus-visible { color: var(--text-d); }
  .kopf.hell .nav-recht a { color: var(--leise-h); }
  .kopf.hell .nav-recht a:hover { color: var(--tinte); }
  .nav-kontakt { margin-left: 0; }
}

/* ── Pulslinie über die ganze Seite ────────────────────────── */
.linie {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  pointer-events: none; z-index: 1; overflow: visible;
}
.linie path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.linie .schatten { stroke-width: 7; opacity: .16; }
.linie .zug { stroke-width: 2; }
.linie .spur { stroke-width: 1; opacity: .14; }
.linie .kopfpunkt { will-change: transform; }
/* Ohne JS: ruhige senkrechte Linie am Rand */
html:not(.js) .seite { background-image: linear-gradient(var(--blau), var(--blau)); background-size: 2px 100%; background-repeat: no-repeat; background-position: calc(var(--rand) / 2) 0; }

/* ── Grundgerüst der Stationen ─────────────────────────────── */
.seite { position: relative; }
.station {
  position: relative; overflow-x: clip;
  padding: clamp(72px, 12vw, 160px) var(--rand-r) clamp(72px, 12vw, 160px) var(--rand);
}
.innen { max-width: var(--max); margin: 0 auto; position: relative; z-index: 2; }
.raster { margin-top: 56px; }
.kennung {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--leise-d);
  margin-bottom: 20px;
}
.kennung b { font-weight: 600; color: var(--akzent, var(--blau-h)); }
.kennung img, .kennung svg { height: clamp(26px, 2vw + 16px, 40px); width: auto; }
.titel {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 9vw, 120px); line-height: .98; letter-spacing: -.035em;
  text-wrap: balance; overflow-wrap: break-word; hyphens: manual;
}
.titel em { font-style: normal; color: var(--akzent, var(--blau-h)); }
.vorspann { margin-top: 20px; max-width: 34em; font-size: clamp(17px, 1.2vw + 12px, 22px); color: var(--leise-d); line-height: 1.5; }
.vorspann strong { color: var(--text-d); font-weight: 600; }

.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; text-decoration: none; letter-spacing: .01em;
  transition: transform .15s ease, opacity .15s;
}
.knopf:active { transform: scale(.98); }
.knopf.voll { background: var(--blau); color: #fff; }
.knopf.voll:hover { opacity: .92; }
.knopf.rand { border: 1px solid rgba(255,255,255,.28); color: var(--text-d); }
.knopf.rand:hover { border-color: var(--text-d); }


.zwei { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .zwei { grid-template-columns: 1fr 1fr; gap: clamp(48px, 6vw, 96px); }
}

/* ── Bytes als Textur ──────────────────────────────────────── */
.bytes {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
  font-family: var(--mono); font-size: 13px; line-height: 2.4; letter-spacing: .12em;
  color: #fff; opacity: .055; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}
.bytes div { width: max-content; animation: laufen 70s linear infinite; }
.bytes div:nth-child(2n) { animation-duration: 95s; animation-direction: reverse; }
.bytes div:nth-child(3n) { animation-duration: 120s; }
@keyframes laufen { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── 0 Bühne ──────────────────────────────────────────────── */
.buehne {
  min-height: calc(100svh - var(--kopf));
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(40px, 8vh, 96px); padding-bottom: clamp(40px, 8vh, 96px);
  background: radial-gradient(120% 70% at 70% 40%, #16202f 0%, var(--nacht) 60%);
  overflow: hidden;
}
.buehne .innen { width: 100%; position: relative; z-index: 2; }
.buehne h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(46px, 11vw, 140px); line-height: .94; letter-spacing: -.045em;
  max-width: 11ch; text-wrap: balance;
}
.buehne h1 .rot { color: var(--puls-h); }
.ekg { position: relative; z-index: 1; width: 100%; height: clamp(90px, 16vw, 180px); margin: clamp(16px, 3vh, 32px) 0; overflow: visible; }
.ekg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ekg .grund { stroke: rgba(255,255,255,.10); stroke-width: 1.5; }
.ekg .schlag { stroke: var(--puls-h); stroke-width: 3; stroke-dasharray: .22 .78; animation: schlagen 2.4s linear infinite; }
.ekg .schlag-glanz { stroke: var(--puls); stroke-width: 12; opacity: .18; stroke-dasharray: .22 .78; animation: schlagen 2.4s linear infinite; }
@keyframes schlagen { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.buehne .unter { max-width: 30em; font-size: clamp(18px, 1.3vw + 13px, 24px); color: var(--leise-d); line-height: 1.45; }
.buehne .unter strong { color: var(--text-d); font-weight: 500; }
.buehne .knopf.voll { background: var(--puls); color: #1a0a08; }
.taktmass { margin-top: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--leise-d); display: flex; gap: 10px; align-items: center; }
.taktmass i { width: 8px; height: 8px; border-radius: 50%; background: var(--puls-h); animation: punkt 1.2s ease-in-out infinite; }
@keyframes punkt { 0%, 100% { transform: scale(.6); opacity: .5; } 15% { transform: scale(1.3); opacity: 1; } 40% { transform: scale(.8); opacity: .7; } }

/* ── 1 vh pulse ───────────────────────────────────────────── */
.st-pulse { --akzent: var(--puls-h); --grund: var(--nacht); background: var(--nacht); }
.st-pulse .titel em { color: var(--puls-h); }
.box-bild { position: relative; width: min(100%, 520px); margin: 0 auto; aspect-ratio: 1 / .9; }
.box-bild svg { width: 100%; height: 100%; overflow: visible; }
.schicht { transform-box: fill-box; }
.box-led { animation: punkt 1.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.box-beschriftung { position: absolute; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--leise-d); text-transform: uppercase; }

/* ── 2 Zentrale ───────────────────────────────────────────── */
.st-zentrale { --akzent: var(--blau-h); --grund: var(--nacht-2); background: var(--nacht-2); }
.fenster {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #0b0e13; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  font-size: 14px;
}
.fenster-leiste { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--linie-d); font-family: var(--mono); font-size: 11px; color: var(--leise-d); }
.fenster-leiste i { width: 9px; height: 9px; border-radius: 50%; background: #2a313d; }
.fenster-leiste span { margin-left: 8px; }
.baum { padding: 12px 6px 16px; }
.baum li { list-style: none; }
.zeile { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 8px; white-space: nowrap; }
.zeile .pfeil { width: 12px; color: var(--leise-d); font-size: 10px; transition: transform .3s; }
.zeile .art { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--leise-d); min-width: 64px; }
.zeile .zahl { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--leise-d); }
.ebene-1 { padding-left: 18px; }
.ebene-2 { padding-left: 36px; }
.zeile.automat .art { min-width: 0; }
.zustand { width: 9px; height: 9px; border-radius: 50%; background: var(--gruen-h); flex: none; position: relative; }
.zustand.rot { background: var(--gruen-h); }
.zustand.rot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--puls); opacity: 0; transition: opacity .4s; }
.zeile.markiert { background: rgba(94,162,255,.10); }
.ticket {
  margin: 4px 12px 0; padding: 12px 14px; border-radius: 10px;
  background: #141a24; border: 1px solid rgba(255,92,77,.45);
  display: grid; gap: 4px; font-size: 13px;
}
.ticket b { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--puls-h); font-weight: 500; text-transform: uppercase; }
.ticket span { color: var(--leise-d); font-size: 12px; }
/* Ablauf im Baum: Ausgangszustand nur wenn JS die Szene steuert */
html.js .szene .zustand.rot::after { opacity: 0; }
html.js .szene.an .zustand.rot::after { opacity: 1; transition-delay: 1.9s; }
html.js .szene .ticket { opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
html.js .szene.an .ticket { opacity: 1; transform: none; transition-delay: 1.1s; }
html.js .szene .zeile.automat { opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s; }
html.js .szene.an .zeile.automat { opacity: 1; transform: none; }
html.js .szene.an li:nth-child(2) > .zeile.automat { transition-delay: .12s; }
html.js .szene.an li:nth-child(3) > .zeile.automat { transition-delay: .24s; }
html.js .szene.an li:nth-child(4) > .zeile.automat { transition-delay: .36s; }
html.js .szene .zeile.offen .pfeil { transform: rotate(0deg); }
html.js .szene.an .zeile.offen .pfeil { transform: rotate(90deg); }
html:not(.js) .zustand.rot::after { opacity: 1; }
html:not(.js) .zeile.offen .pfeil { transform: rotate(90deg); }

.montag { margin-top: clamp(64px, 10vw, 120px); }
.montag h3 { font-family: var(--display); font-size: clamp(28px, 4vw, 52px); letter-spacing: -.02em; line-height: 1.05; }
.umschalter { display: none; margin-top: 20px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); width: fit-content; }
.umschalter button { min-height: 44px; padding: 0 18px; border: 0; background: none; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--leise-d); }
.umschalter button[aria-pressed="true"] { background: var(--text-d); color: var(--tinte); }
.geschichten { display: grid; gap: 20px; margin-top: 24px; }
.geschichte { padding: 24px; border-radius: 16px; border: 1px solid var(--linie-d); }
.geschichte h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--leise-d); font-weight: 500; }
.geschichte p + p { margin-top: 10px; }
.geschichte.vorher { color: var(--leise-d); background: repeating-linear-gradient(-45deg, rgba(255,255,255,.015) 0 8px, transparent 8px 16px); }
.geschichte.nachher { background: linear-gradient(180deg, rgba(22,119,255,.12), rgba(22,119,255,.03)); border-color: rgba(94,162,255,.35); }
.geschichte.nachher h4 { color: var(--blau-h); }
@media (max-width: 899px) {
  html.js .umschalter { display: flex; }
  html.js .geschichten[data-zeigt="vorher"] .nachher,
  html.js .geschichten[data-zeigt="nachher"] .vorher { display: none; }
}
@media (min-width: 900px) { .geschichten { grid-template-columns: 1fr 1fr; } }

/* ── 3 Im Feld ────────────────────────────────────────────── */
.st-feld { --akzent: var(--blau-h); --grund: var(--nacht-3); background: linear-gradient(var(--nacht-2), var(--nacht-3)); }
.telefon {
  position: relative; width: min(300px, 82vw); margin: 0 auto; aspect-ratio: 9 / 18.5;
  border-radius: 40px; padding: 10px; background: #050608;
  box-shadow: 0 0 0 1.5px #2b313b, 0 50px 90px -30px rgba(0,0,0,.8);
}
.telefon::before { content: ""; position: absolute; top: 18px; left: 50%; width: 70px; height: 20px; margin-left: -35px; border-radius: 12px; background: #050608; z-index: 3; }
.schirm { position: relative; height: 100%; border-radius: 31px; overflow: hidden; background: #f3f5f8; color: var(--tinte); font-size: 12.5px; display: flex; flex-direction: column; }
.schirm-kopf { padding: 44px 16px 0; background: #fff; }
.schirm-kopf small { font-family: var(--mono); font-size: 10px; color: #5c6573; letter-spacing: .08em; }
.schirm-kopf strong { display: block; font-family: var(--display); font-size: 19px; letter-spacing: -.01em; line-height: 1.2; margin: 2px 0 10px; }
.reiter { display: flex; gap: 18px; border-bottom: 1px solid #e3e7ec; }
.reiter span { padding: 8px 0; font-weight: 600; color: #5c6573; }
.reiter span.aktiv { color: var(--blau); box-shadow: inset 0 -2px 0 var(--blau); }
.schirm-inhalt { padding: 12px; display: grid; gap: 8px; align-content: start; flex: 1; }
.karte { background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 0 #e3e7ec; }
.karte .z { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.karte .z span:first-child { color: #5c6573; }
.karte h5 { margin: 0 0 4px; font-size: 11px; font-family: var(--mono); letter-spacing: .08em; color: #5c6573; font-weight: 500; text-transform: uppercase; }
.ampel { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.schirm-fuss { display: flex; justify-content: space-around; background: #fff; border-top: 1px solid #e3e7ec; padding: 8px 0 18px; font-size: 10.5px; color: #5c6573; }
.schirm-fuss span { display: grid; justify-items: center; gap: 3px; }
.schirm-fuss span.aktiv { color: var(--blau); font-weight: 600; }
.schirm-fuss svg { width: 20px; height: 20px; }
.scanrahmen { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
html.js .scanrahmen { opacity: 0; }
/* Der Sucher der Kamera: abgedunkelt drumherum, darin der Aufkleber mit dem
   Code des Automaten, die Linie fährt einmal darüber, dann der Haken.
   Ohne den Aufkleber las sich das als leerer Kasten mit Strich. */
.scanrahmen .sucher { width: 62%; aspect-ratio: 1; border-radius: 18px; border: 3px solid #fff; box-shadow: 0 0 0 999px rgba(5,8,12,.62); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  /* Die Kamera sieht die Front des Automaten, nicht das Blatt dahinter. */
  background: radial-gradient(120% 90% at 30% 20%, #3a414b 0%, #22272e 60%, #181c22 100%); }
.scanrahmen .etikett { width: 74%; padding: 10px 10px 6px; border-radius: 8px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.35); display: grid; gap: 4px; justify-items: center; transform: rotate(-4deg); }
.scanrahmen .etikett .striche { width: 100%; height: 46px; background: repeating-linear-gradient(90deg, #0b0f14 0 2px, transparent 2px 4px, #0b0f14 4px 7px, transparent 7px 8px, #0b0f14 8px 9px, transparent 9px 12px, #0b0f14 12px 15px, transparent 15px 16px); }
.scanrahmen .etikett .etikett-nr { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: #0b0f14; }
.scanrahmen .laser { position: absolute; left: 5%; right: 5%; top: 12%; height: 2px; border-radius: 2px; background: var(--puls-h); box-shadow: 0 0 14px 2px var(--puls); }
.scanrahmen .erkannt { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 999px; background: #12b76a; color: #fff; font-weight: 700; font-size: 12px; white-space: nowrap; opacity: 0; box-shadow: 0 6px 16px rgba(18,183,106,.35); }
.scanrahmen .erkannt svg { flex: 0 0 15px; width: 15px; height: 15px; }
html:not(.js) .scanrahmen { display: none; }

/* ── 4 vh pay ─────────────────────────────────────────────── */
.st-pay { --akzent: var(--gruen-h); --grund: #0d1a14; background: radial-gradient(100% 60% at 70% 50%, #0f2a1d 0%, #0c1712 70%); }
.st-pay .titel em { color: var(--gruen-h); }
.pay-marke { height: 34px; width: auto; }
.pay-buehne { position: relative; width: min(100%, 460px); margin: 0 auto; aspect-ratio: 1 / 1.05; }
.automat-front {
  position: absolute; left: 4%; top: 4%; width: 62%; height: 92%;
  border-radius: 16px; background: linear-gradient(160deg, #1b2a23, #121c17); border: 1px solid rgba(255,255,255,.08);
}
.automat-front .glas { position: absolute; inset: 7% 34% 34% 8%; border-radius: 8px; background: repeating-linear-gradient(180deg, rgba(255,255,255,.06) 0 2px, transparent 2px 22%); border: 1px solid rgba(255,255,255,.08); }
.automat-front .schacht { position: absolute; left: 8%; right: 34%; bottom: 8%; height: 12%; border-radius: 6px; background: #0a0f0c; }
.aufkleber {
  position: absolute; left: 47%; top: 30%; width: 16%;
  background: #fff; border-radius: 6px; padding: 2.4%;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  display: grid; gap: 6%; justify-items: center;
}
.aufkleber svg { width: 100%; height: auto; }
.aufkleber span { font-family: var(--display); font-weight: 700; font-size: clamp(8px, 1.4vw, 11px); color: #0c1712; letter-spacing: -.01em; }
.pay-telefon {
  position: absolute; right: 2%; top: 14%; width: 46%; aspect-ratio: 9 / 18;
  border-radius: 26px; padding: 6px; background: #050608; box-shadow: 0 0 0 1.5px #2b3a33, 0 30px 60px -20px rgba(0,0,0,.8);
  transform-origin: 80% 90%;
}
.pay-schirm { height: 100%; border-radius: 20px; background: #f5f8f6; color: #0c1712; overflow: hidden; display: grid; align-content: start; gap: 8px; padding: 18% 9% 8%; font-size: 11px; }
.pay-schirm .gruss { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: #4a5a52; text-transform: uppercase; }
.pay-karte { border-radius: 12px; padding: 10px; background: linear-gradient(135deg, #0f7a4a, #12b76a); color: #fff; display: grid; gap: 2px; }
.pay-karte small { font-size: 9px; opacity: .85; letter-spacing: .06em; text-transform: uppercase; }
.pay-karte strong { font-family: var(--display); font-size: 20px; letter-spacing: -.01em; }
.pay-karte.frei { background: #0c1712; }
.pay-karte.frei strong { font-size: 14px; }
.pay-knopf { border-radius: 999px; background: #0c1712; color: #fff; text-align: center; padding: 7px; font-weight: 600; font-size: 11px; }
.pay-schein { position: absolute; left: 50%; top: 32%; width: 26%; aspect-ratio: 1; margin-left: -13%; border-radius: 50%; border: 2px solid var(--gruen-h); opacity: 0; }
html:not(.js) .pay-schein { display: none; }

/* ── 5 Abrechnung: ab hier hell ───────────────────────────── */
.uebergang { height: clamp(120px, 20vw, 260px); background: linear-gradient(#0c1712, var(--hell)); }
.st-abrechnung { --akzent: var(--blau); --grund: var(--hell); background: var(--hell); color: var(--tinte); }
.st-abrechnung .kennung, .st-module .kennung { color: var(--leise-h); }
.st-abrechnung .vorspann, .st-module .vorspann { color: var(--leise-h); }
.st-abrechnung .vorspann strong { color: var(--tinte); }
.st-abrechnung .titel em { color: var(--blau); }
.bericht { background: var(--papier); border: 1px solid var(--linie-h); border-radius: 18px; padding: clamp(16px, 3vw, 32px); box-shadow: 0 30px 60px -40px rgba(18,22,29,.35); }
.bericht-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--leise-h); letter-spacing: .06em; }
.bericht-kopf strong { font-family: var(--display); font-size: 18px; color: var(--tinte); letter-spacing: -.01em; }
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.kachel { border: 1px solid var(--linie-h); border-radius: 12px; padding: 12px; }
.kachel small { display: block; font-size: 12px; color: var(--leise-h); }
.kachel strong { font-family: var(--display); font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (min-width: 600px) { .kacheln { grid-template-columns: repeat(4, 1fr); } }
.saeulen { display: flex; align-items: flex-end; gap: clamp(3px, .8vw, 8px); height: clamp(120px, 18vw, 200px); padding-top: 8px; border-bottom: 1px solid var(--linie-h); }
.saeulen i { flex: 1; height: var(--h); background: var(--blau); border-radius: 4px 4px 0 0; transform-origin: bottom; opacity: .9; }
.saeulen i:nth-child(7n) { background: #9cc3ff; }
.saeulen-achse { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--leise-h); margin-top: 6px; }
.beispiel { margin-top: 10px; font-size: 12px; color: var(--leise-h); }

/* ── 6 Alles drin ─────────────────────────────────────────── */
.st-module { --akzent: var(--blau); background: linear-gradient(var(--hell), var(--papier)); color: var(--tinte); }
.wand { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 40px; }
@media (min-width: 700px) { .wand { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .wand { grid-template-columns: repeat(5, 1fr); gap: 10px; } }
.modul {
  position: relative; min-height: 104px; border-radius: 14px;
  background: var(--papier); border: 1px solid var(--linie-h);
  overflow: hidden;
}
.modul button {
  all: unset; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end;
  width: 100%; min-height: 104px; padding: 14px; cursor: pointer;
}
.modul button:focus-visible { outline: 2px solid var(--blau); outline-offset: -2px; border-radius: 14px; }
.modul .name { font-family: var(--display); font-weight: 600; font-size: clamp(16px, .6vw + 13px, 19px); letter-spacing: -.01em; line-height: 1.15; hyphens: auto; overflow-wrap: anywhere; }
.modul button::before { content: ""; position: absolute; top: 14px; left: 14px; width: 8px; height: 8px; border-radius: 2px; background: var(--blau); transform: rotate(45deg); opacity: .8; }
.modul .satz {
  position: absolute; inset: 0; padding: 14px; display: flex; align-items: flex-end;
  background: var(--blau); color: #fff; font-size: 14px; line-height: 1.4;
  pointer-events: none;
}
html.js .modul .satz { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .25s; }
html.js .modul.offen .satz { opacity: 1; transform: none; }
@media (hover: hover) { html.js .modul:hover .satz { opacity: 1; transform: none; } }
/* Ohne JS: Satz unter dem Namen */
html:not(.js) .modul .satz { position: static; background: none; color: var(--leise-h); padding: 0 14px 14px; }

/* ── 7 Schluss ────────────────────────────────────────────── */
.st-schluss { background: var(--papier); color: var(--tinte); text-align: left; padding-bottom: 48px; }
.st-schluss .wort { width: clamp(220px, 50vw, 520px); height: auto; }
.st-schluss .knopf.rand { border-color: #b8c0cc; color: var(--tinte); }
/* Schluss: ein einziger, breiter Knopf statt Knopf plus Mailadresse. Auf
   dem Telefon über die ganze Breite, am Desktop deutlich breiter als die
   Knöpfe oben, damit er als Ende der Seite steht. */
.st-schluss .knoepfe { margin-top: clamp(28px, 4vw, 44px); }
.knopf.breit { width: 100%; min-height: 64px; font-size: clamp(18px, 1.8vw, 22px); }
@media (min-width: 700px) { .knopf.breit { width: auto; min-width: 540px; padding: 0 56px; } }
.st-schluss .mail:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.fuss {
  position: relative; z-index: 2; background: var(--papier); color: var(--leise-h);
  border-top: 1px solid var(--linie-h);
  padding: 20px var(--rand-r) calc(28px + env(safe-area-inset-bottom)) var(--rand);
  font-family: var(--mono); font-size: 13px;
}
.fuss .innen { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; }
.fuss a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.fuss a:hover { color: var(--blau); }
.fuss .copy { width: 100%; padding-top: 6px; }
@media (min-width: 700px) { .fuss .copy { width: auto; margin-left: auto; padding: 0; } }


/* ── Stichworte je Station ────────────────────────────────── */
.stichworte { display: grid; gap: clamp(10px, 1.6vw, 18px); align-content: center; }
.stichworte li {
  display: flex; align-items: center; gap: clamp(14px, 1.6vw, 22px);
  font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1;
  font-size: clamp(26px, 3.4vw + 10px, 52px);
}
.stichworte li::before { content: ""; flex: none; width: .28em; height: .28em; border-radius: 2px; background: var(--akzent); transform: rotate(45deg); }
.st-abrechnung .stichworte { margin-top: 48px; }
.st-abrechnung .stichworte li { color: var(--tinte); }
.st-abrechnung .bericht { margin-top: 56px; }
@media (min-width: 700px) { .st-abrechnung .stichworte { display: flex; flex-wrap: wrap; gap: 12px 40px; } }
.geschichte p { font-family: var(--display); font-size: clamp(22px, 1.6vw + 14px, 34px); line-height: 1.2; letter-spacing: -.015em; font-weight: 500; }
.geschichte.nachher p { color: var(--text-d); }
.neugierig { margin-top: clamp(40px, 6vw, 72px); font-family: var(--display); font-size: clamp(34px, 6vw, 84px); font-weight: 300; letter-spacing: -.03em; line-height: 1.05; color: var(--leise-h); }
.neugierig b { font-weight: 700; color: var(--tinte); }
.vorspann { font-size: clamp(19px, 1.4vw + 13px, 26px); }

/* ── Erscheinen beim Scrollen ─────────────────────────────── */
/* 1) Scroll-gesteuerte Animationen, wo der Browser sie kann */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .auf { animation: auftauchen linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .box-bild .schicht { animation: zusammensetzen linear both; animation-timeline: --box; animation-range: contain 0% contain 60%; }
    .box-bild { view-timeline: --box block; }
    .box-bild .s-boden   { --dy: 90px;  }
    .box-bild .s-platine { --dy: -70px; animation-range: contain 5% contain 60%; }
    .box-bild .s-stecker { --dy: 0px; --dx: -120px; animation-range: contain 10% contain 65%; }
    .box-bild .s-deckel  { --dy: -170px; animation-range: contain 18% contain 75%; }
    .saeulen i { animation: wachsen linear both; animation-timeline: --saeulen; animation-range: entry 20% cover 45%; }
    .saeulen { view-timeline: --saeulen block; }
  }
}
@keyframes auftauchen { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
@keyframes zusammensetzen { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)); } to { opacity: 1; transform: none; } }
@keyframes wachsen { from { transform: scaleY(.04); } to { transform: none; } }

/* 2) Rückfall: IntersectionObserver setzt .da (html.io nur wenn view() fehlt) */
@media (prefers-reduced-motion: no-preference) {
  html.io .auf { opacity: 0; transform: translateY(36px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
  html.io .auf.da { opacity: 1; transform: none; }
  html.io .box-bild .schicht { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)); transition: opacity .7s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
  html.io .box-bild .s-boden   { --dy: 90px; }
  html.io .box-bild .s-platine { --dy: -70px; transition-delay: .15s; }
  html.io .box-bild .s-stecker { --dx: -120px; transition-delay: .3s; }
  html.io .box-bild .s-deckel  { --dy: -170px; transition-delay: .5s; }
  html.io .box-bild.da .schicht { opacity: 1; transform: none; }
  html.io .saeulen i { transform: scaleY(.04); transition: transform .9s cubic-bezier(.2,.8,.2,1); }
  html.io .saeulen.da i { transform: none; }
}

/* Szenen mit festem Ablauf (Telefon, vh pay) */
@media (prefers-reduced-motion: no-preference) {
  /* 7 s im Kreis: Blatt stehen lassen, Sucher auf, Linie fährt über den
     Code, Haken, Sucher zu. Alle drei Teile laufen auf derselben Uhr. */
  html.js .feld-szene.an .scanrahmen { animation: scannen 7s ease-in-out infinite; }
  html.js .feld-szene.an .scanrahmen .laser { animation: laser 7s ease-in-out infinite; }
  html.js .feld-szene.an .scanrahmen .erkannt { animation: erkannt 7s ease-out infinite; }
  @keyframes scannen { 0%, 46% { opacity: 0; } 51%, 90% { opacity: 1; } 95%, 100% { opacity: 0; } }
  /* `top` statt transform: Der Weg hängt an der Größe des Suchers, und die
     kennt nur die Prozentangabe. Ein 2-px-Strich kostet dabei nichts. */
  @keyframes laser { 0%, 52% { top: 12%; opacity: 1; } 70% { top: 86%; opacity: 1; } 72%, 100% { top: 86%; opacity: 0; } }
  @keyframes erkannt { 0%, 71% { opacity: 0; transform: translate(-50%, 8px); } 75%, 90% { opacity: 1; transform: translate(-50%, 0); } 95%, 100% { opacity: 0; transform: translate(-50%, 0); } }
  html.js .pay-szene .pay-telefon { transform: translate(40%, 12%) rotate(12deg); opacity: 0; }
  html.js .pay-szene.an .pay-telefon { animation: schwenken 6.5s cubic-bezier(.5,0,.2,1) infinite; }
  html.js .pay-szene.an .pay-schein { animation: ring 6.5s ease-out infinite; }
  html.js .pay-szene .pay-karte, html.js .pay-szene .pay-knopf { opacity: 0; transform: translateY(10px); }
  html.js .pay-szene.an .pay-karte { animation: karte 6.5s ease infinite; }
  html.js .pay-szene.an .pay-karte.frei { animation-name: karte2; }
  html.js .pay-szene.an .pay-knopf { animation: karte2 6.5s ease infinite; }
  @keyframes schwenken {
    0%   { transform: translate(40%, 12%) rotate(12deg); opacity: 0; }
    12%  { opacity: 1; }
    30%, 86% { transform: translate(-58%, 6%) rotate(-6deg); opacity: 1; }
    100% { transform: translate(40%, 12%) rotate(12deg); opacity: 0; }
  }
  @keyframes ring { 0%, 26% { opacity: 0; transform: scale(.4); } 30% { opacity: .9; } 46%, 100% { opacity: 0; transform: scale(1.6); } }
  @keyframes karte  { 0%, 36% { opacity: 0; transform: translateY(10px); } 44%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
  @keyframes karte2 { 0%, 50% { opacity: 0; transform: translateY(10px); } 58%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
}

/* ── Ruhige Fassung ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bytes { display: none; }
  .ekg .schlag, .ekg .schlag-glanz { stroke-dasharray: none; }
  .ekg .schlag-glanz { opacity: .12; }
  html.js .szene .zustand.rot::after { opacity: 1; }
  html.js .szene .ticket, html.js .szene .zeile.automat { opacity: 1; transform: none; }
  html.js .szene .zeile.offen .pfeil { transform: rotate(90deg); }
  html.js .pay-szene .pay-telefon { transform: translate(-6%, 8%) rotate(-4deg); opacity: 1; }
  html.js .pay-szene .pay-karte, html.js .pay-szene .pay-knopf { opacity: 1; transform: none; }
}

/* ── Tablet / Desktop ─────────────────────────────────────── */
@media (min-width: 768px) {
  .bytes { font-size: 14px; }
}
@media (min-width: 960px) {
  .buehne .innen { display: grid; grid-template-columns: 1fr; }
  .st-feld .zwei { grid-template-columns: .9fr 1.1fr; }
  .st-feld .zwei > :first-child { order: 2; }
  .st-pay .zwei { grid-template-columns: .8fr 1.2fr; }
}
