/* ============================================================================
   BASE.CSS  ·  Reset, global element defaults, layout primitives, utilities
   Loaded AFTER variables.css so it can use the tokens.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; }

/* --- Typography defaults ------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); }
p  { color: var(--text); }

/* Reusable "eyebrow" label — the mono kicker above headings */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: var(--space-3);
}

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

/* Standard vertical rhythm for a full-width section */
.section { padding-block: var(--section-y); }

/* Section heading block (eyebrow + title + optional intro) */
.section-head { max-width: 62ch; margin-bottom: var(--space-6); }
.section-head .lead { color: var(--text-muted); font-size: var(--fs-lg); margin-top: var(--space-3); }

/* --- Accessibility helpers ---------------------------------------------- */
/* Visible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Skip link — first tab stop, hidden until focused */
.skip-link {
  position: absolute; left: var(--space-3); top: -100px;
  background: var(--brand); color: #fff;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-btn);
  z-index: 1000; transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-3); }

/* Screen-reader-only text */
.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;
}

/* --- Scroll-reveal utility ---------------------------------------------- */
/* Elements start slightly down + transparent; JS adds .is-visible on scroll. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
