/* ============================================================
   PULSE — Funnel „Erstgespräch"
   Baut auf dem Design-System der Website auf (main.css).
   ============================================================ */

[hidden] { display: none !important; }

.fx-body {
  background:
    radial-gradient(ellipse at 82% 12%, rgba(102, 42, 52, .28), transparent 55%),
    radial-gradient(ellipse at 8% 95%, rgba(102, 42, 52, .14), transparent 50%),
    var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Kopf ---------- */
.fx-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px var(--pad) 8px;
  position: relative; z-index: 10;
}
.fx-head .brand img { width: 108px; height: auto; }
.fx-zaehler {
  font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim);
}
.fx-zaehler b { color: var(--puls-hell); }
.fx-abbruch {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--dim);
  transition: color .3s;
}
.fx-abbruch span {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--rand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; font-family: var(--f-disp);
  transition: background .3s, color .3s, transform .4s var(--ease);
}
.fx-abbruch:hover { color: var(--bone); }
.fx-abbruch:hover span { background: var(--bone); color: var(--ink); transform: rotate(90deg); }

/* ---------- Puls-Fortschritt ---------- */
.fx-puls {
  position: relative; z-index: 5;
  height: 64px;
  margin: 0 var(--pad);
}
.fx-puls svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fx-puls .ekg-basis { fill: none; stroke: rgba(242, 244, 247, .1); stroke-width: 1; }
.fx-puls .ekg-glow {
  fill: none; stroke: var(--puls); stroke-width: 5; opacity: .3; filter: blur(5px);
  transition: stroke-dashoffset .9s var(--ease-io);
}
.fx-puls .ekg-line {
  fill: none; stroke: var(--puls-hell); stroke-width: 1.8;
  transition: stroke-dashoffset .9s var(--ease-io);
}
.fx-bpm {
  position: absolute; right: 0; bottom: -6px;
  font-family: var(--f-mono); font-size: .6rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--puls-hell); opacity: .8;
}

/* ---------- Geist-Nummer ---------- */
.fx-geist {
  top: 50%; right: -2vw; transform: translateY(-46%);
  font-size: clamp(10rem, 30vw, 26rem);
  -webkit-text-stroke-color: rgba(242, 244, 247, .05);
  z-index: 0;
  transition: opacity .6s;
}

/* ---------- Bühne ---------- */
.fx-stage {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; align-items: center;
  padding: 12px var(--pad);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.fx-step {
  width: min(860px, 100%);
  margin: 0 auto;
  outline: none;
}
.fx-step.raus { animation: fxRaus .32s var(--ease-io) forwards; }
.fx-step.rein { animation: fxRein .5s var(--ease) backwards; }
.fx-step.raus-zurueck { animation: fxRausZurueck .32s var(--ease-io) forwards; }
.fx-step.rein-zurueck { animation: fxReinZurueck .5s var(--ease) backwards; }
@keyframes fxRaus { to { opacity: 0; transform: translateY(-34px); } }
@keyframes fxRein { from { opacity: 0; transform: translateY(44px); } }
@keyframes fxRausZurueck { to { opacity: 0; transform: translateY(34px); } }
@keyframes fxReinZurueck { from { opacity: 0; transform: translateY(-44px); } }

/* ---------- Typografie im Step ---------- */
.fx-kicker {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--dim);
  margin-bottom: clamp(14px, 2.4vh, 24px);
}
.fx-kicker .idx { color: var(--puls); }
.fx-frage {
  font-weight: 760; font-stretch: 108%;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.12; letter-spacing: -.02em;
  margin-bottom: 10px;
  text-wrap: balance;
  max-width: 24ch;
}
/* Erläuternde zweite Zeile, klar der Hauptfrage untergeordnet */
.fx-zusatz {
  color: var(--mist);
  font-size: clamp(.92rem, 1.15vw, 1.02rem);
  line-height: 1.5;
  max-width: 48ch;
  margin-bottom: 4px;
}
.fx-regel {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim);
  margin-bottom: clamp(18px, 3vh, 30px);
  display: flex; align-items: center; gap: 12px;
}
.fx-regel .fx-limit { color: var(--puls-hell); }

