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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--color-accent) var(--color-bg);
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

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

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

a {
  color: inherit;
  text-decoration-color: var(--color-line-strong);
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: currentColor;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--color-ink);
  line-height: 1.03;
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  margin-bottom: var(--size-4);
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
}

h2 {
  margin-bottom: var(--size-4);
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
}

h3 {
  margin-bottom: var(--size-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

em {
  color: var(--color-accent);
  font-style: normal;
}

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

::selection {
  background: var(--color-accent);
  color: white;
}

.container {
  width: min(calc(100% - 2.5rem), var(--container));
  margin-inline: auto;
}

.container.narrow {
  max-width: var(--container-narrow);
}

.section {
  position: relative;
  padding-block: var(--size-8);
}

.section-tight {
  padding-top: var(--size-5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: var(--size-3);
  left: var(--size-3);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-small);
  background: var(--color-ink);
  color: var(--color-bg);
  transform: translateY(-200%);
}

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

@media (max-width: 42rem) {
  .container {
    width: min(calc(100% - 1.5rem), var(--container));
  }

  .section {
    padding-block: var(--size-7);
  }
}

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