/* ============================================================
   TIERVERBUND – Startseite · FUNNEL-OVERLAYS
   Gehoert zu: index.html · Ladereihenfolge 3 von 4
   Logik dazu: start-funnel.js

   Inhalt:
     .funnel ............. Overlay-Rahmen (#funnel Versicherung,
                           #kconsent Kredit), .ftop, .ffig, .ktrio
     .fstep .............. ein Screen (f-q1/f-q2/f-q3/f-ergebnis/...)
     .fbtn .fcheck ....... Auswahl-Buttons, Kriterienlisten
     .fcta .fresult-box .. Ergebnis-Screen
     f-verzicht .......... Formular Beratungsverzicht:
                           .finput .fnamerow .fcheckrow .fstore .fpartner
     .fwerbebox .......... freiwillige Werbe-Einwilligung (beide Formulare)
     f-angebot ........... Angebotsanfrage per E-Mail (nutzt die f-verzicht-
                           Bausteine): .fsummary .flabel .fhp .ferror,
                           #faSubmit, Test-Vorschau .fmailprev
   ============================================================ */

/* ---------- FUNNEL (Overlay, aktuell nur Pferd) ---------- */
.funnel {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  background: linear-gradient(165deg, #2d3e9e 0%, #1d2a63 80%);
  color: #fff;
  overflow-y: auto;
}
.funnel.on { display: block; }
.funnel-inner {
  min-height: 100%;
  max-width: 720px; margin: 0 auto;
  padding: 84px 20px 60px;
  display: flex; flex-direction: column; justify-content: center;
}
.funnel .ftop {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
}
.funnel .ftop .fmeta {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,0.65);
}
.funnel .ficon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: none; border: 1.5px solid rgba(255,255,255,0.45); color: #fff;
  cursor: pointer; transition: transform 150ms ease, background-color 150ms ease;
}
.funnel .ficon:hover { transform: scale(1.06); background: rgba(255,255,255,0.1); }
.funnel .ficon:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.funnel .ficon svg { width: 18px; height: 18px; }
.funnel .ficon[hidden] { display: none; }

/* Tierfigur im Funnel: steht ruhig rechts unten, dezent hinter dem Inhalt.
   Wird nur in den Frage-Screens per JS eingeblendet (Frame a/b/a). */
.funnel .ffig {
  position: fixed; right: clamp(0px, 3vw, 60px); bottom: 0;
  height: 68vh; width: auto; max-width: 46vw;
  object-fit: contain; object-position: bottom;
  opacity: 0.6; z-index: 0; pointer-events: none;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.28));
}
.funnel .ffig[hidden] { display: none; }
.funnel .funnel-inner { position: relative; z-index: 1; }
.funnel .ftop { z-index: 3; }
/* Trio auf der Kredit-Unterseite (kconsent): dezent auf Navy, hinter dem Text */
#kconsent .ktrio {
  position: fixed; right: clamp(0px, 3vw, 60px); bottom: 0;
  height: 64vh; width: auto; max-width: 42vw;
  object-fit: contain; object-position: bottom right;
  opacity: 0.55; z-index: 0; pointer-events: none;
}
@media (max-width: 859px) {
  /* Desktop-Figur (seitlich, fixed) auf Mobil aus — dafuer die Fluss-Figur unten */
  .funnel .ffig { display: none; }
  #kconsent .ktrio { display: none; }
}

/* Mobile Frage-Screen-Figur (P1): im Fluss, mittig unter den Kacheln. Hoehe
   setzt das Skript nach Platzmessung (>=220px, sonst hidden). Gleiche Behandlung
   wie die Desktop-Figur (Deckkraft 0.6, Drop-Shadow). Nur unter 860px. */
.funnel .ffig-m { display: none; }
@media (max-width: 859px) {
  .funnel .ffig-m {
    display: block; margin: 16px auto 0;
    width: auto; max-width: 86%;
    object-fit: contain; object-position: bottom;
    opacity: 0.6; pointer-events: none;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.28));
  }
  .funnel .ffig-m[hidden] { display: none; }
}

