/* Base reset + type scale + layout — IMPLEMENTATION_SPEC §4. Left-aligned. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--midnight);
  background: var(--white);
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); }

/* Type scale (§4) */
/* Headings balance their last line; body copy avoids single-word orphans. */
h1, h2, h3 { text-wrap: balance; }

h1 {
  font-family: var(--font-heading);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h3 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
p { max-width: 70ch; text-wrap: pretty; }

/* Brand text selection */
::selection { background: var(--blue); color: var(--white); }

/* Layout */
.wrap { width: var(--wrap); margin-inline: auto; }
.narrow { max-width: 720px; }
.section { padding: 96px 0; }
@media (max-width: 700px) { .section { padding: 64px 0; } }

/* Skip link */
.skip-link {
  position: absolute;
  top: 0;
  left: 16px;
  z-index: 200;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 18px;
  border-radius: 0 0 var(--r-control) var(--r-control);
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform .15s cubic-bezier(.32,.72,0,1);
}
.skip-link:focus { transform: translateY(0); color: var(--white); }

/* Visible keyboard focus everywhere */
:focus-visible { outline: 3px solid var(--electric); outline-offset: 2px; }

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

/* Honour reduced motion: hero diagram CSS also ends in final state */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
