/* =========================================================================
   BASE — @font-face, reset, base typography, layout primitives, a11y.
   References tokens only. No brand-specific one-off values.
   ========================================================================= */

/* --- self-hosted fonts (subset woff2 in /fonts) ------------------------- */
@font-face {
  font-family: 'Kudryashev Display';
  src: url('/fonts/kudryashev-display-contrast-sans.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('/fonts/lato-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--type-body);
  letter-spacing: -0.01em;   /* Lato loosens at 18px+; slight tighten (Chiara: spacing felt off) */
  line-height: var(--lh-body);
  font-weight: 300;                 /* Lato Light for body copy */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* --- base headings (Kudryashev Display, lh 1.09) ------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: 0;
}
h1 { font-size: var(--type-display); }   /* hero H1 */
h2 { font-size: var(--type-h1); }        /* section headings (55px) */
h3 { font-size: var(--type-h2); }        /* hero subhead scale */

/* --- shared type helpers ------------------------------------------------ */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--type-eyebrow);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.2;
}
.meta { font-size: var(--type-meta); }

/* --- layout primitives -------------------------------------------------- */
.wrap    { max-width: calc(var(--max-w) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }   /* content = 1820 + gutters outside (border-box) */
.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: 200;
  background: var(--ink); color: var(--bg); padding: var(--space-xs) var(--space-md);
  border-radius: 6px; transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--space-sm); }

/* --- reduced motion ----------------------------------------------------- */
@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;
  }
}
