/* ==========================================================================
   DigiThings Design System — Tokens
   --------------------------------------------------------------------------
   Single source of truth for colors, type, spacing, radii, timing.
   Component CSS (components.css) must reference tokens only — no raw hex.
   Base palette mirrors digichat/src/app/globals.css (dark mode).

   Per-module accents are declared as --accent-<module>. A section, card,
   or other scope sets `--accent: var(--accent-digigraph);` and component
   rules consume `var(--accent)`.
   ========================================================================== */

:root {
  /* --- Base palette (dark) --------------------------------------------- */
  --bg-primary: #121212;
  --bg-secondary: #0a0a0a;
  --text-primary: #e6e6e6;
  --text-secondary: #a3a3a3;
  --border-color: #2a2a2a;
  --fg: #ffffff;

  /* Legacy alias kept so pre-existing rules (e.g. h2/h3 color) continue
     to resolve. New components should prefer --fg or --accent. */
  --accent-color: var(--fg);

  /* --- Per-module accent palette --------------------------------------- */
  --accent-digigraph:  #e5b765;
  --accent-digiquant:  #4fa37a;
  --accent-atlas:      #6fbf94;
  --accent-hermes:     #4a8f7b;
  --accent-kairos:     #2f7a65;
  --accent-digisearch: #5aa3c4;
  --accent-digichat:   #9d8fc9;
  --accent-digikey:    #d97a5a;
  --accent-digismith:  #6fa3a3;
  --accent-digiclaw:   #b87840;
  --accent-digibase:   #9ea0a5;
  --accent-digistore:  #7b7fc7;
  --accent-digilink:   #4fa39b;

  /* Scoped accent override pattern: sections/cards set --accent locally,
     defaults to the neutral foreground if unscoped. */
  --accent: var(--fg);

  /* --- Typography ------------------------------------------------------- */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Space Mono', monospace;

  --font-size-h1: clamp(3rem, 6vw, 4.5rem);
  --font-size-h2: 2.5rem;
  --font-size-h3: 1.5rem;
  --font-size-section-title: 3.5rem;
  --font-size-body: 1.25rem;
  --font-size-small: 0.95rem;
  --font-size-xs: 0.85rem;

  /* --- Spacing scale --------------------------------------------------- */
  --spacing-base: 1.5rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --space-8: 6rem;
  --space-9: 8rem;

  /* --- Radius ---------------------------------------------------------- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* --- Motion ---------------------------------------------------------- */
  --transition-speed: 0.8s;
  --transition-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Convenience scoping classes so markup can opt into a module's accent
   without writing inline styles. Any component inside will resolve
   var(--accent) to the module color. */
.accent-digigraph  { --accent: var(--accent-digigraph); }
.accent-digiquant  { --accent: var(--accent-digiquant); }
.accent-atlas      { --accent: var(--accent-atlas); }
.accent-hermes     { --accent: var(--accent-hermes); }
.accent-kairos     { --accent: var(--accent-kairos); }
.accent-digisearch { --accent: var(--accent-digisearch); }
.accent-digichat   { --accent: var(--accent-digichat); }
.accent-digikey    { --accent: var(--accent-digikey); }
.accent-digismith  { --accent: var(--accent-digismith); }
.accent-digiclaw   { --accent: var(--accent-digiclaw); }
.accent-digibase   { --accent: var(--accent-digibase); }
.accent-digistore  { --accent: var(--accent-digistore); }
.accent-digilink   { --accent: var(--accent-digilink); }
