/* Reset and base elements. Uses tokens only. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Same-page anchors scroll smoothly (the reduced-motion block at the end
     of this file turns it off) and stop below the sticky header. site.js
     publishes the measured header height; the fallback covers a page without it. */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height, 6rem) + var(--space-16));
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

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

h2 {
  font-size: var(--text-heading-section);
}

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

h4 {
  font-size: var(--text-label);
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

small {
  font-size: var(--text-small);
}

/* Keyboard focus is independent of hover and always visible. */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

:focus:not(:focus-visible) {
  outline: none;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  left: var(--space-16);
  top: var(--space-8);
  z-index: 100;
  padding: var(--space-8) var(--space-16);
  background: var(--paper-white);
  color: var(--ink-base);
  border-radius: var(--radius-control);
  transform: translateY(-200%);
}

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

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

.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-caption);
}

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: none;
  stroke: currentColor;
  vertical-align: middle;
}

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