/* ============================================================
   ALTMATTER SYSTEMS — tokens.css
   Art direction: precision lab. Ink-cobalt primary, amber signal
   accent, graphite darks, warm paper lights. Grotesk display,
   Satoshi body, mono metadata.
   ============================================================ */

:root {
  /* Type scale */
  --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(2.75rem,  0.6rem  + 6.4vw,  7rem);

  /* 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;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1240px;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
}

/* ---------- Color: light ---------- */
:root, [data-theme="light"] {
  --color-bg:              #f4f3f0;
  --color-surface:         #faf9f7;
  --color-surface-2:       #fdfcfb;
  --color-surface-offset:  #ecebe6;
  --color-surface-dynamic: #e3e2dc;
  --color-divider:         #dddcd6;
  --color-border:          #d2d1ca;

  --color-text:        #17181d;
  --color-text-muted:  #5c5d66;
  --color-text-faint:  #9a9ba2;
  --color-text-inverse:#f5f4f1;

  --color-primary:        #2431a8;
  --color-primary-hover:  #1b2582;
  --color-primary-active: #141b61;
  --color-primary-highlight: #d9dbf0;

  --color-accent:        #b06c10;
  --color-accent-strong: #8f5407;
  --color-accent-highlight: #f0e2c8;

  --color-error:   #a12c46;
  --color-success: #33702a;

  --shadow-sm: 0 1px 2px oklch(0.25 0.02 270 / 0.06);
  --shadow-md: 0 4px 14px oklch(0.25 0.02 270 / 0.09);
  --shadow-lg: 0 14px 40px oklch(0.25 0.02 270 / 0.13);

  --hero-ink: #10111a;
  --lattice-dot: rgba(36, 49, 168, 0.5);
  --lattice-line: rgba(36, 49, 168, 0.14);
}

/* ---------- Color: dark ---------- */
[data-theme="dark"] {
  --color-bg:              #0d0e12;
  --color-surface:         #12141a;
  --color-surface-2:       #171a21;
  --color-surface-offset:  #1b1e26;
  --color-surface-dynamic: #232734;
  --color-divider:         #21242e;
  --color-border:          #303442;

  --color-text:        #dbdce2;
  --color-text-muted:  #94959f;
  --color-text-faint:  #5b5d69;
  --color-text-inverse:#15161b;

  --color-primary:        #8d97ff;
  --color-primary-hover:  #a7aeff;
  --color-primary-active: #6d78f0;
  --color-primary-highlight: #23264a;

  --color-accent:        #dfa24e;
  --color-accent-strong: #edbb77;
  --color-accent-highlight: #3a2f1c;

  --color-error:   #d16a84;
  --color-success: #74ab5f;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.38);
  --shadow-lg: 0 14px 40px oklch(0 0 0 / 0.5);

  --hero-ink: #e6e7ee;
  --lattice-dot: rgba(141, 151, 255, 0.55);
  --lattice-line: rgba(141, 151, 255, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #0d0e12;
    --color-surface:         #12141a;
    --color-surface-2:       #171a21;
    --color-surface-offset:  #1b1e26;
    --color-surface-dynamic: #232734;
    --color-divider:         #21242e;
    --color-border:          #303442;
    --color-text:        #dbdce2;
    --color-text-muted:  #94959f;
    --color-text-faint:  #5b5d69;
    --color-text-inverse:#15161b;
    --color-primary:        #8d97ff;
    --color-primary-hover:  #a7aeff;
    --color-primary-active: #6d78f0;
    --color-primary-highlight: #23264a;
    --color-accent:        #dfa24e;
    --color-accent-strong: #edbb77;
    --color-accent-highlight: #3a2f1c;
    --color-error:   #d16a84;
    --color-success: #74ab5f;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 14px oklch(0 0 0 / 0.38);
    --shadow-lg: 0 14px 40px oklch(0 0 0 / 0.5);
    --hero-ink: #e6e7ee;
    --lattice-dot: rgba(141, 151, 255, 0.55);
    --lattice-line: rgba(141, 151, 255, 0.14);
  }
}