.fstep { display: none; }
.fstep.on { display: block; animation: fstepIn 420ms var(--ease) both; }
@keyframes fstepIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .fstep.on { animation: none; } }

.fstep h2 {
  font-family: 'Anton', sans-serif; font-synthesis: none; font-weight: 400;
  font-size: clamp(30px, 5.4vw, 54px);
  line-height: 1.08; letter-spacing: -0.01em;
  text-transform: uppercase; color: #fff;
  margin-bottom: clamp(18px, 3vh, 28px);
}
/* Lange Fragen (Rassenfrage f-qr): gleiche Schrift, kleinere Stufe, damit
   die Aufzaehlung auf dem Handy nicht den ganzen Screen fuellt. */
.fstep h2.fh-lang { font-size: clamp(22px, 3.4vw, 34px); line-height: 1.18; }
.fstep .fsub {
  font-size: clamp(15.5px, 1.9vw, 18px); line-height: 1.7;
  color: rgba(255,255,255,0.88); max-width: 560px;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.fstep ul.fcheck {
  list-style: none; max-width: 600px;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.fstep ul.fcheck li {
  position: relative; padding-left: 30px;
  font-size: 14.5px; line-height: 1.55;
  color: rgba(255,255,255,0.85);
  margin-bottom: 12px;
}
.fstep ul.fcheck li::before {
  content: ''; position: absolute; left: 0; top: 3px;
  width: 16px; height: 16px;
  border: 2px solid #4ab5e8; border-radius: 4px;
}
.fstep ul.fcheck li::after {
  content: ''; position: absolute; left: 5px; top: 6px;
  width: 7px; height: 4px;
  border-left: 2px solid #4ab5e8; border-bottom: 2px solid #4ab5e8;
  transform: rotate(-45deg);
}
.fbtns { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.fbtn {
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 600; line-height: 1.4;
  text-align: left; color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.5); border-radius: 12px;
  padding: 16px 20px; cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.fbtn:hover { transform: translateY(-2px); background: rgba(255,255,255,0.14); border-color: #fff; }
.fbtn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.fbtn .fnote { display: block; font-size: 13px; font-weight: 400; color: rgba(255,255,255,0.65); margin-top: 4px; }
a.fbtn { display: block; text-decoration: none; }

.fdoc { color: #4ab5e8; text-decoration: underline; font-size: 14.5px; }
.fresult-box {
  border: 1.5px dashed rgba(255,255,255,0.4); border-radius: 12px;
  padding: 22px; max-width: 560px;
  font-size: 14px; color: rgba(255,255,255,0.7);
  margin-bottom: clamp(24px, 4vh, 36px);
}
.fcta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Anton', sans-serif; font-weight: 400; font-synthesis: none; font-size: clamp(20px, 3vw, 30px);
  letter-spacing: 0.01em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  border-bottom: 3px solid #4ab5e8; padding-bottom: 4px;
  transition: opacity 200ms ease;
}
.fcta:hover { opacity: 0.85; }
.fhint { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 18px; }

/* ---------- f-verzicht: Beratungsverzicht-Formular ---------- */
.finput {
  display: block; width: 100%; max-width: 480px;
  font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.4;
  color: #fff; background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.45); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px;
}
.finput::placeholder { color: rgba(255,255,255,0.55); }
/* Vorname/Nachname: gestapelt auf schmalen Geraeten, nebeneinander sobald
   Platz ist. Die Zeile behaelt die Breite eines einzelnen .finput (480px),
   damit das Formular nicht ploetzlich breiter wirkt als der Rest. */
.fnamerow { max-width: 480px; }
@media (min-width: 520px) {
  .fnamerow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .fnamerow .finput { max-width: none; }
}
.finput:focus { outline: none; border-color: #fff; background: rgba(255,255,255,0.14); }
.fcheckrow {
  display: flex; gap: 12px; align-items: flex-start;
  max-width: 560px; margin: 16px 0;
}
.fcheckrow input[type="checkbox"] {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px;
  accent-color: #4ab5e8; cursor: pointer;
}
.fcheckrow label { font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,0.85); cursor: pointer; }
.fcheckrow.pflicht label { color: #fff; }
.fcheckrow .fsmall { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.6); }
/* Speicher-Fliesstext (gesetzliche Pflicht, KEINE Checkbox) */
.fstore { display: block; margin: 4px 0 18px; max-width: 560px; font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,0.72); }
/* UWG-Widerspruchshinweis: gleiche Typografie wie .fstore, eigenes Element. */
.fwiderspruch { display: block; margin: 4px 0 18px; max-width: 560px; font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,0.72); }
.fwiderspruch a { color: #fff; text-decoration: underline; }
/* Ansprechpartner-Hinweis: bewusst abgesetzt, nicht im Fliesstext */
.fpartner { margin: 6px 0 20px; padding: 14px 16px; max-width: 560px;
  border-left: 3px solid #4ab5e8; background: rgba(74,181,232,0.10);
  border-radius: 8px; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.9); }
/* F2-Alterseingabe */
.fage-input { max-width: 220px; }
.fbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.fbtn:disabled:hover { transform: none; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.5); }
/* CTA "Weiter zur Antragsstrecke": gefuellt in der Signalfarbe (Cyan), volle
   Breite der Formularspalte, eine Stufe groesser, mit Luft nach oben. EIN Screen
   -> gilt fuer beide Varianten (Barmenia/Uelzener). Deaktiviert bleibt gedaempft. */
#fvSubmit {
  width: 100%; margin-top: 26px;
  text-align: center; font-size: 18px;
  color: #14225f; background: #4ab5e8; border-color: #4ab5e8;
}
#fvSubmit:hover:not(:disabled) { background: #63c2ef; border-color: #63c2ef; transform: translateY(-2px); }
#fvSubmit:disabled { opacity: 1; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.55); border-color: rgba(255,255,255,0.4); }
#f-verzicht .fhint a { color: #4ab5e8; }

