/* ============================================================
   DESIGN TOKENS — Colorado Springs Roofing Platform
   Palette: Deep slate + warm amber accent (strength + trust)
   ============================================================ */

:root,
[data-theme='light'] {
  /* 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;

  /* Surfaces — clean off-white with cool undertone */
  --color-bg:             #f5f5f4;
  --color-surface:        #fafaf9;
  --color-surface-2:      #ffffff;
  --color-surface-offset: #eeeeec;
  --color-divider:        #d6d5d3;
  --color-border:         #c9c8c5;

  /* Text */
  --color-text:         #1c1917;
  --color-text-muted:   #78716c;
  --color-text-faint:   #b5b3b0;
  --color-text-inverse: #fafaf9;

  /* Primary — strong slate-navy */
  --color-primary:           #1e3a5f;
  --color-primary-hover:     #16304f;
  --color-primary-active:    #0f2238;
  --color-primary-highlight: #d0d9e6;

  /* Accent — warm amber (roof / warmth / Colorado sun) */
  --color-accent:           #d97706;
  --color-accent-hover:     #b45309;
  --color-accent-active:    #92400e;
  --color-accent-highlight: #fef3c7;

  /* Success / Error / Warning */
  --color-success:   #15803d;
  --color-error:     #dc2626;
  --color-warning:   #d97706;

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

  /* Shadows */
  --shadow-sm:  0 1px 3px oklch(0.15 0.01 250 / 0.08);
  --shadow-md:  0 4px 16px oklch(0.15 0.01 250 / 0.10);
  --shadow-lg:  0 12px 40px oklch(0.15 0.01 250 / 0.14);
  --shadow-xl:  0 24px 64px oklch(0.15 0.01 250 / 0.18);

  /* Transitions */
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 320ms cubic-bezier(0.16, 1, 0.3, 1);

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

  /* Fonts */
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body:    'Work Sans', 'Helvetica Neue', sans-serif;
}

/* ---- DARK MODE ---- */
[data-theme='dark'],
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #141413;
    --color-surface:        #1a1918;
    --color-surface-2:      #1f1e1d;
    --color-surface-offset: #1d1c1b;
    --color-divider:        #2a2927;
    --color-border:         #363533;
    --color-text:           #e7e5e4;
    --color-text-muted:     #a8a39e;
    --color-text-faint:     #57534e;
    --color-text-inverse:   #1c1917;
    --color-primary:           #6b9fd4;
    --color-primary-hover:     #4f87c2;
    --color-primary-active:    #3370aa;
    --color-primary-highlight: #1e2d3d;
    --color-accent:           #fbbf24;
    --color-accent-hover:     #f59e0b;
    --color-accent-active:    #d97706;
    --color-accent-highlight: #3d2d0e;
    --shadow-sm:  0 1px 3px oklch(0 0 0 / 0.25);
    --shadow-md:  0 4px 16px oklch(0 0 0 / 0.35);
    --shadow-lg:  0 12px 40px oklch(0 0 0 / 0.45);
  }
}

[data-theme='dark'] {
  --color-bg:             #141413;
  --color-surface:        #1a1918;
  --color-surface-2:      #1f1e1d;
  --color-surface-offset: #1d1c1b;
  --color-divider:        #2a2927;
  --color-border:         #363533;
  --color-text:           #e7e5e4;
  --color-text-muted:     #a8a39e;
  --color-text-faint:     #57534e;
  --color-text-inverse:   #1c1917;
  --color-primary:           #6b9fd4;
  --color-primary-hover:     #4f87c2;
  --color-primary-active:    #3370aa;
  --color-primary-highlight: #1e2d3d;
  --color-accent:           #fbbf24;
  --color-accent-hover:     #f59e0b;
  --color-accent-active:    #d97706;
  --color-accent-highlight: #3d2d0e;
  --shadow-sm:  0 1px 3px oklch(0 0 0 / 0.25);
  --shadow-md:  0 4px 16px oklch(0 0 0 / 0.35);
  --shadow-lg:  0 12px 40px oklch(0 0 0 / 0.45);
}
