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

html {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 100%;
  font-weight: var(--weight-regular);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-height);
}

html:focus-within {
  scroll-behavior: smooth;
}

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

  html:focus-within {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
}

body.is-menu-open {
  overflow: hidden;
}

::selection {
  background: var(--color-selection-bg);
  color: var(--color-selection-text);
}

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

svg:not(:root) {
  overflow: visible;
}

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

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

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

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

:focus {
  outline: none;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
.heading-display {
  font-weight: var(--weight-medium);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.heading-xl {
  font-size: var(--heading-xl);
}

.heading-lg {
  font-size: var(--heading-lg);
}

.heading-md {
  font-size: var(--heading-md);
}

.heading-sm {
  font-size: var(--heading-sm);
}

.lede,
.support {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.5;
  max-inline-size: var(--text-max);
}

.support {
  font-size: var(--text-sm);
}

.label {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visually-hidden {
  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: absolute;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--space-3);
  z-index: 80;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg);
  color: var(--color-text);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}
