/* =========================================================================
   MAEK Beitrittsformular V2 · zwei feste Seiten mit Fortschrittsbalken
   Lädt nach ../JoinForm/form.css (Felder, Buttons, Rückseiten-Inhalt, Übersicht, Hinweis).
   Keine Animation beim Seitenwechsel. Mobile first (375px), Desktop ab 1000px wie V1.
   Nur --mk-* Tokens über die Kurznamen aus form.css.
   ========================================================================= */

.jf2 {
  --on-forest-muted: var(--mk-color-hero-muted);
  min-height: 100svh; padding: calc(18px + env(safe-area-inset-top)) 12px 24px;
  background: radial-gradient(120% 90% at 50% 0%, var(--forest-2), var(--forest) 55%, var(--night));
}
.sheet { width: min(1180px, 100%); margin: 0 auto; }

/* ===== Fortschritt ===== */
.progress { color: var(--on-forest); padding: 0 8px 16px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.progress .logo { color: var(--on-forest); font-size: 22px; }
.step-count { font: 500 14px/1 var(--f-body); color: var(--on-forest-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track { height: 8px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--on-forest) 20%, transparent); }
.fill { display: block; height: 100%; border-radius: inherit; background: var(--on-forest); transition: width .4s var(--ease); }
/* Schrittnamen nur am Desktop, mobil reicht der Zähler */
.progress-steps { display: none; list-style: none; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.progress-steps li { font: 500 12px/1.3 var(--f-body); color: color-mix(in srgb, var(--on-forest-muted) 75%, transparent); overflow-wrap: anywhere; }
.progress-steps li::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; margin-bottom: 8px;
  background: color-mix(in srgb, var(--on-forest) 30%, transparent); }
.progress-steps li.done { color: var(--on-forest-muted); }
.progress-steps li.done::before { background: var(--on-forest-muted); }
.progress-steps li.now { color: var(--on-forest); font-weight: 700; }
.progress-steps li.now::before { background: var(--on-forest); box-shadow: 0 0 0 3px color-mix(in srgb, var(--on-forest) 30%, transparent); }

/* ===== Zwei Seiten: mobil untereinander, Formular zuerst ===== */
/* clip statt hidden, sonst klebt die Navigation unten nicht mehr am Bildschirmrand */
.spread { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 12px; overflow: clip; box-shadow: 0 30px 60px var(--shade-40); }
.page-form { display: flex; flex-direction: column; min-width: 0; background: var(--paper); padding: 22px 20px 0 24px; }
.page-about { min-width: 0; background: var(--cream); padding: 24px 20px 26px 24px; }

.page-form .q { margin-top: 10px; }
.page-form .big-no { display: none; }
.page-form h2 { font: 700 clamp(28px, 8vw, 40px)/1.08 var(--f-display); letter-spacing: -.025em; color: var(--heading);
  max-width: 16ch; text-wrap: balance; outline: none; }
.page-form h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

/* Navigation: mobil unten im Daumenbereich, wie in V1 */
.nav { margin: auto -20px 0 -24px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)) 24px; display: flex; gap: 12px; align-items: center;
  position: sticky; bottom: 0; z-index: 3; background: var(--paper); }
.nav::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--paper) 0%, transparent), var(--paper)); }
.q + .nav { margin-top: 28px; }
.nav .btn { flex: 1; min-width: 0; }

/* Dankesseite: Häkchen statt Nummer, ohne Navigation */
.page-form.done { justify-content: center; padding-bottom: 32px; }
.page-form.done .big-no { display: block; }
.page-form.done .big-no svg { width: 96px; height: 96px; color: var(--forest); }
.page-form.done h2 { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .fill { transition: none; }
}

/* ===== Desktop: zwei Seiten nebeneinander, Text links, Formular rechts ===== */
@media (min-width: 1000px) {
  /* Genau ein Bildschirm hoch (100dvh). Ist eine Seite länger, scrollt sie in sich, nicht das Fenster. */
  .jf2 { box-sizing: border-box; height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; padding: 32px 48px; }
  .sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .progress { padding: 0 4px 22px; }
  .progress .logo { font-size: 24px; }
  .progress-steps { display: grid; }
  .spread { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .page-about { order: -1; display: flex; flex-direction: column; padding: 44px 48px 36px 52px; overflow-y: auto; }
  .page-form { padding: 44px 56px 36px 52px; overflow-y: auto; overscroll-behavior: contain; }
  .page-form .q { margin-top: 16px; }
  .page-form h2 { font-size: 42px; }
  /* Klebt auch am Desktop unten, damit der Bezahl-Button bei langer Übersicht sichtbar bleibt */
  .page-form { padding-bottom: 0; }
  .nav { margin: auto -56px 0 -52px; padding: 24px 56px 32px 52px; justify-content: flex-end; }
  .q + .nav { margin-top: 16px; }
  .nav .btn { max-width: 320px; }
  .page-form.done { padding-bottom: 36px; }
}

