/* ADProTac, Entwurf E3 "Springerzug", Runde 2.
   Der Springer aus Logo und Foto gibt das Bewegungsprinzip vor: zwei vor, einer zur Seite.
   Held als klebende Szene: beim Scrollen zeichnet sich der Zug auf dem Brett, der Springer hebt ab, zieht zwei Felder
   in Blickrichtung und eines zur Seite und setzt auf; der Leitsatz weicht aus und nimmt das frei gewordene Feld ein.
   Danach fuehrt eine feine rote Linie (assets/zug.js) durch die Seite, ueber das Gelaende des Sandkastens bis zum
   Springer auf der Kuppe, die Strasse hinunter und landet als Unterstrich auf der Rufnummer.
   Farben aus Entwurf C (Schiefer, Nacht, Eis, Papier, Signalrot nur fuer Handlung und den Weg),
   Hoehenlinien aus Entwurf A als Textur (werkzeug/hoehen.py, als Maske, Farbe je Abschnitt).
   Schrift: D-DIN (Datto, SIL OFL 1.1) als WOFF.
   Grundzustand ist immer das fertige, ruhige Bild. Alle Bewegung steht unter
   @media screen and (prefers-reduced-motion: no-preference), scroll-gesteuerte zusaetzlich unter @supports. */

@font-face {
  font-family: "D-DIN";
  src: url("/assets/schrift/D-DIN.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "D-DIN";
  src: url("/assets/schrift/D-DIN-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "D-DIN Condensed";
  src: url("/assets/schrift/D-DINCondensed-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "D-DIN Exp";
  src: url("/assets/schrift/D-DINExp-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --nacht: #0d141b;      /* tiefster Ton: Vorhang, Fuss */
  --schiefer: #172634;   /* dunkle Abschnitte */
  --stahl: #3b566f;      /* Linien auf dunkel */
  --eis: #cfdce8;        /* heller Abschnitt, deutlich blau */
  --eis-linie: #8ea4b8;  /* Linien auf Eis */
  --papier: #eef3f7;     /* Grund der Unterseiten */
  --tinte: #0f1922;      /* Text auf hell */
  --grau: #33475a;       /* Nebentext auf hell, auf Eis 7:1 */
  --hell: #e8eef3;       /* Text auf dunkel */
  --dunst: #a9b9c6;      /* Nebentext auf dunkel, 7:1 */
  --wappen: #aab6c0;     /* Springer, Schild und AD auf dunkel */
  --rot: #b8222b;        /* Akzent auf hell */
  --rot-hell: #ff5f58;   /* Akzent auf dunkel */
  --hoehe-dunkel: #3a5670; /* Hoehenlinien auf Schiefer, 2:1 zum Grund: als Textur sichtbar, unter dem Text ruhig */
  --hoehe-eis: #a9bed2;    /* Hoehenlinien auf Eis */
  --text: "D-DIN", Bahnschrift, "DIN Alternate", Arial, sans-serif;
  --titel: "D-DIN Condensed", "D-DIN", "DIN Condensed", "Arial Narrow", sans-serif;
  --breit: "D-DIN Exp", "D-DIN", "DIN Alternate", Arial, sans-serif;
  --held-h: clamp(34rem, 100svh, 64rem); /* Hoehe der Heldbuehne */
  --spur: 115vh;                         /* Scrollweg der Szene (nur mit scroll-gesteuerten Animationen) */
  --zug: cubic-bezier(.65, 0, .35, 1);
  /* Seitenschritt der Auftritte: nie breiter als der Rand, sonst ragt Text kurz aus dem Fenster */
  --schritt: min(2.25rem, clamp(2.5rem, 8vw, 7rem) / 2 - .5rem);
}

* { box-sizing: border-box; }
html { background: var(--nacht); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--papier); color: var(--tinte);
  font: 400 1.125rem/1.5 var(--text);
  font-kerning: normal;
}
.start { background: var(--schiefer); }
/* seitliche Zuege duerfen nie horizontales Scrollen erzeugen; clip ist kein Scrollcontainer, sticky bleibt intakt */
main { flex: 1 0 auto; overflow-x: clip; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--rot); text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--rot); outline-offset: 3px; }
h1, h2, h3 { font-weight: 700; }
img { display: block; max-width: 100%; }

.rahmen { width: min(76rem, 100% - clamp(2.5rem, 8vw, 7rem)); margin-inline: auto; }
.vorrat { position: absolute; width: 0; height: 0; overflow: hidden; }

.sprunglink {
  position: absolute; left: 1rem; top: -10rem; z-index: 40;
  background: var(--papier); color: var(--tinte); padding: .5rem .75rem;
}
.sprunglink:focus { position: fixed; top: 1rem; }

/* Hoehenlinien: einfarbige SVG als Maske, die Farbe kommt aus dem Abschnitt */
.textur { position: relative; isolation: isolate; }
.textur::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--linie, var(--hoehe-dunkel));
  -webkit-mask: var(--karte) center / cover no-repeat;
  mask: var(--karte) center / cover no-repeat;
}

