/* KOTE Generalplanung (Beispiel) · lp-253 · Schrift-Ordnung: zwei Schriften, fünf Größen (--t1 bis --t5), Abstände aus --rand und svh.
   Ecken: Knöpfe rund, Flächen 28 px, Felder 14 px. Zwei Gründe: Gelb (Tag, Baustelle) und Nachtblau (Betrieb). */
@font-face { font-family: "Red Hat Display"; src: url("../fonts/red-hat-display-var.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("../fonts/red-hat-mono-var.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --gelb: #ffca1c; --gelb-tief: #f3b500; --blau: #0b1f66; --nacht: #08194a; --nacht-hell: #112a70; --weiss: #fff;
  --schrift: "Red Hat Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --t1: clamp(2.05rem, min(4.3vw, 8svh), 4.3rem);      /* Kopfzeile */
  --t2: clamp(1.75rem, min(3.5vw, 6.6svh), 3.3rem);    /* Abschnittstitel */
  --t3: clamp(1.2rem, min(1.7vw, 3.6svh), 1.55rem);    /* Kernsatz */
  --t4: clamp(1rem, min(1.25vw, 2.5svh), 1.125rem);    /* Fließtext */
  --t5: .8125rem;                                       /* Maßangaben, klein */
  --rand: clamp(20px, 5.5vw, 80px);
  --haus-h: min(97svh, 63vw);
  --haus-b: calc(var(--haus-h) * 1.1348);
  --haus-mitte: 70vw;
}
[data-grund="gelb"] { --grund: var(--gelb); --tinte: var(--blau); --akzent: var(--blau); --knopf: var(--blau); --knopf-tinte: #fff; --leise: rgba(11, 31, 102, .72); --strich: rgba(11, 31, 102, .22); }
[data-grund="nacht"] { --grund: var(--nacht); --tinte: #fff; --akzent: var(--gelb); --knopf: var(--gelb); --knopf-tinte: var(--blau); --leise: rgba(255, 255, 255, .74); --strich: rgba(255, 255, 255, .2); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; }
body { margin: 0; font-family: var(--schrift); font-weight: 500; font-size: var(--t4); line-height: 1.5; color: var(--blau); background: var(--nacht); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, address { margin: 0; padding: 0; font-style: normal; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.022em; line-height: 1.04; text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--akzent, var(--blau)); outline-offset: 3px; border-radius: 6px; }
.sprung { position: absolute; left: 12px; top: -80px; z-index: 100; background: #fff; color: var(--blau); padding: 12px 16px; border-radius: 10px; font-weight: 700; }
.sprung:focus { top: 12px; }
.rand { padding-inline: var(--rand); max-width: 1480px; margin-inline: auto; }
section, footer { background: var(--grund); color: var(--tinte); position: relative; }

/* Knöpfe: ein gefüllter Typ, zweite Aktion als Rahmen */
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; border: 2px solid var(--knopf); border-radius: 999px; background: var(--knopf); color: var(--knopf-tinte); font: 700 1rem/1.1 var(--schrift); text-decoration: none; cursor: pointer; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.knopf:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(8, 25, 74, .6); }
.knopf:active { transform: translateY(0) scale(.98); }
.knopf--klein { min-height: 44px; padding: 10px 20px; font-size: .9375rem; }
.knopf--rand { background: transparent; color: var(--tinte); border-color: currentColor; }

/* Kopfzeile */
.leiste { --grund: var(--gelb); --tinte: var(--blau); --knopf: var(--blau); --knopf-tinte: #fff; --akzent: var(--blau);
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px; padding-inline: var(--rand); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--tinte); transition: background-color .3s, color .3s; }
.leiste.nacht { --grund: var(--nacht); --tinte: #fff; --knopf: var(--gelb); --knopf-tinte: var(--blau); --akzent: var(--gelb); }
.leiste.fest { background: var(--grund); }
.marke { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 1.4rem; letter-spacing: .05em; text-decoration: none; min-height: 44px; }
.marke-zeichen { width: 17px; height: 17px; fill: currentColor; }
.marke small { font: 650 .6875rem/1 var(--schrift); letter-spacing: 0; padding: 4px 7px; border: 1.5px solid currentColor; border-radius: 999px; margin-left: 3px; }
.leiste-nav { display: flex; gap: clamp(16px, 2.4vw, 36px); margin-left: auto; }
.leiste-nav a { font-weight: 650; font-size: .9375rem; text-decoration: none; padding: 12px 2px; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 0 2px no-repeat; transition: background-size .3s; }
.leiste-nav a:hover { background-size: 100% 2px; }

/* Der Kasten: alle Zustände des Modells liegen deckungsgleich übereinander */
.kasten { position: relative; aspect-ratio: 1600 / 1410; }
.lage { position: absolute; inset: 0; width: 100%; height: 100%; }
.haus-platz, .kopf-haus, .stufen-haus { position: absolute; height: var(--haus-h); width: var(--haus-b); left: calc(var(--haus-mitte) - var(--haus-b) * .515); bottom: -7svh; }
.kote-linie { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; transition: opacity .35s; pointer-events: none; }
.kote-linie polyline { fill: none; stroke: var(--akzent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 9 6; }
.kote-marke { position: absolute; left: 76.4%; top: 14.3%; display: inline-flex; align-items: center; gap: 7px; transform: translateY(-50%); font: 600 var(--t5)/1 var(--mono); color: var(--akzent); white-space: nowrap; transition: opacity .35s; pointer-events: none; }
html.js .kote-marke { opacity: 0; }
html:not(.js) .kote-marke, html:not(.js) .linse, html:not(.js) .kote-linie { display: none; }
.kote-marke::before { content: ""; width: clamp(18px, 2.4vw, 40px); height: 2px; background: currentColor; }
.kote-marke svg { width: 13px; height: 13px; fill: currentColor; }
.kote-marke b { font-weight: 700; font-size: clamp(.8125rem, 1.05vw, .9375rem); font-variant-numeric: tabular-nums; }
html.js .zeigt-linie .kote-linie, html.js .zeigt-marke .kote-marke { opacity: 1; }

/* 1 · Kopf */
.kopf { min-height: 100svh; overflow: clip; --mx: 0; --my: 0; --sy: 0; }
.kopf-zahl { position: absolute; left: 71.5vw; top: 8svh; font: 700 min(15.4vw, 25svh)/1 var(--mono); letter-spacing: -.05em; color: #efae00; white-space: nowrap; font-variant-numeric: tabular-nums; transform: translate3d(calc(-50% + var(--mx) * -16px), calc(var(--my) * -9px + var(--sy) * 20svh), 0); user-select: none; }
.kopf-haus { transform: translate3d(calc(var(--mx) * 7px), calc(var(--my) * 4px + var(--sy) * 7svh), 0); }
.kopf .lage--technik { clip-path: circle(0 at 58% 44%); }
.linse { position: absolute; left: 58%; top: 44%; width: 0; height: 0; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--blau), 0 0 0 9px rgba(255, 202, 28, .55); pointer-events: none; }
html.js .linse { opacity: 0; }
.linse-wort { position: absolute; left: 50%; top: calc(100% + 16px); transform: translateX(-50%); background: var(--blau); color: #fff; font: 600 var(--t5)/1 var(--mono); padding: 7px 11px; border-radius: 999px; white-space: nowrap; }
.kopf-text { position: relative; z-index: 3; width: min(35vw, 510px); margin-left: var(--rand); padding-top: clamp(104px, 16.5svh, 168px); }
.kopf h1 { font-size: var(--t1); }
.kopf-satz { margin-top: clamp(14px, 2.6svh, 26px); font-size: var(--t3); font-weight: 600; line-height: 1.32; max-width: 24em; }
.kopf-knopf { margin-top: clamp(18px, 3.4svh, 34px); }
.kopf-klein { margin-top: 12px; font-size: .9375rem; line-height: 1.4; max-width: 25em; color: var(--leise); }
.kopf-beleg { margin-top: clamp(14px, 2.6svh, 26px); display: flex; flex-wrap: wrap; font: 500 var(--t5)/1.2 var(--mono); }
.kopf-beleg li { padding: 3px 14px; border-left: 2px solid var(--strich); }
.kopf-beleg li:first-child { padding-left: 0; border-left: 0; }
.kopf-beleg b { font-weight: 700; }
.kopf-hinweis { position: absolute; left: 40vw; bottom: 2.4svh; z-index: 3; font: 500 var(--t5)/1.3 var(--mono); color: var(--leise); }
.nur-finger { display: none; }
@media (hover: none) { .nur-maus { display: none; } .nur-finger { display: inline; } }
.vorn { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: clip; }
.vorn img { position: absolute; height: auto; }
.vorn-stift { left: -2vw; bottom: -15svh; width: min(14vw, 25svh); transform: translate3d(calc(var(--mx) * 30px), calc(var(--my) * 18px - var(--sy) * 34svh), 0) rotate(-7deg); }
.vorn-massstab { right: -4vw; bottom: -17svh; width: min(24vw, 39svh); transform: translate3d(calc(var(--mx) * 40px), calc(var(--my) * 24px - var(--sy) * 46svh), 0) rotate(4deg); }

/* 2 · Büro */
.buero { padding: 15svh 0 0; }
.buero-satz { font-size: var(--t2); font-weight: 750; line-height: 1.12; max-width: 21em; letter-spacing: -.02em; text-wrap: pretty; }
.buero-satz .w { opacity: .2; transition: opacity .45s; }
.buero-satz .w.an { opacity: 1; }
.zahlen { margin-top: 9svh; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 64px); }
.zahlen li { border-top: 2px solid var(--blau); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
.zaehler { font: 700 clamp(3.2rem, 8vw, 7.4rem)/.95 var(--mono); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.zahlen span { max-width: 17em; color: var(--leise); font-weight: 600; }
.band { margin-top: 11svh; overflow: clip; border-block: 2px solid var(--blau); padding: clamp(12px, 2.2svh, 22px) 0; }
.band-zeile { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); width: max-content; font-weight: 850; font-size: clamp(1.9rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; will-change: transform; }
.band-zeile i { width: .42em; height: .42em; background: var(--blau); clip-path: polygon(0 8%, 100% 8%, 50% 100%); flex: none; }

/* 3 · Vier Stufen (Signatur: die Kote steigt) */
.stufen-haus .lage--rohbau, .stufen-haus .lage--technik, .kontakt-haus .lage--rohbau, .kontakt-haus .lage--technik, .kontakt-haus .lage--fertig { clip-path: inset(100% 0 0 0); }
.schicht--nacht { display: none; --akzent: var(--gelb); --tinte: #fff; --leise: rgba(255, 255, 255, .78); --strich: rgba(255, 255, 255, .22); background: var(--nacht); color: #fff; }
.ziffer { display: none; }
.stufen { padding: 13svh 0 10svh; }
.stufen-haus { position: relative; left: auto; bottom: auto; margin: 0 auto 5svh; height: auto; width: min(92vw, 760px); }
.stufen-text { padding-inline: var(--rand); max-width: 760px; margin-inline: auto; }
.stufen-text h2 { font-size: var(--t2); }
.stufen-leiste { display: none; }
.stufe { margin-top: 5svh; }
.stufe h3 { font-size: clamp(1.45rem, 2.3vw, 2.1rem); display: flex; align-items: baseline; gap: .55em; }
.stufe-nr { font: 600 .62em/1 var(--mono); letter-spacing: 0; padding: .38em .5em; border: 2px solid currentColor; border-radius: 999px; transform: translateY(-.12em); }
.stufe-kern { margin-top: .7em; font-size: var(--t3); font-weight: 750; line-height: 1.22; }
.stufe p + p { margin-top: .7em; }
.stufe-ergebnis { font: 500 var(--t5)/1.45 var(--mono); border-top: 2px solid var(--strich); padding-top: .9em; margin-top: 1.1em !important; }
.legende { margin-top: .9em; display: grid; grid-template-columns: 1fr 1fr; gap: .35em 1.2em; font: 650 var(--t5)/1.3 var(--schrift); }
.legende li { display: grid; grid-template-columns: 14px 1fr; gap: .6em; align-items: start; }
.legende i { width: 14px; height: 14px; border-radius: 4px; margin-top: .1em; box-shadow: 0 0 0 1.5px var(--blau); }
.legende-breit { grid-column: 1 / -1; }
.f-fbh { background: repeating-linear-gradient(0deg, #d4202b 0 2px, #fff 2px 5px); }
.f-luft { background: #c3c8cf; } .f-vl { background: #d4202b; } .f-rl { background: #1f5fd0; } .f-kw { background: #1e9b4b; }
.achse { display: none; }

html.js .stufen { padding: 0; height: 640svh; }
html.js .stufen-halt { position: sticky; top: 0; height: 100svh; overflow: clip; }
html.js .schicht { position: absolute; inset: 0; display: block; isolation: isolate; }
html.js .schicht--nacht { z-index: 1; }
html.js .schicht--tag { background: var(--gelb); }
html.js .schicht--nacht { clip-path: inset(0 0 100% 0); }
html.js .stufen-haus { position: absolute; margin: 0; height: var(--haus-h); width: var(--haus-b); left: calc(var(--haus-mitte) - var(--haus-b) * .515); bottom: -7svh; }
html.js .stufen-haus .lage--fertig { clip-path: inset(100% 0 0 0); }
html.js .schicht--nacht .lage--licht { clip-path: inset(100% 0 0 0); }
html.js .ziffer { display: block; position: absolute; left: var(--haus-mitte); top: 4svh; font: 700 min(31vw, 50svh)/1 var(--mono); letter-spacing: -.06em; color: var(--gelb-tief); transform: translateX(-50%); user-select: none; }
html.js .schicht--nacht .ziffer { color: var(--nacht-hell); }
.ziffer span { display: block; }
.ziffer span.neu { animation: ziffer-rein .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes ziffer-rein { from { transform: translateY(14%); opacity: 0; } }
html.js .stufen-text { position: absolute; left: 0; top: clamp(96px, 15svh, 150px); width: calc(min(35vw, 510px) + var(--rand)); margin: 0; padding-right: 0; z-index: 3; }
html.js .stufen-leiste { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: clamp(16px, 3svh, 28px); }
.stufen-leiste i { height: 5px; border-radius: 3px; background: var(--strich); position: relative; overflow: hidden; }
.stufen-leiste i::after { content: ""; position: absolute; inset: 0; background: var(--akzent); transform: scaleX(var(--f, 0)); transform-origin: left; }
html.js .stufen-stapel { display: grid; margin-top: clamp(18px, 4svh, 40px); }
html.js .stufe { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(22px); transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
html.js .stufen[data-stufe="1"] .stufe[data-nr="1"], html.js .stufen[data-stufe="2"] .stufe[data-nr="2"], html.js .stufen[data-stufe="3"] .stufe[data-nr="3"], html.js .stufen[data-stufe="4"] .stufe[data-nr="4"] { opacity: 1; transform: none; pointer-events: auto; transition-delay: .12s; }
html.js .achse { display: block; position: absolute; top: 2%; height: 74%; left: 24%; width: 0; border-left: 2px dashed var(--blau); opacity: 0; transition: opacity .3s; pointer-events: none; }
.stufen-haus .lage--technik, .kontakt-haus .lage--technik { z-index: 1; }
.stufen-haus .kote-linie, .stufen-haus .kote-marke, .stufen-haus .achse, .kontakt-haus .kote-linie, .kontakt-haus .kote-marke { z-index: 2; }
.achse::after { content: ""; position: absolute; top: 0; bottom: 0; right: var(--band, 0px); border-left: 2px dashed var(--blau); }
.achse b { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--blau); border-radius: 50%; background: var(--gelb); color: var(--blau); font: 700 .9375rem/1 var(--mono); }
.zeigt-achse .achse { opacity: 1 !important; }

/* 4 · Drei Felder */
.felder { padding: 15svh 0 12svh; }
.felder-kopf { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4vw; align-items: end; padding-bottom: 7svh; }
.felder-kopf h2, .tafel h2, .projekte h2, .kontakt h2 { font-size: var(--t2); }
.felder-kopf p { font-size: var(--t3); font-weight: 600; line-height: 1.32; max-width: 26em; color: var(--leise); }
.karten { padding-inline: clamp(12px, 3vw, 48px); display: grid; gap: 5svh; }
.karte { position: sticky; top: calc(88px + var(--i, 0) * 16px); height: min(78svh, 56vw); min-height: 440px; border-radius: 28px; overflow: hidden; background: var(--gelb); color: var(--blau); transform: scale(calc(1 - var(--d, 0) * .045)); transform-origin: 50% 0; }
.karte::after { content: ""; position: absolute; inset: 0; background: var(--nacht); opacity: calc(var(--d, 0) * .6); pointer-events: none; }
.karte-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); }
.karte--oben .karte-bild img { object-position: 50% 0; }
.karte-text { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); width: min(38%, 470px); background: #fff; border-radius: 22px; padding: clamp(22px, 2.6vw, 40px); box-shadow: 0 30px 60px -30px rgba(8, 25, 74, .55); }
.karte--links .karte-text { left: clamp(16px, 3vw, 48px); }
.karte--rechts .karte-text { right: clamp(16px, 3vw, 48px); }
.karte--tafel .karte-text { left: clamp(16px, 3vw, 48px); top: auto; bottom: clamp(16px, 3vw, 48px); transform: none; }
.karte-nr { font: 600 var(--t5)/1 var(--mono); color: rgba(11, 31, 102, .7); }
.karte h3 { font-size: clamp(1.6rem, 2.7vw, 2.5rem); margin-top: .5em; }
.karte-text > p:not(.karte-nr) { margin-top: .8em; }
.karte ul { margin-top: 1.1em; border-top: 2px solid rgba(11, 31, 102, .2); font-weight: 650; }
.karte li { padding: .62em 0 .62em 1.5em; border-bottom: 1px solid rgba(11, 31, 102, .16); position: relative; }
.karte li::before { content: ""; position: absolute; left: 0; top: 1em; width: .62em; height: .62em; background: var(--blau); clip-path: polygon(0 8%, 100% 8%, 50% 100%); }

/* 5 · Lifttafel */
.tafel { padding: 14svh 0 16svh; }
.tafel-raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 6vw; align-items: start; }
.tafel-links { position: sticky; top: 17svh; }
.tafel-links p { margin-top: 1.1em; max-width: 24em; color: var(--leise); font-size: var(--t3); font-weight: 600; line-height: 1.32; }
.tafel-anzeige { margin-top: 5svh; display: flex; align-items: center; gap: 2.2vw; color: var(--gelb); }
.tafel-pfeil svg { width: clamp(34px, 4.4vw, 64px); height: auto; fill: currentColor; }
.tafel-zahl { font: 700 clamp(6rem, min(17vw, 32svh), 15rem)/.84 var(--mono); letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.tafel-zahl.neu { animation: ziffer-rein .4s cubic-bezier(.2, .8, .2, 1); }
.tafel-liste { counter-reset: stock 13; border-top: 2px solid var(--strich); }
.tafel-liste li { counter-increment: stock -1; display: grid; grid-template-columns: 3.1em 1fr; align-items: baseline; padding: .78em 0; border-bottom: 2px solid var(--strich); font-weight: 750; font-size: clamp(1.35rem, 2.9vw, 2.55rem); line-height: 1.1; letter-spacing: -.02em; color: rgba(255, 255, 255, .42); transition: color .3s, transform .45s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.tafel-liste li::before { content: counter(stock, decimal-leading-zero); font: 600 .5em/1 var(--mono); letter-spacing: 0; color: rgba(255, 255, 255, .55); transition: color .3s; }
.tafel-liste li.aktiv { color: #fff; transform: translateX(clamp(8px, 1.6vw, 26px)); border-color: var(--gelb); }
.tafel-liste li.aktiv::before { color: var(--gelb); }
html:not(.js) .tafel-liste li { color: #fff; }

/* 6 · Projekte */
.projekte { padding: 13svh 0 14svh; overflow-x: clip; }
.projekte-kopf { display: flex; align-items: baseline; gap: 3vw; flex-wrap: wrap; }
.projekte-kopf p { color: var(--leise); font-size: var(--t3); font-weight: 600; max-width: 26em; line-height: 1.32; }
.projekt { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); align-items: center; gap: 2vw; padding-inline: var(--rand); margin-top: 6svh; }
.projekt img { width: 100%; height: auto; }
.projekt-ort { font: 600 var(--t5)/1 var(--mono); color: var(--gelb); }
.projekt h3 { font-size: var(--t2); margin-top: .35em; }
.projekt dl { margin-top: 1.4em; border-top: 2px solid var(--strich); max-width: 30em; }
.projekt dl div { display: grid; grid-template-columns: 7.5em 1fr; gap: 1em; padding: .7em 0; border-bottom: 1px solid var(--strich); }
.projekt dt { font: 500 var(--t5)/1.6 var(--mono); color: var(--leise); }
.projekt dd { font-weight: 650; }
.projekt-klein { margin-top: 1em; font: 500 var(--t5)/1 var(--mono); color: var(--leise); }
.projekte-stand { display: none; }
html.quer .projekte { padding: 0; height: 330svh; }
html.quer .projekte-halt { position: sticky; top: 0; height: 100svh; overflow: clip; display: flex; flex-direction: column; }
html.quer .projekte-kopf { padding-top: clamp(92px, 13svh, 130px); width: 100%; }
html.quer .projekte-bahn { flex: 1; min-height: 0; display: flex; will-change: transform; }
html.quer .projekt { flex: 0 0 100vw; margin: 0; height: 100%; }
html.quer .projekt { grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); }
html.quer .projekt img { height: min(68svh, 41vw); width: auto; max-width: none; justify-self: center; transform: translate3d(var(--px, 0), 0, 0); }
html.quer .projekt-text { transform: translate3d(var(--tx, 0), 0, 0); }
html.quer .projekte-stand { display: block; position: absolute; right: var(--rand); bottom: 4svh; font: 600 1rem/1 var(--mono); color: var(--leise); }
html.quer .projekte-stand b { color: var(--gelb); font-size: 1.6em; }

/* 7 · Kontakt */
.kontakt { border-radius: clamp(26px, 4vw, 56px) clamp(26px, 4vw, 56px) 0 0; margin-top: -1px; padding: 13svh 0 12svh; z-index: 2; overflow-x: clip; }
.kontakt-raster { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 3vw; align-items: start; }
.kontakt-bild { position: sticky; top: 13svh; }
.kontakt-haus { width: 112%; margin-left: -10%; }
.kontakt-waechst { position: relative; z-index: 1; margin-top: -3%; display: grid; gap: 12px; justify-items: center; text-align: center; font-weight: 700; }
html:not(.js) .kontakt-waechst { display: none; }
.kontakt-waechst ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font: 600 var(--t5)/1 var(--mono); }
.kontakt-waechst li { padding: 9px 13px; border: 2px solid var(--blau); border-radius: 999px; transition: background-color .35s, color .35s; }
.kontakt-waechst li.an { background: var(--blau); color: #fff; }
.kontakt-zirkel { position: absolute; left: 4%; bottom: -30%; width: 14%; height: auto; transform: rotate(64deg); transform-origin: 50% 80%; }
.kontakt-stift { position: absolute; right: 0%; bottom: -32%; width: 17%; height: auto; transform: rotate(18deg); }
.kontakt-satz { margin-top: 1em; font-size: var(--t3); font-weight: 600; line-height: 1.32; max-width: 27em; }
.formular { margin-top: 5svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 20px; }
.feld { display: grid; gap: 7px; }
.feld--breit { grid-column: 1 / -1; }
.feld label { font-weight: 700; font-size: .9375rem; }
.feld-leise { font-weight: 500; color: var(--leise); }
.feld input[type="text"], .feld input[type="email"], .feld input[type="tel"], .feld textarea { width: 100%; font: 500 1.0625rem/1.4 var(--schrift); color: var(--blau); background: #fff; border: 2px solid var(--blau); border-radius: 14px; padding: 13px 16px; min-height: 52px; }
.feld textarea { resize: vertical; min-height: 124px; }
.feld [aria-invalid="true"] { border-color: #b3001e; box-shadow: 0 0 0 3px rgba(179, 0, 30, .18); }
.haken { grid-template-columns: 28px 1fr; align-items: start; gap: 12px; font-size: .9375rem; }
.haken input { width: 26px; height: 26px; margin: 0; accent-color: var(--blau); }
.haken label { font-weight: 500; line-height: 1.4; }
.formular-ende { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.formular-meldung { font-weight: 700; max-width: 24em; line-height: 1.35; }
.formular-meldung.fehler { color: #8f0018; }
.orte { margin-top: 8svh; padding-top: 4svh; border-top: 2px solid var(--blau); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; line-height: 1.6; }
.orte a:not(.knopf) { text-underline-offset: 3px; }
.orte-karriere .knopf { white-space: nowrap; }
.orte-karriere { display: grid; gap: 14px; justify-items: start; align-content: start; line-height: 1.4; }

/* Fuß */
.fuss { padding: 9svh 0 7svh; font-size: .9375rem; }
.fuss-reihe { display: grid; grid-template-columns: 1.4fr 1fr auto 1.2fr; gap: 32px; align-items: start; line-height: 1.7; }
.fuss a { text-underline-offset: 3px; }
.zeichen-liste { display: flex; gap: 6px; }
.zeichen-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--strich); transition: background-color .25s, color .25s; }
.zeichen-link:hover { background: var(--gelb); color: var(--blau); border-color: var(--gelb); }
.zeichen { width: 19px; height: 19px; }
.fuss-klein { color: var(--leise); }

/* Rechtliches */
.recht { background: var(--gelb); }
.recht main { --tinte: var(--blau); --akzent: var(--blau); max-width: 760px; margin: 0 auto; padding: 130px var(--rand) 90px; color: var(--blau); }
.recht h1 { font-size: var(--t2); }
.recht h2 { font-size: 1.4rem; margin-top: 2.2em; }
.recht p, .recht dl { margin-top: .9em; }
.recht dl div { display: grid; grid-template-columns: 11em 1fr; gap: 1em; padding: .5em 0; border-bottom: 1px solid rgba(11, 31, 102, .2); }
.recht dt { font-weight: 700; }
.offen { background: #fff; border-radius: 6px; padding: 1px 6px; font: 500 .875em/1.5 var(--mono); }
.offen.block { display: block; padding: 12px 16px; border-radius: 14px; }

html:not(.js) .leiste { position: absolute; }

/* Startbild ohne Springen: bis das Skript einmal gezeichnet hat, steht im Kopf nur die Grundplatte (der Aufbau folgt als Bewegung) */
html.js .kopf .lage--fertig { clip-path: inset(100% 0 0 0); }
html.js:not(.bereit) .kopf-zahl, html.js:not(.bereit) .linse { opacity: 0; }
html.js .kopf-zahl { transition: opacity .4s; }

/* Schmale Fenster */
@media (max-width: 1020px) {
  .leiste-nav { display: none; }
  .felder-kopf, .tafel-raster { grid-template-columns: 1fr; }
  .tafel-links { position: static; }
  .tafel-anzeige { display: none; }
  .fuss-reihe { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --haus-h: calc(112vw / 1.1348); --haus-mitte: 50vw; }
  .leiste { height: 60px; gap: 10px; }
  .leiste .knopf--klein { white-space: nowrap; font-size: .8125rem; padding: 8px 14px; min-height: 44px; }
  .marke small { font-size: .625rem; padding: 3px 6px; }
  .marke { font-size: 1.2rem; }
  .kopf { display: flex; flex-direction: column; min-height: 100svh; }
  .kopf-text { width: auto; margin: 0; padding: 78px var(--rand) 0; }
  .kopf h1 { font-size: clamp(1.9rem, 8.6vw, 2.5rem); }
  .kopf-satz { font-size: 1.0625rem; margin-top: 12px; }
  .kopf-knopf { margin-top: 16px; }
  .kopf-klein { font-size: .875rem; margin-top: 10px; }
  .kopf-beleg { margin-top: 12px; }
  .kopf-haus { position: relative; order: 2; left: auto; bottom: auto; margin: auto 0 0 -6vw; width: 112vw; height: auto; flex: none; }
  .kopf-zahl { left: 50vw; top: auto; bottom: calc(112vw / 1.1348 - 20vw); font-size: 25vw; }
  .kopf-hinweis { position: relative; order: 3; left: auto; bottom: auto; padding: 0 var(--rand) 18px; margin-top: -16px; text-align: center; }
  .vorn-stift { display: none; }
  .vorn-massstab { width: 150px; right: -44px; bottom: -70px; }
  .kote-marke { left: auto; right: 7.5%; }
  .kote-marke::before { width: 14px; }
  .zahlen { grid-template-columns: 1fr; gap: 26px; }
  .zaehler { font-size: 4.2rem; }
  html.js .stufen { height: 560svh; }
  html.js .stufen-haus { left: -6vw; bottom: auto; top: 84px; width: 112vw; height: auto; }
  html.js .ziffer { top: 70px; font-size: 52vw; left: 50vw; }
  html.js .stufen-text { top: auto; bottom: 0; width: 100%; padding: 14px var(--rand) max(16px, 2.4svh); background: linear-gradient(to bottom, transparent, var(--grund-flach, var(--gelb)) 26px); }
  html.js .schicht--nacht .stufen-text { --grund-flach: var(--nacht); }
  html.js .stufen-text h2 { display: none; }
  html.js .stufen-leiste { margin-top: 0; }
  html.js .stufen-stapel { margin-top: 12px; min-height: 16.2em; }
  .stufe h3 { font-size: 1.35rem; }
  .stufe-kern { font-size: 1.0625rem; margin-top: .45em; }
  .stufe p { font-size: .9375rem; line-height: 1.42; }
  .stufe-ergebnis { font-size: .75rem !important; padding-top: .6em; margin-top: .7em !important; }
  .legende { font-size: .6875rem; margin-top: .6em; gap: .25em .8em; }
  html.js .stufen-stapel { min-height: 19.5em; }
  .karte { height: auto; min-height: 0; top: calc(66px + var(--i, 0) * 10px); border-radius: 22px; }
  .karte-bild img { position: relative; inset: auto; aspect-ratio: 16 / 10; height: auto; }
  .karte-text, .karte--tafel .karte-text { position: relative; inset: auto; top: auto; left: auto; right: auto; bottom: auto; transform: none; width: auto; border-radius: 0; box-shadow: none; padding: 20px 20px 22px; }
  .tafel-liste li { font-size: 1.3rem; }
  .projekt { grid-template-columns: 1fr; gap: 0; padding-inline: var(--rand); }
  .projekt img { width: 116%; max-width: none; margin-left: -8%; }
  .kontakt-raster { grid-template-columns: minmax(0, 1fr); }
  .kontakt-bild { position: relative; top: auto; order: 2; margin-top: 4svh; }
  .kontakt-haus { width: 112vw; margin-left: calc(-6vw - var(--rand)); }
  .formular { grid-template-columns: minmax(0, 1fr); }
  .orte { grid-template-columns: 1fr; }
  .fuss-reihe { grid-template-columns: 1fr; gap: 22px; }
  .recht dl div { grid-template-columns: 1fr; gap: 0; }
}
/* Schmal und flach (Handy quer, kleines Fenster): Bühne nebeneinander statt übereinander */
@media (max-width: 760px) and (max-height: 560px) {
  html.js .stufen-haus { top: auto; bottom: -6svh; left: auto; right: -10vw; height: 92svh; width: calc(92svh * 1.1348); }
  html.js .ziffer { display: none; }
  html.js .stufen-text { top: 66px; bottom: auto; width: 54vw; background: none; padding-right: 0; }
  html.js .stufen-stapel { min-height: 0; }
  .stufe p:not(.stufe-kern):not(.stufe-ergebnis) { display: none; }
  .legende { display: none; }
}
/* Flache Fenster am Computer: Text kompakter, damit nichts über die Platte läuft */
@media (min-width: 761px) and (max-height: 620px) {
  .kopf-klein { display: none; }
  .kopf-text { padding-top: 84px; }
}

/* Ruhige Fassung */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .kopf-zahl, .kopf-haus, .vorn img { transform: none; }
  .kopf-zahl { transform: translateX(-50%); }
  .vorn-stift { transform: rotate(-7deg); }
  .vorn-massstab { transform: rotate(4deg); }
  html.js .kopf .lage--fertig { clip-path: none; }
  .buero-satz .w { opacity: 1; }
  .karte { transform: none; }
  .karte::after { display: none; }
}
