/* ============================================================================
   Base — reset, document defaults, typography, a11y, utilities
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: var(--fs-display); font-weight: 800; line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
strong, b { font-weight: 700; color: var(--ink); }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }
::placeholder { color: var(--faint); opacity: 1; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-xs);
}

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

/* --- Accessibility helpers ---------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: var(--z-toast);
  padding: .7rem 1.1rem; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-sm);
  transform: translateY(-160%); transition: transform var(--dur-2) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* --- Icons -------------------------------------------------------------- */
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

/* --- Layout primitives --------------------------------------------------- */
.container {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: var(--page-pad);
}
.container--hero { max-width: var(--container-hero); }

.section { padding-block: var(--section-y); position: relative; }
.section--card { background: var(--card); border-block: 1px solid var(--line); }

/* --- Reusable type roles ------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--accent-deep);
}
.lead {
  font-size: var(--fs-lead); line-height: var(--lh-relaxed);
  color: var(--muted); max-width: var(--measure); text-wrap: pretty;
}
.text-muted { color: var(--muted); }
.hl { color: var(--accent); }

.no-scroll { overflow: hidden; }
