/* ============================================================
   uxpo.co/buy: first-time buyer questionnaire
   Follows docs/house-rules.md: fixed-height stage, one easing token,
   420ms asymmetric push, 160ms hold before auto-advance, one bottom
   rail, 440px decision column, the small-caps ladder.
   Chrome family: the UE showroom pages (black, Archivo / Inter /
   Barlow Condensed, white primary button, gold selection accent).
   ============================================================ */

:root {
  --ease: cubic-bezier(.32,.72,0,1);
  --tick: cubic-bezier(.34,1.56,.64,1);
  --accent: 201,162,75;              /* gold, rgb triplet */
  --ink: #fff;
  --dim: rgba(255,255,255,.62);
  --faint: rgba(255,255,255,.42);
  --line: rgba(255,255,255,.08);
  --surface: rgba(255,255,255,.035);
  --col: 440px;
  --wide: 680px;
  --pad: 26px;
  --font-display: 'Archivo', Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Barlow Condensed', Inter, sans-serif;
}

html { background: #000; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body {
  margin: 0; background: #000; color: var(--ink);
  font: 15px/1.55 var(--font-body);
  overflow: hidden; overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
body.thanks { overflow: auto; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

/* ---------- stage ---------- */
.stage { position: relative; height: 100dvh; overflow: hidden; }
.stage::before {                     /* legibility vignette */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(80% 74% at 50% 46%, rgba(255,255,255,.035), transparent 76%);
}
.grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
}
.screen {
  position: absolute; inset: 0; z-index: 1;
  padding: 54px 0 46px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.screen[hidden] { display: none; }
.screen.scroll { justify-content: flex-start; overflow-y: auto; scrollbar-width: none; }
.screen.scroll::-webkit-scrollbar { display: none; }
@media (max-width: 480px) { .screen { padding: 40px 0 38px; } }

.screen.in  { z-index: 2; animation: pushIn .42s var(--ease) both; }
.screen.out { z-index: 1; animation: pushOut .42s var(--ease) both; pointer-events: none; }
@keyframes pushIn  { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes pushOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-30px); } }

/* ---------- top mark (no nav, no link) ---------- */
.mark {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5; pointer-events: none;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--pad) 0; max-width: 880px; margin: 0 auto;
}
.mark img { height: 22px; width: auto; opacity: .92; }
.mark .free { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

/* ---------- measure ---------- */
.col { width: 100%; max-width: var(--col); padding: 0 var(--pad); margin: 0 auto; }
.col.wide { max-width: var(--wide); }

/* ---------- type ---------- */
.eyebrow { font-size: 13px; letter-spacing: .08em; color: var(--dim); margin: 0 0 14px; }
.q, .headline {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px,5.6vw,60px); line-height: 1.06; letter-spacing: -.03em;
  margin: 0; color: var(--ink);
}
.headline { font-size: clamp(30px,4.6vw,52px); }
.sub {
  font-size: clamp(15px,2.1vw,18px); line-height: 1.55; color: var(--dim);
  max-width: 520px; margin: 22px 0 30px;
}
.q + .sub { margin-top: 14px; }
.body { font-size: 15px; line-height: 1.55; color: var(--dim); }
.caption { font-size: 13px; line-height: 1.55; color: var(--faint); }
@media (max-width: 480px) {
  .q { font-size: clamp(26px,7vw,34px); letter-spacing: -.02em; }
  .headline { font-size: clamp(26px,7vw,34px); letter-spacing: -.02em; }
}

/* ---------- intro screen ---------- */
.intro .col { padding-top: 34px; padding-bottom: 30px; }
.quals { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 0; }
.quals li {
  padding: 11px 0; border-top: 1px solid rgba(255,255,255,.14);
  font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 12px;
}
.quals li:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.quals li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--accent)); flex: 0 0 auto; }
.trustline { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
footer.buy { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
footer.buy p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.6; color: var(--faint); }
footer.buy .links { font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; }
footer.buy .links a { color: var(--dim); text-decoration: none; margin-right: 16px; }

/* ---------- primary button (the one solid fill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 14px 26px; border: 0; border-radius: 980px;
  background: #fff; color: #000; font-weight: 600; font-size: 15.5px; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, opacity .15s ease;
}
.btn:hover { background: #f1f1f1; }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(var(--accent),.22); }
.btn[disabled] { cursor: default; background: rgba(255,255,255,.55); }
.btn.quiet { background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,.22); }
.btn.quiet:hover { background: rgba(255,255,255,.05); }

/* ---------- tiles ---------- */
.tiles { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tile {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; text-align: left; padding: 16px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.3;
  transition: border-color .15s ease, background-color .15s ease, transform .12s ease;
}
.tile .t { flex: 1 1 auto; }
.tile small { display: block; font-weight: 400; font-size: 13px; color: var(--dim); margin-top: 3px; }
.tile:hover { border-color: rgba(var(--accent),.5); }
.tile:active { transform: scale(.98); }
.tile:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(var(--accent),.10); border-color: rgba(var(--accent),.6); }
.tile::after {                        /* the 22px disc, drawn, never a native control */
  content: ""; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.tile.on { border-color: rgba(var(--accent),.55); background: rgba(var(--accent),.10); }
.tile.on::after {
  background: rgb(var(--accent)); border-color: rgb(var(--accent));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16.5 7.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  animation: tick .55s var(--tick) both;
}
@keyframes tick { from { transform: scale(.6); } to { transform: scale(1); } }

/* staggered arrival, max three; four or more get one group reveal */
.reveal { animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- fields ---------- */
.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.field input, .field textarea {
  width: 100%; padding: 15px 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05);
  color: var(--ink); font: inherit; font-size: 17px; min-width: 0; -webkit-appearance: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.35); }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(var(--accent),.6); box-shadow: 0 0 0 4px rgba(var(--accent),.10); }
