/*
 * Heldenbuch – geteilte Styles für Landing Page, Impressum & Datenschutz.
 * Theme: Nord (config/themes.php → key 'nord'). Einzige Quelle der Wahrheit
 * für das Web-Styling dieser öffentlichen Seiten.
 *
 * Aufbau:
 *   1. Reset + Nord-Tokens + Basis
 *   2. Landing-Page-Komponenten (greifen nur auf der Landing Page)
 *   3. Dokument-Styles für Rechtstexte (unter .wrap gescoped → keine Kollision)
 *   4. Responsive-Feinschliff
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── 1. Reset + Nord-Tokens + Basis ─────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #2E3440; --surface: #3B4252; --card: #3B4252;
  --border: #4C566A; --text: #E5E9F0; --muted: #9aa7bd;
  --accent: #88C0D0; --accent2: #5E81AC; --success: #A3BE8C;
  --xp: #EBCB8B; --danger: #BF616A;
}
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100vh;
}
/* Spaltenlayout nur für die Landing Page (drückt den Footer nach unten).
   Bewusst auf .landing beschränkt: auto-Margins zentrierter Kinder würden in
   einem Flex-Column sonst das align-items:stretch aufheben und überlaufen. */
body.landing { display: flex; flex-direction: column; }

/* ── 2. Landing-Page-Komponenten ────────────────────────────────────────── */
/* Marken-Redesign (handoff_heldenbuch_brand): Die Landing Page trägt das Theme
   „Heldenbuch" — die Farbvariablen liefert index.php inline (heldenbuch_scheme_css,
   folgt prefers-color-scheme). Hier nur Schriften + Komponenten, unter .landing
   gescoped, damit Impressum/Datenschutz (teilen diese Datei) unverändert bleiben.
   Wortmarken-/Slogan-Farben sind Brand-Konstanten aus dem Logo-Lockup (README),
   keine Theme-Tokens — daher hier als eigene Variablen je Farbschema. */
