/* ============================================================
   FERGUZ DESIGN SYSTEM v1.1 — TOKENS
   The single source of truth for every FERGUZ page, app and
   landing page. No build may redefine these values locally.
   v1.1 (Nov 10, 2026): reconciled to the premium-design
   research spec — closed type scale, strict 8pt spacing,
   dark surfaces = ladder + hairlines (NO drop shadows),
   light card feeds as a first-class theme, motion tokens.
   Brand: DCODE black / gold terminal. One gold: #D4AF37.
   Type (max 2 families + mono, Latin Extended for ES):
     Display — "Sora"   · UI/Body — "Inter" · Data — "JetBrains Mono"
   ============================================================ */

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

:root{
  /* ——— Dark surfaces (surface ladder — depth comes from the
         ladder + hairline borders, NEVER from drop shadows) ——— */
  --bg-0:#060605;
  --bg-1:#0b0b09;
  --panel:#12120e;
  --panel-2:#17170f;
  --panel-3:#1e1d13;
  --line:rgba(255,255,255,.08);        /* hairline on dark */
  --line-strong:rgba(255,255,255,.16);

  /* ——— Light surfaces (PilotAI-pattern card feeds) ——— */
  --lt-bg:#f5f4f0;
  --lt-panel:#ffffff;
  --lt-panel-2:#efeee8;
  --lt-inset:#f4f4f1;                  /* metric-strip well */
  --lt-line:rgba(0,0,0,.08);
  --lt-line-strong:rgba(0,0,0,.14);
  --lt-ink:#17170f;
  --lt-ink-2:#44443a;
  --lt-mut:#6d6d62;                    /* ≥4.5:1 on --lt-panel */
  --lt-sh-1:0 1px 2px rgba(23,23,15,.05),0 10px 28px rgba(23,23,15,.08);
  --lt-sh-2:0 2px 4px rgba(23,23,15,.06),0 20px 44px rgba(23,23,15,.12);

  /* ——— Brand gold (ONE gold; gradient allowed ONLY on the
         single primary CTA / featured tier per page) ——— */
  --gold-300:#f6e27a;
  --gold-400:#eccd55;
  --gold:#d4af37;
  --gold-600:#b08d2a;
  --gold-700:#7c621f;
  --gold-ink:#171204;
  --gold-wash:rgba(212,175,55,.08);

  /* ——— Ink (dark theme; body text ≥4.5:1 on its surface) ——— */
  --ink:#f5f1e4;
  --ink-2:#cfc9b4;
  --mut:#a49d86;                       /* ≈6.5:1 on --bg-1 */
  --faint:#8a8570;                     /* ≈4.7:1 on --bg-1 — captions floor */

  /* ——— Semantic — green/red are RESERVED for market P&L ——— */
  --up:#2fbf71;
  --up-dim:#123526;
  --down:#e5484d;
  --down-dim:#3a1518;
  --info:#5b93ff;
  --warn:#f5a524;

  /* ——— Type ——— */
  --font-display:"Sora",system-ui,sans-serif;
  --font-body:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-data:"JetBrains Mono",ui-monospace,Consolas,monospace;

  /* Closed scale: 12/14/16/18/20/24/30/36/48 (+60 hero display) */
  --fs-12:12px; --fs-14:14px; --fs-16:16px; --fs-18:18px;
  --fs-20:20px; --fs-24:24px; --fs-30:30px; --fs-36:36px;
  --fs-48:48px; --fs-60:60px;

  --lh-tight:1.1;                      /* headings 1.0–1.25 */
  --lh-snug:1.25;
  --lh-body:1.6;                       /* body 1.5–1.75 */
  --track-display:-0.03em;             /* headings −0.02…−0.04em */
  --measure:65ch;                      /* line length 45–75ch */

  /* ——— Spacing — 8pt scale ONLY: 4/8/12/16/24/32/48/64/96/128 ——— */
  --sp-1:4px;   --sp-2:8px;   --sp-3:12px;  --sp-4:16px;
  --sp-6:24px;  --sp-8:32px;  --sp-12:48px; --sp-16:64px;
  --sp-24:96px; --sp-32:128px;

  /* ——— Radius — 0/4/8/12/16/28/pill ONLY ——— */
  --r-xs:4px;
  --r-sm:8px;   /* inputs, small buttons */
  --r-md:12px;  /* buttons, small cards */
  --r-lg:16px;  /* cards */
  --r-xl:28px;  /* hero panels, featured pricing */
  --r-pill:999px;

  /* ——— Elevation ———
     Dark: none. Depth = surface ladder + hairline border.
     The gold "shadows" below are 1px rings (focus/emphasis),
     permitted only on the primary CTA / featured tier. */
  --sh-1:none; --sh-2:none; --sh-3:none;
  --sh-gold:0 0 0 1px rgba(212,175,55,.35);
  --sh-gold-strong:0 0 0 1px rgba(212,175,55,.55),0 0 32px rgba(212,175,55,.14);

  /* ——— Motion (transform/opacity only; ease-out) ——— */
  --dur-fast:150ms;                    /* hover */
  --dur:200ms;                         /* panels */
  --dur-slow:300ms;                    /* modals / large surfaces */
  --ease:cubic-bezier(0.16,1,0.3,1);

  /* ——— Layout ——— */
  --wrap:1200px;
  --bp-sm:480px; --bp-md:768px; --bp-lg:1024px; --bp-xl:1280px;
}

/* Base reset every FERGUZ page inherits */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;background:var(--bg-1);color:var(--ink);
  font-family:var(--font-body);font-size:var(--fs-16);line-height:var(--lh-body);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
h1,h2,h3,h4{
  font-family:var(--font-display);line-height:var(--lh-tight);margin:0;
  font-weight:700;letter-spacing:var(--track-display);
}
p{margin:0}
a{color:var(--gold-400)}
img{max-width:100%;display:block}
::selection{background:var(--gold);color:var(--gold-ink)}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:4px}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition:none!important;animation:none!important}
}
