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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-gray-main);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body,
button {
  font-family: var(--font-body);
}

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

img {
  height: auto;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--color-gray-main);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

h1 {
  margin-bottom: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
}

h1 span {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: 0.6em;
  font-weight: 500;
}

h2 {
  margin-bottom: var(--space-5);
  font-size: var(--text-2xl);
  font-weight: 600;
}

h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 700;
}

p {
  margin-bottom: var(--space-4);
  max-width: 65ch;
  overflow-wrap: anywhere;
}

a {
  color: inherit;
  overflow-wrap: anywhere;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

::selection {
  background: var(--color-pink-4);
  color: var(--color-ink);
}

.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;
}

.skip-link {
  position: fixed;
  inset: var(--space-3) auto auto var(--space-3);
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-ink);
  color: var(--color-white);
  transform: translateY(-160%);
  transition: transform var(--transition);
}

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

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

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

@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }

  .button,
  .nav-toggle {
    border: 1px solid ButtonText;
  }
}
