/*
 * Funnel (Erstgespräch buchen) — zwei Varianten zum Vergleich.
 *  A .fn--a  = Stepper im Design der LMS-Registrierung (dunkel, Maskottchen)
 *  B .fn--b  = Ablauf der Auvelle-book.html in Stellas Design (creme, editorial)
 * Wird nur auf landing-neu.html geladen.
 */

/* ===== Overlay-Grundgerüst ===== */

.fn {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 28px);
  background: rgba(7, 7, 7, 0.62);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.fn.is-open {
  display: flex;
}

body.fn-open {
  overflow: hidden;
}

.fn__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100svh - 24px);
  overflow-y: auto;
  border-radius: 24px;
  animation: fn-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fn-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fn__panel {
    animation: none;
  }
}

.fn__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.fn__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Fortschritt (beide Varianten) */
.fn__bar {
  display: flex;
  gap: 6px;
}

.fn__seg {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
}

.fn__seg i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fn__seg.is-done i,
.fn__seg.is-current i {
  width: 100%;
}

.fn__count {
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.fn__q {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.fn__sub {
  font-size: 0.86rem;
  line-height: 1.5;
}

/* Formularfelder */
.fn-field {
  display: grid;
  gap: 6px;
}

.fn-field span {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fn-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
}

.fn-field input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.fn-grid {
  display: grid;
  gap: 12px;
}

.fn-check {
  display: flex;
  align-items: flex-start;
  /* Luft zum letzten Eingabefeld — klebte sonst am Telefonfeld */
  margin-top: 14px;
  gap: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  cursor: pointer;
}

.fn-check input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.fn-err {
  font-size: 0.78rem;
  color: rgb(214, 69, 69);
}

.fn-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fn-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.fn-next[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

/* ===== Kalender (beide Varianten) ===== */

.fn-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.fn-cal__month {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.fn-cal__nav {
  display: flex;
  gap: 6px;
}

.fn-cal__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.fn-cal__arrow[disabled] {
  opacity: 0.3;
  pointer-events: none;
}

.fn-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.fn-cal__dow {
  padding: 4px 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
}

.fn-cal__day {
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.84rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.fn-cal__day[disabled] {
  opacity: 0.25;
  pointer-events: none;
}

.fn-cal__day.is-empty {
  visibility: hidden;
}

.fn-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.fn-slot {
  min-height: 42px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 500;
}

.fn-slots__empty {
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ===== Variante A · dunkler Stepper (LMS-Registrierung) ===== */

.fn--a .fn__panel {
  background: rgb(14, 13, 12);
  color: rgb(255, 255, 255);
  padding: 26px 22px 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fn--a .fn__close {
  background: rgba(255, 255, 255, 0.1);
  color: rgb(255, 255, 255);
}

.fn--a .fn__seg {
  background: rgba(255, 255, 255, 0.16);
}

.fn--a .fn__seg i {
  background: rgb(255, 255, 255);
}

.fn--a .fn__count {
  color: rgba(255, 255, 255, 0.45);
}

.fn--a .fn__mascot {
  display: block;
  width: 190px;
  height: 190px;
  margin: 6px auto 2px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45));
}

/* Bezugsfläche für den Dev-Knopf „Bild ändern" am Maskottchen */
.fn__media-wrap {
  position: relative;
  width: fit-content;
  margin-inline: auto;
}

/* nicht auf dem Häkchen der aktiven Karte sitzen */
.fn-pick__card .ldmt-btn {
  top: 8px;
  right: 42px;
}

/* Abstand trägt die Frage selbst — Schritt 1 und 2 haben keine Unterzeile mehr */
.fn--a .fn__q {
  margin-top: 6px;
  margin-bottom: 18px;
  text-align: center;
  font-size: 1.62rem;
  color: rgb(255, 255, 255);
}

/* negativer Rand zieht die Unterzeile wieder dicht unter die Frage (Ergebnis: 8px) */
.fn--a .fn__sub {
  margin-top: -10px;
  margin-bottom: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
}

.fn--a .fn-pick {
  display: grid;
  gap: 10px;
}

.fn--a .fn-pick__card {
  position: relative;
  display: block;
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.fn--a .fn-pick__card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: opacity var(--transition-base), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.fn--a .fn-pick__card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 10%, rgba(0, 0, 0, 0.15) 100%);
}

.fn--a .fn-pick__card b {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  color: rgb(255, 255, 255);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fn--a .fn-pick__card.is-active {
  border-color: rgb(255, 255, 255);
}

.fn--a .fn-pick__card.is-active img {
  opacity: 0.8;
  transform: scale(1.04);
}

.fn--a .fn-pick__card em {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: none;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgb(255, 255, 255);
  color: rgb(10, 10, 10);
  font-size: 0.68rem;
  font-style: normal;
}

.fn--a .fn-pick__card.is-active em {
  display: inline-flex;
}

/* Level-Auswahl als schlichte Zeilen */
.fn--a .fn-level {
  display: grid;
  gap: 10px;
}

.fn--a .fn-level__card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.fn--a .fn-level__card.is-active {
  border-color: rgb(255, 255, 255);
  background: rgba(255, 255, 255, 0.08);
}

.fn--a .fn-level__card b {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: rgb(255, 255, 255);
}

.fn--a .fn-level__card span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  line-height: 1.45;
}

.fn--a .fn-field span {
  color: rgba(255, 255, 255, 0.5);
}

.fn--a .fn-field input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgb(255, 255, 255);
}

.fn--a .fn-check {
  color: rgba(255, 255, 255, 0.6);
}

.fn--a .fn-next {
  background: rgb(255, 255, 255);
  color: rgb(10, 10, 10);
}

.fn--a .fn__back {
  color: rgba(255, 255, 255, 0.5);
}

.fn--a .fn-cal__arrow,
.fn--a .fn-cal__day,
.fn--a .fn-slot {
  background: rgba(255, 255, 255, 0.07);
  color: rgb(255, 255, 255);
  border: 1px solid transparent;
}

.fn--a .fn-cal__day.is-sel,
.fn--a .fn-slot.is-sel {
  background: rgb(255, 255, 255);
  color: rgb(10, 10, 10);
}

.fn--a .fn-cal__dow {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Variante B · Auvelle-Ablauf in Stellas Design ===== */

.fn--b .fn__panel {
  max-width: 620px;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 26px 22px 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.fn--b .fn__close {
  background: rgba(10, 10, 10, 0.08);
  color: var(--color-text);
}

.fn--b .fn__seg {
  background: rgba(10, 10, 10, 0.12);
}

.fn--b .fn__seg i {
  background: var(--color-text);
}

.fn--b .fn__count {
  color: var(--color-soft);
}

.fn--b .fn__q {
  margin-top: 14px;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  text-transform: uppercase;
  letter-spacing: -0.06em;
}

.fn--b .fn__sub {
  margin-top: 8px;
  margin-bottom: 18px;
  color: var(--color-muted);
}

.fn--b .fn-opts {
  display: grid;
  gap: 12px;
}

.fn--b .fn-opt {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(10, 10, 10, 0.1);
  background: rgb(255, 255, 255);
  text-align: left;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.fn--b .fn-opt:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(10, 10, 10, 0.1);
  opacity: 1;
}

.fn--b .fn-opt--dark {
  background: var(--color-text);
  color: rgb(255, 255, 255);
  border-color: transparent;
}

.fn--b .fn-opt__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fn--b .fn-opt__num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fn--b .fn-opt__rule {
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
}

.fn--b .fn-opt__kicker {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.fn--b .fn-opt__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.fn--b .fn-opt__desc {
  font-size: 0.88rem;
  line-height: 1.5;
  opacity: 0.75;
}

.fn--b .fn-opt__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.fn--b .fn-opt__circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 0.8rem;
}

.fn--b .fn-hint {
  margin-top: 14px;
  text-align: center;
  color: var(--color-soft);
  font-size: 0.78rem;
}

.fn--b .fn-field span {
  color: var(--color-soft);
}

.fn--b .fn-field input {
  background: rgb(255, 255, 255);
  border: 1px solid rgba(10, 10, 10, 0.16);
  color: var(--color-text);
}

.fn--b .fn-check {
  color: var(--color-muted);
}

.fn--b .fn-next {
  background: var(--color-text);
  color: rgb(255, 255, 255);
}

.fn--b .fn__back {
  color: var(--color-muted);
}

.fn--b .fn-cal__arrow,
.fn--b .fn-cal__day,
.fn--b .fn-slot {
  background: rgb(255, 255, 255);
  border: 1px solid rgba(10, 10, 10, 0.1);
  color: var(--color-text);
}

.fn--b .fn-cal__day.is-sel,
.fn--b .fn-slot.is-sel {
  background: var(--color-text);
  color: rgb(255, 255, 255);
  border-color: var(--color-text);
}

/* Host-Karte (Variante B, Auvelle-Sidebar) */
.fn-host {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: var(--color-surface);
  margin-bottom: 16px;
}

.fn-host__who {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fn-host__who img {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
}

.fn-host__name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.fn-host__role {
  display: block;
  color: var(--color-soft);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fn-host__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.fn-host__rows {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.fn-host__when {
  color: var(--color-text);
  font-weight: 600;
}

/* ===== Fertig-Screen (beide) ===== */

.fn-done {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 12px 0 6px;
}

.fn-done__mascot {
  width: 170px;
  height: 170px;
  object-fit: contain;
}

.fn-done h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.fn-done p {
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 34ch;
}

.fn--a .fn-done p {
  color: rgba(255, 255, 255, 0.6);
}

.fn--b .fn-done p {
  color: var(--color-muted);
}

.fn-demo {
  margin-top: 14px;
  font-size: 0.68rem;
  opacity: 0.45;
  text-align: center;
}

/* ===== Dev-Umschalter (vor Livegang entfernen) ===== */

.fn-switch {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.82);
  color: rgb(255, 255, 255);
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.fn-switch b {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(255, 255, 255);
  color: rgb(10, 10, 10);
}

@media (min-width: 760px) {
  .fn--a .fn__panel,
  .fn--b .fn__panel {
    padding: 30px 30px 28px;
  }

  .fn--b .fn-opts {
    gap: 14px;
  }
}
