/* ─────────────────────────────────────────────────────────────────
   Aesthetic: editorial financial-publication.
   Distinctive serif display (Fraunces, an italic-aware serif with soft
   geometry) paired with a precise sans for body (IBM Plex Sans).
   Warm cream paper bg, deep ink, single terracotta accent.
   Avoiding the standard purple-on-white tech-startup look entirely.
   ───────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,300..900,0..100&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Palette */
  --ink:          #0e1117;
  --ink-soft:     #2a2f3b;
  --ink-mute:     #5d6577;
  --ink-faint:    #98a0b0;
  --paper:        #faf6ef;     /* warm cream */
  --paper-deep:   #f1ebe0;     /* sidebar / pulled background */
  --surface:      #ffffff;
  --rule:         #e3dccb;     /* warm hairline */
  --rule-strong:  #c8bfa9;
  --accent:       #b1462d;     /* terracotta / oxide red */
  --accent-deep:  #8d3622;
  --accent-soft:  #f7e6d8;
  --success:      #1f7a4a;
  --error:        #9a1d1d;
  --error-soft:   #fbeaea;

  /* Geometry */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;
  --shadow-1: 0 1px 0 rgba(14, 17, 23, 0.04), 0 1px 2px rgba(14, 17, 23, 0.04);
  --shadow-2: 0 1px 0 rgba(14, 17, 23, 0.04), 0 14px 30px -10px rgba(14, 17, 23, 0.12);
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(177, 70, 45, 0.05), transparent 60%),
    radial-gradient(ellipse 800px 400px at 100% 100%, rgba(177, 70, 45, 0.03), transparent 60%);
  background-attachment: fixed;
  font-feature-settings: 'ss01', 'ss02';
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

.page { min-height: 100vh; }

/* ── Brand bar ───────────────────────────────────────────────────── */

.brand-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.brand { display: inline-flex; align-items: baseline; gap: 8px; }
.brand-mark {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transform: translateY(2px);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.005em;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}

/* ── Wizard frame ────────────────────────────────────────────────── */

.wizard {
  max-width: 760px; margin: 0 auto; padding: 56px 32px 64px;
}

.masthead { margin-bottom: 40px; }
.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.display {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  font-variation-settings: 'SOFT' 100, 'opsz' 100;
}

/* ── Stepper ─────────────────────────────────────────────────────── */

.stepper {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  position: relative;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 17px; left: 14px; right: 14px;
  height: 1px;
  background: var(--rule);
  z-index: 0;
}
.step button {
  background: none;
  border: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
  width: 100%;
}
.step button:disabled { cursor: not-allowed; }
.step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  transition: all 0.18s ease;
}
.step.done .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-size: 14px;
}
.step.active .step-dot {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.step.visited .step-dot {
  border-color: var(--ink-soft);
  color: var(--ink-soft);
}
.step-name {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.step.active .step-name { color: var(--ink); font-weight: 500; }
.step.done .step-name   { color: var(--ink-soft); }

/* ── Step card ───────────────────────────────────────────────────── */

.step-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 44px 48px;
}
.step-card header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.step-card h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 6px 0 8px;
  color: var(--ink);
  font-variation-settings: 'SOFT' 50, 'opsz' 144;
}
.step-blurb {
  margin: 0;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.55;
  max-width: 56ch;
}

.step-body { display: flex; flex-direction: column; gap: 22px; }

/* ── Rows & fields ───────────────────────────────────────────────── */

.row-2   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.row-3   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.row-4   { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.row-5   { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.row-2-3 { display: grid; grid-template-columns: 2fr 1fr;        gap: 16px; }
@media (max-width: 720px) {
  .row-2, .row-3, .row-4, .row-5, .row-2-3 { grid-template-columns: 1fr; }
}

.field {
  display: flex; flex-direction: column; gap: 6px;
  margin: 0;
}
.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.field-hint {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
  line-height: 1.4;
}

.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="number"], .field input[type="date"], .field input[type="time"],
.field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(177, 70, 45, 0.16);
}
.field input[type="file"] {
  padding: 6px 0;
  border: none;
  font-size: 13px;
  font-family: inherit;
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin-top: 4px;
}
.field textarea { resize: vertical; min-height: 60px; font-family: var(--font-body); }

/* Radios as pill cards */

.radios {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px;
}
.radios.wrap { flex-wrap: wrap; }
.radios.tight { gap: 6px; }

.radio-card {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-soft);
  transition: all 0.12s ease;
  font-weight: 500;
}
.radio-card:hover { border-color: var(--ink-soft); color: var(--ink); }
.radio-card.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.radio-card input { display: none; }
.radio-card .capitalize { text-transform: capitalize; }

.radio-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px;
  margin: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  letter-spacing: 0.02em;
}
.radio-pill.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.radio-pill input { display: none; }

/* Chips for multi-select */

.chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 2px;
}
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  margin: 0;
  background: var(--paper-deep);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: all 0.1s ease;
}
.chip:hover { border-color: var(--rule-strong); }
.chip.selected {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: var(--accent);
}
.chip input { display: none; }

/* Yes/No block */

.yesno {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.yesno-label { font-size: 14px; color: var(--ink); flex: 1; line-height: 1.5; }

/* Reveal blocks (conditional sub-sections) */

.reveal {
  position: relative;
  padding: 22px 24px 24px;
  margin: 0;
  background: var(--paper-deep);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column; gap: 18px;
}
.reveal-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.reveal-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}

/* Block titles inside step body */

.block-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

/* File pill */

.file-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  width: fit-content;
}

/* ── Summary (review step) ───────────────────────────────────────── */

.summary {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin-bottom: 28px;
}
.summary-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 13px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 2px;
}
.summary-row dd { margin: 0; color: var(--ink); line-height: 1.5; }
.summary-row .dim { color: var(--ink-faint); }

.agreements {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  display: flex; flex-direction: column; gap: 12px;
}

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.check input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px; height: 16px;
  accent-color: var(--accent);
}
.check .req { color: var(--accent); font-style: normal; font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Errors ──────────────────────────────────────────────────────── */

.errors {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--error-soft);
  border-left: 3px solid var(--error);
  border-radius: var(--r-sm);
  color: var(--error);
  font-size: 13px;
}
.errors strong { display: block; margin-bottom: 6px; font-weight: 600; }
.errors ul { margin: 0; padding-left: 20px; }
.errors li { margin-bottom: 3px; line-height: 1.5; }

/* ── Step nav ────────────────────────────────────────────────────── */

.step-nav {
  display: flex; justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.btn-primary, .btn-ghost {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  box-shadow: 0 1px 2px rgba(177, 70, 45, 0.2), 0 2px 6px -2px rgba(177, 70, 45, 0.4);
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--paper-deep);
  color: var(--ink);
}
.btn-ghost:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.legal-foot {
  margin: 28px 0 0;
  text-align: center;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ── Success screen ──────────────────────────────────────────────── */

.success-shell {
  max-width: 640px; margin: 0 auto;
  padding: 72px 32px;
}
.success {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 56px 40px;
  text-align: center;
}
.success-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  font-size: 28px;
  margin-bottom: 20px;
}
.success h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.success-lede {
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 28px;
}
.success-meta {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 18px 24px;
  margin: 0 0 28px;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
}
.success-meta div {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 13px;
  padding: 4px 0;
}
.success-meta dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.success-meta dd { margin: 0; color: var(--ink); font-weight: 500; }
.success-meta code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--paper-deep);
  padding: 2px 8px;
  border-radius: var(--r-sm);
}
