@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* Agesync Longevity Check — visual system matches agesync.com
   (agesync-site-plugin styles.css: hero gradient, Space Grotesk display,
   JetBrains Mono eyebrows, paper pill buttons, white rules on deep violet). */
:root {
  --ink: #0a0a12; --paper: #f4f2ee; --paper-2: #ebe7df;
  --violet: #7b5cff; --violet-soft: #a394ff; --ice: #c9d4ff;
  --purple-deep: #1a0d3d; --purple-mid: #4b2a9e;
  --muted-d: rgba(255, 255, 255, 0.62); --faint-d: rgba(255, 255, 255, 0.42);
  --rule-d: rgba(255, 255, 255, 0.14); --rule-d2: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.045); --glass-2: rgba(255, 255, 255, 0.07);
  --good: #7ee2a8;
  --r: 22px;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --max: 600px;
}

* { box-sizing: border-box; }
html { background: #0a0418; color-scheme: dark; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); color: var(--paper); font-size: 16px; line-height: 1.5;
  background: #0a0418;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; color: inherit; }
a { color: var(--ice); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }

/* Ambient layer: faint grid + concentric rings, as on the landing hero */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 80% 18%, #6c3fb8 0%, transparent 55%),
    radial-gradient(ellipse 70% 70% at 10% 85%, #2d1773 0%, transparent 60%),
    linear-gradient(180deg, #1a0d3d 0%, #0a0418 100%); }
.bg-orbs::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--rule-d2) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-d2) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .35;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 80%);
}
.bg-orbs span { position: absolute; border-radius: 50%; border: 1px solid rgba(201, 212, 255, 0.13); top: 18vh; right: -10vw; transform: translate(50%, -50%); }
.bg-orbs span:nth-child(1) { width: 260px; height: 260px; right: 6vw; }
.bg-orbs span:nth-child(2) { width: 520px; height: 520px; right: 6vw; }
.bg-orbs span:nth-child(3) { width: 820px; height: 820px; right: 6vw; }

.wrap { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 22px 20px 48px; min-height: 100vh; display: flex; flex-direction: column; }

.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.logo { height: 24px; }
.top-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint-d); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-d); }
.eyebrow.v { color: var(--violet-soft); }

/* Progress */
.progress { height: 3px; background: var(--rule-d); border-radius: 3px; overflow: hidden; margin: 22px 0 10px; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--ice)); border-radius: 3px; transition: width .45s cubic-bezier(.2,.7,.2,1); }
.qcount { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint-d); margin-bottom: 18px; }

/* Screens + card */
.screen { display: none; }
.screen.active { display: block; animation: rise .45s cubic-bezier(.2,.7,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
  border: 1px solid var(--rule-d); border-radius: var(--r); padding: 28px;
  box-shadow: 0 40px 80px -40px rgba(5, 2, 20, .8), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}

/* Hero / intro */
.hero { padding-top: 9vh; }
.hero h1 { font-size: clamp(40px, 8.4vw, 64px); font-weight: 400; letter-spacing: -0.04em; line-height: 1.02; margin-top: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(180deg, #c9d4ff 0%, #7b5cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted-d); font-size: 17px; margin-top: 18px; max-width: 48ch; }
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 12px; align-items: baseline; color: var(--paper); font-size: 15px; }
.hero-points li b { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--violet-soft); letter-spacing: .12em; min-width: 22px; }

/* Buttons — landing .btn: pill, Space Grotesk, paper on dark */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 500; font-size: 15.5px; letter-spacing: -0.005em;
  border: 1px solid transparent; border-radius: 999px; padding: 15px 24px;
  background: var(--paper); color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: transform .25s ease, background .25s ease, opacity .2s, border-color .25s;
}
.btn .arr { display: inline-block; transition: transform .25s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:hover .arr { transform: translateX(4px); }
.btn:disabled { opacity: .3; transform: none; cursor: default; }
.btn-primary { flex: 1; }
.btn-violet { background: var(--violet); color: #fff; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--muted-d); padding: 15px 10px; }
.btn-ghost:hover { color: var(--paper); transform: none; }
.btn-outline { background: transparent; color: var(--paper); border-color: var(--rule-d); }
.btn-outline:hover { border-color: rgba(255,255,255,.4); }

.nav { margin-top: 28px; display: flex; gap: 12px; align-items: center; }

/* Question head */
.q-prompt { font-size: clamp(25px, 4.6vw, 32px); margin-bottom: 8px; }
.q-help { color: var(--muted-d); font-size: 14.5px; margin: 0 0 22px; }
.q-prompt + .opts, .q-prompt + .scale, .q-prompt + .field, .q-prompt + div { margin-top: 20px; }

/* Option tiles */
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--glass); border: 1px solid var(--rule-d); border-radius: 16px;
  padding: 17px 18px; font-family: var(--font-display); font-size: 16.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--paper);
  transition: border-color .2s, background .2s, transform .15s;
}
.opt:hover { border-color: rgba(163, 148, 255, .6); transform: translateY(-1px); }
.opt[aria-pressed="true"] { border-color: var(--violet); background: rgba(123, 92, 255, .16); }
.opt .check { margin-left: auto; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--rule-d); position: relative; transition: all .2s; }
.opt[aria-pressed="true"] .check { border-color: var(--violet); background: var(--violet); }
.opt[aria-pressed="true"] .check::after { content: ""; position: absolute; left: 7px; top: 3.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Scale 1..5 — full-width segmented tiles */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.scale button {
  height: 64px; border: 1px solid var(--rule-d); background: var(--glass); border-radius: 16px;
  font-family: var(--font-display); font-weight: 500; font-size: 22px; color: var(--muted-d); transition: all .2s;
}
.scale button:hover { border-color: rgba(163, 148, 255, .6); color: var(--paper); }
.scale button[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); transform: translateY(-2px); }
.scale-legend { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint-d); }

