/* Dark only (decided 2026-10-19), like the instruments in
   docs/design-briefing.md. System fonts only: privacy.html promises no
   third-party requests (site/check.sh). */
:root {
  --bg: #0b0d10;
  --surface: #14181d;
  --text: #e8eaed;
  --muted: #9aa3ad;
  --line: #262c33;
  --accent: #5fd3c2;
  --actual: #ff9a3c;
  --danger: #ff6b6b;
  --road: #0b0d10;
  --lane: #3a434d;
  color-scheme: dark;
}


* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

main { position: relative; }

a { color: var(--accent); }

.hero { padding: 18vh 0 0; }

.wordmark {
  margin: 0;
  font-size: clamp(3rem, 14vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.wordmark .amp { color: var(--accent); }

.tagline {
  margin: 1rem 0 0;
  font-size: 1.35rem;
  color: var(--muted);
}

/* The drive panel: ivi's display with a little game (motion.js). Without
   script the markup is a still frame: the gauge and the SVG road strip. */
.drive {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin: 2rem 0 4rem;
  padding: 1.5rem 16px 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.gauge { display: block; width: min(100%, 15rem); }

.gauge .track { stroke: var(--line); }
.gauge .value { stroke: var(--muted); transition: stroke 0.4s; }
.gauge.on-target .value { stroke: var(--accent); }
.gauge .target { stroke: var(--accent); }
.gauge .actual-tick { stroke: var(--actual); }
.gauge .num { fill: var(--text); font: 700 40px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.gauge .kmh { fill: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.gauge .unit,
.gauge .actual { font: 600 10px system-ui, sans-serif; letter-spacing: 0.2em; }
.gauge .unit { fill: var(--accent); }
.gauge .actual { fill: var(--actual); }
.gauge .actual-num { fill: var(--text); font-variant-numeric: tabular-nums; }

.game, .game-bar { justify-self: stretch; }
.game { position: relative; outline: none; }
.game canvas { display: block; width: 100%; height: 208px; border-radius: 10px; cursor: pointer; }
.game.playing { touch-action: none; user-select: none; -webkit-user-select: none; }
.game.playing canvas { cursor: default; }
/* Sound toggle: a small speaker in the game's top-left corner; the HUD
   (battery) moves right to make room (motion.js, HUD_X). */
.sound-btn {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--muted);
  cursor: pointer;
}
.sound-btn svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; }
.sound-btn .spk { stroke: none; }
.sound-btn[aria-pressed="true"] { color: var(--accent); }
.sound-btn[aria-pressed="true"] .mute,
.sound-btn[aria-pressed="false"] .waves { display: none; }
.sound-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.game-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; }
.game-btn {
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font: 600 0.95rem system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
}
.game-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.game-msg { flex: 1 1 100%; min-width: 0; margin: 0; color: var(--text); font-size: 0.9rem; }
.game-help { flex: 1 1 100%; min-width: 0; margin: 0; color: var(--muted); font-size: 0.85rem; }

/* Segmented switches: language (top right) and the charging strategy. */
.seg {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 600 0.8rem system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.seg-label { padding: 0 0.5rem 0 0.6rem; color: var(--muted); }
.seg button {
  padding: 0.3rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--surface); }
.seg button:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.lang { position: absolute; top: 16px; right: 16px; }

.scroller { display: block; width: 100%; }
.scroller .road { stroke: var(--line); }
.scroller .driven { stroke: var(--accent); opacity: 0.45; }
.scroller .tick { stroke: var(--line); }
.scroller .car { fill: var(--accent); }
.scroller .stop .dot { fill: var(--surface); stroke: var(--muted); transition: fill 0.4s, stroke 0.4s; }
.scroller .stop .halo { fill: none; stroke: var(--accent); opacity: 0; transition: opacity 0.4s; }
.scroller .stop .dist { fill: var(--accent); font: 600 11px system-ui, sans-serif; opacity: 0; transition: opacity 0.4s; font-variant-numeric: tabular-nums; }
.scroller .stop.planned .dot { fill: var(--accent); stroke: var(--accent); }
.scroller .stop.planned .halo { opacity: 0.35; }
.scroller .stop.planned .dist { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .gauge .value, .scroller .stop * { transition: none; }
}

/* The one sentence about the product: the loudest text after the name. */
.lead {
  margin: 2rem 0 0;
  font-size: clamp(1.35rem, 4.6vw, 1.7rem);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* Three teasers: a row on wide screens, stacked on a phone. */
.teaser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.2rem 0.9rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.teaser li { padding-left: 0.75rem; border-left: 2px solid var(--accent); }
/* Sized so each heading ("Die passende Ladekarte", the longest) stays on
   one line in the three-column desktop row with the macOS/Windows system
   fonts (measured 2026-10-19 with Arial metrics: 187 of ~202 px; the wide
   Linux default DejaVu still wraps, gracefully). */
.teaser strong { display: block; margin-bottom: 0.2rem; font-size: 0.9em; }
.teaser span { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.contact { margin: 2.5rem 0 0; }

/* The bridge into the game: says it is a game while the app is coming. */
.play-in { margin: 1rem 0 0; }

footer {
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a { color: var(--muted); margin-right: 1.2rem; }

.legal { padding-top: 4rem; padding-bottom: 3rem; }
.legal h1 { font-size: 2rem; margin: 0 0 1.5rem; }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }
.back { display: inline-block; margin-bottom: 2rem; }

/* Copy button beside an e-mail address (copy.js): a quiet alternative to the link. */
.mail-copy { white-space: nowrap; }
.copy {
  margin-left: 0.4rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.75rem system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  vertical-align: 0.1em;
  cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--muted); }
.copy:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