/* Logo: Form unveraendert, auf dunklem Grund hell */
.logo-figur, .logo-sockel { fill: var(--wappen); }
.logo-ad, .logo-name { stroke-width: 6; stroke-linejoin: miter; }
.logo-ad { fill: var(--wappen); stroke: var(--wappen); }
.logo-name { fill: #fff; stroke: #fff; }

/* Kopf: auf allen Seiten gleich gross und an derselben Stelle, damit das Logo beim Seitenwechsel stehen bleibt */
.kopf { position: relative; z-index: 5; background: var(--schiefer); color: #fff; }
.start .kopf { position: absolute; inset: 0 0 auto; background: none; }
.kopf .rahmen {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 1.5rem; padding-block: 1.25rem;
}
.marke { display: block; line-height: 0; view-transition-name: marke; }
.logo { display: block; width: clamp(9.5rem, 6.5rem + 6vw, 14rem); height: auto; overflow: visible; }
.menue { display: flex; gap: 2rem; font-size: 1.0625rem; view-transition-name: menue; }
.menue a { text-decoration: none; padding-block: .25rem; border-bottom: 2px solid transparent; }
.menue a:hover { border-bottom-color: var(--rot-hell); }
.kopf :focus-visible, .held :focus-visible, .vorstellung :focus-visible, .szene :focus-visible, .kontakt-bereich :focus-visible, .fuss :focus-visible, .seitenkopf :focus-visible { outline-color: var(--rot-hell); }

/* ---------- Held: Szene auf dem Brett ----------
   .buehne ist ein Groessen-Container. .welt bekommt genau die Masse, die object-fit: cover dem 1920 x 1088 Foto
   geben wuerde, und darin liegen deckungsgleich: Grund ohne Springer, Hoehenlinien der Wand, der Zug auf dem Brett
   (SVG in Bildkoordinaten), Schatten und der freigestellte Springer. --s ist ein Bildpixel in CSS-Laenge;
   damit rechnen alle Positionen und der Zug selbst (Fuss des Springers bei 1380/995). */
.held { position: relative; height: var(--held-h); background: var(--nacht); color: #fff; }
.buehne {
  position: relative; height: var(--held-h); overflow: clip; isolation: isolate;
  container-type: size;
  background: #08111a; /* Ton der Wand oben im Foto, fuer das Hochformat */
  --q: 1.7647;                  /* 1920 / 1088 */
  --px0: .68; --px1: .3;        /* Bildausschnitt quer: vor dem Zug, nach dem Zug (Kamera folgt) */
  --py: 1;                      /* unten buendig */
  --hb: 100cqh;                 /* Hoehe der Bildebene */
  --bw: max(100cqw, var(--hb) * var(--q));
  --bh: max(var(--hb), 100cqw / var(--q));
  --s: calc(var(--bw) / 1920);
  --ox0: calc((100cqw - var(--bw)) * var(--px0));
  --ox1: calc((100cqw - var(--bw)) * var(--px1));
  --oy: calc((var(--hb) - var(--bh)) * var(--py) + 100cqh - var(--hb));
  --ox-ende: var(--ox0);        /* wo die Welt am Ende steht (ohne Szene: wie am Anfang) */
}
.welt { position: absolute; left: var(--ox0); top: var(--oy); width: var(--bw); height: var(--bh); }
.welt-innen, .held-grund, .held-figur, .held-linien, .brett { position: absolute; inset: 0; }
.welt-innen, .held-figur { transform-origin: calc(var(--s) * 1380) calc(var(--s) * 995); }
.held-grund picture, .held-figur picture, .held-grund img, .held-figur img { display: block; width: 100%; height: 100%; }
.held-linien-bild {
  position: absolute; inset: 0;
  background: #a9c6dc; opacity: .24;
  /* nur auf der Wand: unten endet sie am Brett, rechts vor den Bauern */
  -webkit-mask: url("/assets/hoehen-wand-2.svg") 0 0 / 100% 100% no-repeat,
    linear-gradient(#000 0 48%, transparent 64%), linear-gradient(90deg, #000 0 70%, transparent 80%);
  -webkit-mask-composite: source-in, source-in;
  mask: url("/assets/hoehen-wand-2.svg") 0 0 / 100% 100% no-repeat,
    linear-gradient(#000 0 48%, transparent 64%), linear-gradient(90deg, #000 0 70%, transparent 80%);
  mask-composite: intersect;
}
.brett { width: 100%; height: 100%; overflow: visible; }
.brett .plan { fill: none; stroke: var(--rot-hell); stroke-width: 3.4; stroke-linecap: square; stroke-linejoin: miter; }
.brett .feld { fill: none; stroke: var(--rot-hell); stroke-width: 2.6; stroke-linejoin: miter; }
.brett .feld-ziel { fill: rgb(255 95 88 / .22); }
/* die beiden Felder, ueber die der Springer zieht: nur angedeutet */
.brett .feld-weg { fill: rgb(255 95 88 / .07); stroke: rgb(255 95 88 / .45); stroke-width: 1.6; }
/* Kontaktschatten: das Foto hat den Schatten mit dem Springer verloren, er wandert mit */
.schatten {
  position: absolute; left: calc(var(--s) * 1380); top: calc(var(--s) * 995);
  width: calc(var(--s) * 520); height: calc(var(--s) * 64);
  margin: calc(var(--s) * -40) 0 0 calc(var(--s) * -260);
  background: radial-gradient(closest-side, rgb(3 7 11 / .8), rgb(3 7 11 / .45) 55%, rgb(3 7 11 / 0));
}
/* Abdunklung fuer den Leitsatz: links am Anfang, rechts nach dem Zug; unten der Uebergang in Schiefer (zuoberst) */
.schleier {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgb(13 20 27 / .74) 0, rgb(13 20 27 / .32) 38%, rgb(13 20 27 / 0) 58%);
}
.schleier-rechts {
  background: linear-gradient(270deg, rgb(13 20 27 / .82) 0, rgb(13 20 27 / .4) 40%, rgb(13 20 27 / 0) 64%);
  opacity: 0;
}
.buehne::before, .buehne::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.buehne::before { background: linear-gradient(180deg, rgb(13 20 27 / .6) 0, rgb(13 20 27 / 0) 9rem); }
.buehne::after { background: linear-gradient(0deg, var(--schiefer) 0, rgb(23 38 52 / .55) 5%, rgb(23 38 52 / 0) 16%); }
/* Ausgang: vom Startfeld senkrecht aus dem Bild, dort setzt der Weg durch die Seite an (zug.js) */
.ausgang {
  position: absolute; z-index: 3; width: 2px; bottom: 0;
  left: calc(var(--ox-ende) + var(--s) * 1381 - 1px);
  top: calc(var(--oy) + var(--s) * 1012);
  background: var(--rot-hell); transform-origin: 50% 0;
}
.held-text { position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(5rem, 17vh, 10.5rem); }
.held h1 {
  font-family: var(--titel); font-weight: 700;
  font-size: clamp(3rem, .8rem + 6.4vw, 8rem); line-height: .9;
  letter-spacing: .005em; margin: 0; width: 6.6em; max-width: 100%;
}
.held .zeile { display: block; }

/* ---------- Vorstellung: dunkel, links der Text, rechts die Bahn des Weges ---------- */
.vorstellung {
  --karte: url("/assets/hoehen-ruhe-1.svg");
  background: var(--schiefer); color: var(--hell);
  padding: clamp(3.5rem, 2rem + 4vw, 6.5rem) 0 clamp(6rem, 4rem + 7vw, 11rem);
}
.vorstellung .rahmen {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(1rem, .5rem + 1.5vw, 2rem);
  row-gap: clamp(2rem, 1rem + 2.5vw, 3.5rem);
}
.vorstellung p {
  margin: 0; grid-column: 1 / span 7;
  font-size: clamp(1.45rem, 1rem + 1.35vw, 2.3rem); line-height: 1.28;
}
.vorstellung p + p { grid-column: 2 / span 7; }
.vorstellung strong { color: #fff; }

/* ---------- Leistungen: der Sandkasten als grosse Szene, darunter die Liste auf Eis ---------- */
.szene {
  position: relative; overflow: clip; isolation: isolate; container-type: size;
  height: clamp(30rem, 56.67vw, 100svh);
  background: #08111a; color: #fff;
  --q: 1.7647; --px: .55; --py: .7;
  --bw: max(100cqw, 100cqh * var(--q));
  --bh: max(100cqh, 100cqw / var(--q));
}
.szene-welt {
  position: absolute; width: var(--bw); height: var(--bh);
  left: calc((100cqw - var(--bw)) * var(--px)); top: calc((100cqh - var(--bh)) * var(--py));
}
.szene-welt picture, .szene-welt img { display: block; width: 100%; height: 100%; }
/* Nacht ueber dem Sandkasten: wird beim Hereinscrollen hell (nur mit Bewegung, sonst unsichtbar) */
.szene-welt::after { content: ""; position: absolute; inset: 0; background: #050b11; opacity: 0; pointer-events: none; }
.szene-weg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.szene-weg path { fill: none; stroke: var(--rot-hell); stroke-width: 3.4; stroke-linejoin: round; }
.zug-an .szene-weg { visibility: hidden; } /* mit Skript zeichnet zug.js den Weg, ohne steht er fertig da */
/* oben geht der Schiefer der Vorstellung in den Nachthimmel des Bildes ueber */
.szene-licht {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--schiefer) 0, rgb(23 38 52 / .7) 9%, rgb(23 38 52 / 0) 30%);
}
.szene-kopf { position: absolute; z-index: 2; left: 0; right: 0; top: clamp(2rem, 1rem + 4vw, 5rem); }
.szene h2 {
  font-family: var(--titel); font-size: clamp(2.6rem, 1.4rem + 4.2vw, 6rem); line-height: .92;
  margin: 0; max-width: 7em; hyphens: manual; color: #fff;
}
.leistungen-feld {
  --karte: url("/assets/hoehen-feld-1.svg"); --linie: var(--hoehe-eis);
  background: var(--eis); color: var(--tinte);
  padding: clamp(5rem, 3.5rem + 5vw, 9rem) 0 clamp(6rem, 4rem + 6vw, 10.5rem);
}
.leistungen {
  list-style: none; margin-block: 0; padding: 0;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, .5rem + 1.5vw, 2rem); row-gap: clamp(2.5rem, 1.5rem + 2.5vw, 4rem);
  align-items: start;
}
.leistungen > li { padding-top: 1.4rem; border-top: 2px solid var(--tinte); }
.leistungen h3 { margin: 0; }
/* jede Leistung steht um einen Seitenschritt versetzt zur vorigen */
.leistung-gross { grid-column: 1 / span 8; }
.leistung-lage { grid-column: 5 / -1; }
.leistung-kurz { grid-column: 1 / span 4; }
.leistung-kurz-2 { grid-column: 6 / span 6; }
.leistung-gross h3 { font-family: var(--titel); font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3.4rem); line-height: 1.02; }
.leistung-lage h3, .leistung-kurz h3 { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.75rem); line-height: 1.22; }
.leistung-lage ul { list-style: none; margin: 1.1rem 0 0; padding: 0; max-width: 34rem; }
.leistung-lage ul li {
  break-inside: avoid; position: relative;
  padding: .5rem 0 .55rem 1.5rem; border-bottom: 1px solid var(--eis-linie); color: var(--grau); font-size: 1.1875rem;
}
/* Aufzaehlungszeichen: das kleine Feld des Weges */
.leistung-lage ul li::before {
  content: ""; position: absolute; left: .1rem; top: 1rem; width: .5rem; height: .5rem; background: var(--rot);
}
.leistung-kurz h3 { max-width: 18em; }

/* ---------- Kontakt: dunkel, links der Waldrand bis an den Rand, rechts die Rufnummer als groesstes Element ---------- */
.kontakt-bereich {
  container-type: inline-size;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--schiefer); color: var(--hell);
}
.kontakt-bild { position: relative; min-height: 38rem; overflow: clip; }
.kontakt-bild picture, .kontakt-bild img { position: absolute; inset: 0; width: 100%; height: 100%; }
.kontakt-bild img { object-fit: cover; object-position: 58% 62%; }
.kontakt-inhalt {
  --karte: url("/assets/hoehen-kuppe-1.svg");
  padding: clamp(4.5rem, 3rem + 4vw, 7.5rem) max(clamp(1.25rem, 4cqw, 3.5rem), calc(50cqw - 38rem)) clamp(4.5rem, 3rem + 3vw, 6.5rem) clamp(2.5rem, 1.5rem + 4cqw, 6rem);
  align-self: stretch; display: flex; flex-direction: column; justify-content: center;
}
.kontakt-bereich h2 {
  font-family: var(--titel); font-size: clamp(2.6rem, 1.4rem + 4.2vw, 6rem); line-height: .92; margin: 0 0 1.5rem; color: #fff;
}
.kontakt-hinweis { margin: 0; max-width: 30em; color: var(--dunst); }
.ruf { margin: clamp(2.25rem, 1.5rem + 2vw, 3.5rem) 0 0; }
/* Unterstrich als Hintergrundbalken an der Unterkante: dort endet der Weg des Springers genau */
.ruf a {
  display: inline-block; padding-bottom: .14em;
  font-family: var(--breit); font-weight: 700; color: #fff;
  font-size: clamp(1.6rem, .4rem + 4.4cqw, 3.6rem); line-height: 1.15; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  background: linear-gradient(var(--rot-hell), var(--rot-hell)) 0 100% / 100% .09em no-repeat;
}
.ruf a:hover { color: var(--rot-hell); }
.zug-an .ruf a { background-image: linear-gradient(var(--stahl), var(--stahl)); background-size: 100% 2px; }
.wege { margin: 1.25rem 0 0; font-size: 1.1875rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.wege a { text-decoration-color: var(--dunst); }
.wege a:hover { text-decoration-color: var(--rot-hell); }

/* ---------- Weg des Springers (von zug.js als SVG eingesetzt) ---------- */
.zugbahn { position: relative; }
.springerweg {
  position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}
.springerweg path { fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.springerweg .weg-dunkel { stroke: var(--rot-hell); }
.springerweg .weg-hell { stroke: var(--rot); }
/* ueber dem hellen Sand bekommt die Linie einen dunklen Saum, sonst geht sie unter */
.springerweg .weg-saum { stroke: rgb(8 14 20 / .55); stroke-width: 6; stroke-linejoin: round; }
.springerweg .weg-szene { stroke-width: 2.5; stroke-linejoin: round; }
/* Felder an den Ecken zeigen sich erst, wenn die Linie sie erreicht */
.springerweg .feld { fill: var(--rot-hell); opacity: 0; }
.springerweg .feld.auf-eis { fill: var(--rot); }
.springerweg .feld.erreicht { opacity: 1; }
.springerweg .spitze { fill: var(--rot-hell); }
.springerweg .spitze.auf-eis { fill: var(--rot); }

/* Fuss */
.fuss { background: var(--nacht); color: var(--dunst); font-size: .9375rem; }
.fuss .rahmen { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 1.75rem 0; }
.fuss a:hover { color: #fff; text-decoration-color: var(--rot-hell); }

/* ---------- Unterseiten ---------- */
.recht { padding: 0 0 5rem; }
.seitenkopf {
  --karte: url("/assets/hoehen-ruhe-1.svg");
  background: var(--schiefer); color: #fff; border-top: 1px solid var(--stahl);
  padding: clamp(3rem, 2rem + 5vw, 6.5rem) 0 clamp(2.25rem, 1.5rem + 2.5vw, 4rem);
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
  overflow: clip;
}
.seitenkopf .rahmen { position: relative; }
.recht h1 {
  font-family: var(--titel); font-size: clamp(2.5rem, 1.4rem + 4vw, 4.75rem); line-height: 1;
  margin: 0; hyphens: auto; overflow-wrap: break-word;
}
/* rote Marke unter der Ueberschrift: der letzte Zug bis zum Ziel */
.seitenkopf h1::after {
  content: ""; display: block; width: 3.2rem; height: 1.6rem; margin-top: 1.1rem;
  border-left: 2px solid var(--rot-hell); border-bottom: 2px solid var(--rot-hell);
}
.absatz {
  display: grid; grid-template-columns: 16rem minmax(0, 1fr);
  gap: 0 3rem; padding: 1.75rem 0; border-top: 1px solid #c3d0db;
}
.absatz:first-of-type { border-top: 0; padding-top: 0; }
.absatz h2 { align-self: start; font-size: 1.25rem; line-height: 1.25; margin: 0 0 .75rem; overflow-wrap: break-word; hyphens: auto; }
.absatz p { margin: 0 0 1rem; max-width: 36em; }
.absatz div > :last-child { margin-bottom: 0; }
.recht .stand { color: var(--grau); margin: 2rem 0 0; }
.weiter { margin: 1rem 0 0; padding-left: 1.1rem; }
.weiter li { margin-bottom: .35rem; }
.weiter li::marker { color: var(--rot); }

/* ---------- Ladebildschirm (aus Entwurf C): ohne Bewegung gibt es ihn nicht, er blockiert nie ---------- */
.vorhang { display: none; pointer-events: none; }
.vorhang-logo { width: min(26rem, 72vw); height: auto; overflow: visible; }
.logo-strich { opacity: 0; }
.logo-strich path {
  fill: none; stroke: var(--wappen); stroke-width: 40;
  stroke-linecap: round; stroke-linejoin: round;
}
.logo-strich .strich-sockel { stroke-width: 32; stroke-linecap: butt; }

/* Richtung des Seitenschritts: links (Standard) oder rechts */
.auftritt { --seite: 1; }
.auftritt-rechts { --seite: -1; }
.held .zeile { --seite: -1; }

/* ======================= Breiten ======================= */
@media (min-aspect-ratio: 2/1) {
  .buehne { --py: .8; } /* sehr breite Schirme: Kopf des Springers nicht anschneiden */
}
/* Hochformat (Handy, Tablet hochkant): das Foto liegt unten, darueber die Wand mit dem Leitsatz.
   Die Kamera folgt dem Springer beim Zug nach links. */
@media (max-aspect-ratio: 1/1) {
  :root { --held-h: clamp(34rem, 100svh, 64rem); --spur: 100vh; }
  .buehne { --hb: min(62cqh, 130cqw); --px0: .78; --px1: 0; }
  .welt::before {
    content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 22%; pointer-events: none;
    background: linear-gradient(#08111a, rgb(8 17 26 / 0));
  }
  .brett .plan { stroke-width: 6; }
  .brett .feld { stroke-width: 4.5; }
  .brett .feld-weg { stroke-width: 2.6; }
  .schleier { display: none; }
  .ausgang { display: none; }
  .held-text { top: clamp(6rem, 4.5rem + 5vw, 9rem); bottom: auto; }
  .held h1 { width: auto; font-size: clamp(2.6rem, 1rem + 9vw, 5.5rem); }
}
@media (max-width: 60rem) {
  .absatz { grid-template-columns: 12rem minmax(0, 1fr); gap: 0 2rem; }
}
@media (max-width: 48rem) {
  .vorstellung .rahmen { display: block; }
  .vorstellung p + p { margin-top: 1.75rem; }
  .szene { height: clamp(26rem, 128vw, 92svh); --px: .7; --py: .55; }
  .szene-weg path { stroke-width: 6; }
  .leistungen { display: block; }
  .leistungen > li + li { margin-top: 2.5rem; }
  .leistung-lage ul { columns: auto; }
  .kontakt-bereich { display: block; }
  .kontakt-bild { min-height: 0; height: clamp(16rem, 80vw, 28rem); }
  .kontakt-bild img { object-position: 60% 66%; }
  .kontakt-inhalt { padding: 3rem max(1.25rem, 4cqw) 3.5rem; }
  .ruf a { font-size: clamp(1.6rem, .5rem + 6.6cqw, 3rem); }
  .absatz { grid-template-columns: 1fr; }
  .kopf .rahmen { padding-block: 1rem; }
  .menue { gap: 1.25rem; }
  /* schmal: Seitenschritte kuerzer und alle von rechts, damit nichts ueber den Rand ragt */
  .auftritt, .auftritt-rechts, .held .zeile { --seite: -.4; }
}
@media (max-width: 24rem) {
  .rahmen { width: calc(100% - 2rem); }
  .kontakt-inhalt { padding-inline: 1rem; }
  .logo { width: 7.25rem; }
  .kopf .rahmen { gap: .5rem .75rem; }
  .menue { gap: .9rem; font-size: .9375rem; }
  .held h1 { font-size: 2.75rem; }
}

/* ======================= Bewegung ======================= */
@media screen and (prefers-reduced-motion: no-preference) {

  /* Seitenwechsel: das Logo bleibt stehen, die neue Seite deckt die alte als L auf
     (erst ein Streifen von oben nach unten, dann zur Seite); keine Verschiebung, also kein freier Rand */
  @view-transition { navigation: auto; }
  ::view-transition-group(marke), ::view-transition-group(menue) { animation-duration: .5s; }
  ::view-transition-old(root) { animation: halten .62s linear both; }
  ::view-transition-new(root) { animation: l-wischen .62s var(--zug) both; }

  /* Vorhang mit dem Logo, das sich zeichnet (wie Entwurf C): Zeichnen 0,1 bis 0,85 s, Fuellen ab 0,8 s,
     AD ab 0,9 s, ProTac 1,0 bis 1,4 s, Halten bis 1,9 s, Vorhang 1,9 bis 2,5 s, danach visibility hidden. */
  .vorhang {
    display: flex; align-items: center; justify-content: center;
    position: fixed; inset: 0; z-index: 30; background: var(--nacht);
    animation: vorhang-weg .6s cubic-bezier(.7, 0, .3, 1) 1.9s both;
  }
  .vorhang .logo-strich { animation: abblenden .25s ease-out 1.05s both; }
  .vorhang .logo-strich path { stroke-dasharray: 1 1; }
  .vorhang .strich-figur { animation: ziehen .6s cubic-bezier(.55, 0, .35, 1) .1s both; }
  .vorhang .strich-sockel { animation: ziehen .2s cubic-bezier(.4, 0, .2, 1) .65s both; }
  .vorhang .logo-figur, .vorhang .logo-sockel { animation: fuellen .3s ease-out .8s both; }
  .vorhang .logo-ad { animation: einblenden .3s ease-out .9s both; }
  .vorhang .logo-name { animation: einruecken .4s cubic-bezier(.2, .8, .2, 1) 1s both; }

  /* Unter dem Vorhang: die Szene setzt sich, der Leitsatz kommt auf einem L, das Startfeld leuchtet auf */
  .start .welt-innen { animation: welt-setzen 2.2s cubic-bezier(.2, .7, .2, 1) 1.9s both; }
  .start .held-figur img { animation: figur-setzen 1.6s cubic-bezier(.2, .7, .2, 1) 1.9s both; }
  .start .held-linien-bild { animation: linien-auf 1.6s ease-out 2.2s both; }
  .start .held .zeile { animation: l-zeit .9s var(--zug) 2.2s both; }
  .start .held .zeile + .zeile { animation-delay: 2.34s; }
  .start .feld-start { animation: einblenden .5s ease-out 3s both; }
  .start .kopf { animation: einblenden .4s ease-out 2.15s both; }

  /* Wer ueber ein Sprungziel kommt (Leistungen, Kontakt, Logo von den Unterseiten), sieht keinen Vorhang */
  .start:has(:target) .vorhang { display: none; }
  .start:has(:target) .kopf, .start:has(:target) .welt-innen, .start:has(:target) .held-figur img,
  .start:has(:target) .held-linien-bild, .start:has(:target) .held .zeile, .start:has(:target) .feld-start { animation: none; }

  /* Mausparallaxe (zug.js setzt --mx/--my zwischen -1 und 1): nur die Linien auf der Wand weichen aus */
  .held-linien { transform: translate3d(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -8px), 0); }

  /* Unterseiten: Ueberschrift auf einem L */
  .seitenkopf h1 { animation: l-zeit .8s var(--zug) .15s both; }
  .seitenkopf h1::after { animation: l-zeichnen .6s var(--zug) .55s both; }

  .menue a { transition: border-color .2s; }
  .ruf a { transition: color .2s; }
  .wege a, .fuss a { transition: text-decoration-color .2s, color .2s; }
  .springerweg .feld { transition: opacity .25s; }

  /* Ersatz ohne scroll-gesteuerte Animationen: zug.js setzt .zug-io und markiert sichtbare Elemente mit .da */
  .zug-io .auftritt:not(.da) { opacity: 0; }
  .zug-io .auftritt.da { animation: l-zeit .9s var(--zug) both; }
  .zug-io .kontakt-bild:not(.da) img { clip-path: inset(100% 0 0 62%); }
  .zug-io .kontakt-bild.da img { animation: l-aufdecken-links 1.1s var(--zug) both; }

  /* Scroll-gesteuert, wo der Browser es kann. Nichts davon haelt das Scrollen an oder lenkt es um:
     die Szene klebt nur (position: sticky), waehrend die Seite ganz normal weiterscrollt. */
  @supports (animation-timeline: scroll()) {
    .held { height: calc(var(--held-h) + var(--spur)); }
    .buehne { position: sticky; top: 0; --ox-ende: var(--ox1); }
    .welt, .held-figur, .schatten, .brett .plan, .brett .feld-ziel, .brett .feld-weg, .ausgang, .held h1, .schleier, .schleier-rechts {
      animation-timing-function: linear; animation-fill-mode: both; animation-duration: auto;
      animation-timeline: scroll(root); animation-range: 0 var(--spur);
    }
    .welt { animation-name: kamera; }
    .held-figur { animation-name: springer; }
    .schatten { animation-name: schatten; }
    .brett .plan { stroke-dasharray: 1 1; animation-name: plan; }
    .brett .feld-ziel { animation-name: ziel; }
    .brett .feld-weg-1 { animation-name: weg-1; }
    .brett .feld-weg-2 { animation-name: weg-2; }
    .ausgang { animation-name: ausgang; }
    .held h1 { animation-name: leitsatz-tausch; }
    .schleier { animation-name: schleier-weg; }
    .schleier-rechts { animation-name: schleier-her; }

    /* Abschnitte und Ueberschriften: zwei vor (von unten), einer zur Seite */
    .auftritt { animation: l-zug linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .kontakt-bild img { animation: l-aufdecken-links linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    /* der Sandkasten: es wird Licht, waehrend er hereinkommt */
    .szene { view-timeline-name: --szene; }
    .szene-welt::after { animation: licht-an linear both; animation-timeline: --szene; animation-range: entry 0% cover 42%; }
  }
}

/* im Hochformat bleibt der Leitsatz oben stehen; er weicht nur ein Stueck nach oben aus */
@media screen and (prefers-reduced-motion: no-preference) and (max-aspect-ratio: 1/1) {
  @supports (animation-timeline: scroll()) {
    .held h1 { animation-name: leitsatz-hoch; }
  }
}

@keyframes vorhang-weg {
  from { transform: none; visibility: visible; }
  to { transform: translateY(-100%); visibility: hidden; }
}
@keyframes ziehen { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes abblenden { from { opacity: 1; } to { opacity: 0; } }
@keyframes fuellen { from { fill-opacity: 0; } to { fill-opacity: 1; } }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes einruecken { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }

@keyframes welt-setzen { from { scale: 1.08; } to { scale: 1; } }
@keyframes figur-setzen { from { opacity: .35; } to { opacity: 1; } }
@keyframes linien-auf { from { opacity: 0; translate: 0 2.5rem; } to { opacity: .24; translate: 0 0; } }

/* ---- Der Zug (Anteile am Scrollweg) ----
   0 bis 18 %: der Zug zeichnet sich auf dem Brett; der Leitsatz weicht aus
   18 bis 26 %: der Springer hebt ab
   26 bis 50 %: zwei Felder in Blickrichtung (nach links), die Kamera folgt
   50 bis 64 %: ein Feld zur Seite (nach hinten, deshalb kleiner)
   64 bis 74 %: er setzt auf
   72 bis 88 %: der Leitsatz nimmt das frei gewordene Feld ein
   80 bis 94 %: vom Startfeld aus zieht die Linie aus dem Bild in die Seite */
@keyframes plan {
  0%, 3% { stroke-dashoffset: 1; }
  18%, 100% { stroke-dashoffset: 0; }
}
@keyframes weg-1 { 0%, 6% { opacity: 0; } 9%, 100% { opacity: 1; } }
@keyframes weg-2 { 0%, 10% { opacity: 0; } 13%, 100% { opacity: 1; } }
@keyframes ziel {
  0%, 15% { opacity: 0; }
  19%, 100% { opacity: 1; }
}
@keyframes springer {
  0%, 18% { translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  26% { translate: 0 calc(var(--s) * -78); scale: 1.02; animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  50% { translate: calc(var(--s) * -1082) calc(var(--s) * -78); scale: 1.02; animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  64% { translate: calc(var(--s) * -1029) calc(var(--s) * -138); scale: .9; animation-timing-function: cubic-bezier(.55, 0, .8, .4); }
  72% { translate: calc(var(--s) * -1029) calc(var(--s) * -70); scale: .88; animation-timing-function: ease-out; }
  75% { translate: calc(var(--s) * -1029) calc(var(--s) * -74); scale: .88; animation-timing-function: ease-in; }
  78%, 100% { translate: calc(var(--s) * -1029) calc(var(--s) * -70); scale: .88; }
}
@keyframes schatten {
  0%, 18% { translate: 0 0; scale: 1; opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  26% { translate: 0 0; scale: .78; opacity: .45; animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  50% { translate: calc(var(--s) * -1082) 0; scale: .78; opacity: .45; animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  64% { translate: calc(var(--s) * -1029) calc(var(--s) * -70); scale: .7; opacity: .45; animation-timing-function: cubic-bezier(.55, 0, .8, .4); }
  72%, 100% { translate: calc(var(--s) * -1029) calc(var(--s) * -70); scale: .88; opacity: 1; }
}
@keyframes kamera {
  0%, 22% { translate: 0 0; animation-timing-function: cubic-bezier(.45, 0, .4, 1); }
  56%, 100% { translate: calc(var(--ox1) - var(--ox0)) 0; }
}
@keyframes ausgang {
  0%, 80% { scale: 1 0; }
  94%, 100% { scale: 1 1; }
}
@keyframes leitsatz-tausch {
  0%, 4% { translate: 0 0; opacity: 1; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  11% { translate: 0 -2.2rem; opacity: .7; animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  17% { translate: -1.6rem -2.2rem; opacity: 0; }
  17.01%, 72% { translate: calc(min(76rem, 100cqw - clamp(2.5rem, 8vw, 7rem)) - 6.6em + 1.6rem) 2.4rem; opacity: 0; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  80% { translate: calc(min(76rem, 100cqw - clamp(2.5rem, 8vw, 7rem)) - 6.6em + 1.6rem) 0; opacity: 1; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
  88%, 100% { translate: calc(min(76rem, 100cqw - clamp(2.5rem, 8vw, 7rem)) - 6.6em) 0; opacity: 1; }
}
@keyframes leitsatz-hoch { to { translate: 0 -1.5rem; } }
@keyframes schleier-weg {
  0%, 20% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes schleier-her {
  0%, 60% { opacity: 0; }
  80%, 100% { opacity: 1; }
}
@keyframes licht-an { from { opacity: .62; } to { opacity: 0; } }

/* Das L: erst zwei Schritte nach oben, dann einen zur Seite */
@keyframes l-zug {
  0% { opacity: 0; translate: calc(var(--seite) * -1 * var(--schritt)) 4.5rem; }
  55% { opacity: 1; translate: calc(var(--seite) * -1 * var(--schritt)) 0; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  100% { opacity: 1; translate: 0 0; }
}
@keyframes l-zeit {
  0% { opacity: 0; translate: calc(var(--seite, 1) * -1.5rem) 1.1em; animation-timing-function: cubic-bezier(.2, .6, .3, 1); }
  60% { opacity: 1; translate: calc(var(--seite, 1) * -1.5rem) 0; animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
  100% { opacity: 1; translate: 0 0; }
}
@keyframes l-aufdecken-links {
  0% { clip-path: inset(100% 0 0 62%); }
  55% { clip-path: inset(0 0 0 62%); }
  100% { clip-path: inset(0 0 0 0); }
}
@keyframes l-zeichnen {
  0% { clip-path: inset(0 100% 100% 0); }
  60% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}
@keyframes halten { from { opacity: 1; } to { opacity: 1; } }
@keyframes l-wischen {
  0% { clip-path: inset(0 72% 100% 0); }
  50% { clip-path: inset(0 72% 0 0); animation-timing-function: cubic-bezier(.5, 0, .2, 1); }
  100% { clip-path: inset(0 0 0 0); }
}

@media print {
  .sprunglink, .menue, .welt, .schleier, .buehne::before, .buehne::after, .ausgang, .kontakt-bild, .szene-welt, .szene-licht,
  .springerweg, .textur::before, .vorhang { display: none; }
  html, body, .start, .kopf, .held, .buehne, .vorstellung, .szene, .leistungen-feld, .kontakt-bereich, .fuss { background: none; color: #000; }
  .rahmen { width: auto; margin-inline: 0; }
  body { display: block; font-size: 11pt; }
  .start .kopf { position: static; }
  .logo { width: 45mm; }
  .logo-name { fill: #000; stroke: #000; }
  .logo-figur, .logo-sockel, .logo-ad { fill: #706f6f; stroke: #706f6f; }
  .held, .buehne { display: block; height: auto; container-type: normal; overflow: visible; }
  .held-text, .szene-kopf { position: static; padding: 12pt 0; }
  .held h1 { font-size: 30pt; width: auto; }
  .szene { height: auto; container-type: normal; overflow: visible; }
  .held h1, .leistungen h3, .szene h2, .seitenkopf, .vorstellung strong, .kontakt-bereich h2, .ruf a { color: #000; }
  .seitenkopf { background: none; border: 0; padding: 0 0 12pt; margin: 0; }
  .seitenkopf h1::after { display: none; }
  .vorstellung, .leistungen-feld, .kontakt-inhalt { padding: 12pt 0; }
  .vorstellung .rahmen, .leistungen { display: block; }
  .vorstellung p { font-size: 13pt; max-width: none; }
  .vorstellung p + p { margin-top: 8pt; }
  .szene h2, .kontakt-bereich h2 { font-size: 22pt; margin-bottom: 10pt; max-width: none; }
  .leistungen > li { padding: 6pt 0; border-top-width: 1px; }
  .leistungen > li + li { margin-top: 0; }
  .leistung-gross h3, .leistung-lage h3, .leistung-kurz h3 { font-family: var(--text); font-size: 13pt; }
  .leistung-lage ul { margin-top: 4pt; columns: auto; }
  .leistung-lage ul li { color: #000; padding: 2pt 0 2pt 12pt; font-size: 11pt; border: 0; }
  .leistung-lage ul li::before { top: 6pt; width: 4pt; height: 4pt; background: #000; }
  .kontakt-bereich { display: block; }
  .kontakt-inhalt { break-inside: avoid; display: block; }
  .kontakt-hinweis { color: #000; }
  .ruf { margin-top: 12pt; }
  .ruf a, .zug-an .ruf a { font-size: 20pt; background: none; padding: 0; }
  .fuss { display: none; }
  .wege, .absatz, .leistungen > li { break-inside: avoid; }
  .absatz h2, .szene h2, .kontakt-bereich h2, .leistung-lage h3 { break-after: avoid; }
  a { text-decoration: none; }
}
