/* ============================================================
   Axorum — base element styles & utility primitives.
   Light-touch resets so specimens/components inherit the brand
   without a framework. Theme-aware: a .ax-machine / [data-theme]
   subtree flips to the machine substrate automatically.
   ============================================================ */

:root {
  color-scheme: light;
}

body.ax-root,
.ax-root {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Editorial / display helpers */
.ax-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-accent);
}

/* Big statements are the serif — the editorial signature. */
.ax-display {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text-strong);
}

/* Product-UI headings are the sans. */
.ax-heading {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
  color: var(--text-strong);
}

.ax-serif {
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
}
.ax-serif-italic { font-family: var(--font-serif); font-style: italic; }

.ax-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Tabular numbers everywhere numeric precision matters (ledger figures) */
.ax-tnum { font-variant-numeric: tabular-nums; }

a {
  color: var(--text-link);
  text-decoration: none;
}
a:hover { color: var(--text-link-hover); text-decoration: underline; text-underline-offset: 2px; }

::selection {
  background: var(--prussian-100);
  color: var(--prussian-900);
}

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

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