/* Inputs */
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint-d); margin-bottom: 8px; }
.field input, .field select {
  width: 100%; padding: 15px 18px; border: 1px solid var(--rule-d); border-radius: 14px; font: inherit; font-size: 16.5px;
  background: rgba(10, 4, 24, .45); color: var(--paper); outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--faint-d); }
.field input:focus, .field select:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(123, 92, 255, .18); }
.field select { padding-right: 46px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a394ff' stroke-width='1.6'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; }
.field select option { background: #1a0d3d; color: var(--paper); }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field.two > div { min-width: 0; }

/* Toggles */
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule-d); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .lbl { font-family: var(--font-display); font-size: 16.5px; font-weight: 500; }
.switch { margin-left: auto; width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.14); border: 0; position: relative; flex: none; transition: background .2s; }
.switch[aria-pressed="true"] { background: var(--violet); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 99px; background: var(--paper); transition: transform .2s; }
.switch[aria-pressed="true"]::after { transform: translateX(20px); }

[data-screen="result"], [data-screen="cta"] { margin-top: 18px; }
/* ── Result ─────────────────────────────────────────────────────────────── */
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.result-head h2 { font-size: clamp(26px, 5vw, 34px); margin-top: 10px; }
.snap { display: grid; grid-template-columns: 172px 1fr; gap: 22px; align-items: center; margin-top: 22px; }
.score-ring { width: 172px; height: 172px; position: relative; }
.score-ring svg { display: block; }
.score-ring .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring .num b { font-family: var(--font-display); font-size: 52px; font-weight: 400; letter-spacing: -0.04em; display: block; line-height: 1; }
.score-ring .num span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-d); margin-top: 6px; }
.stat-col { display: grid; gap: 10px; }
.stat { background: var(--glass); border: 1px solid var(--rule-d); border-radius: 16px; padding: 14px 16px; }
.stat .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint-d); }
.stat .v { font-family: var(--font-display); font-size: 28px; font-weight: 400; letter-spacing: -0.03em; margin-top: 2px; }
.stat .v small { font-size: 14px; color: var(--muted-d); letter-spacing: 0; margin-left: 4px; }
.reading { margin: 22px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted-d); }
.reading b { color: var(--paper); font-weight: 500; }

.section-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint-d); margin: 26px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--rule-d); color: var(--paper); border-radius: 99px; padding: 7px 14px; font-family: var(--font-display); font-size: 14px; font-weight: 500; background: var(--glass); }

/* Locked biomarkers — what the estimate cannot see */
.locked { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.marker { position: relative; overflow: hidden; border: 1px solid var(--rule-d); border-radius: 14px; padding: 12px 13px; background: var(--glass); }
.marker .mk { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); }
.marker .mv { font-family: var(--font-display); font-size: 21px; margin-top: 4px; filter: blur(6px); opacity: .7; user-select: none; }
.marker .lock { position: absolute; right: 10px; top: 10px; width: 14px; height: 14px; opacity: .55; }

