/* ==========================================================================
   Base — reset, document defaults, typography, shared layout primitives
   ========================================================================== */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

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

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

a { color: var(--primary-dk); }
a:hover { color: var(--primary); }

ul, ol { list-style: none; }

/* Visible focus for keyboard users on every interactive element */
:where(a, button, input, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Headings --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 700;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: 999;
  background: var(--ink);
  color: var(--surface);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; color: var(--surface); }

/* --- Layout primitives --- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 96px); }
.section--white { background: var(--white); }
.section--cream { background: var(--surface); }

.section-tag {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-dk);
  margin-bottom: var(--sp-3);
}

.section-title {
  font-size: var(--fs-h2);
  line-height: 1.2;
  margin-bottom: var(--sp-4);
}

.section-sub {
  color: var(--ink-md);
  font-size: var(--fs-md);
  line-height: 1.7;
  max-width: 56ch;
}

.section-head { margin-bottom: var(--sp-7); }

/* Utility */
.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;
}
.center { text-align: center; }
.center .section-sub { margin-inline: auto; }
