/* tokens.css — Keystone Steel Buildings design system
   Industrial / structural concept: graphite steel neutrals + corten-rust accent */

: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.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.75rem);
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 6rem);

  /* Spacing (4px base) */
  --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.25rem;
  --radius-md: 0.4rem;
  --radius-lg: 0.6rem;
  --radius-xl: 0.9rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1240px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

:root,
[data-theme='light'] {
  /* Surfaces — cool concrete/steel neutrals */
  --color-bg: #f1efea;
  --color-surface: #ffffff;
  --color-surface-2: #f8f6f2;
  --color-surface-offset: #eae7e0;
  --color-surface-offset-2: #e1ddd4;
  --color-surface-dynamic: #d8d3c8;
  --color-divider: #dfdbd2;
  --color-border: #cfcabe;

  /* Text — charcoal steel */
  --color-text: #201f1c;
  --color-text-muted: #63605a;
  --color-text-faint: #9a968c;
  --color-text-inverse: #f6f3ee;

  /* Primary accent — corten rust/amber */
  --color-primary: #b8501e;
  --color-primary-hover: #963e15;
  --color-primary-active: #75300f;
  --color-primary-highlight: #f0dcc9;

  /* Structural dark (headers, footer, dark bands) */
  --color-ink: #1b1c1f;
  --color-ink-2: #24262b;

  /* Warning / Error / Success (kept for form states) */
  --color-warning: #96631a;
  --color-warning-highlight: #eadfc6;
  --color-error: #a4322a;
  --color-error-highlight: #e6d0cc;
  --color-success: #3f7a3a;
  --color-success-highlight: #d6e2ce;

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 60 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.2 0.01 60 / 0.12);
  --shadow-lg: 0 16px 40px oklch(0.2 0.01 60 / 0.18);
}

[data-theme='dark'] {
  --color-bg: #15161a;
  --color-surface: #1b1c21;
  --color-surface-2: #202126;
  --color-surface-offset: #24262b;
  --color-surface-offset-2: #2a2c31;
  --color-surface-dynamic: #33353a;
  --color-divider: #2b2c31;
  --color-border: #3a3b40;

  --color-text: #e9e6de;
  --color-text-muted: #a3a099;
  --color-text-faint: #6f6c66;
  --color-text-inverse: #1b1c21;

  --color-primary: #e2762f;
  --color-primary-hover: #ef8b4c;
  --color-primary-active: #f7a56e;
  --color-primary-highlight: #3d2a1c;

  --color-ink: #0f1013;
  --color-ink-2: #191a1e;

  --color-warning: #d4a743;
  --color-warning-highlight: #453b26;
  --color-error: #d3665c;
  --color-error-highlight: #452e2c;
  --color-success: #7fb26f;
  --color-success-highlight: #29331f;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-bg: #15161a;
    --color-surface: #1b1c21;
    --color-surface-2: #202126;
    --color-surface-offset: #24262b;
    --color-surface-offset-2: #2a2c31;
    --color-surface-dynamic: #33353a;
    --color-divider: #2b2c31;
    --color-border: #3a3b40;
    --color-text: #e9e6de;
    --color-text-muted: #a3a099;
    --color-text-faint: #6f6c66;
    --color-text-inverse: #1b1c21;
    --color-primary: #e2762f;
    --color-primary-hover: #ef8b4c;
    --color-primary-active: #f7a56e;
    --color-primary-highlight: #3d2a1c;
    --color-ink: #0f1013;
    --color-ink-2: #191a1e;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
  }
}
