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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scroll-padding-bottom: var(--bar-h);
}

@media (min-width: 960px) {
  html {
    scroll-padding-bottom: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-paper);
  min-height: 100vh;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--color-cta);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: 600;
  color: var(--color-graphite);
  margin: 0 0 var(--space-16);
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin: 0 0 var(--space-16);
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-16);
  top: -3rem;
  z-index: 100;
  background: var(--color-graphite);
  color: var(--color-text-invert);
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-16);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
