/* ============================================================================
   DocTarif Web, Gestaltungssystem
   ----------------------------------------------------------------------------
   Alle Werte kommen aus src/theme.ts der App. Kein Farbwert wird hier
   erfunden. Wer eine Farbe braucht, nimmt eine der Variablen unten.

   Regeln, die auch fuer die App gelten:
     kein Gelb, kein Blau
     Flaechen sind weiss oder surfaceMid, Bedeutung tragen Kante und Symbol
     genau ein Hauptbutton je Abschnitt, mit einsinkender Unterkante
     Symbole sind immer gefuellt, nie als Kontur
     jede Beruehrflaeche mindestens 48 Punkte
   ========================================================================= */

:root {
  /* Flaechen */
  --bg:          #F3F7F4;
  --surface:     #FFFFFF;
  --surface-mid: #EDF3EF;
  --surface-high:#E4ECE7;

  /* Marke, Kittelgruen */
  --primary:      #10A96C;
  --primary-fill: #0B8F5B;
  --primary-dark: #076B44;
  --primary-ink:  #0A7449;
  --primary-tint: #E4F6EC;
  --primary-line: #C8E8D8;

  /* Schrift */
  --text:      #0E201A;
  --text-sub:  #4C635C;
  --text-muted:#67807A;
  --on-primary:#FFFFFF;
  --on-primary-soft: rgba(255,255,255,.82);
  --on-primary-faint: rgba(255,255,255,.58);

  /* Rahmen */
  --border:     #E2EBE6;
  --border-mid: #D2DED8;

  /* Fehler */
  --error:      #C8453A;
  --error-dark: #A2332A;
  --error-bg:   #FCECEA;
  --error-line: #F2D2CE;

  /* Inaktiv */
  --disabled:     #D8E2DC;
  --disabled-dark:#C2D0CA;
  --disabled-ink: #8DA29B;

  /* Radien und Abstaende */
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 20px; --r-xxl: 30px; --r-pill: 999px;
  --s-xs: 4px; --s-sm: 8px; --s-md: 16px; --s-lg: 24px; --s-xl: 32px; --s-xxl: 48px;

  --shadow-card: 0 6px 18px rgba(14,32,26,.07);
  --shadow-lift: 0 18px 44px rgba(14,32,26,.10);
  --shadow-glow: 0 4px 12px rgba(11,143,91,.18);

  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: 'DM Serif Display', Georgia, serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Schriftstufen ─────────────────────────────────────────────────────── */
h1, h2, h3 { letter-spacing: -.6px; line-height: 1.12; font-weight: 800; }
h1 { font-size: clamp(38px, 6vw, 62px); letter-spacing: -1.6px; }
h2 { font-size: clamp(30px, 4.2vw, 44px); letter-spacing: -1.1px; }
h3 { font-size: 20px; letter-spacing: -.3px; line-height: 1.3; }

.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-sub); line-height: 1.6; }
.small { font-size: 15px; color: var(--text-sub); }
.cap { font-size: 14px; color: var(--text-muted); }

.tag {
  display: inline-block;
  font-size: 12px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--primary-ink); margin-bottom: 14px;
}

