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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-5);
  color: var(--color-brand);
  font-family: var(--font-heading);
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(var(--mobile-h1), 5vw, var(--h1-size));
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(var(--mobile-h2), 4vw, var(--h2-size));
  line-height: 1.15;
}

h3 {
  font-size: clamp(var(--mobile-h3), 3vw, var(--h3-size));
  line-height: 1.25;
}

h4 {
  font-size: clamp(var(--mobile-h4), 2.5vw, var(--h4-size));
  line-height: 1.3;
}

p {
  max-width: var(--content-measure);
  margin: 0 0 var(--space-5);
}

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

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

::selection {
  background: var(--color-blue-tint);
  color: var(--color-brand);
}

.container {
  width: min(100% - (var(--page-padding) * 2), var(--container-width));
  margin-inline: auto;
}

.layout-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: var(--grid-gap);
}

.grid-full {
  grid-column: 1 / -1;
}

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

.text-large {
  font-size: var(--body-large);
}

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

.text-secondary {
  color: var(--color-text-secondary);
}

.content-measure {
  max-width: var(--content-measure);
}

.hero-measure {
  max-width: var(--hero-measure);
}

.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;
  z-index: 1000;
  top: var(--space-4);
  left: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-brand);
  font-weight: 600;
  box-shadow: var(--shadow-overlay);
  transform: translateY(-180%);
}

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

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