/* =========================================================
   Money Academy / RaisingMoguls design system  (v2 preview)
   Editorial type (Wealthsimple), outcome copy (Ellevest),
   dark depth + crisp borders (Linear).
   Tokens first, then base, then components.
   ========================================================= */

:root {
  /* Ink + paper */
  --ink-950: #07090c;
  --ink-900: #0b0e13;
  --ink-850: #10141b;
  --ink-800: #151a22;
  --ink-700: #1e2530;
  --paper: #f6f3ec;
  --paper-2: #ede8dc;
  --white: #ffffff;

  /* Brand: mint + gold (matches the course + app icon) */
  --mint-50: #e9f6f1;
  --mint-200: #b5e3d2;
  --mint-400: #4fd1a5;
  --mint-500: #23b386;
  --mint-700: #0f5e4c;
  --mint-900: #0a3a30;
  --gold-200: #f3e2b0;
  --gold-300: #ecd08a;
  --gold-500: #c99a3e;
  --gold-700: #8a6418;

  /* Text */
  --text-dark: #0b0e13;
  --text-dark-2: #4a525e;
  --text-light: #f3f5f7;
  --text-light-2: #9aa3af;
  --text-light-3: #6b7480;

  /* Lines: crisp, never heavy shadows */
  --line-dark: rgba(255, 255, 255, 0.08);
  --line-dark-2: rgba(255, 255, 255, 0.14);
  --line-light: rgba(11, 14, 19, 0.10);
  --line-light-2: rgba(11, 14, 19, 0.18);

  /* Type */
  --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --fs-display: clamp(44px, 7vw, 104px);
  --fs-h1: clamp(38px, 6.2vw, 80px);
  --fs-h2: clamp(32px, 4.8vw, 60px);
  --fs-h3: clamp(21px, 2.2vw, 26px);
  --fs-stat: clamp(64px, 10vw, 140px);
  --fs-lede: clamp(17px, 1.6vw, 21px);
  --tracking-tight: -0.035em;
  --tracking-tighter: -0.05em;

  /* Space + shape */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section: clamp(88px, 12vw, 168px);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--ink-900);
  color: var(--text-light);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, blockquote, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Surfaces ---------- */
.surface-dark { background: var(--ink-900); color: var(--text-light); }
.surface-deep { background: var(--ink-950); color: var(--text-light); }
.surface-paper { background: var(--paper); color: var(--text-dark); }
.surface-mint { background: var(--mint-700); color: var(--white); }
.surface-gold { background: var(--gold-300); color: var(--ink-900); }

/* Depth: grid lines + radial glows (no drop shadows) */
.grid-lines { position: relative; isolation: isolate; }
.grid-lines::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-dark) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
}
.surface-paper.grid-lines::before {
  background-image:
    linear-gradient(to right, var(--line-light) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-light) 1px, transparent 1px);
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; z-index: -1; }
.glow-mint { background: rgba(35, 179, 134, .34); }
.glow-gold { background: rgba(201, 154, 62, .26); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-light-2);
}
.surface-paper .eyebrow { color: var(--text-dark-2); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-400); box-shadow: 0 0 0 4px rgba(79,209,165,.18); }

.display, .h1, .h2 {
  font-weight: 700; letter-spacing: var(--tracking-tighter); line-height: .96;
}
.display { font-size: var(--fs-display); }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); letter-spacing: var(--tracking-tight); line-height: 1.0; }
.h3 { font-size: var(--fs-h3); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--text-light-2); max-width: 34ch; }
.surface-paper .lede { color: var(--text-dark-2); }
.muted { color: var(--text-light-2); }
.surface-paper .muted { color: var(--text-dark-2); }
.gold-text { color: var(--gold-300); }
.mint-text { color: var(--mint-400); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: var(--r-pill);
  font-size: 16px; font-weight: 650; letter-spacing: -0.01em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); color: #1a1408; border-color: rgba(255,255,255,.25); }
.btn-gold:hover { background: linear-gradient(180deg, #f3dc9e, #d3a64b); }
.btn-ink { background: var(--ink-900); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text-light); border-color: var(--line-dark-2); }
.btn-ghost:hover { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.04); }
.surface-paper .btn-ghost { color: var(--text-dark); border-color: var(--line-light-2); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* Reassurance micro-copy under CTAs */
.reassure { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--text-light-2); list-style: none; padding: 0; margin: 0; }
.reassure li { display: inline-flex; align-items: center; gap: 8px; }
.reassure svg { width: 16px; height: 16px; color: var(--mint-400); flex: none; }
.surface-paper .reassure { color: var(--text-dark-2); }
.surface-paper .reassure svg { color: var(--mint-700); }

/* ---------- Panels (crisp borders) ---------- */
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01));
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
}
.surface-paper .panel { background: var(--white); border-color: var(--line-light); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--line-dark-2); color: var(--text-light-2);
}
.chip-mint { color: var(--mint-200); border-color: rgba(79,209,165,.35); background: rgba(79,209,165,.08); }
.chip-gold { color: var(--gold-300); border-color: rgba(236,208,138,.35); background: rgba(236,208,138,.08); }

.rule { height: 1px; background: var(--line-dark); border: 0; margin: 0; }
.surface-paper .rule { background: var(--line-light); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
