/* Base reset, typography, landmarks, and accessibility helpers */
*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 100%;
  line-height: 1.55;
  color: var(--color-ink);
  background-color: var(--color-surface);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-ink);
  background-color: var(--color-surface);
  overflow-x: clip;
  overflow-wrap: break-word;
}

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

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

h1,
h2,
h3 {
  color: var(--color-ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  hyphens: manual;
}

@media (max-width: 479px) {
  h1,
  h2,
  h3 {
    overflow-wrap: anywhere;
    hyphens: auto;
  }
}

p,
li,
a,
span,
label,
button {
  overflow-wrap: anywhere;
}

a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

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

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

section[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.container {
  width: 100%;
  max-width: calc(var(--container-max) + 5rem);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section-pad {
  padding-block: 3rem;
}

.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;
  top: -100px;
  left: var(--space-4);
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background-color: var(--color-ink);
  color: var(--color-surface);
  font-weight: 700;
  border-radius: var(--radius-control);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--color-surface);
  outline: 3px solid var(--color-brand-light);
}