/* ── Buttons, dieselbe Mechanik wie in der App ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 15px 28px;
  border: none; border-radius: var(--r-lg);
  background: var(--primary-fill); color: var(--on-primary);
  border-bottom: 5px solid var(--primary-dark);
  font-family: inherit; font-size: 19px; font-weight: 700; letter-spacing: .1px;
  cursor: pointer; box-shadow: var(--shadow-glow);
  transition: filter .12s ease;
  position: relative; overflow: hidden;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { border-bottom-width: 0; margin-top: 5px; }
.btn[disabled] { background: var(--disabled); border-bottom-color: var(--disabled-dark); color: var(--disabled-ink); box-shadow: none; cursor: default; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 15px 24px;
  border: 2px solid var(--border); border-bottom-width: 5px; border-bottom-color: var(--surface-high);
  border-radius: var(--r-lg); background: var(--surface); color: var(--text-sub);
  font-family: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
}
.btn-ghost:active { border-bottom-width: 2px; margin-top: 3px; }

.btn-text {
  background: none; border: none; padding: 12px 6px; min-height: 48px;
  font-family: inherit; cursor: pointer;
  color: var(--text-muted); font-weight: 600; font-size: 15px;
  text-decoration: underline; text-underline-offset: 3px;
}
.btn-text:hover { color: var(--primary-ink); }

/* ── Kopfzeile ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(243,247,244,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.3px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--primary-fill);
  display: grid; place-items: center; color: #fff; font-family: var(--serif);
  font-size: 21px; letter-spacing: -1px; padding-bottom: 2px;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font-size: 15px; font-weight: 600; color: var(--text-sub); padding: 6px 0; }
.nav-links a:hover { color: var(--primary-ink); }
.nav .btn { min-height: 46px; padding: 10px 20px; font-size: 16px; border-bottom-width: 4px; }
.nav-burger { display: none; }

/* ── Abschnitte ────────────────────────────────────────────────────────── */
section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head h2 { margin-bottom: 14px; }

/* ── Karten ────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 26px;
}
.card-lift { box-shadow: var(--shadow-card); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* Symbolfeld: Feld hell, Symbol dunkel */
.tile {
  width: 46px; height: 46px; border-radius: var(--r-md);
  background: var(--primary-tint); display: grid; place-items: center;
  margin-bottom: 16px; flex: 0 0 46px;
}
.tile svg { width: 24px; height: 24px; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(48px, 6vw, 76px); padding-bottom: clamp(56px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--primary-ink); }
.hero .lead { margin-bottom: 30px; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.trust-tile { width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--primary-tint); display: grid; place-items: center; }
.trust-tile svg { width: 15px; height: 15px; }

/* Geraet mit gruener Kante, wie auf den Store-Bildern */
.device {
  position: relative; width: 100%; max-width: 340px; margin: 0 auto;
  border-radius: 46px; padding: 10px;
  background: linear-gradient(150deg, #4FE0A6, var(--primary-fill) 46%, #05412A);
  box-shadow: 0 40px 80px rgba(14,32,26,.22), 0 14px 30px rgba(14,32,26,.14);
  transform: rotate(-1.6deg);
}
.device img { border-radius: 37px; }
.device::after {
  content: ''; position: absolute; inset: 10px; border-radius: 37px; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.04) 14%, transparent 34%);
}

/* ── Rechner ───────────────────────────────────────────────────────────── */
.calc-shell {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xxl);
  box-shadow: var(--shadow-lift); padding: clamp(22px, 3vw, 34px);
  max-width: 620px; margin: 0 auto;
}
.calc-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.calc-back {
  width: 40px; height: 40px; border-radius: var(--r-sm); border: none; background: transparent;
  display: grid; place-items: center; cursor: pointer; flex: 0 0 40px;
}
.calc-back[hidden] { visibility: hidden; display: grid; }
.calc-bar { flex: 1; height: 14px; border-radius: var(--r-pill); background: var(--surface-high); overflow: hidden; }
.calc-fill { height: 100%; border-radius: var(--r-pill); background: var(--primary); width: 16%; transition: width .42s cubic-bezier(.22,.61,.36,1); }
.calc-meta { display: flex; justify-content: space-between; margin: 0 0 26px 54px; }
.calc-meta span { font-size: 13px; font-weight: 600; color: var(--text-muted); }

