:root {
  --bg: #efeeeb;
  --text: #0a0a0a;
  --muted: #6b6862;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --panel: rgba(239, 238, 235, .72);
  --ink: #0a0a0a;
  --accent: #d12424;
  --sw-accent: var(--accent);
  --font-display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(16px, 3vw, 48px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
body[data-theme="nacht"] {
  --bg: #0b0b0d;
  --text: #efeeeb;
  --muted: #8d8a84;
  --panel: rgba(11, 11, 13, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(.9375rem, 1.111vw, 1rem); line-height: 1.55; letter-spacing: -.01em;
  overflow-x: hidden;
  transition: background .5s ease, color .5s ease;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.accent { color: var(--accent); }
.eyebrow {
  display: block;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase;
}

/* ---------- icons & letter wave (same as the main site) ---------- */
.icon {
  width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .4s var(--ease);
}
.wave { display: inline-flex; align-items: center; gap: .5em; }
.wave-inner { display: inline-flex; overflow: hidden; line-height: 1.25; }
.wave .ch {
  display: inline-block; white-space: pre;
  transition: transform .45s var(--ease);
  transition-delay: calc(var(--i) * 18ms);
  text-shadow: 0 1.25em 0 currentColor;
}
.wave:hover .ch, .wave:focus-visible .ch { transform: translateY(-1.25em); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad);
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500; letter-spacing: .04em;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: .12em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-transform: uppercase; }

/* ---------- hero: the landscape fills the screen ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  touch-action: pan-y;
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.no-webgl-msg { display: none; }
.no-webgl .no-webgl-msg { display: block; position: absolute; top: 40%; left: var(--pad); right: var(--pad); text-align: center; color: var(--muted); }

.hero-text {
  position: absolute; left: var(--pad); top: clamp(90px, 14vh, 150px);
  display: flex; flex-direction: column; gap: 14px; max-width: 34rem;
  pointer-events: none;
}
.title {
  font-size: clamp(3.2rem, 9vw, 8.5rem); font-weight: 800;
  letter-spacing: -.06em; line-height: .84;
  display: flex; flex-direction: column;
}
.title .line { display: inline-block; animation: rise 1.2s var(--ease) both; }
.title .line + .line { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.4rem); line-height: 1.25; max-width: 24rem; }
/* a soft haze in the background colour keeps the text readable over the lines */
.hero-text .lead, .hero-text .eyebrow { text-shadow: 0 0 12px var(--bg), 0 0 4px var(--bg), 0 0 24px var(--bg); }
.title { text-shadow: 0 0 30px color-mix(in srgb, var(--bg) 70%, transparent); }

/* ---------- control panel ---------- */
.panel {
  position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(18px, 4vh, 36px);
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "status meters" "buttons meters"; gap: 10px 24px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  max-width: 900px;
}
.status { grid-area: status; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.playing .status { color: var(--text); }
.playing .status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); animation: live 1.2s ease-in-out infinite; vertical-align: 1px; }
@keyframes live { 50% { opacity: .25; } }
.buttons { grid-area: buttons; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px 0 14px;
  border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  font: 500 .8rem var(--font-mono); letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; transition: background .3s, color .3s, transform .2s var(--ease);
}
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#btn-demo svg { fill: currentColor; stroke: none; }
.pill:hover { background: transparent; color: var(--accent); }
.pill:active { transform: scale(.97); }
.pill[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.pill-ghost, .pill-stop { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 35%, transparent); padding: 0 18px; }
.pill-stop { padding-left: 12px; }
.pill-ghost:hover, .pill-stop:hover { border-color: var(--accent); color: var(--accent); }

.meters { grid-area: meters; display: flex; gap: 14px; align-items: end; height: 64px; }
.meters span { display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 6px; height: 100%; font-family: var(--font-mono); font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.meters i { display: block; width: 10px; flex: 1; border-radius: 3px; background: var(--accent); transform-origin: bottom; transform: scaleY(.1); will-change: transform; }
.meters span:nth-child(2) i { opacity: .7; }
.meters span:nth-child(3) i { opacity: .45; }

.steer-hint {
  position: absolute; right: var(--pad); top: clamp(90px, 14vh, 150px);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  pointer-events: none;
}

/* ---------- about ---------- */
.about {
  padding: clamp(80px, 12vw, 160px) var(--pad);
  display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.about h2 { font-size: clamp(2.4rem, 5.5vw, 5rem); font-weight: 800; letter-spacing: -.05em; line-height: .95; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.how li { display: flex; flex-direction: column; gap: 8px; padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); }
.how li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.how b { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--accent); }
.how strong { font-size: 1.2rem; letter-spacing: -.02em; }
.how span { color: var(--muted); }
.note { max-width: 46rem; color: var(--muted); font-size: .95rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
  padding: 14px 24px; border-radius: 999px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  transition: background .3s, color .3s;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn:hover .icon { transform: translateX(3px); }
.btn:not(.btn-ghost) { --sw-accent: currentColor; }
.btn-ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- footer (same as the main site) ---------- */
.footer { background: var(--ink); color: #efeeeb; padding: clamp(60px, 8vw, 120px) var(--pad) 28px; }
.footer-line { font-size: clamp(1.4rem, 3vw, 2.6rem); letter-spacing: -.03em; color: #bfbab2; }
.footer-big {
  display: inline-flex; max-width: 100%; gap: .25em; margin: 32px 0 80px;
  font-size: clamp(1.6rem, 6.4vw, 7rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.05;
}
.footer-big .icon { width: .7em; height: .7em; stroke-width: 2.2; }
.footer-big:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-family: var(--font-mono); font-size: .75rem; color: #918e89;
  border-top: 1px solid rgba(239, 238, 235, .15); padding-top: 20px;
}
.footer-bottom a:hover { color: #efeeeb; }

@media (hover: none) { .steer-hint { display: none; } }
@media (max-width: 800px) {
  .nav-links { gap: 16px; }
  .panel { grid-template-columns: 1fr; grid-template-areas: "status" "buttons"; padding: 14px; }
  .meters { display: none; }
  .pill { padding: 0 14px 0 12px; font-size: .74rem; }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how li + li { padding-left: 0; border-left: 0; }
  .steer-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
