/* =============================================================================
   Tischkicker Landing Page

   Farbtoken sind 1:1 aus der App uebernommen (lib/theme/app_colors.dart),
   damit Website und App denselben Eindruck machen. Wichtig dabei: der Akzent
   ist NICHT in beiden Schemata derselbe - dunkel ist er Gold (#D9A441), hell
   ein Blaugrau (#546E7A). Das ist so gewollt und in der App genauso.

   Hell ist die Grundvariante auf :root, Dunkel wird darueber gelegt: einmal
   ueber prefers-color-scheme (Systemeinstellung, solange niemand manuell
   gewaehlt hat) und einmal ueber [data-theme="dark"] (manuelle Wahl, gewinnt
   in beide Richtungen).
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-raised: #E3E9EC;
  --ink: #101619;
  --ink-muted: #4C585E;
  --ink-faint: #748187;
  --accent: #546E7A;
  --accent-ink: #FFFFFF;
  --line: rgba(16, 22, 25, 0.12);
  --line-strong: rgba(16, 22, 25, 0.22);
  --shadow: 0 1px 2px rgba(16, 22, 25, .06), 0 8px 24px rgba(16, 22, 25, .06);
  --logo-filter: brightness(.92) saturate(1.05);

  --maxw: 1120px;
  --radius: 14px;
  --radius-lg: 22px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101613;
    --surface: #161D1A;
    --surface-raised: #1E2723;
    --ink: #E4E9E6;
    --ink-muted: #93A29B;
    --ink-faint: #5D6B65;
    --accent: #D9A441;
    --accent-ink: #14191A;
    --line: rgba(228, 233, 230, 0.12);
    --line-strong: rgba(228, 233, 230, 0.22);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --logo-filter: none;
  }
}

:root[data-theme="dark"] {
  --bg: #101613;
  --surface: #161D1A;
  --surface-raised: #1E2723;
  --ink: #E4E9E6;
  --ink-muted: #93A29B;
  --ink-faint: #5D6B65;
  --accent: #D9A441;
  --accent-ink: #14191A;
  --line: rgba(228, 233, 230, 0.12);
  --line-strong: rgba(228, 233, 230, 0.22);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --logo-filter: none;
}

/* --- Grundlagen ---------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .8em;
}

.lead { font-size: clamp(1.02rem, 2.2vw, 1.22rem); color: var(--ink-muted); max-width: 62ch; }

.muted { color: var(--ink-muted); }
.small { font-size: .92rem; }

section { padding: clamp(56px, 9vw, 104px) 0; }
section + section { border-top: 1px solid var(--line); }

/* Sichtbar nur fuer Screenreader, bis jemand hintabbt. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 18px; border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* --- Kopfzeile ----------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; }
.brand img { width: 34px; height: 34px; filter: var(--logo-filter); }
.brand span { letter-spacing: -.02em; }

.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
/* Nur die direkten Anker-Kinder, nicht der CTA-Knopf in .header-tools:
   `.site-nav a` hat die hoehere Spezifitaet als `.btn-primary` und faerbte
   dessen Beschriftung sonst grau statt dunkel auf Gold. */
.site-nav > a {
  color: var(--ink-muted); text-decoration: none; font-size: .95rem; font-weight: 550;
  padding: 8px 12px; border-radius: 9px;
}
.site-nav > a:hover { color: var(--ink); background: var(--surface-raised); }

.header-tools { display: flex; gap: 8px; align-items: center; }

/* Auf schmalen Geraeten wandern die Anker-Links weg - die Seite ist kurz
   genug zum Scrollen, ein Burger-Menue waere hier reine Mechanik. */
@media (max-width: 720px) {
  .site-nav > a[href^="#"] { display: none; }
  .site-nav { margin-left: auto; }
}

/* --- Schaltflaechen ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-raised); }
.btn-sm { padding: 9px 16px; font-size: .92rem; }

.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); cursor: pointer; font: inherit;
  font-size: .82rem; font-weight: 700;
}
.icon-btn:hover { background: var(--surface-raised); }

/* --- Hero ---------------------------------------------------------------- */

.hero { padding-top: clamp(40px, 7vw, 76px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; } }

.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--ink-faint); }

.hero-art { display: grid; place-items: center; }
.hero-art img { width: min(280px, 70vw); filter: var(--logo-filter); }

/* --- Live-Zahlen --------------------------------------------------------- */

.stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-top: clamp(36px, 6vw, 56px);
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 16px; text-align: center;
}
.stat-value {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-value[data-loading="1"] { color: var(--ink-faint); }
.stat-label { font-size: .82rem; color: var(--ink-muted); margin-top: 2px; }
.stat-note { grid-column: 1 / -1; text-align: center; font-size: .84rem; color: var(--ink-faint); margin-top: 2px; }

/* --- Karten und Raster --------------------------------------------------- */

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin-bottom: .35em; }
.card p { margin: 0; color: var(--ink-muted); font-size: .96rem; }

