/* =========================================================================
   BASE — reset, fonts, base typography, layout primitives, accessibility.
   References tokens only.
   ========================================================================= */
@font-face { font-family: 'Libre Baskerville'; src: url('/fonts/libre-baskerville-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-var.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--white);
  font-family: var(--font-body); font-size: var(--type-body); line-height: var(--lh-body); font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background: none; border: 0; cursor: pointer; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
h1, h2 { font-size: var(--type-display); line-height: var(--lh-display); }
h3 { font-size: var(--type-h3); line-height: var(--lh-heading); }
.h2 { font-size: var(--type-h2); line-height: var(--lh-heading); }
.lead { font-family: var(--font-display); font-size: var(--type-lead); line-height: var(--lh-lead); }
.sub  { font-family: var(--font-display); font-size: var(--type-sub);  line-height: var(--lh-lead); }
.eyebrow { font-size: var(--type-meta); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--white-50); }
.accent { color: var(--accent); }

/* --- layout primitives --- */
.wrap    { width: 100%; max-width: calc(var(--max-w) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space-3xl); }
.stack > * + * { margin-top: var(--space-md); }

/* --- accessibility --- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { 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: absolute; left: var(--space-sm); top: -100px; z-index: 100; background: var(--accent); color: var(--ink-2); padding: var(--space-xs) var(--space-md); border-radius: var(--radius); transition: top var(--dur) var(--ease-out); }
.skip-link:focus { top: var(--space-sm); }

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

/* Anchor jumps cleared the nav by nothing at all (Chiara 16 Sep): the nav is fixed, so
   #form, #ways, #pricing, #register et al landed with their heading tucked under the pill.
   #main is the skip-link target, so this mattered for keyboard users too. Derived from the
   nav tokens so it tracks the pill at every width. */
[id] { scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + var(--space-md)); }
