/* ==========================================================================
   Onyx Algo Design System — tokens.css  (v1.0, Nov 2026)
   Onyx Algo LLC · Warm, clean foundation for client work.
   Layer 1  Foundation  (fixed: neutrals, semantic, scale, motion, elevation)
   Layer 2  Client theme (swappable: 8 override tokens, see bottom)
   Layer 3  Aliases     (what components consume; derived from 1 + 2)
   Fonts (Google Fonts, OFL): Inter, Instrument Serif, JetBrains Mono
   ========================================================================== */

:root {
  /* ---------- 1. FOUNDATION · warm neutrals ("paper & onyx") ---------- */
  --onyx-950: #15120F;  /* night canvas (dark bg)            */
  --onyx-900: #1C1814;  /* Onyx ink: headings, primary fills */
  --onyx-800: #27221D;
  --onyx-700: #3A332C;  /* strong body on light              */
  --onyx-600: #4E463D;
  --stone-500: #6B6258; /* muted text  (5.6:1 on paper)      */
  --ash-400:  #8C847A;  /* placeholder / decorative only     */
  --ash-300:  #B8AFA3;
  --sand-200: #E6DED2;  /* borders                           */
  --sand-150: #EDE6DB;  /* dividers                          */
  --linen-100:#F2ECE3;  /* sunken surfaces, table stripes    */
  --paper-50: #FAF7F2;  /* page canvas                       */
  --white:    #FFFFFF;  /* raised cards on paper             */

  /* ---------- brand DNA · peach (carried from the original Onyx site) ---------- */
  --peach-50:  #FFF1EC;
  --peach-100: #FFE0D7;
  --peach-300: #FFB8A8;
  --peach-400: #FF9985;  /* signature accent (fills, highlights, focus) */
  --peach-600: #D9644D;
  --ember-700: #A8473A;  /* peach as TEXT on light (5.4:1)              */
  --ember-800: #7F3328;

  /* ---------- semantic (fixed across all clients) ---------- */
  --success-600: #2F7D57; --success-50: #EAF4EE;
  --warning-600: #9A6412; --warning-50: #FBF2E1;
  --danger-600:  #B23B2B; --danger-50:  #FBECE8;
  --info-600:    #2F64A3; --info-50:    #E8F0F9;

  /* ---------- type ---------- */
  --font-sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 1.250 major-third scale, 16px base */
  --text-xs:   0.75rem;   /* 12  meta, eyebrows (mono, uppercase) */
  --text-sm:   0.875rem;  /* 14  UI, table cells                  */
  --text-base: 1rem;      /* 16  body                             */
  --text-lg:   1.125rem;  /* 18  lead / intro                     */
  --text-xl:   1.25rem;   /* 20  card titles                      */
  --text-2xl:  1.5625rem; /* 25  h3                               */
  --text-3xl:  1.953rem;  /* 31  h2                               */
  --text-4xl:  2.441rem;  /* 39  h1 (app)                         */
  --text-5xl:  3.052rem;  /* 49  display (mobile hero)            */
  --text-6xl:  3.815rem;  /* 61  display (desktop hero)           */
  --leading-tight: 1.08; --leading-snug: 1.25; --leading-body: 1.6;
  --tracking-display: -0.025em; --tracking-heading: -0.015em; --tracking-eyebrow: 0.08em;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700; --weight-heavy: 800;

  /* ---------- space (4px base) ---------- */
  --space-0: 0; --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px; --space-24: 96px; --space-32: 128px;
  --container-max: 1200px; --container-prose: 680px; --gutter: 24px; --grid-columns: 12;

  /* ---------- radius (base values; multiplied by client --theme-radius-scale) ---------- */
  --radius-xs-base: 4px;  --radius-sm-base: 8px;  --radius-md-base: 12px;
  --radius-lg-base: 16px; --radius-xl-base: 24px; --radius-pill: 999px;

  /* ---------- elevation (warm-tinted, low, layered) ---------- */
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(28,24,20,.06);
  --shadow-2: 0 1px 2px rgba(28,24,20,.05), 0 6px 20px rgba(28,24,20,.06);
  --shadow-3: 0 10px 24px rgba(91,76,58,.10), 0 40px 48px rgba(91,76,58,.08);
  --shadow-focus: 0 0 0 3px var(--color-paper), 0 0 0 5px var(--color-focus);

  /* ---------- motion ---------- */
  --ease-standard: cubic-bezier(.2,0,0,1);
  --ease-enter: cubic-bezier(0,0,.2,1);
  --ease-exit: cubic-bezier(.4,0,1,1);
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 320ms; --dur-enter: 480ms;

  /* ---------- 2. CLIENT THEME LAYER · defaults = Onyx ---------- */
  --theme-accent:        var(--peach-400);  /* brand fill (highlights, badges, focus)  */
  --theme-accent-ink:    var(--onyx-900);   /* text/icon placed ON the accent fill     */
  --theme-accent-text:   var(--ember-700);  /* accent used as text on light surfaces   */
  --theme-primary:       var(--onyx-900);   /* primary button / strong fill            */
  --theme-primary-ink:   var(--paper-50);
  --theme-secondary:     var(--sand-200);   /* support color (tags, charts series 2)   */
  --theme-font-display:  var(--font-sans);
  --theme-font-body:     var(--font-sans);
  --theme-font-accent:   var(--font-serif); /* the one emphasized word in headlines    */
  --theme-radius-scale:  1;                 /* 0.5 sharp · 1 Onyx · 1.5 soft            */
  --theme-density:       1;                 /* 0.85 compact · 1 comfortable · 1.15 airy */

  /* ---------- 3. ALIASES (components read only these) ---------- */
  --color-paper:    var(--paper-50);
  --color-surface:  var(--white);
  --color-sunken:   var(--linen-100);
  --color-border:   var(--sand-200);
  --color-divider:  var(--sand-150);
  --color-text:     var(--onyx-900);
  --color-text-2:   var(--onyx-700);
  --color-muted:    var(--stone-500);
  --color-subtle:   var(--ash-400);
  --color-inverse:  var(--onyx-900);
  --color-on-inverse: var(--paper-50);
  --color-focus:    var(--theme-accent-text);

  --radius-xs: calc(var(--radius-xs-base) * var(--theme-radius-scale));
  --radius-sm: calc(var(--radius-sm-base) * var(--theme-radius-scale));
  --radius-md: calc(var(--radius-md-base) * var(--theme-radius-scale));
  --radius-lg: calc(var(--radius-lg-base) * var(--theme-radius-scale));
  --radius-xl: calc(var(--radius-xl-base) * var(--theme-radius-scale));

  --pad-control-y: calc(10px * var(--theme-density));
  --pad-control-x: calc(16px * var(--theme-density));
  --pad-card:      calc(24px * var(--theme-density));
  --pad-section:   calc(96px * var(--theme-density));
  --control-h:     calc(40px * var(--theme-density));
}

/* ---------- Dark mode ("night onyx") ---------- */
[data-mode="dark"], .mode-dark {
  --color-paper:   var(--onyx-950);
  --color-surface: #1E1A16;
  --color-sunken:  #191512;
  --color-border:  #352E27;
  --color-divider: #2A241F;
  --color-text:    #F4EEE6;
  --color-text-2:  #D8D0C4;
  --color-muted:   #A69C90;  /* 6.9:1 on night */
  --color-subtle:  #7A7166;
  --color-inverse: #F4EEE6;
  --color-on-inverse: var(--onyx-900);
  --theme-accent-text: var(--peach-400); /* peach reads at 9:1 on night */
  --theme-primary: #F4EEE6;
  --theme-primary-ink: var(--onyx-900);
  --shadow-2: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-3: 0 16px 48px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]) { /* opt-in: copy dark block here if auto mode is wanted */ } }

/* ==========================================================================
   CLIENT THEMES: none for this site. Onyx Strategies uses the Onyx default
   theme above. A theme block would override only the --theme-* tokens.
   ========================================================================== */
