/* ==========================================================================
   Dominik Berner – zentrales Stylesheet für alle Seiten
   Design angelehnt an aerzte-finanz.de (Fira Sans, Markenblau, Pill-Buttons)

   Inhalt
   1. Schriften
   2. Farben & Grundwerte
   3. Basis
   4. Kopfzeile (Logo | Dominik Berner)
   5. Titelbereich (blau)
   6. Inhaltsbereich
   7. Video
   8. Karten
   9. Buttons & Hinweise
   10. Formulare
   11. Fußzeile
   12. Weiterleitungsseite (index.html)
   13. Rechtstexte (Impressum, Datenschutz, Erstinformation)
   14. Cookie-Banner & Video-Einwilligung
   15. Hilfsklassen
   16. Mobil & Barrierefreiheit
   ========================================================================== */


/* 1. Schriften – lokal gehostet (SIL Open Font License), keine Verbindung zu Google
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fira-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/fira-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fira-sans-700.woff2") format("woff2");
}


/* 2. Farben & Grundwerte
   -------------------------------------------------------------------------- */
:root {
  --blue: #0867d7;
  --blue-dark: #0654b0;
  --blue-gradient: linear-gradient(160deg, #0a72e8 0%, #0867d7 45%, #0553b8 100%);
  --navy: #000c6f;
  --heading: #242a33;
  --text: #404a5a;
  --muted: #7a8699;
  --sand: #f9f7f4;
  --border: #e4e8ee;
  --input-border: #cfd6e0;
  --error: #d6334a;

  --content-width: 680px;
  --radius-card: 16px;
  --radius-pill: 30px;
}


/* 3. Basis
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--heading); font-weight: 700; line-height: 1.25; }
a { color: var(--blue); }


/* 4. Kopfzeile
   -------------------------------------------------------------------------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.brand {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.brand img { height: 36px; width: auto; display: block; }
.brand .divider { width: 1px; height: 30px; background: var(--border); flex: none; }
.brand .name { font-size: 1rem; font-weight: 500; color: var(--heading); white-space: nowrap; }

/* Helle Variante für blauen Hintergrund (mit images/logo-weiss.png) */
.brand--light .divider { background: rgba(255, 255, 255, 0.45); }
.brand--light .name { color: #fff; }


/* 5. Titelbereich
   -------------------------------------------------------------------------- */
.hero {
  background: var(--blue-gradient);
  color: #fff;
  padding: 56px 16px 176px;
  text-align: center;
}
.hero .eyebrow {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #b9d6fb;
}
.hero h1 {
  font-size: clamp(1.625rem, 3.8vw, 2.125rem);
  color: #fff;
  max-width: var(--content-width);
  margin: 0 auto 16px;
}
.hero .intro {
  font-size: 1.0625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
  margin: 0 auto;
}
/* Titelbereich ohne überlappendes Video/Karte darunter */
.hero--compact { padding-bottom: 56px; }


/* 6. Inhaltsbereich
   -------------------------------------------------------------------------- */
main {
  max-width: 960px;
  margin: -136px auto 0;
  padding: 0 16px 56px;
  text-align: center;
}
.hero--compact + main { margin-top: 40px; }
main > * + * { margin-top: 40px; }


/* 7. Video – Wistia, wird erst nach Klick geladen (siehe js/video.js)
   -------------------------------------------------------------------------- */
.video-frame {
  position: relative;
  width: min(100%, var(--content-width), max(336px, (100svh - 380px) * 16 / 9));
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 28px 56px -24px rgba(0, 12, 111, 0.45);
}
.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #dfe7f0;
  font: inherit;
  cursor: pointer;
}
.video[aria-disabled="true"] { cursor: default; }
.video.is-playing { background: #000; cursor: auto; }
.video.is-playing::after { display: none; }
.video .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.5s ease;
}
.video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 50%); /* wie aerzte-finanz.de, etwas heller */
}
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.watch {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 1;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 10px 12px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.2s ease;
}
.watch .icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  display: grid;
  place-items: center;
  flex: none;
}
.watch .icon svg { width: 10px; height: 10px; margin-left: 2px; fill: var(--blue); }
.video:hover .thumb { transform: scale(1.025); }
.video:hover .watch { transform: translateX(-50%) translateY(-2px); }


/* 8. Karten
   .card            weiße Box
   .card--center    Inhalt zentriert untereinander (z. B. Logo, Text, Button)
   -------------------------------------------------------------------------- */
.card {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding: 40px 32px;
  background: #fff;
  border-radius: var(--radius-card);
  text-align: left;
}
.card--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.card--center > p { margin: 0; max-width: 440px; }
.card h2 { margin: 0 0 8px; font-size: 1.375rem; }
/* Karte, die wie das Video in den blauen Titelbereich hineinragt */
.card--raised { position: relative; box-shadow: 0 28px 56px -24px rgba(0, 12, 111, 0.35); }
.partner-logo { height: 30px; width: auto; display: block; }


