/* ============================================
   LEEDS BLOCKED DRAIN — Design Tokens & Base
   Colour: urgent blue/navy with high-vis orange CTA
   ============================================ */

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-2: #eef1f6;
  --color-surface-offset: #e4e9f0;
  --color-border: #cdd3dc;
  --color-divider: #d8dde6;

  /* Text */
  --color-text: #0f1c2e;
  --color-text-muted: #4a5568;
  --color-text-faint: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Primary — deep navy blue */
  --color-primary: #1a3a6b;
  --color-primary-hover: #122b52;
  --color-primary-active: #0b1e3a;
  --color-primary-highlight: #dde6f5;

  /* Accent — high-vis emergency orange */
  --color-accent: #e85d04;
  --color-accent-hover: #c94e00;
  --color-accent-active: #a83f00;
  --color-accent-highlight: #fde8d8;

  /* Semantic */
  --color-success: #2d7a3a;
  --color-warning: #b45309;
  --color-error: #c0392b;

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

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15,28,46,0.08);
  --shadow-md: 0 4px 16px rgba(15,28,46,0.10);
  --shadow-lg: 0 12px 36px rgba(15,28,46,0.14);

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

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

  /* 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-hero: clamp(2.5rem, 1rem + 5vw, 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;

  /* Fonts */
  --font-display: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #0a0f18;
  --color-surface: #101828;
  --color-surface-2: #1a2640;
  --color-surface-offset: #1e2d4a;
  --color-border: #2a3a55;
  --color-divider: #1e2d4a;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-faint: #475569;
  --color-text-inverse: #0f1c2e;
  --color-primary: #4a7fd4;
  --color-primary-hover: #6a9de8;
  --color-primary-active: #8ab5f0;
  --color-primary-highlight: #1a2d4a;
  --color-accent: #ff7b2e;
  --color-accent-hover: #ff9455;
  --color-accent-active: #ffad7a;
  --color-accent-highlight: #3a1a08;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 36px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a0f18;
    --color-surface: #101828;
    --color-surface-2: #1a2640;
    --color-surface-offset: #1e2d4a;
    --color-border: #2a3a55;
    --color-divider: #1e2d4a;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-text-faint: #475569;
    --color-text-inverse: #0f1c2e;
    --color-primary: #4a7fd4;
    --color-primary-hover: #6a9de8;
    --color-primary-active: #8ab5f0;
    --color-primary-highlight: #1a2d4a;
    --color-accent: #ff7b2e;
    --color-accent-hover: #ff9455;
    --color-accent-active: #ffad7a;
    --color-accent-highlight: #3a1a08;
  }
}

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

html {
  -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);
}

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.15; font-family: var(--font-display); }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection { background: rgba(26,58,107,0.2); 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;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

button { cursor: pointer; background: none; border: none; }

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