:root {
  --purple: #6750A4;
  --purple-dark: #4F3D82;
  --bg: #FBF8FF;
  --surface: #FFFFFF;
  --text: #1C1B1F;
  --text-muted: #49454F;
  --border: #E7E0EC;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1B1F;
    --surface: #262529;
    --text: #F3EDFB;
    --text-muted: #CAC4D0;
    --border: #3A383E;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); }
@media (prefers-color-scheme: dark) { a { color: #D0BCFF; } }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

header.hero {
  background: linear-gradient(160deg, var(--purple), var(--purple-dark));
  color: #fff;
  text-align: center;
  padding: 64px 24px 72px;
  overflow: hidden;
}
header.hero.hero-small { padding: 40px 24px 48px; }
header.hero .hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
header.hero .hero-text { max-width: 520px; order: 1; }
header.hero img.hero-shot {
  width: 220px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 24px 48px rgba(0,0,0,0.28);
  height: auto;
  transform: rotate(-4deg);
  flex-shrink: 0;
  order: 2;
}
/* Auf dem Handy zuerst Text und Store-Buttons, das Bild darunter und kleiner,
   damit die Buttons im ersten sichtbaren Bereich liegen. */
@media (max-width: 700px) {
  header.hero { padding: 40px 24px 48px; }
  header.hero img.hero-shot { order: 2; width: 180px; transform: rotate(-3deg); }
}
header.hero img.logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin: 0 auto 24px;
  /* heller Ring: die Kachel ist selbst lila und verschwindet sonst im Verlauf */
  box-shadow: 0 0 0 3px rgba(255,255,255,0.35), 0 8px 24px rgba(0,0,0,0.25);
}
header.hero h1 { font-size: clamp(28px, 5vw, 42px); margin: 0 0 8px; }
header.hero.hero-small h1 { font-size: clamp(24px, 4vw, 32px); }
header.hero p.tagline { font-size: clamp(16px, 2.4vw, 20px); opacity: 0.92; margin: 0 0 28px; }
header.hero p.hook {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 16px;
  opacity: 0.95;
}
header.hero a.home-link {
  color: #fff;
  opacity: 0.85;
  font-size: 14px;
  text-decoration: none;
}
header.hero a.home-link:hover { text-decoration: underline; }

/* Offizielle Store-Badges (Dateien unter assets/badges/). Apple: mindestens
   40 px hoch, Google: mindestens 28 px; beide hier 48 px, damit auch die
   Tippfläche mindestens 44 pt hat. Den transparenten Rand der Google-PNGs
   haben wir abgeschnitten (siehe README), deshalb brauchen EN und DE keinen
   unterschiedlichen Ausgleich per Außenabstand mehr. */
.store-button { display: inline-block; line-height: 0; border-radius: 8px; }
.store-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.badge { display: block; width: auto; }
.badge-apple { height: 48px; }
.badge-play { height: 48px; }

/* Zwei Store-Buttons nebeneinander; auf schmalen Bildschirmen umbrechen sie
   untereinander, jeder bleibt ein voller 44pt-Tapziel. */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.lang-switch {
  display: inline-block;
  margin-top: 20px;
  font-size: 14px;
  color: #fff;
  opacity: 0.85;
}
.lang-switch:hover { opacity: 1; text-decoration: underline; }

section { padding: 56px 0; }
section h2 {
  text-align: center;
  font-size: clamp(22px, 3.5vw, 30px);
  margin: 0 0 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}
.feature h3 { margin: 0 0 8px; font-size: 17px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* Bild-Text-Abschnitt zur Rangliste: Screenshot links, Text rechts; auf dem
   Handy steht der Text zuerst. */
#leaderboard .split {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  justify-content: center;
}
#leaderboard .split img {
  width: 100%;
  max-width: 300px;
  height: auto;
  justify-self: center;
  border-radius: 24px;
  border: 1px solid var(--border);
}
.split-text h2 { text-align: left; margin: 0 0 16px; }
.split-text p { color: var(--text-muted); max-width: 46ch; margin: 0 0 12px; font-size: 17px; }
@media (max-width: 700px) {
  #leaderboard .split { grid-template-columns: 1fr; gap: 28px; }
  .split-text { order: 1; }
  #leaderboard .split img { order: 2; }
}

.screens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}
.screens figure {
  margin: 0;
  flex: 0 1 240px;
  max-width: 240px;
  text-align: center;
}
.screens img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
}
.screens figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Download-Bereich mit QR-Codes für Besucher am Computer. */
.download { text-align: center; }
.download h2 { margin-bottom: 12px; }
.download .lede { color: var(--text-muted); max-width: 480px; margin: 0 auto 32px; }
.qr-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.qr { margin: 0; }
/* Weiße Kachel auch im Dunkelmodus: QR-Scanner brauchen dunklen Code auf
   hellem Grund samt Ruhezone, die SVGs bringen ihre eigene weiße Fläche mit. */
.qr a {
  display: block;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
}
.qr img { display: block; width: 148px; height: 148px; }
.qr figcaption { margin-top: 12px; font-weight: 600; }
.qr figcaption span { display: block; font-weight: 400; font-size: 14px; color: var(--text-muted); }
/* Auf dem Handy selbst nützt ein QR-Code nichts -- dort reichen die Buttons. */
@media (hover: none) and (pointer: coarse) and (max-width: 700px) {
  .download { display: none; }
}

.support { text-align: center; }
.support p { color: var(--text-muted); max-width: 480px; margin: 0 auto 16px; }
.support .email { font-size: 18px; font-weight: 600; }

/* Content pages (Privacy Policy, Impressum) */
.doc { max-width: 720px; margin: 0 auto; padding: 48px 0 72px; }
.doc h2 { text-align: left; font-size: 24px; margin: 40px 0 16px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 18px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text-muted); }
.doc ul { padding-left: 20px; }
.doc .lang-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 40px 0 16px;
}
.doc .lang-label:first-child { margin-top: 8px; }
.doc dl { color: var(--text-muted); }
.doc dt { font-weight: 600; color: var(--text); margin-top: 12px; }
.doc dd { margin: 0 0 4px; }

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
footer nav a { margin: 0 10px; }
footer .legal { max-width: 640px; margin: 12px auto 0; font-size: 12px; }
