/* ===== Design-Tokens ===== */
:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f0f4fa;
  --ink: #0d1526;
  --muted: #576179;
  --accent: #4f46e5;
  --accent-2: #6366f1;
  --accent-ink: #ffffff;
  --positive: #0f9d6b;
  --err: #d92d20;
  --line: #e4e9f2;
  --ring: rgba(79, 70, 229, .35);
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, .05);
  --shadow-md: 0 8px 24px rgba(13, 21, 38, .08);
  --shadow-lg: 0 20px 50px rgba(13, 21, 38, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --maxw-narrow: 660px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --surface: #141a29;
    --surface-2: #1b2334;
    --ink: #eef2fb;
    --muted: #9aa6c0;
    --accent: #7c83ff;
    --accent-2: #9aa0ff;
    --positive: #34d399;
    --line: #26304a;
    --ring: rgba(124, 131, 255, .4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: .8rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-weight: 800; font-size: 1.12rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: .4rem; }
.nav-links > a { color: var(--muted); padding: .5rem .7rem; border-radius: 8px; font-weight: 600; font-size: .93rem; }
.nav-links > a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  background: var(--accent); color: var(--accent-ink) !important;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { filter: brightness(1.07); }
@media (max-width: 560px) {
  .nav-links > a:not(.nav-cta) { display: none; }
}

/* ===== Layout ===== */
.main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section-narrow { max-width: var(--maxw-narrow); margin: 0 auto; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 15% 0%, #6d5cff 0%, transparent 55%),
    radial-gradient(120% 120% at 100% 20%, #2aa9ff 0%, transparent 50%),
    linear-gradient(160deg, #4a2fe0 0%, #3a1fb8 55%, #1b1147 100%);
  color: #fff;
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 4.5rem 1.25rem 5rem;
  text-align: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .85rem; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  margin-bottom: 1.4rem;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #6ee7a8; box-shadow: 0 0 0 4px rgba(110, 231, 168, .25); }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.35rem); font-weight: 850;
  max-width: 16ch; margin: 0 auto;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #ffe9a8, #ffc46b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .08em;
}
.hero p.sub {
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  color: rgba(255, 255, 255, .86);
  max-width: 42ch; margin: 1.2rem auto 0;
}
.hero-cta { margin-top: 2.2rem; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; margin-top: 2.2rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .9rem; border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: .9rem; font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.7rem; border: 0; border-radius: 12px;
  font: 700 1.05rem inherit; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-light { background: #fff; color: #2a1c8a; box-shadow: var(--shadow-lg); }
.btn-light:hover { filter: brightness(.97); }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.cta-note { font-size: .85rem; color: rgba(255, 255, 255, .72); }

/* ===== "So funktioniert's" Schritte ===== */
.section-head { text-align: center; margin-bottom: 2.6rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.section-head p { color: var(--muted); margin: .7rem auto 0; max-width: 46ch; font-size: 1.05rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.5rem; box-shadow: var(--shadow-sm);
}
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: .45rem; }
.step p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ===== Trust-Band ===== */
.band {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem;
  display: flex; align-items: flex-start; gap: 1rem;
}
.band .ico { font-size: 1.7rem; line-height: 1; }
.band h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.band p { color: var(--muted); margin: 0; }

/* ===== Card (Ergebnisseiten) ===== */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm);
}
.card.center { text-align: center; }
.card > h1 { font-size: 1.55rem; margin-bottom: .7rem; }

/* ===== Formular (Karte mit Umrandung) ===== */
.form-head { text-align: center; margin-bottom: 2rem; }
.form-head h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.form-head p { color: var(--muted); margin: .6rem auto 0; max-width: 44ch; }

.signup {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.9rem; box-shadow: var(--shadow-md);
}
.field { display: block; margin-bottom: 1.4rem; }
.field > span { display: block; font-weight: 600; margin-bottom: .5rem; }
.field em { color: var(--muted); font-weight: 400; font-style: normal; }
input[type=email], input[type=search], input[type=text], textarea, select {
  width: 100%; padding: .8rem .9rem; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font: inherit;
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { resize: vertical; min-height: 7rem; }
input[type=email]::placeholder, input[type=search]::placeholder,
input[type=text]::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=email]:focus, input[type=search]:focus, input[type=text]:focus,
textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring);
}
.kassen-list {
  max-height: 280px; overflow-y: auto; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); margin-top: .55rem; background: var(--bg);
}
.kasse {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.kasse:last-child { border-bottom: none; }
.kasse:hover { background: var(--surface-2); }
.kasse input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.kasse .kname { flex: 1; }
.kasse .ksatz {
  color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; font-size: .84rem;
  background: var(--surface-2); padding: .12rem .5rem; border-radius: 999px;
}

/* Live: aktuell ausgewählte Kassen */
.selected-kassen { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .85rem; }
.selected-kassen[hidden] { display: none; }  /* sonst gewinnt display:flex gegen das hidden-Attribut */
.selected-kassen .sel-label { color: var(--muted); font-size: .86rem; font-weight: 600; margin-right: .1rem; }
#sel-chips { display: contents; }
.sel-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .28rem .3rem .28rem .7rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  color: var(--accent); font: 600 .84rem inherit; cursor: pointer;
}
.sel-chip .x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 20%, transparent); font-size: .78rem; line-height: 1;
}
.sel-chip:hover { filter: brightness(.97); }
.sel-clear {
  margin-left: .2rem; padding: .28rem .6rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: 600 .82rem inherit;
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.sel-clear:hover { color: var(--err); }

.field small.note { color: var(--muted); display: block; margin-top: .7rem; font-size: .86rem; }
.consent {
  display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem;
  color: var(--muted); margin: 1.4rem 0 1.5rem;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .9rem 1rem;
}
.consent input { margin-top: .2rem; accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

/* Button deaktiviert (bis alle Pflichtangaben erfüllt sind) */
.btn.is-disabled { background: var(--accent); opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.is-disabled:hover { filter: none; }

/* Fehlende Angaben hervorheben */
.hint { display: none; color: var(--err); font-size: .86rem; font-weight: 600; margin-top: .55rem; }
.field.missing .hint, #consent-field.missing .hint { display: block; }
.field.missing > span { color: var(--err); }
.field.missing input[type=email] {
  border-color: var(--err); box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 15%, transparent);
}
.field.missing .kassen-list { border-color: var(--err); }
#consent-field.missing .consent { color: var(--err); border-color: var(--err); }
#consent-field.missing .consent input { outline: 2px solid var(--err); outline-offset: 2px; }

.errors {
  background: color-mix(in srgb, var(--err) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--err) 40%, transparent);
  border-radius: var(--radius-sm); padding: .3rem 1rem; margin-bottom: 1.2rem;
}
.errors p { color: var(--err); margin: .55rem 0; font-weight: 600; }

.kassen-summary { list-style: none; padding: 0; margin: 1rem 0; }
.kassen-summary li {
  padding: .6rem .9rem; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin: .4rem 0; font-weight: 600;
}
.muted { color: var(--muted); }
.result-wrap { padding: 3.5rem 0; }

/* ===== Rechtstexte (Impressum / Datenschutz) ===== */
.legal .card { text-align: left; }
.legal h1 { font-size: 1.7rem; margin-bottom: 1.2rem; }
.legal h2 { font-size: 1.12rem; margin: 1.8rem 0 .5rem; }
.legal p { margin: .5rem 0; }
.legal .draft-note {
  background: color-mix(in srgb, #d9a400 16%, transparent);
  border: 1px solid color-mix(in srgb, #d9a400 45%, transparent);
  border-radius: var(--radius-sm); padding: .8rem 1rem; margin: 0 0 1.5rem; font-size: .92rem;
}
.legal mark {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--ink); padding: .05rem .35rem; border-radius: 5px; font-weight: 600;
}

/* Anker-Offset wegen sticky Nav */
#anmelden, #so-gehts { scroll-margin-top: 80px; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); margin-top: 2rem; background: var(--surface); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem;
  text-align: center; color: var(--muted);
}
.footer-brand { font-weight: 800; color: var(--ink); margin-bottom: .7rem; }
.footer-links { display: flex; gap: 1.2rem; justify-content: center; margin-bottom: 1rem; }
.footer-links a { color: var(--muted); font-weight: 600; }
.privacy { font-size: .88rem; max-width: 52ch; margin: 0 auto; }

/* ===== "Projekt unterstützen" (Nav-Button + eigener Abschnitt) ===== */
html { scroll-behavior: smooth; }
.nav-support {
  border: 1px solid var(--accent);
  color: var(--accent) !important;
}
.nav-support:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent) !important;
}
#unterstuetzen { scroll-margin-top: 72px; }  /* Anker-Sprung unter der Sticky-Nav */
.support-band .btn { margin-top: 1.15rem; }

/* Honeypot: für Menschen unsichtbar, füllen nur Bots aus (Anti-Spam). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
