/* ---- Design tokens ---- */
: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.25rem);
  --text-3xl: clamp(2.5rem, 1.4rem + 4vw, 4.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;

  /* Fonts */
  --font-display: "Cabinet Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Brand colours (HEA navy + emerald) */
  --navy-950: #050e1c;
  --navy-900: #081a30;
  --navy-800: #0b2340;
  --navy-700: #143257;
  --navy-600: #1e4576;
  --navy-500: #365f92;

  --emerald-700: #0a7d55;
  --emerald-600: #0f9d6b;
  --emerald-500: #29b783;
  --emerald-400: #5ecfa1;
  --emerald-200: #c9ecdb;

  --sand-50: #f8f6f1;
  --sand-100: #efece3;
  --sand-200: #e2ddce;

  --ink-950: #08111f;
  --ink-800: #182234;
  --ink-600: #4b586c;
  --ink-500: #6a778b;
  --ink-400: #98a2b5;
  --ink-200: #d7dce4;
  --ink-100: #eef1f6;

  /* Semantic (light) */
  --bg: #fbfaf6;
  --bg-elev: #ffffff;
  --bg-muted: #f2efe8;
  --surface: #ffffff;
  --border: #e5e0d1;
  --border-strong: #cfc7b0;
  --fg: var(--ink-950);
  --fg-muted: var(--ink-600);
  --fg-subtle: var(--ink-500);
  --accent: var(--emerald-600);
  --accent-strong: var(--emerald-700);
  --btn-green: var(--emerald-400);
  --btn-green-hover: var(--emerald-500);
  --btn-green-ink: #062718;
  --brand: var(--navy-800);
  --brand-strong: var(--navy-900);

  --shadow-sm: 0 1px 2px rgba(10, 20, 40, .06), 0 1px 1px rgba(10, 20, 40, .04);
  --shadow-md: 0 8px 24px -12px rgba(10, 20, 40, .18);
  --shadow-lg: 0 24px 60px -30px rgba(10, 20, 40, .35);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  --container-max: 1200px;
  --container-pad: clamp(1.25rem, 3vw, 2.5rem);
}

[data-theme="dark"] {
  --bg: #060d1a;
  --bg-elev: #0b1524;
  --bg-muted: #0d1a2e;
  --surface: #0f1c31;
  --border: #1c2b45;
  --border-strong: #26385a;
  --fg: #f0f2f7;
  --fg-muted: #a9b4c7;
  --fg-subtle: #7d8aa1;
  --accent: var(--emerald-500);
  --accent-strong: var(--emerald-400);
  --brand: #e8ecf3;
  --brand-strong: #ffffff;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  font-feature-settings: "ss01", "ss02", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
p { margin: 0; }
a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: .75rem 1rem; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }
