/* ============================================
   MAXCRAFTSMAN — Design Tokens
   Palette: Deep Ink Navy + Sage Green + Sand
   ============================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f5f2ec;
  --color-surface: #f9f7f2;
  --color-surface-2: #fdfcfa;
  --color-surface-offset: #ede9e1;
  --color-surface-offset-2: #e5e0d7;
  --color-divider: #d8d2c8;
  --color-border: #ccc6ba;

  /* Text */
  --color-text: #1a1e2b;
  --color-text-muted: #6b6a64;
  --color-text-faint: #b0ada6;
  --color-text-inverse: #f5f2ec;

  /* Primary Accent — Sage green */
  --color-primary: #3d6b5e;
  --color-primary-hover: #2e5148;
  --color-primary-active: #1f3830;
  --color-primary-highlight: #c8d9d5;

  /* Secondary Accent — Sand/warm */
  --color-secondary: #b89467;
  --color-secondary-hover: #9a7a52;
  --color-secondary-highlight: #ecddc8;

  /* Navy — used for hero, dark sections */
  --color-navy: #060d1a;
  --color-navy-surface: #0c1526;
  --color-navy-border: #1a2640;
  --color-navy-text: #e8e4dc;
  --color-navy-muted: #8a94a8;


  /* Construction line aesthetic */
  --cross-size: 12px;
  --cross-weight: 1px;
  --cross-offset: -6px;
  --rule-weight: 1px;
  --grid-color: rgba(90, 155, 138, 0.12);

  /* Radius */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --radius-full: 0;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 30, 43, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 30, 43, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 30, 43, 0.12);

  /* Transitions */
  --transition-fast: 120ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Clash Display', 'Georgia', serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* 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(3rem, 0.5rem + 7vw, 8rem);

  /* 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;
}

[data-theme='dark'] {
  --color-bg: #0c1220;
  --color-surface: #101828;
  --color-surface-2: #131d2e;
  --color-surface-offset: #0e1520;
  --color-surface-offset-2: #162035;
  --color-divider: #1e2d42;
  --color-border: #253349;
  --color-text: #dfe3eb;
  --color-text-muted: #7e8fa8;
  --color-text-faint: #4a5a72;
  --color-text-inverse: #0c1220;
  --color-primary: #5a9b8a;
  --color-primary-hover: #3d7a6a;
  --color-primary-active: #2a5c50;
  --color-primary-highlight: #1e3632;
  --color-secondary: #d4a870;
  --color-secondary-hover: #b88a52;
  --color-secondary-highlight: #3a2d1e;
  --color-navy: #060d1a;
  --color-navy-surface: #0c1526;
  --color-navy-border: #1a2640;
  --color-navy-text: #e8e4dc;
  --color-navy-muted: #8a94a8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0c1220;
    --color-surface: #101828;
    --color-surface-2: #131d2e;
    --color-surface-offset: #0e1520;
    --color-surface-offset-2: #162035;
    --color-divider: #1e2d42;
    --color-border: #253349;
    --color-text: #dfe3eb;
    --color-text-muted: #7e8fa8;
    --color-text-faint: #4a5a72;
    --color-text-inverse: #0c1220;
    --color-primary: #5a9b8a;
    --color-primary-hover: #3d7a6a;
    --color-primary-active: #2a5c50;
    --color-primary-highlight: #1e3632;
    --color-secondary: #d4a870;
    --color-secondary-hover: #b88a52;
    --color-secondary-highlight: #3a2d1e;
  }
}
