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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

button {
  border: 0;
}

a {
  color: var(--color-brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

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

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

h1,
h2,
h3,
h4 {
  color: var(--color-heading);
  line-height: 1.3;
}

h1 {
  font-size: var(--text-display);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-xl);
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: min(calc(100% - 48px), var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-20);
}

.section--soft {
  background: var(--color-surface-soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: var(--space-10);
}

.section-heading h2 {
  margin-bottom: var(--space-3);
}

.section-heading p {
  color: var(--color-muted);
  font-size: var(--text-lg);
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-heading);
  color: #fff;
  transform: translateY(-160%);
  transition: transform var(--transition-fast);
}

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

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

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  body {
    font-size: 15px;
  }

  .container {
    width: min(calc(100% - 32px), var(--container-max));
  }

  .section {
    padding-block: var(--space-12);
  }
}

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

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