/* ---------- Warteliste: kleiner Eintrage-Flow (wie das App-Onboarding) ----------
   Handy: Vollbild-Blatt, fährt von unten ein. Ab 720 px: zentrierte Karte.
   Aufbau je Schritt wie in der App: Zurück-Kreis + Fortschrittsbalken oben,
   große Überschrift mit Akzentwort, Inhalt, Haupt-Button unten.
   Nur Farben aus :root (css/peaks.css). Logik: js/waitlist-flow.js */

.wl { position: fixed; inset: 0; z-index: 80; }
.wl[hidden] { display: none; }
.wl-scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 13, 0.6);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  opacity: 0;
  transition: opacity 280ms ease;
}
.wl.is-open .wl-scrim { opacity: 1; }

.wl-sheet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}
.wl.is-open .wl-sheet { transform: translateY(0); }

/* Kopf: Zurück · Fortschritt · Schließen */
.wl-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: max(16px, env(safe-area-inset-top)) 20px 8px;
  flex: none;
}
.wl-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--ink-12);
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 160ms ease, opacity 200ms ease;
}
.wl-circle svg { width: 20px; height: 20px; }
.wl-circle:active { border-color: var(--navy); }
.wl-circle:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.wl-circle.is-hidden { opacity: 0; pointer-events: none; }
.wl-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.wl-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--navy);
  transition: width 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Schritte */
.wl-form { position: relative; flex: 1; min-height: 0; display: flex; }
.wl-step {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  animation: wl-in 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
.wl-step[hidden] { display: none; }
.wl-step.is-back { animation-name: wl-in-back; }
@keyframes wl-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes wl-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

.wl-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px 24px;
}
.wl-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 24px max(24px, env(safe-area-inset-bottom));
}
.wl-foot .btn-primary { width: 100%; border: 0; cursor: pointer; }
.wl-foot .btn-primary:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.wl-foot .btn-primary:disabled { background: var(--surface-3); color: var(--faint); cursor: not-allowed; }
.wl-foot .btn-primary.is-busy { pointer-events: none; }
.wl-fine { font-size: 13px; line-height: 1.45; color: var(--mute); text-align: center; }
.wl-fine a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.wl-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--mint-dim);
}
.wl-title {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--text);
  text-wrap: balance;
}
.wl-title span { color: var(--navy); }
.wl-title:focus { outline: none; }
.wl-text { font-size: 17px; font-weight: 500; line-height: 1.45; color: var(--mute); }
.wl-text strong { color: var(--text); font-weight: 600; }

/* Schritt 1: drei Zusagen */
.wl-points { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.wl-point {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--ink-06);
  border-radius: 20px;
  background: var(--card);
}
.wl-point svg { width: 22px; height: 22px; flex: none; margin-top: 1px; stroke: var(--navy); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wl-point p { font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--mute); }
.wl-point strong { display: block; margin-bottom: 2px; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }

/* Schritt 2: drei Listen untereinander. Haken = abonniert (Start + Updates vorausgewählt),
   Pfeil klappt die Details auf. „Insider“ ist golden (Premium-Farbe --star der App). */
.wl-opts { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.wl-opt {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1.5px solid var(--ink-06);
  border-radius: 20px;
  background: var(--card);
  transition: border-color 180ms ease, background 180ms ease;
}
.wl-opt:has(input:checked) { border-color: var(--navy); background: rgba(78, 234, 194, 0.05); }
.wl-opt-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 0 4px 0 18px;
  cursor: pointer;
}
.wl-opt-head input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wl-opt-head input:checked + .wl-box { border-color: var(--navy); background: var(--navy); }
.wl-opt-head input:checked + .wl-box svg { opacity: 1; }
.wl-opt-head input:focus-visible + .wl-box { outline: 2px solid var(--navy); outline-offset: 3px; }
.wl-opt-name { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.4px; color: var(--text); }
.wl-opt-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mute);
  cursor: pointer;
}
.wl-opt-more svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1); }
.wl-opt-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.wl-opt-more:hover, .wl-opt-more[aria-expanded="true"] { color: var(--text); }
.wl-opt-more:focus-visible { outline: 2px solid var(--navy); outline-offset: -4px; }
.wl-opt-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.wl-opt-detail.is-open { grid-template-rows: 1fr; }
.wl-opt-detail-in { overflow: hidden; }
.wl-opt-detail p {
  padding: 0 20px 18px 54px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--mute);
}

