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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--sp-16));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-80);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p, figure, ul, ol, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { margin: 0; font: inherit; color: inherit; }
button { padding: 0; cursor: pointer; }
sub, sup { line-height: 0; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--sp-8);
  z-index: 100;
  padding: var(--sp-8) var(--sp-12);
  background: var(--ink);
  color: var(--cream);
}
.skip-link:focus { left: var(--sp-8); }
/* The skip link moves focus to <main tabindex="-1">; no outline around the whole page. */
main:focus { outline: none; }

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

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Every page section uses one of these; nothing else sets section padding. */
.section { padding-block: var(--section-y); }
.section--band { padding-block: var(--band-y); }
.section--hero { padding-top: var(--sp-64); padding-bottom: var(--section-y); }
/* Two cream sections in a row: one --section-y between them, not two stacked. */
.section:not([class*="bg-"]) + .section:not([class*="bg-"]) { padding-top: 0; }
.bg-white + .bg-white.section { padding-top: 0; }

.bg-cream  { background: var(--cream); }
.bg-white  { background: var(--white); }
.bg-ink    { background: var(--ink); color: var(--on-dark); }
.bg-forest { background: var(--forest); color: var(--on-dark); }
.bg-clay   { background: var(--clay); color: var(--on-dark); }
