/* =========================================================
   BASE : Global element styles (Pass 4b)
   ========================================================= */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background-color: var(--bg);
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 500;
  line-height: var(--lh-h);
}

h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-h1);
  font-optical-sizing: auto;
}

h2 {
  font-family: var(--font-sans);
  font-size: var(--fs-h2);
  font-weight: 600;
}

h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-h3);
  font-weight: 600;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font-family: inherit; cursor: pointer; }
strong { font-weight: 600; }

/* Typography role classes */
.text-hero {
  font-family: var(--font-serif);
  font-size: var(--fs-hero);
  line-height: var(--lh-hero);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
}

.text-h1 { font-family: var(--font-serif); font-size: var(--fs-h1); line-height: var(--lh-h); }
.text-h2 { font-family: var(--font-sans); font-size: var(--fs-h2); font-weight: 600; line-height: var(--lh-h); }
.text-h3 { font-family: var(--font-sans); font-size: var(--fs-h3); font-weight: 600; line-height: var(--lh-h); }
.text-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.text-body-l { font-size: var(--fs-body-l); line-height: var(--lh-body); }
.text-small { font-size: var(--fs-small); line-height: var(--lh-body); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
  line-height: var(--lh-micro);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

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