/* ============================================================
   APG — Base element styles & utility helpers.
   Light-touch resets + brand defaults for raw HTML.
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headings default to the display serif */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  margin: 0 0 0.4em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-family: var(--font-sans); font-weight: var(--fw-semibold); letter-spacing: 0; }

p { margin: 0 0 1em; text-wrap: pretty; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-standard);
}
a:hover { color: var(--text-link-hover); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

strong { font-weight: var(--fw-semibold); color: var(--text-strong); }
hr { border: none; border-top: var(--bw-hair) solid var(--divider); margin: var(--space-8) 0; }

::selection { background: var(--copper-200); color: var(--navy-900); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* -------- Utility / helper classes -------- */
.apg-eyebrow {
  font-family: var(--font-eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-accent);
}
.apg-display {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  color: var(--text-strong);
}
.apg-lede {
  font-family: var(--font-sans);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}
.apg-serif-body {
  font-family: var(--font-serif);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
}
/* The signature copper rule — a short accent line under eyebrows/headings */
.apg-rule {
  display: inline-block;
  width: 48px;
  height: var(--bw-rule);
  background: var(--brand-accent);
  border: none;
  margin: 0;
}
.apg-container { max-width: var(--container-lg); margin-inline: auto; padding-inline: var(--gutter); }
