*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--teal-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.nav-lock {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--teal);
}

h1 {
  font-size: clamp(2.7rem, 5.4vw, 4.6rem);
}

h2 {
  font-size: clamp(2.15rem, 4vw, 3.45rem);
  max-width: 16ch;
}

h3 {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
}

a {
  color: inherit;
}

p {
  color: var(--ink-soft);
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  color: inherit;
  background: none;
  border: 0;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--gold);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  padding: 0.7rem 1rem;
  background: var(--gold);
  color: var(--teal-deep);
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  top: 0.75rem;
}

.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;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

main:focus {
  outline: none;
}

::selection {
  background: var(--gold);
  color: var(--teal-deep);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
