/* LogosArchive — Design Tokens v3
   Light mode is default. [data-theme="dark"] applies terminal aesthetic.
   Import this file first on every page. Never hardcode these values. */

:root {
  /* Stone ramp — warm gray neutral */
  --stone-0:   #FAFAFA;
  --stone-50:  #F4F3F1;
  --stone-100: #E8E6E3;
  --stone-200: #D1CEC9;
  --stone-300: #B0ADA7;
  --stone-400: #8C8880;
  --stone-500: #6B6760;
  --stone-600: #504D47;
  --stone-700: #3A3832;
  --stone-800: #262420;
  --stone-900: #17150F;
  --stone-950: #0C0B07;

  /* Gold ramp — single accent */
  --gold-50:  #FBF8EE;
  --gold-100: #F3ECCC;
  --gold-200: #E8D898;
  --gold-300: #D9BF62;
  --gold-400: #C8A43A;
  --gold-500: #B08D24;
  --gold-600: #8E711A;
  --gold-700: #6C5513;
  --gold-800: #4A3A0D;
  --gold-900: #2A2008;

  /* Category colors — text / bg / border */
  --cat-nt:         #1A4A2E;
  --cat-nt-bg:      #EDF5F0;
  --cat-nt-border:  #B8D9C5;
  --cat-apo:        #1E3A6B;
  --cat-apo-bg:     #EDF1F9;
  --cat-apo-border: #B5C8E8;
  --cat-gno:        #4A1A6B;
  --cat-gno-bg:     #F3EDF9;
  --cat-gno-border: #CEAEE8;
  --cat-fat:        #5C2D0A;
  --cat-fat-bg:     #F9F1EC;
  --cat-fat-border: #DEC0A5;
  --cat-oth:        #1A3D4A;
  --cat-oth-bg:     #EDF3F5;
  --cat-oth-border: #AAC8D3;
  --cat-stj:        #4A3800;
  --cat-stj-bg:     #FFF8E6;
  --cat-stj-border: #D4B84A;
  --cat-grb:        #1A2E4A;
  --cat-grb-bg:     #E8F0F8;
  --cat-grb-border: #7AAAD4;

  /* Semantic surface */
  --color-page:    var(--stone-0);
  --color-surface: var(--stone-50);
  --color-raised:  #FFFFFF;
  --color-overlay: rgba(23,21,15,0.05);

  /* Semantic text */
  --color-text-primary:   var(--stone-900);
  --color-text-secondary: var(--stone-500);
  --color-text-tertiary:  var(--stone-300);

  /* Semantic accent — gold in light mode */
  --color-accent:      var(--gold-600);
  --color-accent-dim:  var(--gold-700);
  --color-accent-glow: rgba(142,113,26,0.12);
  --color-text-accent: var(--gold-600);

  /* Semantic borders */
  --color-border-subtle:  var(--stone-100);
  --color-border-default: var(--stone-200);
  --color-border-strong:  var(--stone-300);
  --color-border-accent:  var(--gold-300);

  /* Header background (semi-transparent for backdrop blur) */
  --color-header-bg: rgba(250,250,250,0.94);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;  /* doc titles + wordmark italic */
  --font-heading: 'Jost', 'Futura', system-ui, sans-serif;
  --font-body:    'Lora', Georgia, serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Type scale */
  --text-xs:   0.6875rem;  /* 11px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 0.9375rem;  /* 15px */
  --text-md:   1.0625rem;  /* 17px */
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.625rem;   /* 26px */
  --text-2xl:  2.25rem;    /* 36px */
  --text-3xl:  3.25rem;    /* 52px */

  /* Tracking */
  --tracking-tight:   -0.02em;
  --tracking-wide:     0.06em;
  --tracking-wider:    0.12em;
  --tracking-widest:   0.18em;

  /* Leading */
  --leading-tight:   1.1;
  --leading-snug:    1.3;
  --leading-normal:  1.5;
  --leading-relaxed: 1.7;
  --leading-loose:   1.85;

  /* Weight */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --sidebar-width:      220px;
  --header-height:      52px;
  --container-reading:  660px;

  /* Radius */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(23,21,15,0.07);
  --shadow-md: 0 4px 12px rgba(23,21,15,0.08);

  /* ── Terminal shell tokens (fixed constants — do not theme these) ── */
  --shell-bg:          #0f0f0f;
  --shell-raised:      #161616;
  --shell-card:        #1c1c1c;
  --shell-fg:          #d8d8d8;
  --shell-fg-dim:      #888888;
  --shell-fg-quiet:    #444444;
  --shell-rule:        #252525;
  --shell-accent:      #6b9e6b;
  --shell-accent-dim:  #4a734a;
  --shell-accent-glow: rgba(107, 158, 107, 0.12);

  /* ── Reading surface aliases (map to semantic tokens) ── */
  --read-bg:       var(--color-page);
  --read-text:     var(--color-text-primary);
  --read-text-sec: var(--color-text-secondary);
  --read-border:   var(--color-border-default);
}

/* ── Dark mode overrides ────────────────────────────────────────────
   Applied when <html data-theme="dark"> is set.
   All --color-* and --cat-* tokens remap to terminal dark values.
   --font-heading switches to JetBrains Mono for the terminal aesthetic.
   ──────────────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  /* Surface */
  --color-page:            #0f0f0f;
  --color-surface:         #161616;
  --color-raised:          #1c1c1c;
  --color-overlay:         rgba(255,255,255,0.04);

  /* Text */
  --color-text-primary:    #d8d8d8;
  --color-text-secondary:  #888888;
  --color-text-tertiary:   #444444;

  /* Accent — green in dark mode */
  --color-accent:          #6b9e6b;
  --color-accent-dim:      #4a734a;
  --color-accent-glow:     rgba(107,158,107,0.12);
  --color-text-accent:     #6b9e6b;

  /* Borders */
  --color-border-subtle:   #1c1c1c;
  --color-border-default:  #252525;
  --color-border-strong:   #333333;
  --color-border-accent:   #4a734a;

  /* Header */
  --color-header-bg:       rgba(15,15,15,0.94);

  /* Heading font switches to mono for terminal aesthetic */
  --font-heading:          'JetBrains Mono', monospace;

  /* Category badge colors — dark variants */
  --cat-nt:         #8dcc9e;
  --cat-nt-bg:      #0d2318;
  --cat-nt-border:  #1a4a2e;
  --cat-apo:        #9ab5e8;
  --cat-apo-bg:     #0d1828;
  --cat-apo-border: #1e3a6b;
  --cat-gno:        #c49be8;
  --cat-gno-bg:     #1a0d28;
  --cat-gno-border: #4a1a6b;
  --cat-fat:        #e8b09e;
  --cat-fat-bg:     #1f0f05;
  --cat-fat-border: #5c2d0a;
  --cat-oth:        #9ec8d6;
  --cat-oth-bg:     #0d1a1f;
  --cat-oth-border: #1a3d4a;
  --cat-stj:        #e8d472;
  --cat-stj-bg:     #1f1800;
  --cat-stj-border: #4A3800;
  --cat-grb:        #9ab8d6;
  --cat-grb-bg:     #0d1828;
  --cat-grb-border: #1A2E4A;
}
