/* Tomorrow.City USA 2027 — registration flow.
   Palette and type mirror the survey microsite (survey.css), which in turn
   takes them from the main site: this must read as one product. */

:root {
  --paper: #FFFFFF;
  --ink: #0E1113;
  --ink-soft: #3E4644;
  --mint: #0EE2B9;
  --teal: #1CA292;
  --teal-deep: #007A63;
  --teal-dark: #073830;
  --teal-tint: #E7F7F4;
  --line: #DCEAE6;
  --danger: #B4232A;
  --radius: 10px;
  --font-sans: "Montserrat", "Gotham", system-ui, -apple-system, sans-serif;
  --measure: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  padding-top: 56px;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

.mono {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px; z-index: 20;
  padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
}

/* ---------- Bar & progress ---------- */

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar-brand { display: flex; align-items: center; text-decoration: none; }
.bar-logo { display: block; width: auto; height: 34px; }
.bar-title { flex: 1; color: var(--ink-soft); display: none; }
.bar-count { color: var(--teal-deep); white-space: nowrap; margin-left: auto; }

.progress {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 10;
  height: 3px; background: var(--line);
}
.progress-fill {
  height: 100%; width: 0;
  background: var(--teal-deep);
  transition: width 240ms ease;
}

/* ---------- Stage ---------- */

/* ---------- Deadline banner (two-step flow) ---------- */

.deadline {
  background: #FBEDE9;
  color: #7A2E1F;
  border-bottom: 1px solid #F3D3CB;
  font-size: 0.9rem;
}
.deadline-inner {
  max-width: 1040px; margin: 0 auto; padding: 10px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
}
.deadline strong { color: #B4232A; }
.deadline-clock { display: inline-flex; gap: 6px; align-items: baseline; margin: 0 4px; }
.deadline-clock b {
  display: inline-block; min-width: 30px; text-align: center;
  padding: 1px 6px; border-radius: 5px; background: #fff;
  font-weight: 800; font-size: 0.8rem; font-variant-numeric: tabular-nums;
}
.deadline-clock i { font-style: normal; font-size: 0.7rem; margin-right: 2px; opacity: 0.8; }
.deadline-closed { display: none; }
.eb-closed .deadline-open { display: none; }
.eb-closed .deadline-closed { display: inline; }

.stage {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 36px 20px 64px;
  min-height: 60vh;
}

.screen { display: none; }
.screen.is-active { display: block; animation: rise 220ms ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: none; }
  .progress-fill { transition: none; }
}

.q-kicker { color: var(--teal-deep); margin-bottom: 10px; }
.q-title {
  font-size: clamp(1.45rem, 4.5vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  text-wrap: balance;
}
.q-help { color: var(--ink-soft); margin-bottom: 24px; max-width: 56ch; }

/* ---------- Tier cards ---------- */

.tiers { display: grid; gap: 12px; margin-bottom: 24px; }
.tier-card {
  display: block; width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.tier-card:hover { border-color: var(--teal); }
.tier-card[aria-pressed="true"] {
  border-color: var(--teal-deep);
  background: var(--teal-tint);
}
.tier-head { display: flex; align-items: baseline; gap: 12px; }
.tier-name { font-weight: 700; font-size: 1.05rem; flex: 1; }
.tier-price { font-weight: 800; color: var(--teal-dark); white-space: nowrap; }
.tier-price s { color: var(--ink-soft); font-weight: 500; margin-right: 6px; }
.tier-price .eb { font-size: 0.72em; font-weight: 600; color: var(--teal-deep); }
.tier-window { color: var(--teal-deep); }
.tier-blurb { color: var(--ink-soft); font-size: 0.9rem; margin-top: 6px; }
.tier-includes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tier-includes span {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--teal-tint); color: var(--teal-deep); border-radius: 4px; padding: 4px 8px;
}
.tier-card[aria-pressed="true"] .tier-includes span { background: #fff; }

/* ---------- Two-column: passes + order ---------- */

.reg-grid { display: grid; gap: 28px; }
.reg-main { min-width: 0; }
.order {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; background: var(--paper);
  position: sticky; top: 72px;
}
.order-head { color: var(--teal-deep); margin-bottom: 10px; }
.summary-order { margin-bottom: 18px; }
.summary-order .summary-row dt { color: var(--ink); font-weight: 600; }
.summary-order .summary-note dt, .summary-order .summary-note dd { color: var(--ink-soft); font-weight: 500; font-size: 0.85rem; }
.order .field { margin-bottom: 14px; }
.order .nav-row { margin-top: 18px; }
.pay-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.pay-badges span {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; color: var(--ink-soft);
}
.order-note { margin-top: 12px; font-size: 0.82rem; color: var(--ink-soft); }
.order-terms { margin-top: 8px; font-size: 0.75rem; color: var(--ink-soft); }
.order-terms a { color: var(--teal-deep); }

.buying { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.buying-opt {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink-soft); cursor: pointer;
}
.buying-opt:hover { border-color: var(--teal); }
.buying-opt[aria-pressed="true"] { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--mint); }

.team-box {
  background: var(--teal-tint); border-radius: var(--radius); padding: 16px 18px;
  display: grid; gap: 4px; font-size: 0.9rem;
}
.team-box span { color: var(--ink-soft); }
.link-btn {
  justify-self: start; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--teal-deep); font-weight: 700; font-size: 0.88rem; margin-top: 4px;
}
.link-btn:hover { color: var(--ink); }

.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.confirm-card--soft { border-color: var(--line); background: var(--paper); }
.confirm-card + .q-kicker { margin-top: 32px; }

@media (min-width: 900px) {
  .stage { max-width: 1040px; }
  .reg-grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .tiers { margin-bottom: 18px; }
}

/* ---------- Fields ---------- */

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.tier-card:focus-visible, .chip:focus-visible, .btn:focus-visible, .check:focus-visible-within {
  outline: 3px solid var(--mint);
  outline-offset: 1px;
}
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.85rem; margin-top: 5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

details.more {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
}
details.more summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--teal-deep);
}
details.more[open] summary { margin-bottom: 14px; }