.card-icon {
  width: 40px; height: 40px; border-radius: 11px; margin-bottom: 14px;
  display: grid; place-items: center; font-size: 1.15rem;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.steps { counter-reset: step; }
.step .card-icon {
  counter-increment: step; font-weight: 800; font-size: 1rem; color: var(--accent);
}
.step .card-icon::before { content: counter(step); }

/* --- Free / Pro ---------------------------------------------------------- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }

.plan {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; background: var(--surface);
}
.plan-pro { border-color: var(--accent); box-shadow: var(--shadow); position: relative; }
.plan-badge {
  position: absolute; top: -12px; left: 26px;
  background: var(--accent); color: var(--accent-ink);
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.plan h3 { font-size: 1.4rem; }
.plan-price { font-size: 1.05rem; color: var(--ink-muted); margin: 0 0 1.2em; }
.plan-price strong { font-size: 1.9rem; color: var(--ink); font-weight: 800; letter-spacing: -.03em; }

/* Zweite Preiszeile (Jahresabo) - haengt optisch am Monatspreis, deshalb
   der negative Abstand nach oben. */
.plan-price-alt {
  margin: -1em 0 1.4em; font-size: .95rem; color: var(--ink-muted);
}
.plan-price-alt strong { color: var(--ink); }

/* Kein Knopf, sondern eine Marke: Pro ist noch nicht buchbar, also darf hier
   auch nichts klickbar aussehen. */
.btn-soon {
  background: var(--surface-raised); color: var(--ink-muted);
  border-color: var(--line-strong); cursor: default; margin: 0;
}
.btn-soon:hover { transform: none; }

.plan ul { list-style: none; margin: 0 0 1.6em; padding: 0; }
.plan li { display: flex; gap: 11px; align-items: flex-start; padding: 7px 0; font-size: .97rem; }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 800; line-height: 1.5; flex: 0 0 auto; }

/* Das Manifest zum Abo - bewusst als eigener, ruhiger Block statt als
   weitere Feature-Kachel. Es ist die Botschaft, nicht ein Verkaufsargument. */
.manifest {
  background: var(--surface-raised); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(26px, 5vw, 44px);
}
.manifest p:last-child { margin-bottom: 0; }
.manifest .lead { max-width: 70ch; }

/* --- Feature-Liste mit Pro-Markierung ------------------------------------ */

.tag {
  display: inline-block; margin-left: 8px; vertical-align: 2px;
  font-size: .64rem; font-weight: 800; letter-spacing: .1em;
  padding: 3px 7px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
}

/* --- FAQ ----------------------------------------------------------------- */

.faq details {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 18px; background: var(--surface); margin-bottom: 10px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; font-weight: 650; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-muted); margin: 0 0 14px; }

/* --- Fusszeile ----------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); padding: 40px 0; background: var(--surface); }
.footer-grid { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-muted); text-decoration: none; font-size: .93rem; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { font-size: .86rem; color: var(--ink-faint); }

/* --- Rechtstexte / Unterseiten ------------------------------------------- */

.doc { max-width: 74ch; }
.doc h2 { margin-top: 2em; font-size: 1.35rem; }
.doc h3 { margin-top: 1.6em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .94rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--ink-muted); font-weight: 650; }
.doc-scroll { overflow-x: auto; }

/* Alles, was noch echte Angaben braucht, wird deutlich markiert - damit es
   niemandem durchrutscht, bevor die Seite oeffentlich geht. */
.todo {
  display: inline-block; background: #FFD9D9; color: #7A1010;
  border: 1px dashed #C24A4A; border-radius: 6px;
  padding: 1px 8px; font-weight: 700; font-size: .9em;
}
:root[data-theme="dark"] .todo,
:root:not([data-theme="light"]) .todo { background: #4A1F1F; color: #FFC9C9; border-color: #C24A4A; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .todo { background: #FFD9D9; color: #7A1010; } }

.notice {
  border-left: 3px solid var(--accent); background: var(--surface-raised);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5em 0;
}
.notice p:last-child { margin-bottom: 0; }

/* --- Sprachumschaltung ---------------------------------------------------
   Beide Sprachfassungen stehen im HTML; sichtbar ist immer genau eine.
   Das haelt die Rechtstexte im Quelltext (auffindbar, auch ohne JavaScript)
   und braucht keinen Build-Schritt. */
html[lang="de"] [data-lang="en"] { display: none; }
html[lang="en"] [data-lang="de"] { display: none; }