/* Netlify-Test-Warnung vor der ECHTEN Weiterleitung: bewusst auffaellig
   (gelber Grund, Rahmen), dunkler Text fuer Kontrast. Nur *.netlify.app. */
.fpreview {
  margin-top: 24px; max-width: 560px;
  background: #fff3bf; border: 2px solid #e0a800; border-radius: 12px;
  padding: 18px 20px;
}
.fpreview .fsub { color: #4a3b00; max-width: none; margin-bottom: 14px; }
.fpreview .fbtn {
  background: #e0a800; color: #1d2a63; border-color: #e0a800;
  font-weight: 700; text-align: center;
}
.fpreview .fbtn:hover { background: #f0b400; border-color: #f0b400; transform: translateY(-2px); }


/* ---------- f-angebot: Angebotsanfrage per E-Mail ----------
   Gleiche Bausteine wie f-verzicht (.finput/.fnamerow/.fcheckrow), hier nur
   das, was dort fehlt: Zusammenfassung, Feld-Labels, Select/Datum/Textarea,
   Honigtopf, Fehlerzeile, Test-Mailvorschau. */
.fsummary {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  max-width: 560px; margin: 0 0 24px; padding: 14px 16px;
  border-left: 3px solid #4ab5e8; background: rgba(74,181,232,0.10); border-radius: 8px;
  font-size: 13.5px; line-height: 1.5;
}
.fsummary dt { color: rgba(255,255,255,0.65); }
.fsummary dd { color: #fff; font-weight: 600; }
.flabel { display: block; margin: 4px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.65); }
.ffieldhint { margin: -8px 0 14px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.6); }
textarea.finput { resize: vertical; min-height: 88px; }
/* PLZ + Wohnort: gestapelt auf schmalen Geraeten, ab 520px PLZ schmal daneben */
.fplzrow { max-width: 480px; }
@media (min-width: 520px) {
  .fplzrow { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
  .fplzrow .finput { max-width: none; }
}
select.finput {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
select.finput:invalid { color: rgba(255,255,255,0.55); }   /* Platzhalter-Option gedaempft wie ::placeholder */
select.finput option { color: #14225f; background: #fff; } /* Dropdown-Liste lesbar (sonst weiss auf weiss) */
.fdate { max-width: 220px; color-scheme: dark; }         /* Kalender-Icon hell auf Navy */
/* Honigtopf: aus dem Sichtfeld, NICHT display:none (manche Bots ueberspringen das) */
.fhp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#faSubmit {
  width: 100%; margin-top: 26px;
  text-align: center; font-size: 18px;
  color: #14225f; background: #4ab5e8; border-color: #4ab5e8;
}
#faSubmit:hover:not(:disabled) { background: #63c2ef; border-color: #63c2ef; transform: translateY(-2px); }
#faSubmit:disabled { opacity: 1; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.55); border-color: rgba(255,255,255,0.4); }
#f-angebot .fhint a, #f-angebot .fstore a { color: #4ab5e8; }
/* Fehler beim Absenden: deutlich, Eingaben bleiben stehen */
.ferror {
  margin-top: 18px; max-width: 560px; padding: 14px 16px;
  background: rgba(201,123,40,0.18); border-left: 3px solid #c97b28; border-radius: 8px;
  font-size: 14px; line-height: 1.55; color: #fff;
}
.ferror[hidden] { display: none; }
/* Testumgebung: Mailvorschau als Klartext, genau wie sie verschickt wuerde */
#f-angebot-test .fpreview { margin: 0 0 24px; }
#f-angebot-test .fpreview .fsub { margin-bottom: 0; }
.fmailprev { max-width: 640px; margin-bottom: 24px; }
.fmailprev pre {
  white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.55;
  color: #14225f; background: #fff; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 18px;
}

/* Telefon-Links in den Hinweiszeilen (Ergebnis, Termin, Anfrage-Erfolg, Kredit-Fenster) */
.funnel .fhint a[href^="tel:"] { color: #4ab5e8; }
/* "Wer ist das?" unter dem Anbieter-Satz in f-verzicht: Aufklapper, kein Link */
.fwer { max-width: 560px; margin: calc(-1 * clamp(16px, 3vh, 30px)) 0 clamp(20px, 3.5vh, 34px); }
.fwer summary {
  display: inline-block; cursor: pointer; list-style: none;
  font-size: 14.5px; font-weight: 600; color: #4ab5e8;
  border-bottom: 1px dashed rgba(74,181,232,0.7);
}
.fwer summary::-webkit-details-marker { display: none; }
.fwer summary::after { content: ' +'; }
.fwer[open] summary::after { content: ' −'; }
.fwer summary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.fwer p { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,0.85); }
/* Freiwillige Werbe-Einwilligung (f-verzicht + f-angebot): eigener Kasten,
   bewusst anders als die Pflicht-Haken (Orange-Rahmen, kein Etikett). */
.fwerbebox {
  max-width: 560px; margin: 6px 0 22px; padding: 12px 16px 14px;
  border: 1.5px solid rgba(201,123,40,0.75); border-radius: 12px;
  background: rgba(201,123,40,0.10);
}
.fwerbebox .fcheckrow { margin: 2px 0 4px; }
/* Hinweis zum Bestaetigungslink, eingerueckt auf Label-Hoehe */
.fdoi { margin: 0 0 0 32px; font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,0.7); }

/* Termin-Screen: Button oeffnet Cal.com als Popup (Fallback-Link darunter) */
.fbtn.fcal { text-align: center; }
#fcalFallback a { color: #4ab5e8; }
