/* ──────────────────────────────────────────────────────────────
   typography.css — Cormorant Garamond for display, system for all
   running text. Five sizes, three weights, nothing else.
   ────────────────────────────────────────────────────────────── */

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Display face. Cormorant runs small and loose, so it is set
   tighter and heavier than its default would be. */
.t-display,
.t-head,
.t-title {
  font-family: var(--font-serif);
  color: var(--color-ink);
  font-weight: 600;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.t-display {
  font-size: clamp(2.125rem, 7vw, var(--text-display));
  line-height: 1.04;
  font-weight: 500;
}

.t-head {
  font-size: clamp(1.5rem, 4.5vw, var(--text-head));
  line-height: 1.18;
}

.t-title {
  font-size: var(--text-title);
  line-height: 1.3;
}

/* Section label inside a card: body face, not an all-caps eyebrow. */
.t-label {
  font-size: var(--text-meta);
  font-weight: 600;
  color: var(--color-ink-2);
}

.t-body {
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-ink-2);
}

.t-meta {
  font-family: var(--font-body);
  font-size: var(--text-meta);
  line-height: 1.45;
  color: var(--color-ink-3);
}

/* The one place the serif carries a whole paragraph: scripture. */
.t-verse {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3.6vw, 1.75rem);
  line-height: 1.42;
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.005em;
  color: var(--color-ink);
  text-wrap: pretty;
}

/* Reading measure. Serif text gets a little more room. */
.measure {
  max-width: 62ch;
}

.measure-serif {
  max-width: 50ch;
}

/* Numerals in tables and schedules line up. */
.tnum {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--color-accent);
  text-decoration-color: color-mix(in oklab, var(--color-accent) 35%, transparent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-accent-hover);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: color-mix(in oklab, var(--color-accent) 22%, transparent);
}
