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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
  margin-block: 0;
}

h1,
h2,
h3 {
  color: var(--text-heading);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--weight-extrabold);
  line-height: var(--line-height-tight);
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--weight-extrabold);
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--weight-bold);
}

p {
  text-wrap: pretty;
}

a {
  color: var(--blue-500);
  text-decoration: none;
}

a:hover {
  color: var(--blue-600);
}

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

button,
a {
  outline: none;
}

button:focus-visible,
a:focus-visible {
  box-shadow: var(--focus-ring);
}

::selection {
  background: var(--blue-100);
  color: var(--navy-800);
}

.container {
  width: min(100% - (var(--container-gutter) * 2), var(--container-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 999;
  padding: var(--space-xs) var(--space-sm);
  background: var(--white);
  color: var(--navy-800);
  font-weight: var(--weight-bold);
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

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

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  margin: -0.0625rem;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

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