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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

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

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

body {
  margin: 0;
  background: var(--color-canvas);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

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

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

button {
  cursor: pointer;
}

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

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

h1,
h2,
h3,
p,
figure {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(3rem, 4.8rem, 5.8rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(2rem, 2.8rem, 3.4rem);
}

h3 {
  font-size: 1.1rem;
}

@media (max-width: 38rem) {
  h2 {
    font-size: 1.85rem;
  }
}

p {
  color: var(--color-text-muted);
  margin-block-end: var(--space-md);
}

ul,
ol {
  color: var(--color-text-muted);
  padding-inline-start: 1.25rem;
}

li + li {
  margin-block-start: var(--space-xs);
}

.skip-link {
  background: var(--color-text);
  border-radius: var(--radius-sm);
  color: var(--color-canvas);
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  position: fixed;
  top: var(--space-md);
  transform: translateY(-180%);
  z-index: var(--z-overlay);
}

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

.visually-hidden {
  block-size: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  inline-size: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}