/* Upsell offers */
.offer { margin-top: 12px; border-radius: 18px; padding: 20px; border: 1px solid var(--rule-d); background: var(--glass); }
.offer.hero-offer { border-color: rgba(163, 148, 255, .55); background: linear-gradient(135deg, rgba(123, 92, 255, .30), rgba(75, 42, 158, .18)); }
.offer .tag { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); background: var(--ice); border-radius: 99px; padding: 4px 9px; margin-bottom: 10px; }
.offer h3 { font-size: 21px; letter-spacing: -0.02em; }
.offer p { color: var(--muted-d); font-size: 14.5px; margin: 8px 0 14px; }
.offer ul { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 7px; }
.offer li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--paper); }
.offer li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px; border: solid var(--violet-soft); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
.offer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.offer-row .offer { margin-top: 12px; display: flex; flex-direction: column; }
.offer-row .offer p { flex: 1; }
.price-line { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-d); margin-top: 12px; text-align: center; }

/* CTA */
.cta-card { background: var(--glass); border: 1px solid var(--rule-d); border-radius: 18px; padding: 22px; margin-top: 14px; }
.cta-card.primary { border-color: rgba(163, 148, 255, .55); background: linear-gradient(135deg, rgba(123, 92, 255, .26), rgba(75, 42, 158, .14)); }
.cta-card h3 { font-size: 21px; margin-bottom: 6px; }
.cta-card p { color: var(--muted-d); font-size: 14.5px; margin: 0 0 16px; }
.cta-card ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 7px; }
.cta-card li { position: relative; padding-left: 22px; font-size: 14.5px; }
.cta-card li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 10px; height: 6px; border: solid var(--violet-soft); border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
.stores { display: flex; gap: 10px; flex-wrap: wrap; }
/* Official-style store badges, same as agesync.com (.app-store-badge) */
.app-store-badge { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 12px; border-radius: 11px;
  background: #000; color: #fff; border: 1px solid #a6a6a6; text-decoration: none; white-space: nowrap; transition: transform .25s ease, border-color .25s ease; }
.app-store-badge:hover { transform: translateY(-1px); border-color: #fff; }
.app-store-badge svg { width: 22px; height: 22px; fill: currentColor; flex: none; margin-top: -3px; }
.app-store-badge .play-logo { width: 20px; height: 21px; margin-top: 0; }
.app-store-badge span { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.app-store-badge small { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif; font-size: 10px; letter-spacing: .01em; margin-bottom: 3px; }
.app-store-badge strong { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.saved { display: flex; align-items: center; gap: 8px; color: var(--good); font-size: 13px; margin-top: 14px; justify-content: center; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted-d); margin-top: 4px; }
.consent input { margin-top: 3px; accent-color: var(--violet); }
.fine { color: var(--faint-d); font-size: 12px; line-height: 1.55; margin-top: 22px; }

@media (max-width: 520px) {
  .card { padding: 22px 18px; border-radius: 20px; }
  .snap { grid-template-columns: 1fr; justify-items: center; }
  .stat-col { grid-template-columns: 1fr 1fr; width: 100%; }
  .offer-row { grid-template-columns: 1fr; }
  .locked { grid-template-columns: repeat(2, 1fr); }
  .scale button { height: 56px; font-size: 19px; }
  .hero { padding-top: 5vh; }
}

/* Footer */
.foot { margin-top: auto; padding-top: 36px; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12px; color: var(--faint-d); }
.foot a { color: var(--faint-d); text-decoration: none; }
.foot a:hover, .linkish:hover { color: var(--paper); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--faint-d); }

/* Cookie banner — same as agesync.com (dark card, equal outlined pills) */
.cookie { position: fixed; z-index: 20; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 470px; background: #0b0816; border: 1px solid var(--rule-d); border-radius: 16px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); padding: 16px 18px; animation: rise .32s cubic-bezier(.2,.7,.2,1); }
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--muted-d); }
.cookie p a { color: var(--paper); }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cookie-btn { font-family: var(--font-display); font-weight: 500; font-size: 14px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--rule-d); background: transparent; color: var(--paper); }
.cookie-btn:hover { border-color: rgba(255,255,255,.45); }

[hidden] { display: none !important; }
