/* ==============================================
   LONDON AUTO CARE — BASE STYLES
   Automotive: dark steel surfaces, amber 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.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7.5rem);

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

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.625rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

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

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

  /* Fonts */
  --font-display: 'Clash Grotesk', 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* === AUTOMOTIVE DARK PALETTE === */
:root,
[data-theme='dark'] {
  --color-bg: #0e0f11;
  --color-surface: #13151a;
  --color-surface-2: #181b21;
  --color-surface-offset: #1e2028;
  --color-surface-dynamic: #252830;
  --color-divider: #2a2d36;
  --color-border: #343844;

  --color-text: #e8e9ec;
  --color-text-muted: #888d9a;
  --color-text-faint: #4a4f5c;
  --color-text-inverse: #0e0f11;

  /* Amber accent — precision & power */
  --color-primary: #f59e0b;
  --color-primary-hover: #d97706;
  --color-primary-active: #b45309;
  --color-primary-highlight: rgba(245, 158, 11, 0.12);

  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-warning: #f97316;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 32px rgba(245, 158, 11, 0.15);
}

/* === LIGHT MODE === */
[data-theme='light'] {
  --color-bg: #f5f5f0;
  --color-surface: #fafaf7;
  --color-surface-2: #ffffff;
  --color-surface-offset: #eeede8;
  --color-surface-dynamic: #e5e4df;
  --color-divider: #d8d7d2;
  --color-border: #cccbc5;

  --color-text: #1a1b1e;
  --color-text-muted: #5a5d6a;
  --color-text-faint: #aaaaab;
  --color-text-inverse: #f5f5f0;

  --color-primary: #d97706;
  --color-primary-hover: #b45309;
  --color-primary-active: #92400e;
  --color-primary-highlight: rgba(217, 119, 6, 0.1);

  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-warning: #ea580c;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 32px rgba(217, 119, 6, 0.12);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg: #f5f5f0;
    --color-surface: #fafaf7;
    --color-surface-2: #ffffff;
    --color-surface-offset: #eeede8;
    --color-surface-dynamic: #e5e4df;
    --color-divider: #d8d7d2;
    --color-border: #cccbc5;
    --color-text: #1a1b1e;
    --color-text-muted: #5a5d6a;
    --color-text-faint: #aaaaab;
    --color-text-inverse: #f5f5f0;
    --color-primary: #d97706;
    --color-primary-hover: #b45309;
    --color-primary-active: #92400e;
    --color-primary-highlight: rgba(217, 119, 6, 0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.09);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 32px rgba(217, 119, 6, 0.12);
  }
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-16);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.25s ease, color 0.25s ease;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.1;
  font-family: var(--font-display);
  font-weight: 700;
}

p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection { background: var(--color-primary-highlight); color: var(--color-text); }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button { cursor: pointer; background: none; border: none; }
table { border-collapse: collapse; width: 100%; }

a, button, [role='button'] {
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}
