/* ============================================================
   Canada Covenant — base: tokens, reset, typography, a11y
   ============================================================ */

:root {
  /* Palette — colorhunt.co/palette/0915401b2cc17692ffabd2fa
     091540 deep navy · 1B2CC1 vivid blue · 7692FF periwinkle · ABD2FA pale blue */
  --ink: #091540;
  --ink-soft: #414a75;
  --paper: #f4f6fb;
  --paper-dim: #e4eaf6;
  --navy: #1b2cc1;
  --navy-on-dark: #7692ff;
  --line: rgba(9, 21, 64, 0.14);
  --line-on-dark: rgba(244, 246, 251, 0.16);
  --paper-on-dark: #f4f6fb;
  --paper-on-dark-soft: #abd2fa;

  /* Type — one family, three weights */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --w-regular: 400;
  --w-semibold: 600;
  --w-black: 800;

  /* Fluid type scale */
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.1875rem, 1.1rem + 0.45vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.3rem + 1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.6rem + 2vw, 3.25rem);
  --text-hero: clamp(3.25rem, 1.5rem + 11vw, 9.5rem);

  /* Rhythm */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(3.5rem, 2.75rem + 3.5vw, 6rem);

  --container: 72rem;
  --measure: 65ch;
  --radius: 2px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: var(--w-regular);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: var(--w-black);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.measure {
  max-width: var(--measure);
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.contact :focus-visible,
.hero :focus-visible {
  outline-color: var(--navy-on-dark);
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: var(--w-semibold);
  text-decoration: none;
  transform: translateY(-300%);
}

.skip-link:focus {
  transform: none;
}

::selection {
  background: var(--navy);
  color: var(--paper);
}

/* ---------- Reduced motion: no animation at all ---------- */
@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;
  }
}
