:root {
  --black: #000000;
  --bg: #050505;
  --panel: #0c0c0d;
  --line: #1c1c1e;
  --line-2: #2a2a2c;
  --ink: #f3f4f4;
  --ink-2: #b9bbbb;
  --ink-3: #7c7e7e;
  --ink-4: #5a5c5c;
  --silver-1: #504d4d;
  --silver-2: #959999;
  --silver-3: #e5e6e6;
  --silver-4: #838080;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Montserrat', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--black); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
#root { min-height: 100%; }

.metal {
  background: linear-gradient(100deg, #504d4d 0%, #959999 24%, #e5e6e6 50%, #838080 78%, #4a4848 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.app { position: relative; min-height: 100vh; min-height: 100dvh; isolation: isolate; }

/* subtle film grain + radial vignette over the black */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(149,153,153,0.10), transparent 55%),
    radial-gradient(90% 70% at 50% 120%, rgba(80,77,77,0.10), transparent 55%);
}
.grain::after {
  content: ''; position: absolute; inset: 0; opacity: 0.035; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.screen { position: relative; z-index: 1; }

/* ---------- shared type ---------- */
.eyebrow { font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.display { font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; }
.lede { color: var(--ink-2); line-height: 1.6; font-weight: 400; }

/* ---------- buttons ---------- */
.btn {
  font-family: inherit; font-weight: 600; font-size: 15px; letter-spacing: 0.01em;
  border: none; cursor: pointer; border-radius: 999px; padding: 16px 30px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), filter 0.3s;
}
.btn-primary {
  color: #0b0b0b;
  background: linear-gradient(100deg, #6c6a6a 0%, #b8bbbb 28%, #f1f2f2 52%, #9a9898 80%, #6c6a6a 100%);
  background-size: 200% 100%; background-position: 0% 0;
  box-shadow: 0 10px 30px rgba(229,230,230,0.14), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-primary:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 16px 44px rgba(229,230,230,0.22), inset 0 1px 0 rgba(255,255,255,0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn-block { width: 100%; }

/* ===================================================================== */
/* INTRO                                                                  */
/* ===================================================================== */
.intro {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 48px 24px; gap: 22px; max-width: 820px; margin: 0 auto;
}
.intro-mark { margin-bottom: 6px; }
.intro .display { font-size: clamp(36px, 6vw, 62px); }
.intro .lede { max-width: 580px; font-size: clamp(15px, 2vw, 17px); text-wrap: pretty; }
.intro .btn-primary { margin-top: 10px; }
.meta-line { display: flex; align-items: center; gap: 14px; color: var(--ink-4); font-size: 12.5px; letter-spacing: 0.04em; flex-wrap: wrap; justify-content: center; }
.meta-line i { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); display: inline-block; }

/* reveal animations */
@keyframes pop { 0% { opacity: 0; transform: scale(0.82) translateY(8px); filter: blur(6px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes up { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: none; } }
.reveal-pop { animation: pop 1s var(--ease) both; }
.reveal-up { animation: up 0.85s var(--ease) both; }
.d1 { animation-delay: 0.15s; } .d2 { animation-delay: 0.32s; } .d3 { animation-delay: 0.5s; }
.d4 { animation-delay: 0.68s; } .d5 { animation-delay: 0.84s; }

/* ===================================================================== */
/* QUIZ                                                                   */
/* ===================================================================== */
.quiz { display: grid; grid-template-columns: 360px 1fr; min-height: 100vh; min-height: 100dvh; }
.rail {
  background: linear-gradient(180deg, #0a0a0b, #060606); border-right: 1px solid var(--line);
  padding: 40px 38px; display: flex; flex-direction: column; gap: 36px;
}
.rail-top { opacity: 0.92; }
.rail-gauge { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 8px; }
.rail-caption { font-size: 12.5px; color: var(--ink-4); line-height: 1.55; text-align: center; max-width: 250px; }
.rail-progress { margin-top: auto; border-top: 1px solid var(--line); padding-top: 22px; }
.rail-count { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 8px; }
.rail-count em { font-style: normal; font-size: 15px; color: var(--ink-4); font-weight: 500; }
.rail-area { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; font-weight: 600; }

.stage { position: relative; display: flex; flex-direction: column; }
.bar { height: 3px; background: var(--line); }
.bar-fill { height: 100%; background: linear-gradient(90deg, #504d4d, #e5e6e6); transition: width 0.6s var(--ease); box-shadow: 0 0 12px rgba(229,230,230,0.4); }

.q-wrap {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  max-width: 680px; width: 100%; margin: 0 auto; padding: 56px 56px 64px;
  animation: qin 0.55s var(--ease) both;
}
@keyframes qin { 0% { opacity: 0; transform: translateX(24px); } 100% { opacity: 1; transform: none; } }
.q-index { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 18px; }
.q-index span { color: var(--ink-4); }
.q-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.16; text-wrap: pretty; }
.q-help { color: var(--ink-3); font-size: 14.5px; margin-top: 14px; line-height: 1.5; }

.options { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.opt {
  display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: var(--r); padding: 18px 20px; font-family: inherit; font-size: 15.5px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
  animation: optin 0.5s var(--ease) both;
}
@keyframes optin { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: none; } }
.opt:hover { border-color: var(--silver-2); background: #111112; transform: translateX(4px); }
.opt-key {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: #161617; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  transition: all 0.3s;
}
.opt-label { flex: 1; line-height: 1.35; }
.opt-check { flex-shrink: 0; color: #0b0b0b; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: scale(0.6); transition: all 0.3s var(--ease); background: linear-gradient(120deg, #b8bbbb, #f1f2f2, #9a9898); }
.opt-sel { border-color: var(--silver-3); background: #131314; transform: translateX(4px); }
.opt-sel .opt-key { background: linear-gradient(120deg, #6c6a6a, #e5e6e6); color: #0b0b0b; border-color: transparent; }
.opt-sel .opt-check { opacity: 1; transform: scale(1); }
.opt-dim { opacity: 0.4; }

.q-foot { margin-top: 30px; min-height: 20px; }
.link-back { background: none; border: none; color: var(--ink-3); font-family: inherit; font-size: 14px; cursor: pointer; padding: 4px 0; transition: color 0.3s; }
.link-back:hover { color: var(--ink); }
.q-foot-note { color: var(--ink-4); font-size: 13px; }

/* ===================================================================== */
/* CAPTURE                                                                */
/* ===================================================================== */
.capture { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 48px 24px; }
.capture-inner { width: 100%; max-width: 520px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0; }
.capture-gauge { margin-bottom: 18px; }
.capture-inner .eyebrow { margin-bottom: 14px; }
.capture-taste { font-size: 19px; color: var(--ink-2); font-weight: 500; }
.capture-taste .metal { font-weight: 700; }
.capture-h { font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: -0.02em; margin-top: 18px; line-height: 1.1; }
.capture-sub { color: var(--ink-3); font-size: 15px; line-height: 1.6; margin-top: 14px; max-width: 430px; text-wrap: pretty; }
.capture-form { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.field {
  width: 100%; font-family: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px;
  transition: border-color 0.3s, background 0.3s;
}
.field::placeholder { color: var(--ink-4); }
.field:focus { outline: none; border-color: var(--silver-3); background: #111112; }
.field-err { border-color: #6e4a4a; }
.field-msg { color: #c98b8b; font-size: 13px; text-align: left; margin-top: -4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.reassure { color: var(--ink-4); font-size: 12.5px; margin-top: 4px; }
.link-skip { background: none; border: none; color: var(--ink-3); font-family: inherit; font-size: 13.5px; cursor: pointer; padding: 8px; transition: color 0.3s; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link-skip:hover { color: var(--ink-2); }

/* ===================================================================== */
/* ANALYZING                                                              */
/* ===================================================================== */
.analyzing { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; padding: 24px; }
.analyze-mark { position: relative; display: grid; place-items: center; width: 120px; height: 120px; }
.spin-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--line); border-top-color: var(--silver-3); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyze-lines { display: flex; flex-direction: column; gap: 16px; }
.analyze-line { display: flex; align-items: center; gap: 12px; color: var(--ink-4); font-size: 15px; opacity: 0.35; transition: opacity 0.5s, color 0.5s; }
.analyze-line.on { opacity: 1; color: var(--ink-2); }
.analyze-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background 0.5s, box-shadow 0.5s; }
.analyze-line.on .analyze-dot { background: var(--silver-3); box-shadow: 0 0 10px rgba(229,230,230,0.6); }

/* ===================================================================== */
/* RESULTS                                                                */
/* ===================================================================== */
.results { min-height: 100vh; min-height: 100dvh; padding: 56px 24px 80px; }
.results-inner { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.sent-note { text-align: center; color: var(--ink-3); font-size: 13.5px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 10px 20px; align-self: center; }
.sent-note strong { color: var(--ink-2); font-weight: 600; }

.result-head { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: center; background: linear-gradient(170deg, #0c0c0d, #070707); border: 1px solid var(--line); border-radius: 22px; padding: 40px; }
.result-headcol .eyebrow { margin-bottom: 14px; }
.result-h { font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; }
.result-summary { color: var(--ink-2); font-size: 15.5px; line-height: 1.62; margin-top: 18px; text-wrap: pretty; }
.result-gauge { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.band-chip { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; background: #0b0b0c; }

.rx { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 36px 40px 40px; }
.rx-head { margin-bottom: 24px; }
.rx-kicker { font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--silver-2); font-weight: 600; }
.rx-title { font-size: clamp(19px, 2.6vw, 24px); font-weight: 700; letter-spacing: -0.015em; margin-top: 12px; line-height: 1.25; text-wrap: pretty; }
.rx-list { display: flex; flex-direction: column; gap: 16px; }
.rx-card { padding: 26px 28px; background: #0a0a0b; border: 1px solid var(--line); border-radius: 16px; animation: up 0.7s var(--ease) both; }
.rx-top { display: flex; align-items: center; gap: 16px; }
.rx-num { font-size: 24px; font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--silver-4); letter-spacing: -0.02em; line-height: 1; }
.rx-area { font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.rx-system { margin-left: auto; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; background: #0d0d0e; white-space: nowrap; }
.rx-you { color: var(--ink-3); font-size: 14.5px; font-style: italic; margin-top: 16px; line-height: 1.5; padding-left: 14px; border-left: 2px solid var(--line-2); }
.rx-block { margin-top: 18px; }
.rx-tag { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; margin-bottom: 7px; }
.rx-tag-pain { color: #b98d8d; }
.rx-tag-fix { color: var(--silver-2); }
.rx-pain { color: var(--ink-2); font-size: 15px; line-height: 1.62; text-wrap: pretty; }
.rx-fix { color: var(--ink); font-size: 15.5px; line-height: 1.62; font-weight: 500; text-wrap: pretty; }
.rx-channels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chan { font-size: 11.5px; letter-spacing: 0.04em; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 12px; background: linear-gradient(180deg, #111112, #0b0b0c); }

.cta { display: grid; grid-template-columns: 0.85fr 1fr; gap: 0; align-items: stretch; background: linear-gradient(135deg, #151515, #0a0a0a); border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden; }
.cta-proof { padding: 38px 34px; background: linear-gradient(180deg, rgba(149,153,153,0.06), rgba(149,153,153,0.01)); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.cta-proof-label { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.cta-proof-client { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 10px; letter-spacing: -0.01em; }
.cta-proof-text { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; margin-top: 12px; text-wrap: pretty; }
.cta-stats { display: flex; gap: 28px; margin-top: auto; padding-top: 26px; }
.cta-stat-val { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.cta-stat-label { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.35; max-width: 130px; }
.cta-main { padding: 38px 40px; display: flex; flex-direction: column; justify-content: center; }
.cta-h { font-size: clamp(21px, 3vw, 27px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.18; }
.cta-sub { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin-top: 12px; text-wrap: pretty; }
.cta-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 24px; }
.cta-actions .btn { text-align: center; text-decoration: none; }
.results-foot { display: flex; justify-content: center; opacity: 0.6; padding-top: 12px; }

/* ===================================================================== */
/* RESPONSIVE                                                             */
/* ===================================================================== */
@media (max-width: 900px) {
  .quiz { grid-template-columns: 1fr; }
  .rail { flex-direction: row; align-items: center; gap: 20px; padding: 16px 20px; border-right: none; border-bottom: 1px solid var(--line); }
  .rail-top { display: none; }
  .rail-gauge { flex-direction: row; margin-top: 0; gap: 14px; transform: scale(0.7); transform-origin: left center; }
  .rail-caption { display: none; }
  .rail-progress { margin-top: 0; margin-left: auto; border-top: none; padding-top: 0; text-align: right; }
  .rail-count { font-size: 22px; justify-content: flex-end; }
  .rail-area { display: none; }
  .q-wrap { padding: 36px 24px 56px; }
  .result-head { grid-template-columns: 1fr; gap: 28px; padding: 28px; text-align: center; }
  .result-head .eyebrow { text-align: center; }
  .result-gauge { order: -1; }
  .result-summary { text-align: left; }
  .cta { grid-template-columns: 1fr; }
  .cta-proof { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 24px; }
  .cta-main { padding: 28px 24px; }
  .rx { padding: 26px 22px 28px; }
  .rx-card { padding: 22px 20px; }
  .rx-top { flex-wrap: wrap; }
  .rx-system { margin-left: 0; flex-basis: 100%; order: 3; align-self: flex-start; }
}
@media (max-width: 520px) {
  .rail-gauge { transform: scale(0.6); }
  .opt { padding: 16px; font-size: 14.5px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.08s !important; }
  .spin-ring { animation: spin 0.9s linear infinite !important; }
}