/* Insider: golden, mit Stern und leichtem Schimmer */
.wl-opt.is-gold {
  position: relative;
  border-color: rgba(255, 179, 64, 0.45);
  background: linear-gradient(135deg, rgba(255, 179, 64, 0.12), rgba(255, 179, 64, 0.02) 55%), var(--card);
  box-shadow: 0 12px 40px -18px rgba(255, 179, 64, 0.45);
}
.wl-opt.is-gold:has(input:checked) { border-color: var(--star); background: linear-gradient(135deg, rgba(255, 179, 64, 0.2), rgba(255, 179, 64, 0.04) 60%), var(--card); }
.wl-opt.is-gold .wl-opt-name { color: var(--star); }
.wl-opt.is-gold .wl-box { border-color: rgba(255, 179, 64, 0.5); }
.wl-opt.is-gold input:checked + .wl-box { border-color: var(--star); background: var(--star); }
.wl-opt.is-gold input:focus-visible + .wl-box { outline-color: var(--star); }
.wl-opt-star { width: 16px; height: 16px; margin-left: -6px; fill: var(--star); }
.wl-opt.is-gold .wl-opt-more { color: rgba(255, 179, 64, 0.8); }
.wl-opt.is-gold .wl-opt-more:hover, .wl-opt.is-gold .wl-opt-more[aria-expanded="true"] { color: var(--star); }

/* Schritt 3: Adresse */
.wl-field { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.wl-input {
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border: 1px solid var(--ink-12);
  border-radius: 18px;
  background: var(--bg-lift);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  transition: border-color 160ms ease;
}
.wl-input::placeholder { color: var(--faint); }
.wl-input:focus { outline: none; border-color: var(--navy); }
.wl-input.is-bad { border-color: var(--orange); }
.wl-msg { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--orange); }
.wl-msg[hidden], .wl-hint[hidden] { display: none; }
.wl-hint {
  align-self: flex-start;
  padding: 8px 14px;
  border: 1px solid var(--ink-12);
  border-radius: 999px;
  background: transparent;
  color: var(--mute);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.wl-hint strong { color: var(--navy); font-weight: 600; }
.wl-hint:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.wl-check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--ink-06);
  border-radius: 20px;
  background: var(--card);
  cursor: pointer;
}
.wl-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wl-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 1px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  transition: background 180ms ease, border-color 180ms ease;
}
.wl-box svg { width: 12px; height: 12px; stroke: var(--navy-ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.wl-check input:checked + .wl-box { border-color: var(--navy); background: var(--navy); }
.wl-check input:checked + .wl-box svg { opacity: 1; }
.wl-check input:focus-visible + .wl-box { outline: 2px solid var(--navy); outline-offset: 3px; }
.wl-check p { font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--mute); }
.wl-check p strong { display: block; color: var(--text); font-weight: 600; }

/* Honeypot für Bots: unsichtbar, nicht fokussierbar */
.wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Schritt 4: Bestätigung per Code. Ein echtes Eingabefeld liegt unsichtbar über sechs Zellen. */
.wl-code { position: relative; margin-top: 12px; }
.wl-code-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  font-size: 16px;
  caret-color: transparent;
  cursor: text;
}
.wl-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.wl-cells span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  border: 1.5px solid var(--ink-12);
  border-radius: 16px;
  background: var(--bg-lift);
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease;
}
.wl-cells span.is-filled { border-color: rgba(78, 234, 194, 0.4); }
.wl-cells span.is-active { border-color: var(--navy); background: rgba(78, 234, 194, 0.06); }
.wl-cells span.is-active:empty::after {
  content: "";
  width: 2px;
  height: 26px;
  border-radius: 1px;
  background: var(--navy);
  animation: wl-blink 1s steps(1) infinite;
}
.wl-code.is-bad .wl-cells span { border-color: var(--orange); }
.wl-code.is-bad { animation: wl-shake 360ms ease; }
@keyframes wl-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.wl-code-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wl-link {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--navy);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.wl-link:disabled { color: var(--faint); cursor: default; }
.wl-link:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
.wl-wait { display: none; font-variant-numeric: tabular-nums; }
.wl-link.is-waiting .wl-wait { display: inline; }
.wl-why {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--ink-06);
  border-radius: 20px;
  background: var(--card);
}
.wl-why svg { width: 22px; height: 22px; flex: none; margin-top: 1px; stroke: var(--navy); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wl-why p { font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--mute); }
.wl-why strong { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; font-size: 15px; }
.wl-text strong[data-wl-out] { font-family: var(--mono); font-weight: 500; overflow-wrap: anywhere; }

