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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--teal-700);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy-900);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75em;
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.14;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 5rem);
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3.05rem);
  letter-spacing: -0.035em;
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
}

p,
ul,
ol {
  margin-top: 0;
}

ul,
ol {
  padding-left: 1.3rem;
}

::selection {
  background: var(--gold-100);
  color: var(--navy-950);
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 5000;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--navy-900);
  padding: 0.7rem 1rem;
  box-shadow: var(--shadow-md);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
  }
}
