/*
 * Colour contrast (WCAG AA), agreed with Denali on 2026-11-25.
 *
 * The palette cyan (Kadence palette2) is #0088d1. It passes for headlines and other
 * large text (3.86:1 on white, 3.33:1 on the light blue) but not for small text, so
 * the places below use the dark blue (palette3, #0069ae) instead.
 *
 * Each rule swaps the palette2 variable (and WordPress's two preset copies of it, which
 * block link colours use) inside one block rather than overriding a colour property,
 * so the block's own Kadence colour setting keeps working and there is no specificity
 * fight. The selectors with a block id (e.g. 10745_64f798-9d) point
 * at one specific block: if that block is rebuilt in the editor, its id changes and
 * the rule stops applying, so re-run the contrast scan after editing these blocks.
 *
 * For new content: add the class mt-contrast-dark (block > Advanced > Additional CSS
 * class) to any small text or panel set in the palette cyan, and it gets the same swap.
 * Put it on the smallest block that holds the cyan, not on the section around it:
 * inside a tagged block, headline accent words (h1/h2 em) take the heading colour.
 */

/* Small cyan text: switch to the dark blue. */
.mt-contrast-dark,                    /* opt-in class for new content, see above */
.wp-block-breadcrumbs,                /* breadcrumbs (block) */
.kadence-breadcrumbs,                 /* breadcrumbs (Kadence archive titles) */
.publish-date,                        /* The Scoop post dates */
/* Card links with an arrow icon ("Explore This Flavor", "Go To Recipe"). Older Kadence
   Blocks write palette2, newer ones palette-2; re-saving a card can switch it. */
.kt-adv-heading-has-icon.has-theme-palette2-color,
.kt-adv-heading-has-icon.has-theme-palette-2-color,
.kt-adv-heading11981_59fafd-2b,       /* press outlet names on 10K Scoops */
.kt-adv-heading12047_60155c-55,       /* "Merch Shop" label on the shop */
.kt-adv-heading11108_a0407a-dc {      /* "News & Events" label on The Scoop */
	--global-palette2: var(--global-palette3);
	--wp--preset--color--theme-palette-2: var(--global-palette3);
	--wp--preset--color--palette-2: var(--global-palette3);
}

/* Cyan panels with small white text: switch the panel to the dark blue. */
.kb-row-layout-wrap.site-footer,      /* site footer */
.kb-row-layout-wrap.home-scoops,      /* 10,000 scoops panel (home, 10K Scoops) */
.kadence-column10745_64f798-9d,       /* "We didn't stop there" panel on Our Story */
.kt-adv-heading12047_457e56-d4 {      /* "Free shipping on all orders!" pill on the shop */
	--global-palette2: var(--global-palette3);
	--wp--preset--color--theme-palette-2: var(--global-palette3);
	--wp--preset--color--palette-2: var(--global-palette3);
}

/* Headline accent words use palette2 (style.css: h1 em, h2 em). Inside a panel whose
   background is palette2 they would match the background, so keep the heading colour. */
:is(.site-footer, .home-scoops, .kadence-column10745_64f798-9d, .kadence-column5806_8c1ed8-c1, .mt-contrast-dark) :is(h1, h2) em {
	color: inherit;
}

/*
 * Prices stay in the palette cyan so they stand apart from the dark blue product name
 * (Denali, 2026-12-01). #0088d1 passes only as large text, so a price must be bold and
 * at least 19px (WCAG large text: 18.66px bold). The weight is set here; the sizes are in
 * style.css (search "contrast: price floor"). If a price is ever made smaller or lighter,
 * add its block to the dark blue list above instead.
 */
body.wp-child-theme-inspry-child-theme .kwt-price-wrap,
body.wp-child-theme-inspry-child-theme .kwt-price-wrap :is(span, bdi, ins, del, small) {
	font-weight: 800 !important; /* !important does not inherit, so name the parts of a price too */
}
/* A price suffix or "From:" label renders smaller than the amount by default: keep it at the floor. */
body.wp-child-theme-inspry-child-theme .kwt-price-wrap :is(small, .woocommerce-price-suffix, .from) {
	font-size: max(19px, 1em) !important;
}

/*
 * The swoosh behind the 10,000 scoops panel is dark blue artwork (#016bae) drawn for the
 * old cyan panel, so it disappeared on the dark blue one. Lighten it. 12% is close to the
 * ceiling: the small white paragraph crosses the swoosh (about a fifth of its area) and
 * needs 4.5:1. It is 4.69:1 at 12% and drops just under 4.5:1 at 15%. The large white
 * heading crosses it slightly (needs 3:1); the lime heading and the button do not.
 */
.home-scoops .kb-section-has-overlay > .kt-inside-inner-col:before {
	filter: brightness(1.12);
}
