/* tokens.css — DownRight Mobile Detailing design system
   Palette derived directly from the DownRight Car Washing logo:
   near-black/navy background, confident blue wordmark accent, crisp white,
   and a single red taillight accent reserved for tiny highlights only. */

: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, 1rem + 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.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

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

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

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

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f5f8fb;
  --color-surface: #ffffff;
  --color-surface-2: #eef3f9;
  --color-surface-offset: #e3ecf5;
  --color-surface-navy: #0c1a2b;
  --color-surface-navy-2: #16283f;
  --color-divider: #e0e7f0;
  --color-border: #d2dce8;

  /* Text */
  --color-text: #0c1a2b;
  --color-text-muted: #52657a;
  --color-text-faint: #8fa0b3;
  --color-text-inverse: #f5f8fb;

  /* Primary accent (logo blue — AA compliant on white) */
  --color-primary: #215aa0;
  --color-primary-hover: #184370;
  --color-primary-active: #123256;
  --color-primary-highlight: #dce8f6;

  /* Logo taillight red — reserved for tiny badges/highlights only */
  --color-red: #9c0a0e;
  --color-red-bg: #b8070b;
  --color-red-highlight: #fbe1e1;

  /* Semantic */
  --color-success: #2f7a4f;
  --color-success-highlight: #d9efe1;
  --color-error: #b5372f;
  --color-error-highlight: #f6dbd8;
  --color-warning: #a15b12;
  --color-warning-highlight: #f3e2c9;

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 240 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.2 0.03 240 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.2 0.03 240 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #060b14;
  --color-surface: #0e1c30;
  --color-surface-2: #122438;
  --color-surface-offset: #0a1626;
  --color-surface-navy: #060b14;
  --color-surface-navy-2: #0c1a2b;
  --color-divider: #1d2e44;
  --color-border: #253850;

  --color-text: #eef3f8;
  --color-text-muted: #9fb3c8;
  --color-text-faint: #5f7288;
  --color-text-inverse: #0c1a2b;

  --color-primary: #6fb0ff;
  --color-primary-hover: #8fc2ff;
  --color-primary-active: #4f93e8;
  --color-primary-highlight: #16283f;

  --color-red: #ff8f92;
  --color-red-bg: #ff6b6e;
  --color-red-highlight: #3a1315;

  --color-success: #6fce93;
  --color-success-highlight: #1d3a29;
  --color-error: #e08b84;
  --color-error-highlight: #3d2320;
  --color-warning: #e0ab68;
  --color-warning-highlight: #3a2c17;

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #060b14;
    --color-surface: #0e1c30;
    --color-surface-2: #122438;
    --color-surface-offset: #0a1626;
    --color-surface-navy: #060b14;
    --color-surface-navy-2: #0c1a2b;
    --color-divider: #1d2e44;
    --color-border: #253850;
    --color-text: #eef3f8;
    --color-text-muted: #9fb3c8;
    --color-text-faint: #5f7288;
    --color-text-inverse: #0c1a2b;
    --color-primary: #6fb0ff;
    --color-primary-hover: #8fc2ff;
    --color-primary-active: #4f93e8;
    --color-primary-highlight: #16283f;
    --color-red: #ff8f92;
    --color-red-bg: #ff6b6e;
    --color-red-highlight: #3a1315;
    --color-success: #6fce93;
    --color-success-highlight: #1d3a29;
    --color-error: #e08b84;
    --color-error-highlight: #3d2320;
    --color-warning: #e0ab68;
    --color-warning-highlight: #3a2c17;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}
