/* ==========================================================================
   base.css — design tokens, reset, typography
   ========================================================================== */

:root {
  /* Colour */
  --ink: #0e2233;          /* dark navy: headings, key text, dark bands */
  --ink-2: #364b5c;        /* body text */
  --muted: #5b6e7c;        /* secondary text */
  --teal: #177a83;         /* primary action */
  --teal-deep: #0e5a62;    /* hover / pressed */
  --mist: #e4f0f1;         /* soft teal-blue tint */
  --mist-2: #eef5f6;
  --paper: #f7f9f9;        /* page background */
  --white: #ffffff;
  --line: #d8e3e5;         /* borders */
  --danger: #b3261e;

  /* Type */
  --font-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-sm: 0.875rem;
  --fs-base: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.75rem);
  --fs-h1: clamp(2.75rem, 1.7rem + 4.6vw, 5rem);

  /* Shape and space */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-pill: 999px;
  --section-y: clamp(4rem, 2.8rem + 5vw, 7.5rem);
  --gutter: clamp(1.25rem, 0.8rem + 2vw, 2.5rem);
  --maxw: 1180px;
  --header-h: 72px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.025em; line-height: 1.02; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--mist); color: var(--ink); }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-sm);
  transition: top 0.15s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--white); }

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