/* ============================================================
   BBR Pre-Call Quiz - premium dark, mobile-first
   Palette: #0D0D0D bg / #C9A84C gold / warm off-white text
   ============================================================ */

:root {
  --bg: #0d0d0d;
  --surface: #161513;
  --surface-2: #1e1c19;
  --surface-hi: #262320;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f1ea;
  --muted: #a49d92;
  --muted-2: #78716a;
  --gold: #c9a84c;
  --gold-hi: #e3c66d;
  --gold-soft: rgba(201, 168, 76, 0.13);
  --gold-line: rgba(201, 168, 76, 0.45);
  --danger: #e0684f;
  --ok: #6fbf8f;
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 600px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --accent: 'Caveat', 'Inter', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.bg-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(201, 168, 76, 0.10), transparent 60%),
    radial-gradient(800px 500px at 100% 110%, rgba(201, 168, 76, 0.05), transparent 55%);
}

/* ---------- top bar + progress ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  padding: 14px 20px calc(14px + env(safe-area-inset-top, 0)) 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0));
  background: linear-gradient(180deg, rgba(13, 13, 13, 0.96), rgba(13, 13, 13, 0.72));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-weight: 800; font-size: 13px; letter-spacing: 0.28em;
  color: var(--text); text-align: center; opacity: 0.92;
}
.progress-wrap { margin-top: 12px; }
.progress {
  height: 5px; border-radius: 99px; background: var(--surface-2);
  overflow: hidden; border: 1px solid var(--line);
}
.progress__bar {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transition: width 0.5s var(--ease);
}
.progress__meta {
  margin-top: 8px; display: flex; justify-content: space-between;
  font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted-2);
  text-transform: uppercase; font-weight: 600;
}

/* ---------- app frame ---------- */
.app {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px 20px calc(40px + env(safe-area-inset-bottom, 0));
}

.screen { animation: rise 0.45s var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- intro ---------- */
.intro { text-align: center; padding-top: 18px; }
.intro__mark {
  font-family: var(--accent); font-size: 30px; color: var(--gold);
  line-height: 1; margin-bottom: 20px;
}
.intro__title {
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.12; margin-bottom: 14px;
}
.intro__title span { color: var(--gold); }
.intro__sub {
  color: var(--muted); font-size: 16px; max-width: 42ch;
  margin: 0 auto 8px; line-height: 1.55;
}
.intro__note {
  color: var(--muted-2); font-size: 14px; font-style: italic;
  max-width: 40ch; margin: 18px auto 30px;
}
.intro__fields { text-align: left; margin: 0 auto; max-width: 420px; }
.intro__privacy {
  text-align: center; color: var(--muted-2); font-size: 12.5px;
  margin-top: 16px; line-height: 1.5;
}

/* ---------- form fields ---------- */
.field { margin-bottom: 16px; }
.field__label {
  display: block; font-size: 13px; font-weight: 600; color: var(--muted);
  margin-bottom: 8px; letter-spacing: 0.02em;
}
.input, .textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 15px 16px; font-family: var(--font); font-size: 16px;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.input:focus, .textarea:focus {
  outline: none; border-color: var(--gold-line); background: var(--surface-2);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
/* The step figure they pull off their own app. Sized like an answer, not a form field. */
.input--number {
  font-size: 30px; font-weight: 700; letter-spacing: 0.01em;
  padding: 18px 16px; text-align: center;
}
.input--number:disabled { opacity: 0.4; }
.field__error { color: var(--danger); font-size: 13px; margin-top: 7px; display: none; }
.field--invalid .field__error { display: block; }
.field--invalid .input { border-color: var(--danger); }

/* ---------- question ---------- */
.q-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.q-label {
  font-size: 23px; font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.28; margin-bottom: 10px;
}
.q-help {
  color: var(--muted); font-size: 15px; margin-bottom: 22px; line-height: 1.5;
}

/* option cards (single + multi) */
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 17px 18px; font-family: var(--font); font-size: 16px; line-height: 1.35;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.1s var(--ease);
}
.option:hover { border-color: var(--gold-line); background: var(--surface-2); }
.option:active { transform: scale(0.99); }
.option__mark {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid var(--line-strong); display: grid; place-items: center;
  transition: all 0.18s var(--ease);
}
.option[data-shape="radio"] .option__mark { border-radius: 50%; }
.option__mark svg { width: 13px; height: 13px; opacity: 0; transform: scale(0.5); transition: all 0.18s var(--ease); }
.option__text { flex: 1; }
.option--selected {
  border-color: var(--gold); background: var(--gold-soft);
}
.option--selected .option__mark {
  border-color: var(--gold); background: var(--gold); color: #1a1206;
}
.option--selected .option__mark svg { opacity: 1; transform: scale(1); }
.option__rank {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line-strong); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--muted-2);
}
.option--selected .option__rank {
  border-color: var(--gold); background: var(--gold); color: #1a1206;
}
.option__specify { margin-top: 2px; }

/* scale 1-10 */
.scale { margin-top: 6px; }
.scale__track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.scale__btn {
  aspect-ratio: 1 / 1; border-radius: 14px; cursor: pointer;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); font-family: var(--font);
  font-size: 18px; font-weight: 700;
  transition: all 0.16s var(--ease);
}
.scale__btn:hover { border-color: var(--gold-line); background: var(--surface-2); }
.scale__btn--selected { border-color: var(--gold); background: var(--gold); color: #1a1206; transform: translateY(-2px); }
.scale__ends { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--muted-2); }

/* ---------- nav ---------- */
.nav { display: flex; gap: 12px; margin-top: 26px; align-items: center; }
.btn {
  cursor: pointer; font-family: var(--font); font-weight: 700; font-size: 16px;
  border-radius: 99px; padding: 15px 26px; border: 1px solid transparent;
  transition: all 0.18s var(--ease); letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--primary { background: var(--gold); color: #1a1206; flex: 1; }
.btn--primary:not(:disabled):hover { background: var(--gold-hi); transform: translateY(-1px); }
.btn--block { width: 100%; flex: none; }
.btn--ghost { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.btn--ghost:hover { color: var(--text); border-color: var(--gold-line); }
.btn--back {
  background: transparent; color: var(--muted); border: none; padding: 15px 10px;
  font-size: 15px; font-weight: 600;
}
.btn--back:hover { color: var(--text); }

/* ---------- results ---------- */
.result { text-align: left; }
.result__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 12px; text-align: center;
}
.result__badge {
  text-align: center; padding: 6px 0 4px; margin-bottom: 8px;
}
.result__label {
  font-size: 34px; font-weight: 800; letter-spacing: -0.02em; color: var(--gold);
  line-height: 1.1; text-align: center;
}
.result__tagline {
  text-align: center; color: var(--text); font-size: 18px; font-weight: 500;
  max-width: 34ch; margin: 12px auto 4px; line-height: 1.4;
}
.result__also {
  text-align: center; color: var(--muted-2); font-size: 13.5px; margin: 14px auto 0;
}
.result__also b { color: var(--muted); font-weight: 600; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-top: 16px;
}
.card__h {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.card p { color: var(--text); font-size: 16px; line-height: 1.62; }
.card p + p { margin-top: 12px; }
.reasons { list-style: none; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.reasons li {
  position: relative; padding-left: 24px; color: var(--text); font-size: 15.5px; line-height: 1.55;
}
.reasons li::before {
  content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--gold);
}

.phases { display: flex; gap: 8px; margin-top: 18px; }
.phase {
  flex: 1; text-align: center; padding: 12px 6px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.phase__n { font-size: 11px; color: var(--gold); font-weight: 700; letter-spacing: 0.08em; }
.phase__t { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* videos */
.videos { margin-top: 26px; }
.videos__h {
  font-size: 20px; font-weight: 800; letter-spacing: -0.01em; text-align: center; margin-bottom: 6px;
}
.videos__sub { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.video-card {
  display: flex; align-items: center; gap: 16px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px;
  transition: all 0.18s var(--ease); color: var(--text);
}
a.video-card:hover { border-color: var(--gold); background: var(--surface-2); transform: translateY(-1px); }
.video-card__play {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  display: grid; place-items: center; color: var(--gold);
}
.video-card--soon .video-card__play { background: var(--surface-2); border-color: var(--line-strong); color: var(--muted-2); }
.video-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.video-card__title { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; }
.video-card__blurb { display: block; font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.video-card__tag {
  display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2);
}
.video-card--soon .video-card__tag { color: var(--gold); }

.closer { text-align: center; margin-top: 30px; padding: 0 6px; }
.closer p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin-bottom: 18px; }
.closer .btn--primary { display: inline-block; text-decoration: none; }

.mini-note {
  text-align: center; color: var(--muted-2); font-size: 12.5px; margin-top: 24px; line-height: 1.5;
}
.mini-note a { color: var(--gold); cursor: pointer; text-decoration: underline; }

/* spinner */
.loading { text-align: center; padding: 60px 0; }
.spinner {
  width: 38px; height: 38px; margin: 0 auto 18px; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- working sequence (the read being built) ---------- */
.working { padding: 46px 0 20px; }
.working__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-2); text-align: center; margin-bottom: 18px;
}
.working__bar {
  height: 3px; border-radius: 3px; background: var(--surface-2);
  border: 1px solid var(--line); overflow: hidden; margin-bottom: 26px;
}
.working__fill {
  /* scaleX, not width: transform animates on the compositor, no layout pass */
  height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi));
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.5s var(--ease); will-change: transform;
}
.working__steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.working__step {
  display: flex; align-items: center; gap: 12px; color: var(--muted-2);
  font-size: 15.5px; line-height: 1.4; opacity: 0.5;
  transition: opacity 0.35s var(--ease), color 0.35s var(--ease);
}
.working__mark {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: transparent;
}
.working__mark svg { width: 12px; height: 12px; }
.working__step--active { opacity: 1; color: var(--text); }
.working__step--active .working__mark { border-color: var(--gold-line); background: var(--gold-soft); }
.working__step--done { opacity: 1; color: var(--muted); }
.working__step--done .working__mark {
  border-color: var(--gold-line); background: var(--gold-soft); color: var(--gold);
}

/* ---------- their own numbers ---------- */
.card__sub { color: var(--muted); font-size: 14px; margin-top: -4px; margin-bottom: 14px; }
.card__note { color: var(--muted); font-size: 14px; margin-top: 14px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px;
}
.tile__v { font-size: 19px; font-weight: 800; color: var(--gold); line-height: 1.2; letter-spacing: -0.01em; }
.tile__l { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 6px; }
.tile__n { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }

/* ---------- case studies ---------- */
.cases { margin-top: 26px; }
.cases__h { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; text-align: center; margin-bottom: 6px; }
.cases__sub { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.case-card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 18px; margin-bottom: 12px;
  transition: all 0.18s var(--ease);
}
a.case-card:hover { border-color: var(--gold); background: var(--surface-2); transform: translateY(-1px); }
.case-card__name {
  display: block; font-family: var(--accent); font-size: 22px; color: var(--gold); line-height: 1.1;
}
.case-card__hook { display: block; font-size: 15px; line-height: 1.5; margin-top: 6px; }
.case-card__tag {
  display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2);
}
a.case-card:hover .case-card__tag { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .working__fill, .working__step, .case-card, .video-card { transition: none; }
  .spinner { animation: none; }
}

@media (min-width: 620px) {
  .intro__title { font-size: 36px; }
  .q-label { font-size: 25px; }
}
