/* Spieltag, Startseite: „Der Spielstand“. Mattes Schwarz, ein riesiges 1:0 aus Bernstein-Leuchtpunkten wie das
   App-Symbol, weiße Punktschrift für Überschriften, Systemschrift in warmem Grau für Sätze, echte Bildschirme im iPhone.
   Punktschrift und 1:0 sind statische SVGs aus tools/site/punkte-web.mjs, das iPhone aus tools/site/telefon.py.
   Keine externen Schriften, keine Requests nach außen; einziges Skript ist die anonyme Reichweitenmessung von Vercel. */
:root {
  color-scheme: dark;
  --grund: #000;
  --weiss: #F2F2F2;
  --satz: #B8B8B8;      /* Sätze, 10,6:1 auf dem Grund */
  --grau: #8C8C8C;      /* Fuß, 6,3:1 */
  --bernstein: #F0C232;
  --linie: #191919;
  --sans: -apple-system, system-ui, sans-serif;
  /* Bühne im Maß des Entwurfs (1536 × 960): 1u ist ein Entwurfspixel, die Bühne passt immer in den ersten Bildschirm */
  --u: min(calc(100vw / 1536), calc(100svh / 960));
  --s: 1;               /* Maßstab der Punktschrift-Überschriften unter der Bühne */
}

* { box-sizing: border-box; }

html {
  background: var(--grund);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #2E2E2E var(--grund);
}

body {
  margin: 0;
  color: var(--satz);
  background: var(--grund);
  font: 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--bernstein); color: var(--grund); }

h1, h2, p, figure { margin: 0; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--bernstein); outline-offset: 4px; border-radius: 4px; }

/* ---------- Kopf ---------- */

.kopf {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--linie);
}
.wortmarke { display: block; }
.wortmarke img { width: 118px; }
/* Apples Badge: unverändert, mindestens 40 px hoch, mit freiem Raum ringsum */
.kopf-laden { display: block; }
.kopf-laden img { height: 40px; width: auto; }

/* ---------- Bühne (schmal: untereinander) ---------- */

.buehne {
  padding: 40px 16px 0;
  display: grid;
  justify-items: center;
  text-align: center;
}
.spielstand { position: relative; width: min(84vw, 460px); aspect-ratio: 992 / 478; }
.spielstand img { position: absolute; inset: 0; width: 100%; height: 100%; }
.titel { margin-top: 20px; }
.titel img { width: min(88vw, 460px); }
.satz { margin-top: 16px; max-width: 22em; font-size: 17px; line-height: 1.45; }
.laden { margin-top: 20px; }
.laden a { display: block; }
.laden img { height: 48px; width: auto; }

/* ---------- iPhone: Rahmen aus der Platte, darin ein echter Bildschirm ---------- */

.telefon { --w: min(78vw, 360px); position: relative; width: var(--w); }
.telefon .rahmen { position: relative; z-index: 1; width: 100%; pointer-events: none; }
.schirm {
  position: absolute;
  left: calc(var(--w) * 26 / 626);
  top: calc(var(--w) * 24 / 626);
  width: calc(var(--w) * 574 / 626);
  border-radius: calc(var(--w) * 72 / 626);
  overflow: hidden;
  background: #000;
}
.schirm img { width: 100%; }
/* Die Aufnahme der Übersicht hat keine Kamera-Insel; die des Geräts sitzt hier wie im Entwurf */
.schirm.insel::after {
  content: "";
  position: absolute;
  top: calc(var(--w) * 21 / 626);
  left: 50%;
  width: calc(var(--w) * 180 / 626);
  height: calc(var(--w) * 50 / 626);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}
.buehne-telefon { --w: min(86vw, 380px); margin-top: 40px; }