/* 9. Buttons & Hinweise
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 32px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.15s; }
.btn:hover { background: var(--blue-dark); }
.btn:hover svg { transform: translateX(3px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn:focus-visible, .video:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* Kleiner grauer Hinweis, optional mit Icon */
.note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.note svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn + .note { margin-top: -8px; }

/* Zweiter Button (weiß mit blauem Rand) und Button-Reihe */
.btn--outline {
  background: #fff;
  color: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.btn--outline:hover { background: #eef5fd; }
/* WhatsApp-Button (grün, mit Original-Logo) */
.btn--whatsapp { background: #1da851; }
.btn--whatsapp:hover { background: #178f44; }
.btn--whatsapp svg { fill: currentColor; stroke: none; width: 20px; height: 20px; }
.btn--whatsapp:focus-visible { outline-color: #1da851; }

.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Runder Icon-Kreis (z. B. über einer Adresse) */
.icon-badge {
  align-self: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f1fc;
  display: grid;
  place-items: center;
}
.icon-badge svg { width: 26px; height: 26px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.address { font-style: normal; font-size: 1.0625rem; line-height: 1.6; }
.address strong { color: var(--heading); }

/* Liste mit Icons (z. B. Anfahrt: Eingang, Etage, Parken) */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #e8f1fc;
  display: grid;
  place-items: center;
}
.step-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steps h3 { margin: 2px 0 2px; font-size: 1.0625rem; }
.steps p { margin: 0; }
.card > h2:first-child { margin-bottom: 20px; }
.steps--numbered .step-icon {
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
}
.steps .btn { margin-top: 14px; white-space: nowrap; }
.steps .btn:hover svg { transform: none; }

/* Erfolgsmeldung (z. B. nach dem Absenden eines Formulars) */
.success { text-align: center; padding: 12px 0; }
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--blue);
  display: grid;
  place-items: center;
}
.success-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.success p { margin: 0 auto; max-width: 420px; }


/* 10. Formulare
   -------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 28px; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form legend {
  padding: 0;
  margin-bottom: 16px;
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--heading);
}
.form em { font-style: normal; color: var(--blue); }
.form > .btn, .form > .note { align-self: center; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 0.9375rem; font-weight: 500; color: var(--heading); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--heading);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230867d7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}
.field input::placeholder, .field textarea::placeholder { color: #9aa4b2; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 103, 215, 0.15);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.hint { margin: 12px 0 0; font-size: 0.875rem; color: var(--muted); }

.checks { display: flex; flex-direction: column; gap: 14px; }
.check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.9375rem;
  line-height: 1.5;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.check.invalid span { color: var(--error); }

.form-error {
  margin: 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fdecee;
  color: #b3263b;
  font-size: 0.9375rem;
}


/* 11. Fußzeile
   -------------------------------------------------------------------------- */
footer {
  background: var(--blue);
  color: rgba(255, 255, 255, 0.85);
  padding: 28px 16px;
  text-align: center;
  font-size: 0.875rem;
}
footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-top: 8px;
}
footer a { color: #fff; font-weight: 500; text-decoration: none; }
footer a:hover { text-decoration: underline; }


/* 12. Weiterleitungsseite (index.html)
   -------------------------------------------------------------------------- */
body.page-redirect {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 0 16px;
  background: var(--blue-gradient);
  color: #fff;
  text-align: center;
}
.page-redirect .brand { padding: 0; gap: 22px; }
.page-redirect .brand img { height: 52px; }
.page-redirect .brand .divider { height: 44px; }
.page-redirect .brand .name { font-size: 1.25rem; }
.redirect-text { margin: 0; font-size: 1.125rem; font-weight: 500; }

.countdown {
  position: relative;
  width: 64px;
  height: 64px;
  margin-top: -8px;
}
.countdown svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown circle { fill: none; stroke-width: 3; }
.countdown .track { stroke: rgba(255, 255, 255, 0.2); }
.countdown .ring {
  stroke: #fff;
  stroke-linecap: round;
  stroke-dasharray: 175.93;
  stroke-dashoffset: 175.93;
  animation: countdown-ring 5s linear forwards;
}
.countdown .num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
@keyframes countdown-ring { to { stroke-dashoffset: 0; } }


/* 13. Rechtstexte (Impressum, Datenschutz, Erstinformation)
   -------------------------------------------------------------------------- */
.legal { max-width: 800px; }
.legal > :first-child { margin-top: 0; }
.legal h2 {
  margin: 36px 0 10px;
  font-size: 1.25rem;
}
.legal h3 {
  margin: 24px 0 6px;
  font-size: 1.0625rem;
}
.legal p, .legal ul, .legal address { margin: 0 0 12px; }
.legal address { font-style: normal; }
.legal ul { padding-left: 1.25em; }
.legal li + li { margin-top: 4px; }
.legal a { word-break: break-word; }
.legal .stand { margin-top: 32px; font-size: 0.875rem; color: var(--muted); }

/* Gelb markierte Stellen = noch auszufüllen */
.placeholder {
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff3c4;
  color: #6b5200;
  font-weight: 500;
}

footer a[aria-current="page"] { text-decoration: underline; }


/* 14. Cookie-Banner & Video-Einwilligung (siehe js/consent.js, js/video.js)
   -------------------------------------------------------------------------- */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.consent-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: 0 20px 50px -12px rgba(0, 12, 111, 0.35), 0 0 0 1px var(--border);
  text-align: left;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.consent h2 { margin: 0 0 8px; font-size: 1.125rem; }
.consent p { margin: 0 0 16px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-btn {
  flex: 1 1 0;
  min-width: 140px;
  padding: 11px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.consent-btn:hover { background: var(--blue-dark); }
.consent-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.consent-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 14px;
}
.consent-footer .consent-links { margin: 0; display: flex; gap: 16px; font-size: 0.8125rem; }
.consent-links a { color: var(--muted); }
.consent-btn:focus-visible, .consent-link:focus-visible, .consent a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.consent-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.consent-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
.consent-item p { margin: 6px 0 0; font-size: 0.875rem; color: var(--text); }
.consent-item a { color: var(--blue); }
.consent-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.consent-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent-slider {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  border-radius: 22px;
  background: #c3cbd6;
  transition: background 0.15s;
}
.consent-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.consent-switch input:checked + .consent-slider { background: var(--blue); }
.consent-switch input:checked + .consent-slider::after { transform: translateX(18px); }
.consent-switch input:disabled + .consent-slider { opacity: 0.55; }
.consent-switch input:focus-visible + .consent-slider { outline: 2px solid var(--blue); outline-offset: 2px; }
.consent-item-title { font-weight: 500; color: var(--heading); }

/* Hinweis im Video, wenn noch keine Einwilligung vorliegt */
.video-consent {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
  background: rgba(10, 20, 40, 0.86);
  color: #fff;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.video-consent p { margin: 0 0 12px; max-width: 440px; }
.video-consent-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.video-consent .consent-btn { flex: none; min-width: 0; }
.video-consent .consent-link { color: #fff; }
.video-consent-more { margin: 12px 0 0 !important; font-size: 0.8125rem; }
.video-consent-more a { color: rgba(255, 255, 255, 0.8); }

/* „Cookie-Einstellungen“ in der Fußzeile sieht aus wie die anderen Links */
footer .footer-link {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
footer .footer-link:hover { text-decoration: underline; }


/* 15. Hilfsklassen
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] { display: none !important; }


/* 16. Mobil & Barrierefreiheit
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .brand { gap: 14px; padding: 14px 16px; }
  .brand img { height: 28px; }
  .brand .divider { height: 24px; }
  .brand .name { font-size: 0.875rem; }
  .hero { padding: 40px 16px 132px; }
  .hero--compact { padding-bottom: 40px; }
  main { margin-top: -100px; }
  .video-frame { border-radius: 12px; }
  .watch { bottom: 14px; padding: 7px 18px 7px 9px; font-size: 0.9375rem; }
  .watch .icon { width: 24px; height: 24px; }
  .card { padding: 32px 20px; }
  .card--center { align-items: stretch; }
  .card--center .partner-logo { align-self: center; height: 24px; }
  .grid { grid-template-columns: 1fr; }
  .form > .btn { align-self: stretch; }
  .btn-row { flex-direction: column; }
  .steps .btn { padding: 12px 20px; }
  .consent { left: 8px; right: 8px; bottom: 8px; }
  .consent-inner { padding: 20px 18px; }
  .video-consent { font-size: 0.8125rem; padding: 12px; }
  .video-consent p { margin-bottom: 8px; }
  .video-consent-more { display: none; }
}
@media (max-width: 480px) {
  .page-redirect .brand { gap: 14px; }
  .page-redirect .brand img { height: 34px; }
  .page-redirect .brand .divider { height: 30px; }
  .page-redirect .brand .name { font-size: 0.9375rem; }
}
@media (prefers-reduced-motion: reduce) {
  .video .thumb, .watch, .btn, .btn svg { transition: none; }
  .countdown .ring { animation: none; stroke-dashoffset: 0; }
}
