/* The setup wizard.
 *
 * The wizard shipped as part 1 with no stylesheet at all -- tokens.css is
 * variables and no element styling -- so every screen rendered as browser
 * default HTML. That was survivable while nothing linked to it. The landing
 * pages' primary action now arrives here, so the journey from a designed hero
 * into step one has to hold together or the hero is a promise the next screen
 * breaks.
 *
 * It borrows the landing vocabulary rather than inventing one: Poppins for
 * headings, Inter for everything else, the gold pill for the action that
 * carries a step forward, the same muted greys, the same 999px radius. It is
 * deliberately quieter than a landing page -- this is a form somebody is
 * filling in, and the loudest thing on the screen should be the field they
 * are typing into, not the furniture around it.
 *
 * Theme comes from tokens.css and follows the rest of the product.
 */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--landing-bg);
  color: var(--landing-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* One measure for the whole wizard. A form read at arm's length wants a
   narrower column than a landing page read across a room. */
body > * {
  width: min(46rem, 100% - 2.5rem);
  margin-inline: auto;
}

h1 {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h2 {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

p { margin: 0 0 1rem; max-width: 62ch; }

a { color: var(--landing-accent-text); }
a:hover { color: var(--landing-text); }

:where(a, button, input, select):focus-visible {
  outline: 3px solid var(--landing-focus-indicator);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Where you are ─────────────────────────────────────────────────────── */

/* Six steps from blank loses people; saying which one this is costs a line
   and is the cheapest thing on the page that reduces abandonment. */
.wizard-progress {
  margin: 0;
  padding: 1.75rem 0 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--landing-muted);
}

.meta {
  font-size: 0.9375rem;
  color: var(--landing-muted);
}

.wizard-error {
  margin: 0 0 1.25rem;
  padding: 0.875rem 1.125rem;
  border-radius: 8px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-text);
  font-size: 0.9375rem;
}

/* ── Fields ────────────────────────────────────────────────────────────── */

.wizard-field {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  margin-bottom: 1.5rem;
}

label {
  font-weight: 600;
  font-size: 0.9375rem;
}

input[type="text"],
input[type="tel"],
select,
textarea {
  font: inherit;
  color: var(--landing-text);
  background: var(--landing-surface);
  border: 1.5px solid var(--landing-line);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  /* 48px of target on a phone, where this form is most likely to be filled
     in standing at a gate rather than sitting at a desk. */
  min-height: 3rem;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus { border-color: var(--landing-accent-text); }

.wizard-availability {
  margin: 0;
  min-height: 1.35rem;
  font-size: 0.875rem;
  color: var(--landing-muted);
}

/* ── One rule per row ──────────────────────────────────────────────────── */

/* Four controls that belong to one rule. They wrap to a stack on a phone
   rather than shrinking into a row nobody can hit. */
.wizard-rule-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  padding: 1rem;
  margin-bottom: 0.875rem;
  border: 1px solid var(--landing-line);
  border-radius: 10px;
  background: var(--landing-surface);
}

@media (min-width: 720px) {
  .wizard-rule-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 1.2fr) auto;
    align-items: center;
  }
}

/* ── Review ────────────────────────────────────────────────────────────── */

.wizard-review-section {
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--landing-line);
  border-radius: 10px;
  background: var(--landing-surface);
}

.wizard-review-section h2 a {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
}

.wizard-review-section dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
}

@media (min-width: 560px) {
  .wizard-review-section dl { grid-template-columns: 14rem minmax(0, 1fr); }
}

.wizard-review-section dt {
  color: var(--landing-muted);
  font-size: 0.9375rem;
}

.wizard-review-section dd { margin: 0 0 0.625rem; }

.wizard-review-section ul {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wizard-review-section li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wizard-review-empty { color: var(--landing-muted); font-style: normal; }

/* A rule with no symbol still has to say so: an empty slot and a deliberate
   "no symbol" look identical otherwise. */
.safety-icon-none {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--landing-muted);
  border: 1px dashed var(--landing-line);
  border-radius: 6px;
  padding: 0.375rem 0.5rem;
}

/* ── Carrying on ───────────────────────────────────────────────────────── */

button[type="submit"] {
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  background: var(--gold);
  color: var(--navy);
  border: 0;
  border-radius: 999px;
  padding: 0.875rem 2.25rem;
  min-height: 3.25rem;
  margin: 0.5rem 0 3rem;
  cursor: pointer;
}

button[type="submit"]:hover { background: #ffd233; }

/* ── The refusal ───────────────────────────────────────────────────────── */

.wizard-busy { padding: clamp(3rem, 12vh, 7rem) 0; }

.wizard-busy-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.wizard-busy-primary {
  background: var(--gold);
  color: var(--navy);
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  text-decoration: none;
}

.wizard-busy-primary:hover { background: #ffd233; color: var(--navy); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── Keeping it ────────────────────────────────────────────────────────── */

/* The only ask in the funnel, and the first one. Everything before it needed
   no account, so this is where the page has to be persuasive rather than
   merely present. */
.example-retention {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-text);
  font-size: 0.9375rem;
}

.example-keep {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 2rem 0 3rem;
}

.example-keep-primary {
  background: var(--gold);
  color: var(--navy);
  font-family: Poppins, Inter, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
}

.example-keep-primary:hover { background: #ffd233; color: var(--navy); }

.example-keep-note { color: var(--landing-muted); font-size: 0.9375rem; }
