/* Pubball – Webseite. Farben, Radien und Schriftgrößen aus lib/ui/theme/tokens.dart
   und lib/ui/theme/app_theme.dart. Systemschrift wie in der App (keine Webfonts). */

:root {
  --primary: #1B7F4B;
  --on-primary: #FFFFFF;
  --surface: #FAFAF7;
  --surface-card: #FFFFFF;
  --on-surface: #1A1C1A;
  --on-surface-muted: #5B625D;
  --success: #1A7F37;
  --accent: #F2B705;
  --on-accent: #1A1C1A;
  --outline: #C9CEC9;
  --hero: #14653C;
  --on-hero: #FFFFFF;

  --radius-card: 16px;
  --radius-button: 12px;
  --content: 560px;
  --wide: 960px;
  --gutter: 16px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #6FD39B;
    --on-primary: #00391F;
    --surface: #121513;
    --surface-card: #1D221F;
    --on-surface: #E3E7E2;
    --on-surface-muted: #A8B0AA;
    --success: #7DDB9A;
    --accent: #FFD54F;
    --on-accent: #1A1C1A;
    --outline: #3B423D;
    --hero: #14432B;
    --on-hero: #E3E7E2;
  }
}

@media (min-width: 600px) {
  :root { --gutter: 24px; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; display: block; }

/* Typografie-Skala der App: 32 / 22 / 18 / 16 / 14 / 12 */
h1 { font-size: 32px; font-weight: 700; line-height: 1.2; margin: 0; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.3; margin: 40px 0 12px; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0 0 4px; }
p, ul { margin: 0 0 12px; }
ul { padding-left: 1.25em; }
li { margin-bottom: 4px; }
.muted { color: var(--on-surface-muted); }
.small { font-size: 12px; }

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Kopfbereich (wie Startbildschirm der App) ---------- */
.hero {
  background: var(--hero);
  color: var(--on-hero);
  border-radius: 0 0 32px 32px;
  padding: 48px 0 40px;
  text-align: center;
}
.hero .logo {
  width: 88px; height: 88px;
  margin: 0 auto 16px;
  border-radius: 22px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.hero h1 { color: var(--on-hero); }
.hero .tagline { font-size: 18px; opacity: .85; margin: 4px 0 0; }
.hero .lead { max-width: 30em; margin: 20px auto 0; opacity: .92; }
.hero .actions { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero .note { font-size: 14px; opacity: .8; margin: 0; }

.hero-small { padding: 20px 0; border-radius: 0 0 24px 24px; text-align: left; }
.hero-small .brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--on-hero); text-decoration: none;
  font-size: 22px; font-weight: 600;
}
.hero-small .brand img { width: 40px; height: 40px; border-radius: 10px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border-radius: var(--radius-button);
  font: inherit; font-size: 14px; font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
}
.button-accent { background: var(--accent); color: var(--on-accent); font-size: 16px; font-weight: 600; }
.button-accent:hover { filter: brightness(1.05); }
.button-outline { border-color: var(--outline); color: var(--on-surface); background: var(--surface-card); }
.button[aria-disabled="true"] { opacity: .75; cursor: default; pointer-events: none; }
.button svg { width: 22px; height: 22px; flex: none; }

/* ---------- Karten ---------- */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .08);
  padding: 20px;
}
@media (prefers-color-scheme: dark) {
  .card { box-shadow: none; border: 1px solid var(--outline); }
}

/* ---------- Startseite ---------- */
.intro {
  display: grid; gap: 32px; align-items: center;
  margin-top: 40px;
}
@media (min-width: 760px) {
  .intro { grid-template-columns: 1fr 1fr; gap: 48px; }
}
.intro h2 { margin-top: 0; }

/* Zeitleiste als Illustration, angelehnt an TimelineTile der App */
.timeline { padding: 16px 16px 16px 8px; }
.timeline ol { list-style: none; margin: 0; padding: 0; }
.tl-item {
  position: relative;
  display: grid; grid-template-columns: 32px 1fr; column-gap: 8px;
  padding: 8px 0;
}
.tl-item::before { /* Linie */
  content: ""; position: absolute; left: 15px; top: 0; bottom: 0; width: 2px;
  background: var(--outline);
}
.tl-item:first-child::before { top: 50%; }
.tl-item:last-child::before { bottom: 50%; }
.tl-dot {
  position: relative; z-index: 1;
  width: 14px; height: 14px; margin: 5px auto 0;
  border-radius: 50%; background: var(--primary);
  border: 3px solid var(--surface-card);
  box-sizing: content-box;
}
.tl-year { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tl-title { color: var(--on-surface-muted); font-size: 14px; }
.tl-slot .tl-dot { background: transparent; border: 2px dashed var(--primary); width: 12px; height: 12px; }
.tl-slot .slot {
  border: 2px dashed var(--primary);
  border-radius: var(--radius-button);
  color: var(--primary); font-size: 14px; font-weight: 500;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.drawn {
  margin: 8px 0 0 40px;
  border-radius: var(--radius-button);
  background: var(--hero); color: var(--on-hero);
  padding: 12px 14px;
  font-size: 14px;
}
.drawn strong { display: block; font-size: 18px; font-weight: 600; margin-top: 2px; }
.drawn .q { font-size: 20px; font-weight: 700; letter-spacing: 2px; color: var(--accent); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; margin: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
  font-weight: 700;
}

.features {
  display: grid; gap: 16px; margin-top: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature .icon {
  width: 40px; height: 40px; border-radius: var(--radius-button);
  display: grid; place-items: center; margin-bottom: 12px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
}
.feature .icon svg { width: 24px; height: 24px; }
.feature p { margin: 0; color: var(--on-surface-muted); }

.modes { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 600px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode { border-left: 4px solid var(--accent); }
.mode p { margin: 0; color: var(--on-surface-muted); font-size: 14px; }

.cta { text-align: center; margin-top: 56px; }
.cta p { color: var(--on-surface-muted); }

/* ---------- Unterseiten ---------- */
.page { padding-top: 32px; padding-bottom: 16px; }
.page h1 { margin-bottom: 8px; }
.page h2 { margin-top: 32px; }
.page address { font-style: normal; margin-bottom: 12px; }
.faq details {
  background: var(--surface-card);
  border: 1px solid var(--outline);
  border-radius: var(--radius-button);
  padding: 0 16px; margin-bottom: 8px;
}
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; min-height: 48px; }
.faq details[open] summary { border-bottom: 1px solid var(--outline); margin-bottom: 12px; }

/* ---------- Fuß ---------- */
footer {
  margin-top: 64px;
  border-top: 1px solid var(--outline);
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--on-surface-muted);
}
footer .wrap-wide { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--on-surface-muted); }
footer a[aria-current="page"] { color: var(--on-surface); font-weight: 600; text-decoration: none; }
