/* typography.css — CRAB v2 site-wide type application
 *
 * Applies Pairing E (Righteous + Lora + Courier Prime) via the tokens in
 * tokens.css. Loaded after the legacy v1 style.css so these rules win.
 *
 * Design direction:
 *   - Righteous (display) on headings h1–h3, hero wordmark, live banner labels
 *   - Lora (body) on everything else textual; weight 600 for strong emphasis
 *   - Courier Prime (mono) on timestamps, episode numbers, track IDs, tag chips
 *
 * Letter-spacing + tracking choices tuned for the warm dark palette.
 */

html {
  font-family: var(--font-body);
  font-size: 17px;            /* slight bump from 16 — Lora reads well at this size */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--lh-normal);
  color: var(--color-ink);
}

/* ---------- Display ---------- */

h1,
.hero-info h1,
.hero-overlay h1,
.home-section h2,
.episode-card h2,
.episode-card h3,
h2.home-about h2 {
  font-family: var(--font-display);
  font-weight: 400;           /* Righteous only ships one weight */
  letter-spacing: 0.01em;
  line-height: var(--lh-tight);
}

/* Specifics */
.hero-info h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 1.02;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.home-section h2,
.home-about h2,
main > section > h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: 0.015em;
  margin-bottom: var(--space-4);
}

.episode-card h3,
.episode-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

/* About-page sections still use Righteous but feel a touch more editorial. */
article h2,
article h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: var(--lh-snug);
}

/* ---------- Body hierarchy ---------- */

p {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--lh-normal);
  color: var(--color-ink);
}

p strong,
strong {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-ink);
}

em,
p em {
  font-style: italic;
  color: var(--color-ink-muted);
}

a { transition: color var(--dur-fast) var(--ease-out); }

/* ---------- Navigation / header ---------- */

/* Only the nav menu items (inside .nav-links). The selector used to also
   include `.site-header nav a` which matched the .nav-logo anchor and
   inherited uppercase + looser tracking into the wordmark — fixed by
   scoping to .nav-links. */
.nav-links a,
.main-nav a,
nav.main-nav a {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.brand-wordmark,
.site-header .site-title,
.site-header .brand,
header .site-name,
.nav-logo .logo-text,
.site-header .logo-text {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--color-ink);
  /* Size the header wordmark slightly larger than body but well below hero */
  font-size: 1.15rem;
}

/* ---------- Episode cards — tag the number as mono ---------- */

.episode-number,
.episode-card .episode-number,
.episode-card .ep-num,
[class*="episode-card"] .number,
[class*="ep-meta"] time {
  font-family: var(--font-mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Dates in metadata are a common pattern — leave them in body serif but tight. */
.episode-card time,
article time,
.episode-meta {
  font-family: var(--font-body);
  color: var(--color-ink-dim);
  font-size: 0.9rem;
}

/* ---------- Tracklist ---------- */

table.tracklist,
table.tracks,
table.tracklist-table,
.tracklist table,
article table {
  font-family: var(--font-body);
}

table.tracklist th,
table.tracklist-table th,
.tracklist th,
article table th {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 400;
}

/* Track number / timestamp column → mono (visibly "radio technical") */
table.tracklist td:first-child,
table.tracklist-table td:first-child,
.tracklist td:first-child,
table td.track-num,
table td.track-ts,
table td.timestamp {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--color-ink-dim);
  font-size: 0.9rem;
  text-align: right;
}

/* Song titles in tracklist get a little weight for hierarchy */
table.tracklist-table td:nth-child(2),
table.tracklist td:nth-child(2) {
  font-weight: 600;
}

/* ---------- Buttons ---------- */

.btn,
a.btn,
button.btn {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* ---------- Live banner polish (uses Pairing E) ---------- */

.crab-live-banner__label {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.crab-live-banner__meta {
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.crab-live-banner__cta {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.crab-live-banner [data-remaining],
.crab-live-banner [data-until],
.crab-live-banner [data-since] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Next-show card */
.crab-next-show__eyebrow {
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
}
.crab-next-show__date {
  font-family: var(--font-display);
  letter-spacing: 0.015em;
  line-height: var(--lh-tight);
}
.crab-next-show__time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.crab-next-show__badge {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-weight: 400;
}
.crab-next-show__btn {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Hero auxiliary text */
.hero-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-ink-muted);
}
.hero-schedule {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  color: var(--color-ink-dim);
}

/* Footer */
.site-footer,
footer.site-footer {
  font-family: var(--font-body);
}
.footer-logo-link + .footer-tagline,
.footer-tagline {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  font-size: 1.1rem;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--color-ink-dim);
}
.footer-links a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
}