.field input.pc { font-family: var(--font-num); font-size: 24px; letter-spacing: .06em; text-transform: uppercase; }
.field.bad input { border-color: rgba(224,138,135,.7); }
.err { min-height: 1.4em; font-size: 13px; color: #e08a87; margin: -6px 0 10px; }
.more { margin-top: 14px; }
.more[hidden] { display: none; }

/* consent tick: same three-part selection language as tiles */
.consent {
  display: flex; align-items: flex-start; gap: 14px; text-align: left;
  width: 100%; padding: 14px 16px; border-radius: 14px; margin: 4px 0 14px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  font-size: 14px; line-height: 1.45; color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease;
}
.consent::before {
  content: ""; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  border: 1px solid rgba(255,255,255,.25); transition: background-color .15s ease, border-color .15s ease;
}
.consent:hover { border-color: rgba(var(--accent),.5); }
.consent:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(var(--accent),.10); border-color: rgba(var(--accent),.6); }
.consent.on { border-color: rgba(var(--accent),.55); background: rgba(var(--accent),.10); }
.consent.on::before {
  background: rgb(var(--accent)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16.5 7.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  border-color: rgb(var(--accent)); animation: tick .55s var(--tick) both;
}
.consent small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.legal { font-size: 12.5px; line-height: 1.55; color: var(--faint); margin: 0 0 18px; }
.legal a { color: var(--dim); }

/* back: a 13.5px underlined text link, never a button */
.back {
  display: inline-block; margin-top: 22px; background: none; border: 0; padding: 0;
  font-size: 13.5px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.back:hover { color: var(--ink); }

/* honeypot: off-screen, never display:none */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---------- progress rail ---------- */
.rail {
  position: fixed; left: 0; right: 0; bottom: 18px; z-index: 6; pointer-events: none;
  display: flex; justify-content: center; gap: 6px;
}
.rail span { width: 18px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); transition: .3s var(--ease); }
.rail span.done { background: rgba(255,255,255,.4); }
.rail span.now { width: 26px; background: rgb(var(--accent)); }
.rail[hidden] { display: none; }
@media (max-width: 859px) { .rail { display: none; } }

/* ---------- sending state ---------- */
.spin {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); border-top-color: #000;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- thanks page ---------- */
body.thanks .wrap { min-height: 100dvh; display: flex; flex-direction: column; }
.stepbar { position: relative; z-index: 5; max-width: 880px; margin: 0 auto; width: 100%; padding: 56px var(--pad) 0; }
.stepbar .segs { display: flex; gap: 6px; }
.stepbar .segs span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.4); }
.stepbar .segs span.now { background: rgb(var(--accent)); }
.stepbar .lbl { margin-top: 10px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.thanks-main { flex: 1; padding: 34px 0 40px; }
.num { font-family: var(--font-num); font-weight: 600; font-size: 1.15em; letter-spacing: .04em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pull { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.pull .tiles { margin-top: 14px; }
.pull .done { margin-top: 12px; font-size: 14px; color: #a9d8b0; min-height: 1.5em; }
.proof { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.proof figure { margin: 14px 0 0; }
.proof .shot {
  display: block; border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.1);
}
.proof .shot img { width: 100%; height: auto; }
.proof figcaption { margin-top: 12px; }
.proof .src { display: inline-block; margin-top: 6px; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .screen.in, .screen.out, .reveal, .tile.on::after, .consent.on::before, .spin { animation: none !important; }
  .rail span, .tile, .btn, .consent { transition: none !important; }
}