body.landing {
  font-family: 'Spectral', Georgia, serif;
  --wordmark: #7d1c1c; --slogan: #8a5a1e;
  --wordmark-shadow: 0 1px 0 rgba(255,255,255,.4);
  --xp-track: #d8c69a; --xp-track-shadow: rgba(120,90,40,.3);
  --xp-label: #9a6b22; --xp-diamond: #b6822c;
}
@media (prefers-color-scheme: dark) {
  body.landing {
    --wordmark: #f0d494; --slogan: #d9c49a;
    --wordmark-shadow: 0 2px 6px rgba(0,0,0,.5);
    --xp-track: #3a2a16; --xp-track-shadow: rgba(0,0,0,.5);
    --xp-label: #c99a44; --xp-diamond: #c99a44;
  }
}
.hero {
  text-align: center; padding: 2.5rem 1.5rem 3rem;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
/* Logo-Lockup — Nachbau der Brand-Quelle (Brand-Export.dc.html, logo-light/logo-dark):
   Emblem, Wortmarke, Slogan, XP-Schiene mit 63%-Goldfüllung und Level/XP-Zeile.
   Bewusst OHNE Karten-Rahmen — die Elemente stehen frei auf dem Hero-Verlauf. */
.hero .logo-lockup {
  max-width: 460px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
}
.hero .emblem { width: 99px; height: auto; display: block; margin: 0 auto; }
.hero .wordmark {
  font-family: 'Cinzel Decorative', Georgia, serif; font-weight: 700;
  font-size: clamp(1.6rem, 5.25vw, 2.55rem); line-height: 1.1;
  letter-spacing: 2px; color: var(--wordmark); margin-top: 0.6rem;
  text-shadow: var(--wordmark-shadow);
}
.hero .slogan {
  font-style: italic; font-weight: 500; font-size: 0.9rem;
  color: var(--slogan); margin-top: 0.4rem;
}
/* XP-Leiste: Rauten-Enden + Laufschiene mit Gold-Verlaufsfüllung (63 % wie im Lockup).
   Bewusst dezent als „Signatur" unter dem Logo: deutlich schmaler als die Wortmarke,
   flache Schiene, kleine gedämpfte Beschriftung — Zierde, kein UI-Element. */
.xp-row {
  display: flex; align-items: center; gap: 0.45rem;
  width: 100%; max-width: 280px; margin-top: 1.1rem;
}
.xp-row .xp-diamond { color: var(--xp-diamond); font-size: 0.6rem; line-height: 1; opacity: 0.85; }
.xp-track {
  flex: 1; height: 6px; border-radius: 3px; background: var(--xp-track);
  overflow: hidden; box-shadow: inset 0 1px 2px var(--xp-track-shadow);
}
.xp-fill {
  height: 100%; width: 63%; border-radius: 3px;
  background: linear-gradient(90deg, #c9962f, #e6c877);
}
.xp-labels {
  display: flex; justify-content: space-between; width: 100%; max-width: 280px;
  margin-top: 0.4rem; font-weight: 600; font-size: 0.6rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--xp-label); opacity: 0.85;
}
.hero .tagline {
  max-width: 600px; margin: 1.75rem auto 0;
  font-size: 1.05rem; color: var(--text);
}
/* Versal-Überschriften der Landing in Cinzel (Brand-Alternative zur Wortmarke). */
.landing .alpha-title, .landing .gallery-title, .landing .feature h3 {
  font-family: 'Cinzel', Georgia, serif; letter-spacing: 1px;
}
/* Stat-Zahlen im XP-Verlauf der Marke (Gold → Orange → Dunkelrot). */
.landing .stat .value {
  background: linear-gradient(135deg, #f0b038, #ee8a3a 55%, #d8383f);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* „Download on the App Store"-Badge zwischen Einleitung und Alpha-Box. Gleicher
   1.75rem-Abstand wie tagline/alpha-card, damit der Rhythmus stimmt. */
.hero .appstore-badge { display: inline-block; margin-top: 1.75rem; line-height: 0; }
.hero .appstore-badge img { height: 52px; width: auto; display: block; }
.hero .appstore-badge:hover { opacity: 0.9; }
.hero .wip {
  display: inline-block; margin-top: 1.25rem;
  padding: 0.4rem 0.95rem; border-radius: 999px;
  background: rgba(251,191,36,0.12); color: var(--xp);
  border: 1px solid rgba(251,191,36,0.35);
  font-size: 0.85rem; font-weight: 600;
}
.stats {
  display: flex; gap: 1.5rem; justify-content: center;
  flex-wrap: wrap; padding: 2rem 1.5rem; width: 100%; max-width: 800px;
  margin: 0 auto;
}
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem 2rem;
  text-align: center; min-width: 150px; flex: 1;
}
.stat .value {
  font-size: 2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--xp), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat .label { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.actions {
  display: flex; gap: 1rem; justify-content: center;
  padding: 2rem 1.5rem; flex-wrap: wrap; width: 100%;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #2E3440;
}
.btn-secondary {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border);
}
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem; width: 100%; max-width: 800px; margin: 1rem auto 3rem;
  padding: 0 1.5rem;
}
.feature {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
}
.feature h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.feature p { font-size: 0.85rem; color: var(--muted); }
.alpha-card {
  max-width: 460px; margin: 1.75rem auto 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem 1.5rem 1.75rem;
  text-align: center;
}
.alpha-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.alpha-text { font-size: 0.92rem; color: var(--text); margin: 0.5rem 0 1.1rem; }
.alpha-gsi { display: flex; justify-content: center; min-height: 44px; }
.alpha-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.9rem; }
.alpha-error {
  display: none; margin-top: 0.9rem; font-size: 0.85rem;
  color: var(--bg); background: var(--accent);
  border-radius: 8px; padding: 0.5rem 0.75rem;
}
/* Direkt-APK-Download-Box (unter „Sei früh dabei") */
/* Icon-Theme: Drachenhort (SVGs aus /assets/icons/drachenhort/) */
.stat-icon { width: 32px; height: 32px; display: block; margin: 0 auto 0.5rem; }
.feature-icon { width: 40px; height: 40px; display: block; margin-bottom: 0.6rem; }
/* Screenshot-Galerie (horizontaler Streifen) + Lightbox */
.gallery-section { width: 100%; max-width: 1000px; margin: 1rem auto 2.5rem; padding: 0 1.5rem; }
.gallery-title { text-align: center; font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 1rem; }
.gallery-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 1.1rem; }
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
}
.seg-btn {
  appearance: none; -webkit-appearance: none; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font-family: inherit;
  font-weight: 600; font-size: 0.88rem; padding: 0.4rem 1.05rem;
  border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.seg-btn:hover:not(.active) { color: var(--text); }
.seg-btn.active { background: var(--accent); color: #241a0f; }
.gallery {
  display: flex; gap: 1rem; overflow-x: auto; padding: 0.5rem 0.25rem 1rem;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.shot {
  flex: 0 0 auto; width: 200px; padding: 0; cursor: pointer;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; scroll-snap-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.shot:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.shot img { display: block; width: 100%; height: auto; }
.lightbox {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: none;
  height: 100vh; height: 100dvh; /* sichtbarer Viewport (ohne Browser-Leisten) */
  align-items: center; justify-content: center;
  background: rgba(20,24,33,0.94);
}
.lightbox.open { display: flex; }
.lb-img {
  max-width: 92vw; max-height: 82vh; /* Fallback für Browser ohne dvh */
  max-width: 92dvw; max-height: 82dvh; /* dvh = sichtbarer Viewport (ohne Browser-Leisten) */
  border-radius: 12px; box-shadow: 0 12px 48px rgba(0,0,0,0.6);
}
.lb-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 999px;
  background: rgba(46,52,64,0.7); color: var(--text); border: 1px solid var(--border);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: var(--surface); }
.lb-close { top: 18px; right: 20px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ── Footer (Landing + Rechtstexte) ─────────────────────────────────────── */
footer {
  margin-top: auto; text-align: center; padding: 2rem;
  color: var(--muted); font-size: 0.8rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent); text-decoration: none; }
/* „Auf X folgen"-Button im Footer — X-Brand-Look (schwarze Pille, weißes Logo). */
.footer-social { margin-bottom: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.x-follow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1.15rem; border-radius: 999px;
  background: #000; color: #fff !important; font-weight: 600; font-size: 0.9rem;
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.x-follow:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.35); background: #111; }
.x-follow-logo { width: 17px; height: 17px; display: block; }
.tiktok-follow:hover { background: #111; }

/* ── 3. Dokument-Styles (Impressum, Datenschutz) ────────────────────────────
   Alles unter .wrap gescoped, damit Überschriften/Links/Listen nicht in die
   Landing-Page-Komponenten hineinwirken. */
.wrap { max-width: 820px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.wrap header {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  text-align: center; margin-bottom: 2.5rem;
}
.wrap header img { height: 72px; width: auto; }
.wrap h1 { font-size: 1.7rem; margin: 0.5rem 0 0.25rem; }
.wrap .meta { color: var(--muted); font-size: 0.85rem; }
.wrap h2 {
  font-size: 1.2rem; margin: 2.25rem 0 0.6rem; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.wrap h3 { font-size: 1rem; margin: 1.4rem 0 0.4rem; color: var(--accent); }
.wrap p, .wrap li { color: var(--text); margin: 0 0 0.8rem; }
.wrap a { color: var(--accent); }
.wrap ul { padding-left: 1.3rem; }
.wrap li { margin-bottom: 0.35rem; }
.wrap .note {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.9rem 1.1rem; margin: 1rem 0; color: var(--muted); font-size: 0.9rem;
}
.wrap .warn {
  background: rgba(191,97,106,0.12); border: 1px solid rgba(191,97,106,0.4);
  color: var(--text);
}
.wrap table { width: 100%; border-collapse: collapse; margin: 0.75rem 0; font-size: 0.92rem; }
.wrap th, .wrap td {
  text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.wrap th { color: var(--muted); font-weight: 600; }
.wrap code { background: var(--card); padding: 0.1rem 0.35rem; border-radius: 5px; font-size: 0.9em; }

/* ── 4. Responsive-Feinschliff ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 1.5rem 1rem 2.25rem; }
  .hero .tagline { font-size: 0.98rem; }
  .stats { gap: 0.75rem; padding: 1.5rem 1rem; }
  .stat { min-width: 132px; padding: 1.1rem 1rem; }
  .stat .value { font-size: 1.6rem; }
  .features { gap: 1rem; margin: 1rem auto 2rem; }
  .gallery-section { margin: 0.5rem auto 2rem; }
  .shot { width: 158px; }
  .alpha-card { padding: 1.25rem 1rem 1.5rem; }
  .lb-btn { width: 40px; height: 40px; font-size: 1.2rem; }
}
