/* ============================================================
   BASE — Balto element defaults & typography utilities.
   Applies the two-typeface system, Paper canvas, Ink text,
   and quiet link styling. Keep product markup semantic; these
   defaults do most of the work.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

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

/* Headings — Roboto Slab Bold, always. */
h1, h2, h3, h4, h5, h6, .b-display {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin: 0 0 0.5em;
  text-wrap: balance;
}

.b-display { font-size: var(--text-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); }
h1, .b-h1 { font-size: var(--text-h1); line-height: var(--leading-h1); letter-spacing: var(--tracking-h1); }
h2, .b-h2 { font-size: var(--text-h2); line-height: var(--leading-h2); }
h3, .b-h3 { font-size: var(--text-h3); line-height: var(--leading-h3); }

/* Body-copy helpers (Inter) */
.b-lead { font-size: var(--text-lead); line-height: var(--leading-lead); color: var(--text-secondary); }
p, .b-body { font-size: var(--text-body); line-height: var(--leading-body); max-width: var(--container-prose); text-wrap: pretty; }
.b-body-sm { font-size: var(--text-body-sm); line-height: var(--leading-body-sm); }
.b-caption { font-size: var(--text-caption); line-height: var(--leading-caption); letter-spacing: var(--tracking-caption); color: var(--text-muted); }
.b-eyebrow {
  font-size: var(--text-eyebrow);
  line-height: 1.4;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  color: var(--brand);
}

/* Links — quiet, brand blue, underline on hover. */
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 2px; }

/* Selection uses the brand tint, never a jarring color. */
::selection { background: var(--brand-subtle); color: var(--ink-900); }

/* A shared, accessible focus ring. */
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
