/*
 * Additive rule for D-12 (Phase 6): turns off the inherited reduced-motion
 * poster (home.css, the .hero-video rule wired to hero-poster.webp) on the
 * new video-hero baustein only. The filename here does NOT matter for the
 * cascade - it must not, because functions.php's beats_group_enqueue_styles()
 * registers every file in assets/css/ via glob(), alphabetically sorted, and
 * "hero-cover" sorts BEFORE "home" - at equal specificity this file would
 * therefore always lose. The rule below beats home.css's :root :where(...)
 * (specificity 0,1,0) through a HIGHER specificity instead, following the
 * project's own precedent for exactly this situation
 * (.service-card .big-number-sm.big-number-sm in home.css, "Deliberately
 * without :where() and with a doubled class").
 *
 * Deliberately outside any media query: core/cover always renders its
 * background as a real <img>/<video> element, never as a CSS background-
 * image, so this declaration has no effect outside reduced motion. Inside
 * reduced motion it is exactly the wanted override, because home.css's own
 * poster rule only ever applies there too - a dedicated media query here
 * would only add a second place to re-check the specificity math above.
 *
 * The selector below repeats the marker class hero-no-poster twice on
 * purpose - that is what raises the specificity to 0,3,0.
 */
.wp-block-cover.hero-no-poster.hero-no-poster {
	background-image: none;
}

/*
 * Additive darkening layer for success criterion 3 (Phase 6, Plan 06-03).
 * kontrast_nach_tausch_probe() measured that after a REAL media swap to the
 * worst-case fixture (a plain white image), the block's own dimRatio
 * overlay alone does not reach the project's AA commitment: heading
 * 2.95:1 against the 3.0:1 large-text threshold, subline 2.56:1 against
 * the 4.5:1 normal-text threshold (measured values, see this plan's
 * SUMMARY).
 *
 * The inherited .hero-gradient::after gradient (home.css) does NOT help
 * here - measured separately: getComputedStyle(cover, '::after') reports
 * content:'none' and background-image:'none' on every hero cover in this
 * WordPress build, the five already-shipped ones included. Cause:
 * `:where()` does not accept a pseudo-element in its selector-list
 * argument per the CSS Selectors specification, so home.css's own
 * `:root :where(.hero-gradient::after) { ... }` is an invalid selector and
 * the whole rule never matches anything, anywhere. This is a pre-existing,
 * out-of-scope finding - home.css stays untouched by this plan (D-01) -
 * not something this rule fixes; it is named here only because it is the
 * reason the darkening below carries the full weight alone instead of
 * sharing it with a working gradient.
 *
 * Same doubled-class specificity trick as .hero-no-poster.hero-no-poster
 * above (0,3,0) - not load-bearing against home.css here (this class
 * exists only on these two new patterns), kept for this file's own
 * consistency. A real ::before pseudo-element selector, not wrapped in
 * :where() - the exact mistake documented above.
 *
 * Stacking, measured rather than assumed (first attempt shipped
 * z-index:0 and was invisible in a screenshot - see this plan's SUMMARY):
 * core/cover's own background <img>/<video> and the dimRatio overlay
 * <span> both carry z-index:auto, and a pseudo-element's z-index:0 does
 * NOT outrank z-index:auto siblings - both sit in the SAME "stack level
 * 0" paint group (CSS2.1 Appendix E, step 6), ordered by document order
 * within that group. ::before is generated as the section's conceptual
 * FIRST child, i.e. document-order BEFORE the real <img>/<span>/inner-
 * container children - so at stack level 0 it paints first (furthest
 * back), fully hidden behind the opaque background image. A positive
 * z-index (1) moves it into its own, later-painted group (step 7),
 * clearing the image/overlay. The inner container (the actual content)
 * needs a HIGHER explicit z-index (2) for the same reason - it is ALSO
 * merely z-index:auto by default, so without this second, equally
 * additive rule the darkened layer would end up on TOP of the heading
 * and subline instead of only behind them.
 *
 * Same colour the inherited (inert) gradient uses (#1E1B18), so a future
 * fix to that selector would tint towards the same hue instead of
 * clashing.
 *
 * Opacity 0.40 is the smallest 0.05 step at which BOTH thresholds clear
 * with the worst-case white fixture still applied - re-measured after
 * this exact value was chosen, not derived and left unverified. See this
 * plan's SUMMARY for the before/after numbers.
 */
.wp-block-cover.hero-cover-dim.hero-cover-dim::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-color: #1E1B18;
	opacity: 0.4;
}

.wp-block-cover.hero-cover-dim.hero-cover-dim > .wp-block-cover__inner-container {
	z-index: 2;
}
