/*
 * Hales design system — the override layer.
 *
 * DESIGN.md §5. This file is enqueued LAST, after every other cascade layer:
 *
 *   assets/css/*.css (p10)
 *     -> trumps.css (p9999, handle site-trumps)
 *     -> hales-css-makeover.php (p9999, handle hales-css-makeover)
 *     -> mobile-extreme.css (p9999, async, handle site-mobile-extreme)
 *     -> THIS FILE (p10000, depends on all three)
 *     -> page-level inline <style> emitted in wp_head
 *
 * Two rules follow from that position:
 *
 *   1. New styling wins by cascade position, never by !important.
 *   2. It cannot beat a page-level inline <style> block or an inline style=
 *      attribute. A defect that lives in one of those is fixed AT SOURCE
 *      instead — that is why the problem-page eyebrow was corrected in
 *      hales-problem-pages.php rather than overridden here.
 *
 * One file to review, one file to revert.
 */

/* ---------------------------------------------------------------------------
 * DESIGN.md §1 — the dark-section rule.
 *
 * "Any section with an --ink family background must set its own text colour
 * explicitly. A dark background without a matching text colour is a bug,
 * not a style."
 *
 * .hales-city-root--cta is seeded into post_content with an inline
 * background:#0a2240;color:#fff on the <section>. Inheritance alone does not
 * carry that colour down: any stylesheet rule that targets p directly beats
 * an inherited value regardless of specificity, so the paragraphs fall back
 * to the light-ground default #333 — 1.26:1 on navy, effectively invisible.
 *
 * hales-city-page-seeder.php:124 already emits the correct inline colour, so
 * newly seeded pages are fine. The live defect is in ALREADY-STORED content
 * seeded by an older version of that generator, which no source change can
 * reach — verified on production: /service-areas/east-lake/ serves a bare
 * <p> where the current seeder would write style="color:rgba(255,255,255,.85)".
 * Fixing it therefore has to happen in CSS, and it has to happen here.
 *
 * The value matches what the seeder writes, so pages fixed by this rule and
 * pages fixed by their own inline style render identically.
 * ------------------------------------------------------------------------ */
.hales-city-root--cta p {
	color: rgba(255, 255, 255, 0.85);
}

/* ---------------------------------------------------------------------------
 * Body links inside the stock .image-text block.
 *
 * Those anchors have no rule of their own anywhere in the cascade, so they
 * fall through to the global `a { color: var(--primary-color) }` — brand gold
 * #d4af37, 2.10:1 on the white/cream grounds these sections normally sit on
 * (26 instances in the 2026-08-15 sweep). The section also comes in a navy
 * variant (.bg-dark-blue) where that same gold passes at 8.9:1, so the
 * default is the light-safe dark gold token and the navy context restores
 * the brand colour — the same two-ground scoping as .hales-problem-eyebrow
 * in #997 and the climate cards in this wave.
 * ------------------------------------------------------------------------ */
.image-text__text a:not(.btn) {
	color: var(--gold-text-on-light, #7a4f00);
}

.image-text.bg-dark-blue .image-text__text a:not(.btn) {
	color: var(--primary-color, #d4af37);
}

/* ---------------------------------------------------------------------------
 * FAQ answer links (.faq-answer).
 *
 * The class is styled in pages/service-redesign.css, which only enqueues on
 * page-service-v2.php — the homepage FAQ carries the same stored markup with
 * NO sheet defining its links, so anchors fall through to the global gold
 * (2.25:1 on the white FAQ ground, 2026-08-15 sweep). This layer loads on
 * both surfaces; the ground is light in both, so one scoped rule covers them.
 * ------------------------------------------------------------------------ */
.faq-answer a {
	color: var(--gold-text-on-light, #7a4f00);
}

/* ---------------------------------------------------------------------------
 * CTA-bar buttons under .full-width-cta__text — and image-text CTAs.
 *
 * trumps.css paints .full-width-cta__text (and its h2/p/spans) white with
 * !important, and the navy image-text variant does the same to its whole
 * text column — including -webkit-text-fill-color, which INHERITS. The .btn
 * rules beneath them declare `color` but never text-fill, so a gold-ground
 * .btn-primary whose color is navy nonetheless PAINTS white glyphs (~2:1).
 * An element's own declaration always beats an inherited value, so no
 * !important is needed here: currentColor restores paint == the button's
 * own palette. .btn-secondary keeps its explicit white-on-navy from trumps
 * (own !important still wins over this rule).
 * ------------------------------------------------------------------------ */
.full-width-cta__text .btn,
.image-text__text .btn {
	-webkit-text-fill-color: currentcolor;
}

/* ---------------------------------------------------------------------------
 * Service-area accordion city links (non-home pages).
 *
 * .accordian-location-links ul li a is painted navy in anniversary-sitewide.css
 * and critical.css (body.home), but neither reaches the /service-areas/ index
 * (its one combined LiteSpeed bundle does not include anniversary-sitewide.css,
 * and critical's rule is homepage-scoped), so its bare city anchors fall
 * through to the global gold `a` colour — 2.10:1 on the white panel. Same
 * dark-gold token as the other link fixes; body.home's higher-specificity
 * navy rule still wins on the homepage, so this only recolours the
 * unstyled instances.
 * ------------------------------------------------------------------------ */
.accordian-location-links ul li a {
	color: var(--gold-text-on-light, #7a4f00);
}
