/* ============================================================
   Was passt zu mir: der Fragebogen.
   Eine Buehne, auf der immer genau ein Schritt steht. Die Seite
   traegt sonst nichts, damit die Auswahl die einzige Handlung
   bleibt. Setzt basis.css und bausteine.css voraus.
   ============================================================ */

/* ---- Buehne ---- */
.finder {
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: center;
  padding-block: clamp(108px, 12vw, 148px) clamp(56px, 8vw, 104px);
  position: relative;
  overflow: hidden;
}

/* Ein weicher Schein hinter der Buehne. Er haelt den Blick in der
   Mitte, ohne dass eine Kante die Aufmerksamkeit abzieht. */
.finder::before {
  content: "";
  position: absolute;
  inset: -25% 20% auto;
  height: 70%;
  background: radial-gradient(50% 50% at 50% 40%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 72%);
  filter: blur(40px);
  pointer-events: none;
}

.finder-buehne { position: relative; max-width: 720px; margin-inline: auto; }

/* ---- Fortschritt ---- */
/* display schlaegt [hidden], deshalb die Ausnahme direkt daneben. */
.finder-fortschritt[hidden] { display: none; }

.finder-fortschritt {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.finder-schiene {
  flex: 1;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.finder-schiene i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-grad);
  transition: width 0.62s var(--ease-out);
}

.finder-zaehler { font-size: 0.82rem; color: var(--ink-3); letter-spacing: 0.02em; flex: none; }

/* ---- Schritt ---- */
/* Jeder Schritt steigt beim Wechsel auf. Der Weg ist kurz, weil er
   nur die Richtung markieren soll, nicht den Blick aufhalten. */
.finder-schritt,
.ziel {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.finder-schritt.is-da,
.ziel.is-da { opacity: 1; transform: none; }

/* Nach jedem Wechsel bekommt die Ueberschrift den Fokus, damit
   Screenreader den neuen Schritt vorlesen. Sichtbar sein muss der
   Ring dabei nicht, die Ueberschrift ist kein Bedienelement. */
.finder-frage:focus,
.ziel-name:focus { outline: none; }

.finder-frage {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 10px 0 0;
}

.finder-lead {
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.62;
  max-width: 46ch;
  margin: 16px 0 0;
}

/* ---- Auswahl ---- */
.wahlen { display: grid; gap: 12px; margin-top: clamp(26px, 3.6vw, 40px); }

/* Die Optionen kommen gestaffelt herein, --i setzt finder.js. */
.is-da .wahl {
  animation: wahl-auf 0.52s var(--ease-out) both;
  animation-delay: calc(60ms + var(--i, 0) * 55ms);
}

@keyframes wahl-auf {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.wahl {
  --hebung: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: inherit;
  font: inherit;
  cursor: pointer;
  position: relative;
  transform: translateY(calc(var(--hebung) * -2px));
  transition: transform 0.32s var(--ease-out), border-color 0.32s var(--ease-out),
              background 0.32s var(--ease-out), box-shadow 0.32s var(--ease-out);
}

.wahl:hover { --hebung: 1; border-color: var(--accent-line); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.wahl:active { transform: scale(0.988); transition-duration: 0.12s; }

.wahl-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background 0.32s var(--ease-out), color 0.32s var(--ease-out);
}

.wahl-ico svg { width: 21px; height: 21px; }
.wahl:hover .wahl-ico { background: var(--accent-deep); color: var(--on-accent); }

.wahl-text { display: grid; gap: 3px; min-width: 0; }
.wahl-titel { font-weight: 600; font-size: 1.02rem; line-height: 1.32; }
.wahl-sub { color: var(--ink-3); font-size: 0.88rem; line-height: 1.45; }

.wahl-pfeil {
  flex: none;
  margin-left: auto;
  color: var(--ink-3);
  display: grid;
  place-items: center;
  transition: transform 0.32s var(--ease-out), color 0.32s var(--ease-out);
}

.wahl-pfeil svg { width: 18px; height: 18px; }
.wahl:hover .wahl-pfeil { color: var(--accent); transform: translateX(4px); }

/* ---- Zurueck und Neustart ---- */
.finder-nav { margin-top: 22px; }

.finder-zurueck,
.finder-neustart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: color 0.28s var(--ease-out);
}

.finder-zurueck svg,
.finder-neustart svg { width: 16px; height: 16px; }
.finder-zurueck:hover,
.finder-neustart:hover { color: var(--ink); }
.finder-zurueck:hover svg { transform: translateX(-3px); transition: transform 0.28s var(--ease-out); }

/* Unter dem Ergebnis stehen beide Rueckwege in einer Zeile. Auf
   schmalen Fenstern brechen sie untereinander. */
.finder-abschluss {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 28px;
  margin-top: 26px;
}

/* ---- Ergebnis ---- */
.ziel-karte {
  position: relative;
  padding: clamp(30px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.ziel-karte.is-empfohlen { border-color: var(--accent-line); }

.ziel-marke {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: var(--accent-deep);
  color: var(--on-accent);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ziel-kicker {
  display: block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ziel-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 12px 0 0;
}

.ziel-preis { color: var(--accent); font-size: 1.16rem; font-weight: 600; margin: 10px 0 0; }

.ziel-grund {
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.62;
  max-width: 52ch;
  margin: 18px auto 0;
}

/* Die Standort-Rechnung steht abgesetzt, damit die Zahlen als
   Nachweis lesbar sind und nicht als Fliesstext untergehen. */
.ziel-rechnung {
  margin: 22px 0 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-1);
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.ziel-rechnung b { color: var(--ink); }

.ziel-aktionen { display: grid; justify-items: center; gap: 14px; margin-top: 28px; }
.ziel-zweitlink { color: var(--ink-3); font-size: 0.92rem; text-decoration: underline; text-underline-offset: 3px; }
.ziel-zweitlink:hover { color: var(--ink); }

/* ---- Schmale Fenster ---- */
@media (max-width: 560px) {
  .wahl { padding: 15px 16px; gap: 13px; }
  .wahl-ico { width: 40px; height: 40px; border-radius: 12px; }
  .wahl-ico svg { width: 19px; height: 19px; }
  .finder::before { inset: -20% -10% auto; }
}

/* ---- Ruhige Darstellung ---- */
@media (prefers-reduced-motion: reduce) {
  .finder-schritt,
  .ziel { opacity: 1; transform: none; transition: none; }
  .is-da .wahl { animation: none; }
  .finder-schiene i { transition: none; }
  .wahl:hover { transform: none; }
  .wahl:hover .wahl-pfeil { transform: none; }
}