.calc-q { font-size: clamp(24px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.6px; line-height: 1.18; }
.calc-hint { font-size: 16px; color: var(--text-sub); margin-top: 8px; line-height: 1.5; }
.calc-options { margin-top: 24px; display: grid; gap: 12px; }

.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 78px; padding: 16px 18px;
  background: var(--surface); border: 2px solid var(--border);
  border-bottom: 5px solid var(--surface-high); border-radius: var(--r-xl);
  font-family: inherit; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.choice:hover { border-color: var(--primary-line); }
.choice:active { border-bottom-width: 2px; margin-top: 3px; }
.choice-body { flex: 1; display: block; }
.choice-kicker { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--primary-ink); text-transform: uppercase; margin-bottom: 3px; }
.choice-title { display: block; font-size: 17px; font-weight: 700; color: var(--text); }
.choice-sub { display: block; font-size: 14px; color: var(--text-sub); margin-top: 3px; }
.choice.is-selected { border-color: var(--primary); background: var(--primary-tint); border-bottom-color: var(--primary-line); }
.choice .tick { width: 26px; height: 26px; opacity: 0; transition: opacity .12s ease; flex: 0 0 26px; }
.choice.is-selected .tick { opacity: 1; }

.step { animation: rise .32s cubic-bezier(.22,.61,.36,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Ergebnis des Rechners */
.calc-result-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--primary-ink); }
.calc-amount { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.calc-amount b { font-size: clamp(44px, 7vw, 58px); font-weight: 800; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.calc-amount span { font-size: 30px; font-weight: 800; color: var(--text-muted); }
.calc-context { font-size: 15px; color: var(--text-sub); margin-top: 8px; }

.calc-warn {
  margin-top: 24px; background: var(--surface-mid); border: 1px solid var(--border-mid);
  border-radius: var(--r-xl); padding: 20px;
}
.calc-warn h3 { font-size: 18px; margin-bottom: 8px; }
.calc-warn p { font-size: 15px; color: var(--text-sub); line-height: 1.55; }
.calc-warn p + p { margin-top: 10px; }
.calc-missing + p { margin-top: 14px; }
.calc-missing { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.calc-missing li { display: flex; align-items: flex-start; gap: 9px; font-size: 15px; color: var(--text-sub); }
.calc-missing svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }

.calc-speech { display: flex; gap: 12px; margin-top: 24px; align-items: flex-start; }
.calc-speech img { width: 104px; flex: 0 0 104px; }
.calc-bubble {
  flex: 1; margin-top: 22px; background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r-xl); padding: 14px 16px; font-size: 15px; color: var(--text-sub); line-height: 1.5;
  position: relative;
}
.calc-bubble::before {
  content: ''; position: absolute; left: -9px; top: 26px; width: 14px; height: 14px;
  background: var(--surface); border-left: 2px solid var(--border); border-bottom: 2px solid var(--border);
  transform: rotate(45deg);
}
.calc-cta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── Zahlenkarten ──────────────────────────────────────────────────────── */
.stat b { display: block; font-size: 40px; font-weight: 800; letter-spacing: -1.4px; color: var(--primary-ink); line-height: 1.1; }
.stat h3 { margin: 6px 0 10px; }
.stat p { font-size: 15px; color: var(--text-sub); line-height: 1.55; }

/* ── Ablauf ────────────────────────────────────────────────────────────── */
.step-card { position: relative; }
.step-num {
  font-size: 13px; font-weight: 800; letter-spacing: 1.4px; color: var(--primary-ink);
  background: var(--primary-tint); border-radius: var(--r-pill); padding: 5px 12px; display: inline-block; margin-bottom: 14px;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: 15px; color: var(--text-sub); }

/* ── Preis ─────────────────────────────────────────────────────────────── */
.price-card { max-width: 520px; margin: 0 auto; border: 2px solid var(--primary-line); }
.price-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.price-label { font-size: 12px; font-weight: 800; letter-spacing: 1.7px; color: var(--primary-ink); }
.badge { padding: 5px 12px; border-radius: var(--r-pill); background: var(--surface-mid); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-muted); }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price-row b { font-size: 46px; font-weight: 800; letter-spacing: -1.6px; }
.price-row span { font-size: 16px; color: var(--text-muted); font-weight: 600; }
.price-list { list-style: none; margin: 20px 0 0; display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.price-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 16px; }
.price-list svg { width: 21px; height: 21px; flex: 0 0 21px; margin-top: 2px; }
.price-note { font-size: 14px; color: var(--text-muted); text-align: center; margin-top: 16px; }

