/* ==========================================================================
   SCULPTED TO BE DESIRED — Unified design system
   Single source of truth for typography, colors, buttons, inputs, layout.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ---------- COLORS ---------- */
  --bg:           #000000;
  --bg-elev:      #0a0a0a;
  --fg:           #ffffff;
  --muted:        #888888;
  --muted-2:      #555555;
  --line:         #222222;
  --line-soft:    #161616;
  --accent:       #22c55e;
  --accent-soft:  #0a1f12;
  --accent-glow:  rgba(34, 197, 94, 0.28);
  --danger:       #ff5555;

  /* ---------- TYPE SCALE ---------- */
  /* One canonical heading size used on every page (landing / offers / form). */
  --fs-h1:        clamp(28px, 4.2vw, 48px);   /* page heading — same everywhere */
  --fs-card:      clamp(18px, 1.8vw, 26px);   /* card title */
  --fs-body:      16px;
  --fs-input:     18px;
  --fs-small:     13px;
  --fs-eyebrow:   11px;
  --fs-btn:       14px;

  /* ---------- TRACKING ---------- */
  --tr-display:   -0.02em;
  --tr-h:         -0.01em;
  --tr-eyebrow:   0.18em;
  --tr-btn:       0.16em;

  /* ---------- SPACING ---------- */
  --pad-page-x:   20px;
  --pad-page-x-d: 32px;
  --gap:          18px;

  /* ---------- MOTION ---------- */
  --ease:         cubic-bezier(.2,.7,.2,1);
}

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  /* Reserve scrollbar space on BOTH sides so document is symmetric and
     viewport center always equals content center. Without this, a vertical
     scrollbar shifts content ~8–15px left of fixed-position elements. */
  scrollbar-gutter: stable both-edges;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
input, textarea, select, button { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ==========================================================================
   PAGE HEADER — unified top bar containing back + brand + spacer
   Three-column grid keeps the brand mathematically centered to the viewport
   regardless of the back arrow's width or whether a scrollbar is present.
   ========================================================================== */
.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 20px;
  z-index: 50;
  /* Solid black backing so content scrolling underneath doesn't bleed
     through. A subtle gradient softens the bottom edge. */
  background: var(--bg);
  background-image: linear-gradient(to bottom, var(--bg) 80%, rgba(0,0,0,0.85) 100%);
  border-bottom: 1px solid var(--line-soft);
}
.page-header .brand {
  position: static;
  transform: none;
  justify-self: center;
}
.page-header .back-link {
  position: static;
  top: auto;
  left: auto;
  justify-self: start;
}
.page-header .header-spacer {
  /* invisible counterweight — keeps brand optically centered */
  justify-self: end;
  width: 1px;
  height: 1px;
  opacity: 0;
}
@media (min-width: 720px) {
  .page-header { padding: 22px 28px; }
}

/* ==========================================================================
   BACK LINK — top-left on pages that have a previous step
   ========================================================================== */
.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 8px;
  z-index: 50;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: color 0.2s var(--ease), transform 0.25s var(--ease);
}
.back-link:hover { color: var(--fg); transform: translateX(-2px); }
.back-link svg { width: 14px; height: 14px; }
@media (min-width: 720px) {
  .back-link { top: 24px; left: 28px; }
}

/* ==========================================================================
   LOGO (top-center on every page)
   ========================================================================== */
.brand {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  z-index: 50;
  user-select: none;
  white-space: nowrap;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--accent { color: var(--accent); }

/* Canonical page heading — used on every page, same size everywhere.
   Always centered, with a sane reading width so it doesn't stretch
   edge-to-edge on huge viewports. */
.h1, .display {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--tr-h);
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  margin-left: auto;
  margin-right: auto;
  max-width: 22ch;
}
.body  { font-size: var(--fs-body); line-height: 1.5; }
.small { font-size: var(--fs-small); color: var(--muted); line-height: 1.45; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 18px 24px;
  font-weight: 700;
  font-size: var(--fs-btn);
  letter-spacing: var(--tr-btn);
  text-transform: uppercase;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.2s var(--ease),
              color 0.2s var(--ease),
              border-color 0.2s var(--ease),
              box-shadow 0.3s var(--ease),
              transform 0.25s var(--ease);
}
.btn:disabled { cursor: not-allowed; opacity: 0.4; }

.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--primary:hover:not(:disabled) {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 60px -10px var(--accent-glow);
}
.btn--primary:disabled {
  background: var(--accent-soft);
  color: #1a4d2c;
  border-color: var(--accent-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--fg);
}
.btn--ghost:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 60px -10px var(--accent-glow);
}

.btn--big {
  padding: 26px 24px;
  font-size: 15px;
  letter-spacing: 0.28em;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card--accent { border-top: 2px solid var(--accent); }
@media (min-width: 720px) {
  .card { padding: 40px; }
}

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */
.field {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-size: var(--fs-input);
  padding: 14px 0;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease);
}
.field::placeholder { color: var(--muted-2); }
.field:focus { border-bottom-color: var(--accent); }
textarea.field { resize: none; min-height: 120px; line-height: 1.4; }

select.field {
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 8px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
select.field option { background: var(--bg); color: var(--fg); }

/* Option-cards (pickable list) */
.opt {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.opt:hover { border-color: var(--muted); }
.opt.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ==========================================================================
   LAYOUT HELPERS
   ========================================================================== */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px var(--pad-page-x) 56px;
}
@media (min-width: 720px) {
  .page { padding: 120px var(--pad-page-x-d) 72px; }
}

.stack > * + * { margin-top: var(--gap); }

/* ==========================================================================
   ANIMATIONS — subtle fade-up reveal
   ========================================================================== */
.fade-in { animation: fadeUp 0.7s var(--ease) both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.30s; }
.d4 { animation-delay: 0.42s; }
.d5 { animation-delay: 0.54s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ERROR
   ========================================================================== */
.err {
  margin-top: 16px;
  color: var(--danger);
  font-size: var(--fs-small);
  display: none;
}
.err.visible { display: block; }
