/* ============================================
   GLASS RX — Design Tokens
   Concept: precision auto-glass care. Cool, clear,
   trustworthy blue against clean glass-white neutrals,
   with a warm amber accent reserved for small highlights.
   ============================================ */

:root {
  /* Type scale — fluid clamp() */
  --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.5rem + 6vw, 6.5rem);

  /* 4px spacing system */
  --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: 1.25rem;
  --radius-full: 9999px;

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

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

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
}

:root,
[data-theme='light'] {
  /* Surfaces — cool glass white */
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-surface-2: #fbfcfd;
  --color-surface-offset: #eceff3;
  --color-surface-offset-2: #e1e6eb;
  --color-surface-dynamic: #d8dee5;
  --color-divider: #dee3e8;
  --color-border: #ccd4db;

  /* Text */
  --color-text: #10161d;
  --color-text-muted: #57636f;
  --color-text-faint: #93a0aa;
  --color-text-inverse: #f6f8fa;

  /* Primary accent — Rx Blue */
  --color-primary: #1e4fd1;
  --color-primary-hover: #17399b;
  --color-primary-active: #112c74;
  --color-primary-highlight: #dce6fb;

  /* Warm accent — Rx Amber (sparing use: badges/icons only) */
  --color-accent-warm: #c97a0e;
  --color-accent-warm-highlight: #f3e1c4;

  /* Semantic */
  --color-warning: #96541e;
  --color-warning-highlight: #e6d3bd;
  --color-error: #a52c4f;
  --color-error-highlight: #e3cdd6;
  --color-success: #2f7a4a;
  --color-success-highlight: #cfe3d5;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 250 / 0.07);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 250 / 0.09);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 250 / 0.14);
}

[data-theme='dark'] {
  --color-bg: #0b0f14;
  --color-surface: #10151b;
  --color-surface-2: #141a21;
  --color-surface-offset: #171d24;
  --color-surface-offset-2: #1c232b;
  --color-surface-dynamic: #232b33;
  --color-divider: #232a31;
  --color-border: #2c343c;

  --color-text: #dce2e8;
  --color-text-muted: #8b96a1;
  --color-text-faint: #5c6670;
  --color-text-inverse: #10151b;

  --color-primary: #7ea0f2;
  --color-primary-hover: #5c85ec;
  --color-primary-active: #4570d6;
  --color-primary-highlight: #1e2a44;

  --color-accent-warm: #e2a54b;
  --color-accent-warm-highlight: #3a2e1b;

  --color-warning: #d99a5c;
  --color-warning-highlight: #3a2e1e;
  --color-error: #d97e9b;
  --color-error-highlight: #3a232b;
  --color-success: #7fc898;
  --color-success-highlight: #1e3324;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0b0f14;
    --color-surface: #10151b;
    --color-surface-2: #141a21;
    --color-surface-offset: #171d24;
    --color-surface-offset-2: #1c232b;
    --color-surface-dynamic: #232b33;
    --color-divider: #232a31;
    --color-border: #2c343c;
    --color-text: #dce2e8;
    --color-text-muted: #8b96a1;
    --color-text-faint: #5c6670;
    --color-text-inverse: #10151b;
    --color-primary: #7ea0f2;
    --color-primary-hover: #5c85ec;
    --color-primary-active: #4570d6;
    --color-primary-highlight: #1e2a44;
    --color-accent-warm: #e2a54b;
    --color-accent-warm-highlight: #3a2e1b;
    --color-warning: #d99a5c;
    --color-warning-highlight: #3a2e1e;
    --color-error: #d97e9b;
    --color-error-highlight: #3a232b;
    --color-success: #7fc898;
    --color-success-highlight: #1e3324;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
  }
}