/* ── Datenschutz ───────────────────────────────────────────────────────── */
.privacy { background: var(--surface-mid); }

/* ── Fragen ────────────────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex; align-items: center; gap: 16px; justify-content: space-between;
  background: none; border: none; font-family: inherit; text-align: left; cursor: pointer;
  padding: 22px 0; min-height: 48px; font-size: 18px; font-weight: 700; color: var(--text);
}
.faq-sign { width: 26px; height: 26px; flex: 0 0 26px; transition: transform .22s ease; }
.faq-item.is-open .faq-sign { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding-bottom: 22px; font-size: 16px; color: var(--text-sub); }

/* ── Abschluss ─────────────────────────────────────────────────────────── */
.final { background: linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; position: relative; overflow: hidden; }
.final::before { content: ''; position: absolute; width: 720px; height: 720px; border-radius: 50%; background: rgba(255,255,255,.08); right: -220px; top: -260px; }
.final::after { content: ''; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: rgba(255,255,255,.06); left: -180px; bottom: -200px; }
.final .wrap { position: relative; text-align: center; }
.final .tag { color: var(--on-primary-soft); }
.final h2 { color: #fff; margin-bottom: 16px; }
.final p { color: var(--on-primary-soft); font-size: 19px; max-width: 620px; margin: 0 auto 32px; }
.final .btn { background: var(--surface); color: var(--primary-ink); border-bottom-color: var(--primary-line); box-shadow: 0 14px 34px rgba(0,0,0,.18); }

/* ── Fusszeile ─────────────────────────────────────────────────────────── */
footer { padding: 56px 0 40px; border-top: 1px solid var(--border); }
.foot { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot-links a { font-size: 15px; color: var(--text-muted); font-weight: 600; }
.foot-links a:hover { color: var(--primary-ink); }
.foot-legal { margin-top: 26px; font-size: 14px; color: var(--text-muted); line-height: 1.6; max-width: 780px; }

/* ── Tonspur ───────────────────────────────────────────────────────────── */
.audio {
  display: flex; align-items: center; gap: 14px; margin-top: 30px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 10px 18px 10px 10px; max-width: 440px;
}
.audio-btn {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary-fill); display: grid; place-items: center;
}
.audio-btn svg { width: 18px; height: 18px; }
.audio-text { flex: 1; font-size: 14px; color: var(--text-sub); font-weight: 600; line-height: 1.35; }
.audio-time { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ── Erscheinen beim Scrollen ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── Schmale Bildschirme ───────────────────────────────────────────────── */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .device { max-width: 280px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .g2, .g4 { grid-template-columns: 1fr; }
  .hero-actions .btn, .hero-actions .btn-ghost { width: 100%; }
  .calc-speech img { width: 76px; flex: 0 0 76px; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Rechtliche Unterseiten ────────────────────────────────────────────── */
.legal { padding: clamp(48px, 6vw, 76px) 0 clamp(64px, 8vw, 96px); }
.legal-head { max-width: 780px; margin-bottom: 40px; }
.legal-head h1 { font-size: clamp(34px, 5vw, 50px); margin-bottom: 12px; }
.legal-body { max-width: 780px; }
.legal-body h2 {
  font-size: 24px; letter-spacing: -.5px; margin: 40px 0 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 18px; margin: 24px 0 8px; }
.legal-body p { color: var(--text-sub); margin-bottom: 12px; }
.legal-body ul { color: var(--text-sub); margin: 0 0 12px 20px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--primary-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.legal-body strong { color: var(--text); font-weight: 700; }
.legal-note {
  background: var(--primary-tint); border: 1px solid var(--primary-line);
  border-radius: var(--r-xl); padding: 20px 22px; margin-bottom: 32px;
}
.legal-note p { color: var(--text-sub); margin: 0; }
.legal-note strong { color: var(--primary-ink); }
.legal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 20px 22px; margin: 16px 0;
}
.legal-box p:last-child { margin-bottom: 0; }
.legal-form { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 2; color: var(--text-sub); }