/* ---------- Optionen ---------- */
.fx-optionen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  list-style: none;
}
.fx-opt {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: clamp(13px, 1.9vh, 18px) 18px;
  border-radius: 16px;
  border: 1px solid var(--rand);
  background: rgba(242, 244, 247, .03);
  color: var(--mist);
  font-size: clamp(.9rem, 1.15vw, 1.02rem);
  line-height: 1.35;
  cursor: pointer;
  transition: border-color .25s, background .25s, color .25s, transform .35s var(--ease), opacity .3s;
  opacity: 0;
  animation: fxOpt .55s var(--ease) forwards;
  animation-delay: calc(.05s + var(--i, 0) * .055s);
}
@keyframes fxOpt { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.fx-opt:hover { border-color: rgba(242, 244, 247, .4); color: var(--bone); transform: translateY(-2px); }
.fx-opt .fx-buchstabe {
  flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: .68rem; font-weight: 600;
  border: 1px solid var(--rand);
  color: var(--dim);
  transition: background .25s, color .25s, border-color .25s;
}
.fx-opt .fx-puls-dot {
  flex: none; margin-left: auto;
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid rgba(242, 244, 247, .3);
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.fx-opt[aria-pressed="true"], .fx-opt[aria-checked="true"] {
  border-color: var(--puls);
  background: linear-gradient(135deg, rgba(102, 42, 52, .5), rgba(102, 42, 52, .22));
  color: var(--bone);
}
.fx-opt[aria-pressed="true"] .fx-buchstabe, .fx-opt[aria-checked="true"] .fx-buchstabe {
  background: var(--puls); border-color: var(--puls); color: #fff;
}
.fx-opt[aria-pressed="true"] .fx-puls-dot, .fx-opt[aria-checked="true"] .fx-puls-dot {
  background: var(--puls-hell); border-color: var(--puls-hell);
  box-shadow: 0 0 12px rgba(217, 90, 110, .8);
  animation: fxDotPuls .5s var(--ease);
}
@keyframes fxDotPuls {
  0% { box-shadow: 0 0 0 0 rgba(217, 90, 110, .7); }
  100% { box-shadow: 0 0 0 12px rgba(217, 90, 110, 0); }
}
.fx-opt.ist-voll { opacity: .38; pointer-events: auto; }
.fx-opt.ist-voll:hover { transform: none; }

/* ---------- Freitext ---------- */
.fx-freitext { grid-column: 1 / -1; overflow: hidden; }
.fx-freitext-inner {
  padding-top: 10px;
  animation: fxOpt .45s var(--ease) backwards;
}
.fx-freitext textarea {
  width: 100%; min-height: 74px; max-height: 180px; resize: none; overflow-y: auto;
  background: rgba(242, 244, 247, .04);
  border: 1px solid var(--rand);
  border-radius: 14px;
  color: var(--bone);
  font-family: var(--f-disp); font-size: .95rem; line-height: 1.5;
  padding: 12px 14px;
  transition: border-color .3s;
}
.fx-freitext textarea:focus { outline: none; border-color: var(--puls); }
.fx-freitext textarea::placeholder { color: var(--dim); }
.fx-feld input::-webkit-contacts-auto-fill-button,
.fx-feld input::-webkit-credentials-auto-fill-button {
  visibility: hidden; display: none !important; pointer-events: none;
}

/* ---------- Intro ---------- */
.fx-intro .fx-titel {
  font-weight: 800; font-stretch: 112%;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: .98; letter-spacing: -.025em;
  margin-bottom: clamp(16px, 3vh, 26px);
}
.fx-intro .fx-titel em { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-stretch: 100%; }
.fx-intro .fx-text {
  color: var(--mist);
  font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.65;
  max-width: 52ch;
  margin-bottom: clamp(20px, 3.4vh, 32px);
}
.fx-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.fx-meta .chip { background: rgba(242, 244, 247, .05); }
.fx-intro-cta { margin-top: clamp(26px, 4.4vh, 40px); }
@media (min-width: 761px) {
  .fx-intro { margin-top: -4vh; }
  body.ist-intro .fx-weiter { display: none; }
}

/* ---------- Kontakt ---------- */
.fx-felder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.fx-feld { position: relative; }
.fx-feld.breit { grid-column: 1 / -1; }
.fx-feld input {
  width: 100%;
  background: rgba(242, 244, 247, .04);
  border: 1px solid var(--rand);
  border-radius: 14px;
  color: var(--bone);
  font-family: var(--f-disp); font-size: 1rem;
  padding: 24px 16px 10px;
  transition: border-color .3s;
}
.fx-feld input:focus { outline: none; border-color: var(--puls); }

/* ---------- Telefon mit Ländervorwahl ----------
   Auswahl und Nummer sitzen in einem gemeinsamen Rahmen, damit das Feld
   wie die übrigen Eingaben wirkt. Das schwebende Label richtet sich an
   der Nummer aus, nicht am Rahmen. */
.fx-tel-reihe { position: relative; display: flex; gap: 8px; }
.fx-vorwahl {
  flex: none; width: 106px;
  background: rgba(242, 244, 247, .04);
  border: 1px solid var(--rand);
  border-radius: 14px;
  color: var(--bone);
  font-family: var(--f-mono); font-size: .86rem; letter-spacing: .04em;
  padding: 0 10px;
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%),
                    linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% + 1px), calc(100% - 11px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color .3s;
}
.fx-vorwahl:focus { outline: none; border-color: var(--puls); }
.fx-vorwahl option { background: #1a1f28; color: var(--bone); }
.fx-tel .fx-tel-reihe input { flex: 1; min-width: 0; }
.fx-tel .fx-tel-reihe label { left: 122px; }
.fx-tel .fx-tel-reihe input:focus + label,
.fx-tel .fx-tel-reihe input:not(:placeholder-shown) + label { left: 122px; }
/* Browser-Autofill behält sonst einen gelben Grund. Der Trick mit dem
   sehr langen inneren Schatten überschreibt ihn, ohne Autofill selbst
   abzuschalten. */
.fx-feld input:-webkit-autofill,
.fx-feld input:-webkit-autofill:hover,
.fx-feld input:-webkit-autofill:focus,
.fx-feld input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--bone);
  -webkit-box-shadow: 0 0 0 1000px #1a1f28 inset;
  box-shadow: 0 0 0 1000px #1a1f28 inset;
  caret-color: var(--bone);
  transition: background-color 9999s ease-out 0s;
}
.fx-feld input:autofill {
  -webkit-text-fill-color: var(--bone);
  box-shadow: 0 0 0 1000px #1a1f28 inset;
}
.fx-feld label {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: .95rem; color: var(--dim);
  pointer-events: none;
  transition: all .25s var(--ease);
}
.fx-feld input:focus + label,
.fx-feld input:not(:placeholder-shown) + label {
  top: 13px; transform: none;
  font-family: var(--f-mono); font-size: .58rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--puls-hell);
}
.fx-feld input.ist-fehler { border-color: #d97a5a; }
.fx-feld .fx-feld-hinweis {
  display: none;
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .06em;
  color: #eba184; margin: 6px 2px 0;
}
.fx-feld input.ist-fehler ~ .fx-feld-hinweis { display: block; }

.fx-consent {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer;
  color: var(--mist); font-size: .82rem; line-height: 1.55;
  max-width: 62ch;
}
.fx-consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fx-consent .fx-box {
  flex: none; margin-top: 2px;
  width: 20px; height: 20px; border-radius: 7px;
  border: 1.5px solid var(--rand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; color: transparent;
  transition: background .25s, border-color .25s, color .25s;
}
.fx-consent input:checked ~ .fx-box { background: var(--puls); border-color: var(--puls); color: #fff; }
.fx-consent input:focus-visible ~ .fx-box { outline: 2px solid var(--puls); outline-offset: 2px; }
.fx-consent a { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; }
.fx-consent.ist-fehler .fx-box { border-color: #d97a5a; }

/* ---------- Calendly / Abschluss ---------- */
.fx-erfolg .fx-frage { max-width: none; }
.fx-erfolg-sub {
  color: var(--mist); font-size: clamp(.98rem, 1.3vw, 1.12rem);
  margin-bottom: clamp(16px, 2.6vh, 26px);
  max-width: 56ch;
}
.fx-calendly {
  border-radius: 20px;
  border: 1px solid var(--rand);
  overflow: hidden;
  background: #fdfdfd;
  min-height: 540px;
  animation: fxOpt .6s var(--ease) .15s backwards;
}
/* Höhe großzügig, damit Calendly seinen Inhalt ohne eigene Scrollleiste
   unterbringt. Scrollt das Widget intern, schluckt der iframe das Mausrad
   und die Seite darunter lässt sich nicht mehr bewegen. */
.fx-calendly .calendly-inline-widget { min-width: 280px; height: 760px; }

/* ---------- Termin-Schritt ----------
   Sonst scrollt nur die innere Bühne (.fx-stage). Über dem Calendly-iframe
   kommen dort keine Mausrad-Ereignisse an, dadurch wirkte die Seite auf
   diesem Schritt festgefroren. Hier scrollt deshalb das Dokument selbst. */
.fx-body.ist-termin { overflow: auto; }
.fx-body.ist-termin .fx-stage {
  overflow: visible;
  align-items: flex-start;
  padding-bottom: clamp(24px, 4vh, 48px);
}
.fx-calendly-platzhalter {
  border-radius: 20px;
  border: 1px dashed rgba(242, 244, 247, .3);
  background: rgba(242, 244, 247, .03);
  padding: clamp(24px, 4vh, 44px);
  max-width: 640px;
  animation: fxOpt .6s var(--ease) .15s backwards;
}
.fx-calendly-platzhalter h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.fx-calendly-platzhalter p { color: var(--mist); font-size: .92rem; line-height: 1.6; margin-bottom: 14px; }
.fx-calendly-platzhalter .final-kontakt { margin-top: 0; }
.fx-check {
  width: 60px; height: 60px; border-radius: 50%;
  border: 1.5px solid var(--puls);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--puls-hell); font-size: 1.4rem;
  margin-bottom: clamp(14px, 2.4vh, 22px);
  position: relative;
}
.fx-check::after {
  content: ""; position: absolute; inset: -1.5px; border-radius: 50%;
  border: 1.5px solid rgba(217, 90, 110, .5);
  animation: ring 2s infinite var(--ease-io);
}

/* ---------- Fußzeile ---------- */
.fx-fuss {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px var(--pad) calc(20px + env(safe-area-inset-bottom, 0px));
}
.fx-zurueck {
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim);
  padding: 12px 6px;
  transition: color .3s, transform .35s var(--ease);
}
.fx-zurueck:hover { color: var(--bone); transform: translateX(-4px); }
.fx-hinweis {
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em;
  color: #eba184;
  text-align: center; flex: 1;
  min-height: 1em;
}
.fx-weiter { min-width: 190px; justify-content: center; }
.fx-weiter[disabled] { opacity: .45; cursor: not-allowed; }
.fx-weiter.sendet .dot { animation-duration: .7s; }
.fx-weiter.wackelt { animation: fxWackeln .45s; }
@keyframes fxWackeln {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  55% { transform: translateX(6px); }
  80% { transform: translateX(-3px); }
}

.fx-noscript {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 30px;
}
.fx-noscript a { color: var(--puls-hell); }

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-opt, .fx-freitext-inner, .fx-calendly, .fx-calendly-platzhalter { animation: none; opacity: 1; }
  .fx-step.raus, .fx-step.rein, .fx-step.raus-zurueck, .fx-step.rein-zurueck { animation: none; }
  .fx-check::after { animation: none; }
  .fx-puls .ekg-line, .fx-puls .ekg-glow { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .fx-body { overflow: auto; }
  .fx-head { padding-top: 14px; }
  .fx-zaehler { display: none; }
  .fx-puls { height: 44px; }
  .fx-bpm { display: none; }
  .fx-stage { align-items: flex-start; padding-top: 4vh; }
  .fx-optionen { grid-template-columns: 1fr; gap: 9px; }
  .fx-opt { padding: 13px 14px; animation-delay: calc(.03s + var(--i, 0) * .04s); }
  .fx-felder { grid-template-columns: 1fr; gap: 11px; }
  /* Vorwahl mobil etwas schmaler, damit die Nummer genug Platz behält */
  .fx-vorwahl { width: 92px; font-size: .8rem; }
  .fx-tel .fx-tel-reihe label,
  .fx-tel .fx-tel-reihe input:focus + label,
  .fx-tel .fx-tel-reihe input:not(:placeholder-shown) + label { left: 108px; }
  .fx-geist { display: none; }
  .fx-fuss { flex-wrap: wrap; }
  .fx-hinweis { order: -1; flex-basis: 100%; text-align: left; }
  .fx-weiter { flex: 1; }
  .fx-intro-cta { display: none; }
  .fx-calendly .calendly-inline-widget { height: 1000px; }
}
