/* ============================================================
   BASE — element defaults built from the tokens.
   Kept intentionally light: resets + sensible typographic
   defaults so plain HTML already looks on-brand.
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--text-h1); font-weight: var(--weight-display); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); letter-spacing: var(--tracking-normal); }
h4 { font-size: var(--text-h4); letter-spacing: var(--tracking-normal); }

p { margin: 0 0 var(--space-4); }

/* Links — quiet by default: underline offset, ink on hover.
   Defined here so user-added links never render browser-blue. */
a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-300);
  transition: text-decoration-color var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard);
}
a:hover {
  color: var(--text-primary);
  text-decoration-color: var(--text-primary);
}

small { font-size: var(--text-small); }

::selection { background: var(--ink-900); color: var(--white); }

/* Lowercase everywhere — no capitals, brand-wide.
   Overrides inline text-transform (e.g. the uppercase caption). */
body, body * { text-transform: lowercase !important; }

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