/* Schritt 5: fertig. Kreis springt auf, Haken zeichnet sich, Konfetti (Canvas, js) fliegt aus dem Kreis. */
.wl-done .wl-body { align-items: center; justify-content: center; text-align: center; gap: 28px; }
.wl-mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: rgba(78, 234, 194, 0.1);
  box-shadow: inset 0 0 0 1.5px rgba(78, 234, 194, 0.45), 0 0 60px -10px rgba(78, 234, 194, 0.45);
}
.wl-mail svg { width: 48px; height: 48px; stroke: var(--navy); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wl-done .wl-title { font-size: 40px; letter-spacing: -1.5px; }
.wl-done.is-celebrate .wl-mail { animation: wl-pop 620ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.wl-done.is-celebrate .wl-mail path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: wl-draw 420ms 280ms cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.wl-done.is-celebrate .wl-title { animation: wl-rise 520ms 360ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes wl-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wl-draw { to { stroke-dashoffset: 0; } }
@keyframes wl-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.wl-confetti { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; border-radius: inherit; }

/* Größere Bildschirme: zentrierte Karte statt Vollbild */
@media (min-width: 720px) {
  .wl-sheet {
    inset: auto;
    top: 50%;
    left: 50%;
    width: 480px;
    height: min(720px, calc(100vh - 64px));
    border: 1px solid var(--ink-12);
    border-radius: 28px;
    background: var(--bg-lift);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
    transform: translate(-50%, calc(-50% + 40px));
    opacity: 0;
    transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms ease;
  }
  .wl.is-open .wl-sheet { transform: translate(-50%, -50%); opacity: 1; }
  .wl-top { padding: 20px 24px 8px; }
  .wl-body { padding: 28px 32px 24px; }
  .wl-foot { padding: 12px 32px 28px; }
  .wl-title { font-size: 38px; letter-spacing: -1.4px; }
}

@media (prefers-reduced-motion: reduce) {
  .wl-scrim, .wl-sheet, .wl-bar span, .wl-circle, .wl-opt, .wl-opt-detail, .wl-opt-more svg, .wl-box, .wl-input, .wl-cells span { transition: none; }
  .wl-code.is-bad, .wl-cells span.is-active:empty::after, .wl-done.is-celebrate .wl-mail, .wl-done.is-celebrate .wl-title { animation: none; }
  .wl-done.is-celebrate .wl-mail path { animation: none; stroke-dashoffset: 0; }
  .wl-step, .wl-step.is-back { animation: none; }
}

/* ---------- Einstieg im Hero: Schein-Eingabefeld ----------
   Sieht aus wie das Formular (Adresse tippt sich selbst), öffnet beim Antippen den Flow.
   Ein Lichtpunkt läuft langsam um den Rand, damit das Feld ins Auge fällt. */
@property --wl-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.wl-pill {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 460px;
  height: 64px;
  padding: 0 7px 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--bg-lift);
  box-shadow: 0 0 0 1px var(--ink-12), 0 18px 50px -18px rgba(78, 234, 194, 0.35);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}
.wl-pill-ring {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--wl-a), transparent 0deg, transparent 250deg, rgba(78, 234, 194, 0.15) 290deg, var(--navy) 340deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: wl-orbit 5.5s linear infinite;
  pointer-events: none;
}
@keyframes wl-orbit { to { --wl-a: 360deg; } }
.wl-pill-icon svg { width: 22px; height: 22px; stroke: var(--mute); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wl-pill-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 500;
  color: var(--mute);
}
.wl-pill-caret {
  width: 2px;
  height: 20px;
  margin-left: 2px;
  flex: none;
  border-radius: 1px;
  background: var(--navy);
  animation: wl-blink 1s steps(1) infinite;
}
@keyframes wl-blink { 50% { opacity: 0; } }
.wl-pill-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 50px;
  padding: 0 18px 0 22px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--navy-ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
}
.wl-pill-go svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.wl-pill:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(78, 234, 194, 0.35), 0 24px 60px -18px rgba(78, 234, 194, 0.5); }
.wl-pill:hover .wl-pill-go svg { transform: translateX(3px); }
.wl-pill:active { transform: scale(0.985); }
.wl-pill:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
@media (min-width: 720px) {
  .wl-pill { max-width: 540px; height: 72px; padding-left: 26px; gap: 14px; }
  .wl-pill-field { font-size: 19px; }
  .wl-pill-go { height: 58px; padding: 0 22px 0 28px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .wl-pill, .wl-pill-go svg { transition: none; }
  .wl-pill-ring { animation: none; --wl-a: 200deg; }
  .wl-pill-caret { animation: none; }
}

/* ---------- Abmelde-Seite (/abmelden/, /en/unsubscribe/) ---------- */
.unsub-btn { border: 0; cursor: pointer; font: inherit; }
.unsub-btn:disabled { opacity: 0.6; cursor: default; }
.unsub-note { margin-top: 32px; font-size: 14px; color: var(--mute); }