/* Herausforderung: nur der obere Teil des Telefons, unten blendet es ins Schwarz */
.telefon.anschnitt {
  height: calc(var(--w) * 1.53);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

/* ---------- Abschnitte: alles auf einer Achse, Überschrift, Satz, Bildschirm ---------- */

.abschnitt {
  padding: clamp(112px, 14vw, 200px) 16px 0;
  display: grid;
  justify-items: center;
  text-align: center;
}
#live-titel img { width: calc(336px * var(--s)); }
#duo-titel img { width: calc(487px * var(--s)); }
#herausforderung-titel img { width: calc(430px * var(--s)); }
#schluss-titel img { width: calc(619px * var(--s)); }
.abschnitt p, .schluss p { margin-top: 24px; max-width: 32em; font-size: clamp(17px, 1.2vw + 8px, 20px); text-wrap: balance; }
.abschnitt figure { margin-top: clamp(48px, 6vw, 72px); }
.schluss .laden { margin-top: 32px; }
.schluss .laden img { height: 56px; }

.duo { width: min(100%, 1000px); }
.duo img { border-radius: 3.3% / 4.6%; box-shadow: 0 0 0 1px #1E1E1E; }

/* ---------- Schluss und Fuß ---------- */

.schluss {
  padding: clamp(128px, 16vw, 224px) 16px clamp(96px, 12vw, 160px);
  display: grid;
  justify-items: center;
  text-align: center;
}

.fuss {
  padding: 24px 16px 40px;
  border-top: 1px solid var(--linie);
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  font-size: 14px;
  color: var(--grau);
}

/* ---------- Impressum und Datenschutz: eine ruhige Lesespalte, Überschrift in Punktschrift ---------- */

.text { max-width: 40em; margin: 0 auto; padding: 56px 16px 96px; font-size: 17px; line-height: 1.6; }
.text h1 img { width: calc(var(--h1-breite) * 1.2); max-width: 100%; }
.text h2 { margin: 40px 0 0; color: var(--weiss); font-size: 19px; font-weight: 600; line-height: 1.3; }
.text p, .text ul { margin-top: 12px; }
.text ul { padding-left: 1.1em; }
.text li + li { margin-top: 12px; }
.text strong { color: var(--weiss); font-weight: 600; }
.text a, .fuss a { color: var(--bernstein); text-underline-offset: 3px; }
.text .kurz { margin-top: 28px; color: var(--weiss); font-size: 19px; }
.text .stand { margin-top: 40px; color: var(--grau); font-size: 15px; }

/* ---------- Das 1:0 geht einmal an: Reihe für Reihe wie eine Anzeigetafel, danach steht alles still ----------
   Die Punktreihen liegen im 478 hohen SVG bei 23 + n × 19,75. Jeder Schritt endet zwischen zwei Reihen, so geht
   immer eine ganze Reihe Lampen an: sichtbar sind −6,6 + n × 19,75 (n = 0 … 24). */

@media (prefers-reduced-motion: no-preference) {
  .spielstand .an { animation: anzeige 0.9s steps(24, jump-start) 0.4s backwards; }
}
@keyframes anzeige {
  from { clip-path: inset(0 0 101.39% 0); }
  to { clip-path: inset(0 0 2.22% 0); }
}

/* ---------- Breit: die Bühne wie im Entwurf, jedes Teil an seinem Platz ---------- */

@media (min-width: 700px) {
  :root { --s: 1.2; }
  .abschnitt .telefon { --w: min(36vw, 400px); }

  .kopf {
    position: relative;
    height: calc(65 * var(--u));
    padding: 0;
    border-bottom-width: max(1px, calc(2 * var(--u)));
  }
  .wortmarke { position: absolute; left: calc(29.5 * var(--u)); top: calc(14.5 * var(--u)); }
  .wortmarke img { width: calc(167.64 * var(--u)); }
  .kopf-laden { position: absolute; right: calc(40 * var(--u)); top: 50%; transform: translateY(-50%); }
  .kopf-laden img { height: max(40px, calc(40 * var(--u))); }

  /* Positionen in Entwurfspixeln, waagerecht von der Mitte (768), senkrecht ab der Kopflinie (67) */
  .buehne {
    position: relative;
    display: block;
    padding: 0;
    height: calc((772 - 67 + 1296) * var(--u));
  }
  .buehne > * { position: absolute; margin: 0; }
  .spielstand { left: calc(50% - 476 * var(--u)); top: calc(16 * var(--u)); width: calc(992 * var(--u)); }
  .titel { left: calc(50% - 567.4 * var(--u)); top: calc(499.1 * var(--u)); }
  .titel img { width: calc(1161.72 * var(--u)); }
  .satz {
    left: calc(50% + 12.5 * var(--u));
    top: calc(598 * var(--u));
    transform: translateX(-50%);
    max-width: none;
    white-space: nowrap;
    font-size: max(16px, calc(25.5 * var(--u)));
    line-height: 1.2;
  }
  /* Der Badge steht, wo im Entwurf „Bald im App Store“ stand, auf der optischen Mitte der Bühne (+20) */
  .buehne .laden { left: calc(50% - 58 * var(--u)); top: calc(642 * var(--u)); }
  .buehne .laden img { height: calc(52 * var(--u)); }
  .buehne-telefon { --w: calc(626 * var(--u)); left: calc(50% - 312 * var(--u)); top: calc(705 * var(--u)); }
}

/* Ab Laptopbreite tragen die Abschnitte das Gewicht der Bühne: Punktschrift im Raster der Hauptüberschrift */
@media (min-width: 1100px) {
  :root { --s: 1.35; }
  .abschnitt .telefon { --w: min(30vw, 440px); }
  .abschnitt p, .schluss p { font-size: 22px; }
  .schluss .laden img { height: 64px; }
}