/* ---------- Chips (multi-select) ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 100ms ease, background 100ms ease;
}
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--paper);
}
.chip-count { color: var(--ink-soft); font-size: 0.82rem; margin-top: 8px; }

.intent-group { margin-bottom: 26px; }
.intent-group > .mono { color: var(--teal-deep); display: block; margin-bottom: 10px; }
.intent-q { font-weight: 700; font-size: 1.02rem; margin-bottom: 10px; }
.intent-q .hint { font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Checks & toggles ---------- */

.check {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.check:last-child { border-bottom: none; }
.check input {
  width: 20px; height: 20px; margin-top: 2px;
  accent-color: var(--teal-deep);
  flex-shrink: 0;
}
.check span { font-size: 0.92rem; }
.check .hint { display: block; color: var(--ink-soft); font-size: 0.84rem; }

/* ---------- Consents ---------- */

.consent-head {
  color: var(--teal-deep);
  margin: 26px 0 2px;
}
.consent-head:first-child { margin-top: 0; }
.consent-explain {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 8px 0 4px;
  max-width: 58ch;
}
.check-sub { padding-left: 32px; }
.check input:disabled { opacity: 0.4; }
.check input:disabled ~ span { opacity: 0.5; }

/* ---------- Summary ---------- */

.summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 18px;
  margin-bottom: 22px;
}
.summary-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row dt { color: var(--ink-soft); }
.summary-row dd { margin: 0; text-align: right; font-weight: 600; }
.summary-total { background: var(--teal-tint); margin: 0 -18px; padding: 12px 18px; border-radius: 0 0 var(--radius) var(--radius); }
.summary-total dd { font-weight: 800; color: var(--teal-dark); }

/* ---------- Buttons ---------- */

.nav-row { display: flex; gap: 12px; margin-top: 28px; align-items: center; }
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--teal-dark); color: var(--paper); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-primary[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-ghost { background: none; border-color: var(--line); color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--teal); color: var(--ink); }
.btn-block { width: 100%; }

.form-error {
  color: var(--danger);
  background: #FBEBEC;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.5;
}
/* When surfaced at the top of a step it leads the content, not trails it. */
.screen > .form-error:first-child { margin: 0 0 20px; }

.returning {
  color: var(--teal-dark);
  background: var(--teal-tint);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: -8px 0 20px;
  font-size: 0.92rem;
}

.form-nudge {
  color: var(--teal-dark);
  background: var(--teal-tint);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 0.92rem;
}

/* ---------- Confirmation ---------- */

.confirm-card {
  border: 2px solid var(--teal-deep);
  border-radius: var(--radius);
  background: var(--teal-tint);
  padding: 26px 24px;
  margin-bottom: 22px;
}
.confirm-card h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.confirm-card p { color: var(--ink-soft); }

/* ---------- Footer ---------- */

.foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 24px 20px 48px;
  border-top: 1px solid var(--line);
}
.foot .mono { color: var(--teal-deep); margin-bottom: 8px; }
.foot-note { color: var(--ink-soft); font-size: 0.82rem; max-width: 62ch; }

@media (min-width: 720px) {
  .bar-title { display: block; }
}

/* ---------- The Room: inclusions ---------- */
.tier-room { display: block; margin-top: 8px; font-size: 0.75rem; font-weight: 700; color: var(--teal-deep); }
.summary-row dd.included { color: var(--teal-deep); font-weight: 700; }
.unlock-card {
  margin-top: 14px; background: var(--teal-dark); color: var(--paper);
  border-radius: var(--radius); padding: 14px 16px;
}
.unlock-card .mono { color: var(--mint); margin-bottom: 8px; }
.unlock-card ul { display: flex; flex-wrap: wrap; gap: 6px; }
.unlock-card li {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12); border-radius: 4px; padding: 4px 8px;
}
.unlock-card p:last-child { margin-top: 10px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.75); }

@media (max-width: 420px) { .bar { gap: 10px; padding: 0 14px; } .bar-count { font-size: 0.6875rem; } }
