/* ============================================================================
   BuildYourPocket — V2 "Investment Intelligence OS" design system
   Obsidian · ivory · signal-gold. Institutional, scientific, calm, luxury.
   Self-contained (no external fonts/CDN — CSP-safe). Mobile-first.
   ========================================================================== */

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* Obsidian base ramp */
  --void: #04060a;
  --ink: #070a10;
  --ink-2: #0b0f17;
  --panel: #0e131d;
  --panel-2: #131a26;
  --line: rgba(233, 238, 247, 0.08);
  --line-strong: rgba(233, 238, 247, 0.16);

  /* Ivory text ramp */
  --ivory: #f4f6fb;
  --text: #dfe5f0;
  --muted: #9aa6ba;
  --faint: #64708a;

  /* Signal accents — gold from the mark + a cool intelligence cyan (used sparingly) */
  --gold: #e8c98a;
  --gold-deep: #c79a52;
  --signal: #6fe3c9;      /* intelligence cyan, restrained */
  --signal-2: #7cc4ff;
  --loss: #ff7a7a;
  --gain: #6fe3a3;

  --grad-gold: linear-gradient(120deg, #f0dbaa 0%, #e8c98a 40%, #c79a52 100%);
  --grad-signal: linear-gradient(120deg, #7cc4ff 0%, #6fe3c9 100%);

  /* Type — system stack, treated for magazine scale */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Fluid scale */
  --step--1: clamp(0.80rem, 0.77rem + 0.15vw, 0.88rem);
  --step-0:  clamp(0.98rem, 0.94rem + 0.2vw, 1.06rem);
  --step-1:  clamp(1.20rem, 1.10rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.55rem, 1.35rem + 1vw, 2.2rem);
  --step-3:  clamp(2.0rem, 1.6rem + 2vw, 3.2rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.6rem);
  --step-5:  clamp(3.2rem, 2.1rem + 5.4vw, 7rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 66ch;
  --maxw: 1240px;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 32px;
  --ease: cubic-bezier(.16,.84,.32,1);
  --ease-out: cubic-bezier(.22,1,.36,1);
}

/* ---- Base -------------------------------------------------------------- */
body {
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: rgba(232,201,138,0.28); color: #fff; }

h1, h2, h3, h4 { color: var(--ivory); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--step-5); letter-spacing: -0.045em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.025em; }
p { text-wrap: pretty; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.grad { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-s { background: var(--grad-signal); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Kicker / eyebrow -------------------------------------------------- */
.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--step--1); font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold);
}
.kicker::before { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.eyebrow { font-size: var(--step--1); letter-spacing: .22em; text-transform: uppercase; color: var(--faint); font-weight: 600; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  --bg: transparent; --fg: var(--ivory); --bd: var(--line-strong);
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82rem 1.35rem; border-radius: 100px; border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 550; font-size: var(--step-0);
  cursor: pointer; transition: transform .3s var(--ease), border-color .3s, background .3s, box-shadow .3s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(232,201,138,0.5); }
.btn--primary {
  color: #241a06; border-color: transparent;
  background: var(--grad-gold);
  box-shadow: 0 10px 40px -14px rgba(232,201,138,0.6);
}
.btn--primary:hover { box-shadow: 0 18px 50px -14px rgba(232,201,138,0.7); }
.btn--ghost { background: rgba(255,255,255,0.02); }
.btn svg { width: 1.05em; height: 1.05em; }
.btn--lg { padding: 1rem 1.7rem; font-size: var(--step-1); }

/* ---- Nav --------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(6,8,13,0.72); backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--line);
}
.nav__row { display: flex; align-items: center; gap: 1.5rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 650; letter-spacing: -.02em; color: var(--ivory); }
.brand__mark { width: 30px; height: 30px; }
.nav__links { display: none; gap: 1.6rem; margin-inline: auto; }
.nav__links a { color: var(--muted); font-size: var(--step--1); font-weight: 500; letter-spacing: .01em; transition: color .25s; position: relative; }
.nav__links a:hover { color: var(--ivory); }
.nav__cta { display: none; gap: .6rem; }
.nav__burger { margin-left: auto; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.02); display: grid; place-items: center; cursor: pointer; }
.nav__burger span, .nav__burger span::before, .nav__burger span::after { content: ""; display: block; width: 17px; height: 1.5px; background: var(--ivory); position: relative; transition: transform .3s; }
.nav__burger span::before { position: absolute; top: -5px; }
.nav__burger span::after { position: absolute; top: 5px; }
.nav__sheet { display: none; }
@media (min-width: 1000px) {
  .nav__links, .nav__cta { display: flex; }
  .nav__burger { display: none; }
}
.nav__sheet.open { display: block; position: fixed; inset: 74px 0 0; z-index: 99; background: rgba(6,8,13,.96); backdrop-filter: blur(20px); padding: var(--gutter); }
.nav__sheet a { display: block; padding: 1rem 0; font-size: var(--step-2); color: var(--ivory); border-bottom: 1px solid var(--line); }

/* ---- Section scaffolding ---------------------------------------------- */
.section { position: relative; padding-block: clamp(5rem, 11vh, 9rem); }
.section--tight { padding-block: clamp(3.5rem, 7vh, 6rem); }
.section__head { max-width: 780px; }
.section__head h2 { margin-top: .8rem; }
.section__head p { margin-top: 1.1rem; color: var(--muted); font-size: var(--step-1); max-width: 62ch; }
.lede { color: var(--muted); font-size: var(--step-1); max-width: var(--measure); }

/* ---- Hairline grid backdrop ------------------------------------------- */
.grid-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 78%); opacity: .5; }

/* ---- Cards / panels ---------------------------------------------------- */
.panel {
  position: relative; background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2.2rem);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.panel:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.panel__num { font-family: var(--mono); font-size: var(--step--1); color: var(--gold-deep); letter-spacing: .1em; }
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---- Glass device frame (for real screenshots later) ------------------ */
.device {
  position: relative; border-radius: var(--r-lg); border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20,26,38,.9), rgba(8,11,17,.9));
  box-shadow: 0 60px 120px -40px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}
