/* Cosmos at Scale: Standpunkt am Meer bei Nacht, Look B2 „IMAX“ der Videos: tiefes Schwarz, ein Motiv, Orange #FF4F00 nur für die Zahl,
   Barlow Condensed (900 für Zahlen und Titel, 500 für Text). Farben in build.py (TEXT, LEISE, ORANGE, GRUND, KARTE) werden dort geprüft. */

@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root { --text: #ece7de; --leise: #aaa59c; --orange: #ff4f00; --grund: #05080c; --karte: rgba(8, 14, 21, .82); --leicht: cubic-bezier(.22, .61, .36, 1); }
* { box-sizing: border-box; }
html { background: var(--grund); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.ruhig { scroll-behavior: auto; }
body { margin: 0; color: var(--text); background: var(--grund); font: 500 19px/1.5 "Barlow Condensed", "Arial Narrow", sans-serif; letter-spacing: .01em; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
.sprung { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--orange); color: var(--grund); }
.sprung:focus { top: 12px; }

/* ---------- Kopf ---------- */
.kopf {
  position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) 20px 28px; background: linear-gradient(to bottom, rgba(5, 8, 12, .7), rgba(5, 8, 12, 0));   /* kein Balken über dem Himmel */
  translate: 0 -100%; opacity: 0; transition: translate .5s var(--leicht), opacity .5s var(--leicht);
}
.kopf.da, html:not(.js) .kopf { translate: 0 0; opacity: 1; }
.recht-seite .kopf { position: sticky; background: var(--grund); }
.kopf-marke img { width: 150px; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: 2px;
  background: var(--orange); color: var(--grund); text-decoration: none; font-weight: 900; font-size: 17px; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .2s var(--leicht), background-color .2s;
}
.knopf:hover { color: var(--grund); background: #ff6a26; transform: translateY(-1px); }
.knopf-hohl { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(236, 231, 222, .5); }
.knopf-hohl:hover { color: #fff; background: rgba(236, 231, 222, .08); }
.knopf-klein { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- Bühne: Himmel, Körper, Vordergrund (bleibt stehen, die Kapitel laufen darüber) ---------- */
.himmel { position: relative; }
.buehne { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 0; }
.ebene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ebene-hell { opacity: 0; }
.koerper-ebene { position: absolute; inset: 0; }
.k-bild { position: absolute; left: 0; top: 0; width: 100px; height: 100px; max-width: none; transform-origin: 0 0; opacity: 0; will-change: transform, opacity; }
.k-bild[data-k="mond"] { opacity: 1; }
html:not(.js) .k-bild[data-k="mond"] { left: 50%; top: 46%; width: 14px; height: 14px; }
/* Ring um den echten Mond im Einstieg (wie der Ring um die winzige Erde in den Videos), Lage setzt site.js */
/* Leben am Himmel: einzelne Sterne funkeln auf, Küstenlichter flimmern über dem Wasser, ab und zu eine Sternschnuppe (site.js). Bei „Bewegung reduzieren“ nichts davon. */
.funkeln, .lichter { position: absolute; inset: 0; pointer-events: none; }
.funkeln i, .lichter i { position: absolute; left: calc(var(--ox) * 1px + var(--x) * var(--s) * 1px); top: calc(var(--oy) * 1px + var(--y) * var(--s) * 1px);
  width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; opacity: 0; animation: funkeln var(--d) ease-in-out var(--v) infinite; }
.funkeln i { background: radial-gradient(circle, #fff 0, rgba(225, 235, 255, .7) 28%, rgba(225, 235, 255, 0) 70%); }
.lichter i { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: radial-gradient(circle, rgba(255, 214, 160, .95) 0, rgba(255, 170, 90, .45) 40%, rgba(255, 170, 90, 0) 72%);
  animation-name: flimmern; animation-timing-function: steps(1, end); }
@keyframes funkeln { 0%, 58%, 100% { opacity: 0; } 72% { opacity: var(--h); } 79% { opacity: calc(var(--h) * .35); } 86% { opacity: calc(var(--h) * .85); } }
@keyframes flimmern { 0% { opacity: calc(var(--h) * .2); } 17% { opacity: var(--h); } 31% { opacity: calc(var(--h) * .5); } 48% { opacity: calc(var(--h) * .9); } 66% { opacity: calc(var(--h) * .1); } 83% { opacity: calc(var(--h) * .7); } }
.schnuppe { position: absolute; left: 0; top: 0; width: var(--l, 180px); height: 1.6px; opacity: 0; pointer-events: none; transform-origin: 100% 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(235, 240, 255, .55) 70%, #fff); border-radius: 2px; }
.schnuppe.los { animation: schnuppe var(--t, .8s) cubic-bezier(.3, .1, .6, 1) forwards; }
@keyframes schnuppe {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--a)) scaleX(.2); }
  18% { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(var(--x0) + var(--dx)), calc(var(--y0) + var(--dy))) rotate(var(--a)) scaleX(1); } }
html.ruhig .funkeln, html.ruhig .lichter, html.ruhig .schnuppe { display: none; }
.mond-ring { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid var(--orange); border-radius: 50%;
  opacity: 0; transition: opacity .5s var(--leicht); pointer-events: none; }
.mond-ring.da { opacity: .9; }
/* Wasser: WebGL-Fläche unter dem Vordergrund (site.js); ohne WebGL bleibt das gerenderte Wasser */
.wasser-gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s var(--leicht); }
html.gl .wasser-gl { opacity: 1; }
html.gl-fertig .ebene-wasser { visibility: hidden; }
.glut { position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 40%), #fffaf0 0%, #ffd9a0 30%, #ff8a3d 62%, #ff4f00 100%); }
.vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .55) 100%), linear-gradient(to bottom, rgba(5, 8, 12, .55), transparent 18%); }
.live {
  position: absolute; left: clamp(20px, 4vw, 64px); top: calc(76px + env(safe-area-inset-top)); margin: 0; z-index: 2;
  font-weight: 900; line-height: .9; text-transform: uppercase; opacity: 0; transition: opacity .6s var(--leicht);
}
.live.da { opacity: 1; }
.live-zahl { display: block; font-size: clamp(64px, 11vw, 150px); color: var(--orange); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.live-mal { display: block; margin-top: 6px; font-size: clamp(16px, 1.8vw, 22px); letter-spacing: .14em; }
.live.auf-glut .live-zahl, .live.auf-glut .live-mal, .live.auf-glut .live-name { color: var(--grund); }
.live-name { display: block; margin-top: 4px; font-size: clamp(14px, 1.4vw, 17px); letter-spacing: .2em; color: var(--leise); }

/* ---------- Kapitel ---------- */
.kapitel { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; }
/* Einstieg in zwei Teilen: oben Marke und Satz, unten Text und Knopf über dem Wasser; dazwischen bleibt der Himmel mit dem Mond frei */
.start {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center;
  padding: calc(9vh + env(safe-area-inset-top)) 20px calc(5vh + env(safe-area-inset-bottom));
}
.start-marke img { width: min(460px, 78vw); margin: 0 auto; }
.start-unten .start-text { margin-top: 0; }
/* Breit: Text unten links, die beiden am Steg bleiben frei. Hoch: Text über dem Wasser, oberhalb von Steg und Menschen */
@media (min-aspect-ratio: 1/1) { .start-unten { align-self: flex-start; text-align: left; max-width: min(30em, 36vw); margin-left: clamp(0px, 4vw, 60px); }
  .start-unten .start-text { margin-left: 0; } }
@media (max-aspect-ratio: 1/1) { .start { padding-bottom: calc(27vh + env(safe-area-inset-bottom)); padding-bottom: calc(27svh + env(safe-area-inset-bottom)); } }
.start-zeile { margin: 16px 0 0; font-size: clamp(24px, 3.2vw, 36px); line-height: 1.15; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.start-text { max-width: 30em; margin: 12px auto 22px; color: var(--text); }
.koerper { min-height: 185vh; padding: 92vh clamp(16px, 5vw, 80px) 0; display: flex; }
.karte {
  width: min(440px, 100%); padding: 26px 26px 22px; background: var(--karte); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 2px solid var(--orange); align-self: flex-start;
}
.karte h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.05; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
.k-zahl { margin: 14px 0 0; font-weight: 900; font-size: 56px; line-height: 1; color: var(--orange); }
.k-zahl span { margin-left: 8px; font-size: 18px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.karte > p { margin: 14px 0 0; }
.video { display: block; margin-top: 18px; padding: 14px 16px; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(236, 231, 222, .22); transition: box-shadow .25s; }
.video:hover { box-shadow: inset 0 0 0 1px var(--orange); color: var(--text); }
.video-titel { display: block; font-size: 20px; line-height: 1.2; color: #fff; }
.video-los { display: block; margin-top: 6px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.video-los::before { content: "▶ "; }
.k-fuss { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.k-fuss .quelle { margin-top: 0; }
.teilen { min-height: 40px; padding: 0 14px; border: 0; background: transparent; color: var(--orange); font: inherit; font-weight: 900; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; box-shadow: inset 0 0 0 1px var(--orange); cursor: pointer; transition: background .2s, color .2s; }
.teilen:hover, .teilen:focus-visible { background: var(--orange); color: var(--grund); }
.teilen::before { content: "↗ "; }
.quelle { display: inline-block; margin-top: 14px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); }
.ende { min-height: 120vh; padding: 60vh 20px 20vh; text-align: center; }
.ende h2 { font-size: clamp(40px, 7vw, 96px); line-height: .95; font-weight: 900; text-transform: uppercase; color: var(--grund); }
.ende p { max-width: 32em; margin: 18px auto 0; color: var(--grund); font-size: 21px; }

/* ---------- Nach dem Himmel ---------- */
.videos, .folgen, .fragen { width: min(760px, 100% - 40px); margin: 0 auto; padding: 16vh 0 4vh; }
.videos h2, .folgen h2, .fragen > h2 { font-size: clamp(34px, 5vw, 56px); font-weight: 900; text-transform: uppercase; line-height: 1; }
.video-liste { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.folgen p { margin: 14px 0 0; }
.folgen-knoepfe { display: flex; gap: 12px; flex-wrap: wrap; }
.frage { padding: 20px 0; border-top: 1px solid rgba(236, 231, 222, .16); }
.frage:first-of-type { margin-top: 20px; }
.frage h3 { font-size: 24px; font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.frage p { margin: 8px 0 0; }
.fuss { width: min(760px, 100% - 40px); margin: 12vh auto 0; padding: 30px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(236, 231, 222, .16); color: var(--leise); font-size: 16px; }
.fuss a { color: var(--leise); }
.fuss ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 14px 0 0; }
.leise { color: var(--leise); }
.recht { width: min(760px, 100% - 40px); margin: 0 auto; padding: 50px 0; }
.recht h1 { font-size: 48px; font-weight: 900; text-transform: uppercase; }
.recht h2 { font-size: 26px; font-weight: 900; text-transform: uppercase; margin: 30px 0 8px; }

/* ---------- Auftritt beim Scrollen ---------- */
html.js:not(.ruhig) .auf:not(.sichtbar) { opacity: 0; translate: 0 24px; }
html.js:not(.ruhig) .auf { transition: opacity .9s var(--leicht), translate .9s var(--leicht); }

@media (max-width: 700px) {
  body { font-size: 18px; }
  .kopf-marke img { width: 120px; }
  .koerper { padding-top: 96vh; }
  .karte { padding: 20px 18px 18px; }
  .k-zahl { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
