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

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: var(--font-content);
  font-size: var(--font-size-content);
  font-weight: var(--font-weight-content);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.5;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heading);
  font-size: var(--font-size-heading);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  touch-action: manipulation;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--color-ink);
  color: #fff;
  font-family: var(--font-menu);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--transition-fast);
}

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

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

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

/* Icons: default to the shared brand color, but let fill follow the
   inherited text color so icons placed on a colored background (e.g. the
   footer's blue social buttons) can be overridden to stay visible. */
.icon {
  color: var(--color-primary);
  fill: currentColor;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

main:focus {
  outline: none;
}

@media (max-width: 600px) {
  :root {
    --font-size-content: 16px;
    --section-space: 48px;
  }

  html {
    scroll-padding-top: 88px;
  }
}

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