.device__bar { display: flex; align-items: center; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.device__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.device__body { padding: clamp(1rem, 3vw, 2rem); min-height: 240px; }

/* ---- Hero -------------------------------------------------------------- */
.hero { position: relative; padding-top: 130px; overflow: clip; }
.hero__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center; }
@media (min-width: 1000px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 3rem; } }
.hero h1 { margin-block: 1.1rem 1.4rem; }
.hero__stage { position: relative; aspect-ratio: 1 / 1; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line); mask: radial-gradient(closest-side, transparent 74%, #000 75%); }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .5rem; }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.2rem; color: var(--faint); font-size: var(--step--1); }
.trust-row b { color: var(--muted); font-weight: 600; }

/* ---- Pipeline ---------------------------------------------------------- */
.pipe { display: grid; gap: .6rem; }
.pipe__step { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); transition: border-color .3s, transform .3s, background .3s; }
.pipe__step:hover { border-color: rgba(232,201,138,.4); transform: translateX(4px); }
.pipe__ix { font-family: var(--mono); color: var(--gold-deep); font-size: var(--step--1); width: 2ch; }
.pipe__t { color: var(--ivory); font-weight: 600; }
.pipe__d { color: var(--muted); font-size: var(--step--1); margin-left: auto; text-align: right; }

/* ---- Surfaces (product map) ------------------------------------------- */
.surface { display: grid; gap: .3rem; padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel), var(--ink-2)); transition: transform .4s var(--ease), border-color .4s; }
.surface:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.surface__ic { width: 34px; height: 34px; color: var(--gold); margin-bottom: .5rem; }
.surface h4 { font-size: var(--step-1); }
.surface p { color: var(--muted); font-size: var(--step--1); }

