@font-face { font-family: 'Instrument Serif'; src: url(fonts/instrument-serif-latin.woff2) format('woff2'); font-display: swap; }

:root { --grund: #020306; --text: #e9edf3; --leise: #8a94a3; --blau: #7ea6ee; --linie: rgba(231, 236, 243, 0.22); }
* { box-sizing: border-box; margin: 0; }
html { background: var(--grund); color: var(--text); font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0.005em; -webkit-font-smoothing: antialiased; }
/* clip, nie hidden: hidden macht die Seite zur Scroll-Box und sticky klebt nicht mehr */
body, main { overflow-x: clip; }

#welt { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
main { position: relative; z-index: 1; }

.s { min-height: 150svh; padding: 0 max(24px, 6vw); }
.hero { min-height: 110svh; }
.text {
  position: sticky; top: 0; height: 100svh; max-width: 31rem;
  display: flex; flex-direction: column; justify-content: center;
  opacity: var(--v, 0);
}
/* Die Abdunklung hinter dem Text rechnet der letzte Shader-Schritt (engine.js, scrim): ein CSS-Verlauf am klebenden
   Text zeigte beim Scrollen seine Kante als Rechteck und hinkte bei schweren Bildern hinterher. */
.rechts .text { margin-left: auto; }
.unten .text { justify-content: flex-end; padding-bottom: 17svh; margin: 0 auto; text-align: center; max-width: 34rem; }
.unten .text p { margin-inline: auto; }

h1, h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; line-height: 1.02; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 5.8vw, 5.4rem); letter-spacing: -0.016em; }
h2 { font-size: clamp(2.3rem, 4.4vw, 4.1rem); }
.text .kanji { font: 400 clamp(1.6rem, 2.6vw, 2.2rem)/1 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif JP', serif; letter-spacing: 0.2em; color: var(--blau); margin: 0 0 1.2rem; }
.text .fuss { font-size: 12px; margin-top: 2rem; opacity: 0.75; }
.text p { margin-top: 1.3rem; color: var(--leise); max-width: 26rem; text-wrap: pretty; }

.labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0; font-size: 12.5px; color: var(--text); }
.labels svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.labels line { stroke: var(--linie); stroke-width: 1; }
.labels span { position: absolute; left: 0; top: 0; line-height: 18px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(16px, 4vw) max(14px, env(safe-area-inset-bottom));
}
.aufziehen, .bauplan { background: none; border: 0; color: var(--leise); font: inherit; font-size: 14px; letter-spacing: 0.01em; cursor: pointer; transition: color 0.3s; }
.aufziehen:hover, .bauplan:hover { color: var(--text); }
.aufziehen { display: flex; align-items: center; gap: 12px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.aufziehen svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.bahn, .fortschritt { fill: none; }
.bahn { stroke: var(--linie); stroke-width: 1.2; }
.fortschritt { stroke: var(--blau); stroke-width: 1.8; stroke-dasharray: 0 1; }
.aufziehen.an { color: var(--blau); }
.bauplan { padding: 4px 0; border-bottom: 1px solid var(--linie); }
.bauplan[aria-pressed='true'] { color: var(--blau); border-color: var(--blau); }
:focus-visible { outline: 2px solid var(--blau); outline-offset: 5px; }

.lade { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; background: var(--grund); color: var(--leise); font-size: 14px; letter-spacing: 0.02em; transition: opacity 0.7s; }
.bereit .lade { opacity: 0; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.kein-3d { display: none; }
.ohne-3d .kein-3d { display: block; position: fixed; top: 16px; left: 16px; right: 16px; z-index: 3; color: var(--leise); }
.ohne-3d .text { opacity: 1; }
.ohne-3d .dock { display: none; }

.touch { display: none; }
@media (pointer: coarse) { .maus { display: none; } .touch { display: inline; } }

@media (orientation: portrait) {
  .text { justify-content: flex-start; padding-top: 11svh; }
  .unten .text { justify-content: flex-end; }
  .labels { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .lade { transition: none; }
}
