/* Xonar Quants landing — ledger ink + logo gold */
:root {
  --ink: #17201b;
  --ink-2: #212d26;
  --ink-3: #2c3a32;
  --porcelain: #f3f4f1;
  --paper: #ffffff;
  --gold: #b98a2e;
  --gold-hi: #e3c26a;
  --gold-text: #7a5a17;
  --loss: #c8372d;
  --gain: #1e8a57;
  --text: #17201b;
  --muted: #56615a;
  --on-ink: #eef0ea;
  --on-ink-muted: #a9b3ab;
  --line: rgba(23, 32, 27, 0.12);
  --line-ink: rgba(238, 240, 234, 0.14);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1140px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { text-wrap: balance; font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; margin: 0; font-optical-sizing: auto; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.08; }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 34em; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 12px; border: 0;
  font: 700 1.02rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1b1407; box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 24px -10px rgba(185,138,46,.8); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 16px 30px -12px rgba(185,138,46,.9); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* header */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgba(243,244,241,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: auto; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: .01em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: .92rem; }
@media (max-width: 820px) { .nav-links a:not(.btn) { display: none; } }

/* hero */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .hit { color: var(--loss); }
.hero h1 .ran { color: var(--gain); }
.hero .lede { margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-promise { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; padding: 0; list-style: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.hero-promise li { display: inline-flex; align-items: center; gap: 8px; }
.hero-promise li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* trap chart */
.trap { background: var(--ink); color: var(--on-ink); border-radius: 22px; padding: 22px 22px 18px; box-shadow: 0 30px 60px -30px rgba(23,32,27,.55); position: relative; }
.trap-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.trap-head strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.trap-head span { color: var(--on-ink-muted); font-size: .85rem; }
.trap svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.trap .lvl { stroke-width: 1.5; stroke-dasharray: 6 7; }
.trap .lvl-label { font: 700 14px var(--sans); letter-spacing: .04em; }
.trap .price { fill: none; stroke: var(--on-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trap .marker { opacity: 0; transition: opacity .3s ease, transform .3s ease; transform-box: fill-box; transform-origin: center; }
.trap .marker.on { opacity: 1; }
.trap-caption { min-height: 3.2em; margin-top: 4px; font-size: .98rem; color: var(--on-ink); }
.trap-caption b { color: var(--gold-hi); font-weight: 700; }
.trap-controls { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.trap-controls input[type=range] { flex: 1; accent-color: var(--gold); height: 28px; }
.trap-controls button { background: var(--ink-3); color: var(--on-ink); border: 0; border-radius: 10px; height: 38px; padding: 0 14px; font: 700 .88rem var(--sans); cursor: pointer; }
.trap-controls button:hover { background: #374840; }

/* sections */
.section { padding: 96px 0; }
.section-head { max-width: 40rem; margin-bottom: 44px; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }
.ink { background: var(--ink); color: var(--on-ink); }
.ink .section-head p, .ink .muted { color: var(--on-ink-muted); }

/* cycle */
.cycle-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.cycle { list-style: none; margin: 0; padding: 0; counter-reset: c; position: relative; }
.cycle li { position: relative; padding: 0 0 30px 64px; counter-increment: c; }
.cycle li::before { content: counter(c); position: absolute; left: 0; top: -2px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 600 1.1rem var(--serif); color: var(--gold-hi); box-shadow: inset 0 0 0 1.5px rgba(227,194,106,.5); background: var(--ink); z-index: 1; }
.cycle li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 40px; bottom: 0; width: 1.5px; background: var(--line-ink); }
.cycle h3 { font-size: 1.25rem; margin-bottom: 4px; }
.cycle p { color: var(--on-ink-muted); }
.cycle li.bad::before { color: #ff8f86; box-shadow: inset 0 0 0 1.5px rgba(255,143,134,.55); }
.break { margin-top: 8px; padding: 22px 24px; border-radius: 16px; background: var(--ink-2); border: 1px solid var(--line-ink); }
.break strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--gold-hi); display: block; margin-bottom: 6px; }

/* syllabus */
.syllabus { border-top: 1.5px solid var(--text); }
.lesson { display: grid; grid-template-columns: 90px 1fr 1.1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.lesson .n { font: 500 2.1rem/1 var(--serif); color: var(--gold); }
.lesson p { color: var(--muted); }
@media (max-width: 760px) { .lesson { grid-template-columns: 54px 1fr; } .lesson p { grid-column: 2; } .lesson .n { font-size: 1.6rem; } }

/* calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--paper); border-radius: 22px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 24px 50px -30px rgba(23,32,27,.35); }
.calc-in { padding: 34px; display: grid; gap: 18px; }
.calc-out { padding: 34px; background: var(--ink); color: var(--on-ink); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 7px; }
.field .hint { font-weight: 500; color: var(--muted); }
.input { width: 100%; height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--porcelain); padding: 0 16px; font: 600 1.05rem var(--sans); color: var(--text); transition: border-color .15s, background .15s; }
.input:focus { outline: none; border-color: var(--gold); background: var(--paper); }
.input[aria-invalid=true] { border-color: var(--loss); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input { flex: 1; accent-color: var(--gold); }
.range-row output { font: 700 1.05rem var(--sans); min-width: 3.4em; text-align: right; }
.big-num { font: 600 clamp(2.4rem, 5vw, 3.4rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.out-label { color: var(--on-ink-muted); font-size: .95rem; margin-bottom: 8px; }
.out-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 20px; border-top: 1px solid var(--line-ink); }
.out-pair .v { font: 700 1.5rem var(--sans); font-variant-numeric: tabular-nums; }
.calc-note { font-size: .9rem; color: var(--on-ink-muted); }
.calc-warn { color: #ffb4ad; font-size: .95rem; min-height: 1.4em; }

/* is / isn't */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.ledger > div { padding: 34px; }
.ledger > div + div { border-left: 1px solid var(--line); background: #faf9f6; }
.ledger h3 { margin-bottom: 18px; }
.ledger ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ledger li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.ledger svg { width: 20px; height: 20px; margin-top: 3px; }

/* join */
.join-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 64px; align-items: start; }
.join-aside img { width: 110px; margin-bottom: 26px; }
.join-aside .steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; color: var(--on-ink-muted); }
.join-aside .steps b { color: var(--on-ink); }
.form-card { background: var(--paper); color: var(--text); border-radius: 22px; padding: 32px; box-shadow: 0 30px 60px -28px rgba(0,0,0,.6); }
.progress { display: flex; gap: 6px; margin-bottom: 22px; }
.progress i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); transition: background .3s; }
.progress i.on { background: var(--gold); }
.step-label { font-size: .9rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.form-card h3 { font-size: 1.55rem; margin-bottom: 20px; }
.form-step { display: none; }
.form-step.active { display: block; animation: stepIn .25s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--porcelain); font: 600 1.02rem var(--sans); color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.choice small { display: block; font-weight: 500; color: var(--muted); font-size: .88rem; margin-top: 2px; }
.choice:hover { border-color: var(--gold); }
.choice[aria-pressed=true] { border-color: var(--gold); background: #fbf5e6; }
.choice .dot { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); flex: none; }
.choice[aria-pressed=true] .dot { box-shadow: inset 0 0 0 6px var(--gold); }
.form-card .field { margin-bottom: 16px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 6px 0 18px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.form-nav { display: flex; gap: 10px; }
.form-nav .btn { flex: 1; }
.form-nav .btn-ghost { flex: 0 0 auto; }
.form-error { color: var(--loss); font-weight: 600; font-size: .92rem; min-height: 1.4em; margin-top: 12px; }
.form-fine { margin-top: 14px; font-size: .82rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* faq */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font: 600 1.2rem var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 40rem; }

/* footer */
.foot { background: var(--ink); color: var(--on-ink-muted); padding: 56px 0 120px; font-size: .92rem; }
.foot-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line-ink); margin-bottom: 24px; }
.foot .brand { color: var(--on-ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot a { color: var(--on-ink); text-decoration: none; }
.foot a:hover { color: var(--gold-hi); }
.foot .legal { max-width: 60rem; line-height: 1.65; }
.foot .legal + .legal { margin-top: 12px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--on-ink); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* sticky mobile CTA */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none; transform: translateY(140%); transition: transform .3s ease; }
.sticky-cta .btn { width: 100%; box-shadow: 0 14px 30px -10px rgba(23,32,27,.55); }
.sticky-cta.show { transform: none; }
@media (max-width: 820px) { .sticky-cta { display: block; } }

/* consent banner */
.cookie { position: fixed; z-index: 60; left: 16px; bottom: 16px; max-width: 420px; background: var(--paper); color: var(--text); border-radius: 18px; padding: 20px; box-shadow: 0 24px 60px -20px rgba(23,32,27,.5); border: 1px solid var(--line); display: none; }
.cookie.show { display: block; }
.cookie p { font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.cookie p strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 1rem; }
.cookie .row { display: flex; gap: 8px; }
.cookie .btn { min-height: 44px; padding: 0 16px; font-size: .92rem; flex: 1; }
@media (max-width: 560px) { .cookie { left: 10px; right: 10px; bottom: 10px; max-width: none; } }

/* responsive */
@media (max-width: 960px) {
  .hero-grid, .cycle-grid, .join-grid { grid-template-columns: 1fr; gap: 40px; }
  .calc, .ledger { grid-template-columns: 1fr; }
  .ledger > div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 18px; }
  .hero { padding: 28px 0 56px; }
  .section { padding: 72px 0; }
  .calc-in, .calc-out, .ledger > div, .form-card { padding: 24px 20px; }
  .trap { padding: 16px 14px 14px; border-radius: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

/* legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 24px 96px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 18px 0 10px; }
.doc .updated { color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 1.45rem; margin: 36px 0 10px; }
.doc p, .doc li { color: #2f3a33; line-height: 1.75; }
.doc ul { padding-left: 22px; }
.doc .callout { margin: 28px 0; padding: 18px 20px; border-left: 3px solid var(--gold); background: var(--paper); border-radius: 0 14px 14px 0; }
.back-link { font-weight: 600; text-decoration: none; }

/* thanks page */
.thanks { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: var(--ink); color: var(--on-ink); text-align: center; }
.thanks .box { max-width: 520px; }
.thanks img { width: 96px; margin: 0 auto 26px; }
.thanks h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin-bottom: 14px; }
.thanks p { color: var(--on-ink-muted); margin-bottom: 26px; }
.thanks .btn { width: 100%; max-width: 360px; }
.thanks ol { text-align: left; color: var(--on-ink-muted); margin: 30px auto 0; max-width: 360px; padding-left: 20px; }
.thanks ol li + li { margin-top: 8px; }

/* interest-based slide-in (non-blocking) */
.nudge { position: fixed; z-index: 45; right: 20px; bottom: 20px; width: 360px; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 20px 20px 18px; border-radius: 18px; background: var(--ink); color: var(--on-ink); box-shadow: 0 24px 60px -18px rgba(23,32,27,.6); border: 1px solid var(--line-ink); transform: translateY(24px); opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease; }
.nudge[hidden] { display: none; }
.nudge.show { transform: none; opacity: 1; }
.nudge img { width: 44px; height: auto; }
.nudge-title { font: 600 1.15rem/1.25 var(--serif); margin-bottom: 4px; padding-right: 22px; }
.nudge-text { color: var(--on-ink-muted); font-size: .92rem; margin-bottom: 14px; }
.nudge .btn { min-height: 44px; padding: 0 20px; font-size: .95rem; }
.nudge-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--on-ink-muted); cursor: pointer; display: grid; place-items: center; }
.nudge-close:hover { background: var(--ink-3); color: var(--on-ink); }
.nudge-close svg { width: 18px; height: 18px; }
@media (max-width: 820px) {
  .nudge { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .nudge .btn { width: 100%; }
}
