/*
 * Pacific Press Publishing — site-wide font pairing.
 * Headings: Nunito (Primavera-style bold headings).
 * Body/UI: PT Sans (as in the supplied HTML page).
 *
 * Loaded LAST by functions.php to override historic Montserrat/Playfair
 * declarations without changing the existing layout, colors or typography sizes.
 * No icon font, inline SVG text or external editor controls are changed.
 */

:root {
  --bpi-font-heading: 'Nunito', Arial, Helvetica, sans-serif;
  --bpi-font-body: 'PT Sans', Arial, Helvetica, sans-serif;
}

html body {
  font-family: var(--bpi-font-body) !important;
}

/* Content, navigation, forms, button labels and other non-heading copy. */
body :is(
  p, li, dt, dd, a, button, input, textarea, select, option, optgroup,
  label, legend, summary, blockquote, figcaption, small, strong, b, em,
  cite, time, th, td, caption, address, q, pre, code
) {
  font-family: var(--bpi-font-body) !important;
}

/* Plain span text, but never override WordPress or icon-font glyphs. */
body span:not(.dashicons):not(.ab-icon):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.material-icons):not([class*="icon"]):not([class*="eicon"]) {
  font-family: var(--bpi-font-body) !important;
}

/* Semantic headings on home, service, about, blog, contact and legal pages. */
body :is(h1, h2, h3, h4, h5, h6),
body [role="heading"],
body :is(h1, h2, h3, h4, h5, h6) :is(span, a, strong, b, em, small) {
  font-family: var(--bpi-font-heading) !important;
}

/* Primavera reference: Nunito Black (900) across primary headings.
 * Force the weight: theme selectors such as `.bpi-hero h1` have higher
 * specificity than a plain h1/h2 declaration. Font size, colors,
 * spacing and text-transform remain unchanged. */
body :is(h1, h2) {
  font-weight: 900 !important;
}

/* Homepage hero PHP splits the heading into three spans with separate
 * font weights (500/800/800). Override all three for a consistent
 * Nunito Black headline, including any rich-text spans inside H1/H2. */
body :is(h1, h2) :is(span, strong, b, em, a),
body .bpi-hero h1 .bpi-hero-title__lead,
body .bpi-hero h1 .bpi-hero-title__bridge,
body .bpi-hero h1 .bpi-hero-title__accent {
  font-family: var(--bpi-font-heading) !important;
  font-weight: 900 !important;
}
