/* ============================================================
   BASE - reset + base element styles + typography defaults.
   No layout or component styling here; that lives in
   layout.css and components.css. Everything references tokens.
   ============================================================ */

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

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  letter-spacing: 0.01em;   /* light bone on near-black needs tracking compensation */
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Anton ships a single weight (400); never let the browser invent bold/italic. */
  font-synthesis: none;
  overflow-x: hidden;
}

/* Film-grain texture overlay - adds depth so the dark surfaces don't read flat. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
@media (prefers-reduced-motion: reduce) { body::after { opacity: 0.035; } }

/* ---- Headings ------------------------------------------------
   Anton is single-weight 400 - setting 700/600 triggers faux-bold smear
   (most visible on the 7.5rem hero). All Anton/display elements stay at 400. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-hero); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* Signage (Anton) is reserved for h1/h2 + a handful of deliberate display
   moments. h3/h4 drop to Archivo 800 sentence case so the mid-page
   hierarchy has real contrast instead of four levels of shouting. */
h3, h4 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-transform: none;
}

p { text-wrap: pretty; }

/* ---- Links --------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease),
              opacity var(--dur-fast) var(--ease);
}

/* ---- Media --------------------------------------------------- */
img, svg, video { display: block; max-width: 100%; height: auto; }

/* ---- Forms / buttons reset ----------------------------------- */
button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button { background: none; border: none; cursor: pointer; }

ul, ol { list-style: none; }

/* ---- Accessible focus --------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: calc(var(--z-nav) + 1);
  background: var(--text);
  color: var(--bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-4); }

/* ---- Selection ---------------------------------------------- */
::selection { background: var(--color-accent); color: var(--color-accent-ink); }

/* ---- Utility: visually-hidden ------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* Marker for placeholder content - visible cue while scaffolding.
   Delete this rule once real copy/images are in. */
[data-placeholder] { /* hook for later; no visual change by default */ }
