/* Base — reset, typography, accessibility helpers */

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

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

@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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-300);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-tight);
  font-weight: 700;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

h1 { font-size: var(--fs-800); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.25em; }

a {
  color: var(--color-primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
a:hover { color: var(--color-primary-dark); }

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

button { cursor: pointer; }

fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

table { border-collapse: collapse; width: 100%; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* Focus visibility — never remove outlines without an equivalent replacement */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--color-text);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: var(--z-toast);
  transition: top var(--transition-base);
  font-weight: 600;
}
.skip-link:focus {
  top: var(--space-4);
}

/* Visually hidden but accessible */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
}

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

@media (max-width: 768px) {
  section { padding-block: var(--space-7); }
}

.section-heading {
  max-width: 46rem;
  margin-bottom: var(--space-6);
}
.section-heading__eyebrow {
  display: inline-block;
  color: var(--color-accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--fs-100);
  margin-bottom: var(--space-2);
}
.section-heading p {
  color: var(--color-text-muted);
  font-size: var(--fs-400);
}

/* No-JS fallback: anything meant to be hidden until JS enhances it must
   still be reachable — see components.css [hidden] rules per element. */
.js-only { display: none; }
.no-js-hide { display: none; }
html.js .js-only { display: revert; }
html.js .no-js-hide.is-active { display: revert; }
