/* ========================================================================
   Loadbearer — Design Tokens
   Concept: clean / modern / construction-tech — authoritative, restrained.
   Display: Boska. Body: Satoshi. Accent: Loadbearer green #4FA845
   ======================================================================== */

:root,
[data-theme="light"] {
  /* SURFACES — warm neutral, paper-feeling */
  --color-bg:                #f5f3ee;   /* page background, warm off-white */
  --color-surface:           #fbfaf6;   /* card / elevated */
  --color-surface-2:         #ffffff;   /* highest elevation */
  --color-surface-offset:    #ece8df;   /* subtle inset / divider band */
  --color-surface-offset-2:  #e2ddd0;
  --color-divider:           #d8d2c4;
  --color-border:            #c8c1b1;

  /* TEXT */
  --color-text:              #1a1f17;   /* near-black with green undertone */
  --color-text-muted:        #5e6557;
  --color-text-faint:        #99a08f;
  --color-text-inverse:      #f8f6f1;

  /* PRIMARY — Loadbearer green (continuity with dashboards) */
  --color-primary:           #4fa845;
  --color-primary-hover:     #3e8a36;
  --color-primary-active:    #2f6c29;
  --color-primary-highlight: #d6e9d3;

  /* DEEP GREEN — secondary brand (used sparingly for type or fills) */
  --color-deep:              #1d3b1a;
  --color-deep-hover:        #142a12;

  /* DATA-VIZ-ONLY ACCENTS (used in roadmap / timeline) */
  --color-amber:             #c8861f;
  --color-rust:              #a0461d;
  --color-slate:             #4a5568;

  /* RADIUS */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* TRANSITIONS */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth:      400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* SHADOWS — toned to warm surfaces */
  --shadow-sm: 0 1px 2px rgba(26,31,23,0.06);
  --shadow-md: 0 4px 14px rgba(26,31,23,0.08);
  --shadow-lg: 0 16px 36px rgba(26,31,23,0.12);

  /* CONTENT WIDTHS */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1240px;
  --content-bleed:   1480px;

  /* TYPE */
  --font-display: 'Boska', 'Source Serif 4', Georgia, serif;
  --font-body:    'Satoshi', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --text-xs:    clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:    clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:    clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl:    clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:   clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl:   clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero:  clamp(3rem, 0.5rem + 7vw, 8rem);

  /* SPACING — 4px system */
  --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;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ============================== DARK MODE ============================== */
[data-theme="dark"] {
  --color-bg:                #0f120e;
  --color-surface:           #15191a;     /* slight cool to break monotony */
  --color-surface-2:         #1c211d;
  --color-surface-offset:    #1a1f1c;
  --color-surface-offset-2:  #232925;
  --color-divider:           #262d28;
  --color-border:            #3a423b;

  --color-text:              #d8dcd2;
  --color-text-muted:        #8a9285;
  --color-text-faint:        #5d6459;
  --color-text-inverse:      #0f120e;

  --color-primary:           #6dc262;
  --color-primary-hover:     #84d479;
  --color-primary-active:    #9be090;
  --color-primary-highlight: #2a3a27;

  --color-deep:              #b6dab1;
  --color-deep-hover:        #d2e7ce;

  --color-amber:             #e2a558;
  --color-rust:              #d27d52;
  --color-slate:             #8c97a8;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 36px rgba(0,0,0,0.6);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:                #0f120e;
    --color-surface:           #15191a;
    --color-surface-2:         #1c211d;
    --color-surface-offset:    #1a1f1c;
    --color-surface-offset-2:  #232925;
    --color-divider:           #262d28;
    --color-border:            #3a423b;
    --color-text:              #d8dcd2;
    --color-text-muted:        #8a9285;
    --color-text-faint:        #5d6459;
    --color-text-inverse:      #0f120e;
    --color-primary:           #6dc262;
    --color-primary-hover:     #84d479;
    --color-primary-active:    #9be090;
    --color-primary-highlight: #2a3a27;
    --color-deep:              #b6dab1;
    --color-deep-hover:        #d2e7ce;
    --color-amber:             #e2a558;
    --color-rust:              #d27d52;
    --color-slate:             #8c97a8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.5);
    --shadow-lg: 0 16px 36px rgba(0,0,0,0.6);
  }
}