/* ---- Pricing ----------------------------------------------------------- */
.tiers { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .tiers { grid-template-columns: repeat(4, 1fr); } }
.tier { display: flex; flex-direction: column; gap: 1rem; padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.tier--feat { border-color: rgba(232,201,138,.45); background: linear-gradient(180deg, rgba(232,201,138,.06), var(--panel)); box-shadow: 0 30px 70px -40px rgba(232,201,138,.4); }
.tier__name { font-weight: 650; color: var(--ivory); letter-spacing: -.01em; }
.tier__price { font-size: var(--step-3); color: var(--ivory); letter-spacing: -.03em; }
.tier__price small { font-size: var(--step-0); color: var(--faint); font-weight: 500; }
.tier ul { list-style: none; display: grid; gap: .55rem; margin-top: .3rem; }
.tier li { display: flex; gap: .6rem; font-size: var(--step--1); color: var(--muted); }
.tier li svg { flex: none; width: 1.1em; height: 1.1em; color: var(--gold); margin-top: .15em; }
.pill { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(232,201,138,.4); border-radius: 100px; padding: .2rem .6rem; align-self: flex-start; }

/* ---- FAQ --------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.3rem 0; display: flex; justify-content: space-between; gap: 1rem; color: var(--ivory); font-size: var(--step-1); font-weight: 550; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 400; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); padding-bottom: 1.3rem; max-width: var(--measure); }

/* ---- Marquee of surfaces ---------------------------------------------- */
.strip { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.chip b { color: var(--gold); }

/* ---- Footer ------------------------------------------------------------ */
.foot { border-top: 1px solid var(--line); padding-block: 4rem 2.5rem; background: var(--ink); }
.foot__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 800px) { .foot__grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.foot h5 { font-size: var(--step--1); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.foot a { display: block; color: var(--muted); padding: .3rem 0; font-size: var(--step--1); transition: color .2s; }
.foot a:hover { color: var(--ivory); }
.foot__bar { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--faint); font-size: var(--step--1); }
.disclaimer { margin-top: 1.2rem; color: var(--faint); font-size: .78rem; line-height: 1.6; max-width: 80ch; }

/* ---- Reveal motion ----------------------------------------------------- */
/* Only hide reveals once JS is confirmed running (html.js). If the script
   fails to load or the tab is backgrounded at load, content stays visible. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- Brand lockup: the FULL BYP logo (medallion + BYP + candlestick arrow).
   The source art has a baked-in near-black navy field (#0A0E19) that sits on the
   obsidian page (#04060a) — close enough to read as seamless. Width-driven, since
   the lockup is ~2.94:1, not a square icon. ------------------------------------ */
.brand__logo { height: clamp(30px, 3.2vw, 40px); width: auto; display: block; }
.foot .brand__logo { height: 34px; }

/* ---- Premium polish: scroll rail + cursor spotlight -------------------- */
.scrollrail { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200; pointer-events: none; background: rgba(255,255,255,0.04); }
.scrollrail > i { display: block; height: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold, #e8c98a), var(--signal, #6fe3c9)); box-shadow: 0 0 12px rgba(232,201,138,0.5); }
.spotlight { position: fixed; top: 0; left: 0; width: 620px; height: 620px; margin: -310px 0 0 -310px; z-index: 1; pointer-events: none;
  border-radius: 50%; opacity: 0.5; mix-blend-mode: screen; will-change: transform;
  background: radial-gradient(circle, rgba(232,201,138,0.10) 0%, rgba(111,227,201,0.05) 32%, transparent 62%);
  transition: opacity .4s var(--ease-out); }
.spotlight.pulse { opacity: 0.8; }
@media (prefers-reduced-motion: reduce) { .scrollrail > i { box-shadow: none; } .spotlight { display: none; } }

/* ---- Typography polish (Apple-grade rhythm; additive) ----------------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, .cin-line, .section__head h2, .tour__head h2, .journey__head h2 { text-wrap: balance; }
.lede, .section__head p, p { text-wrap: pretty; }
.eyebrow { font-variant: small-caps; }
.kicker, .eyebrow { -webkit-font-smoothing: antialiased; }
/* CTA hierarchy — the primary action carries a touch more presence */
.btn--primary { letter-spacing: -0.005em; }
.btn--lg { letter-spacing: -0.01em; }
/* quote/callout treatment */
blockquote, .callout { text-wrap: pretty; }

/* ---- Motion polish: premium hover states ------------------------------ */
.btn { transition: transform .26s var(--ease-out), background .26s var(--ease-out), border-color .26s, color .22s, box-shadow .3s var(--ease-out); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px -10px rgba(232,201,138,0.42); }
.btn--ghost:hover, .btn:hover { transform: translateY(-1px); }
.surface { transition: transform .3s var(--ease-out), border-color .3s var(--ease-out), background .3s, box-shadow .35s var(--ease-out); }
.surface:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -22px rgba(0,0,0,0.62); }
.panel { transition: border-color .3s var(--ease-out), box-shadow .35s var(--ease-out), transform .3s var(--ease-out); }
.faq details { transition: border-color .3s var(--ease-out), background .3s var(--ease-out); }
.tier { transition: transform .32s var(--ease-out), border-color .32s, box-shadow .35s var(--ease-out); }
.tier--feat { will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn--primary:hover, .surface:hover, .btn--ghost:hover { transform: none; }
}
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .panel:hover, .surface:hover { transform: none; }
}

/* ---- Doc pages (legal/content) ---------------------------------------- */
.doc { max-width: 760px; margin-inline: auto; padding-top: 130px; }
.doc h1 { font-size: var(--step-4); margin-bottom: .6rem; }
.doc h2 { font-size: var(--step-1); color: var(--ivory); margin-top: 2.2rem; letter-spacing: -.01em; }
.doc p, .doc li { color: var(--muted); margin-top: .9rem; }
.doc a { color: var(--gold); }
.doc .updated { color: var(--faint); font-size: var(--step--1); }
.doc .callout { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 1.1rem 1.3rem; margin-top: 1.6rem; background: var(--panel); }
.doc .callout p { margin: 0; color: var(--text); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 200; background: var(--gold); color: #000; padding: .6rem 1rem; border-radius: 8px; }
