/* ==========================================================================
   fse-hero — shared hero-height primitive (front-end)
   Platform-level. Consumed by site cover helpers; no site-specific values here
   except the per-hero maxima below, which are transcribed, not chosen.

   WHY THIS EXISTS. A core/cover with `minHeight`/`minHeightUnit` serialises an
   INLINE `style="min-height:NNNpx"`. An inline style beats every selector, so
   the only way to make such a hero responsive from a stylesheet is
   `!important` — and a fixed px min-height is the same on a 1400px desktop as
   on a 375px phone. Measured 2026-09-16 at 375x812: Flurt 720px (89vh),
   Zuidema home 620px (76vh).

   THE MECHANISM. The helpers now omit `minHeight`/`minHeightUnit` entirely and
   pass a class instead. Verified against this WordPress's own
   `wp.blocks.serialize()`: with those two attributes absent, core/cover emits
   NO style attribute at all, so these rules apply with ordinary specificity and
   no `!important`. `.wp-block-cover` is added for specificity (0,2,0) so the
   ceiling wins over core's own `.wp-block-cover { min-height: 430px }` (0,1,0)
   regardless of stylesheet order.

   THE CEILING IS THE CONTRACT; THE MAXIMUM IS THE SITE'S. `--ewo-hero-max` is
   the hero's own height, unchanged from what it was before this primitive
   existed. `82vh` is the ceiling, and it is the ONE hero proportion this
   repository has evidence for: the legacy Flurt theme declared
   `minHeight: "min(82vh, 720px)"`, recorded in
   sites/flurt/patterns/flurt-home-hero.php. It is applied as a safety ceiling,
   never as a target — `min()` can only ever make a hero shorter, so no hero
   grows and no desktop rendering moves.

   NAMING: single hyphen, `ewo-hero-xl`, never `ewo-hero--xl`. A `--` inside the
   block's HTML comment is illegal, so WordPress escapes it to `\u002d\u002d`
   when it serialises the block; the backslashes are then stripped on the way
   into the database and the attribute lands as `ewo-herou002du002dxl` while the
   div still reads `ewo-hero--xl`. The front end looks right and the EDITOR
   invalidates the block. Measured 2026-09-16 on Zuidema post 56.

   Change the ceiling here, once. Do NOT redefine `min-height` on a hero in site
   CSS: that reintroduces the fixed-height problem one site at a time.
   ========================================================================== */

.wp-block-cover.ewo-hero {
	min-height: min( 82vh, var( --ewo-hero-max, 560px ) );
}

/*
 * Per-hero maxima. Each value is the px height that hero already had; this
 * primitive did not choose any of them and must not be used to normalise them.
 * Different heroes carry different weight on purpose.
 */
.ewo-hero-xl { --ewo-hero-max: 720px; } /* flurt: home hero */
.ewo-hero-lg { --ewo-hero-max: 620px; } /* zuidemametselwerken: home hero */
.ewo-hero-md { --ewo-hero-max: 480px; } /* zuidemametselwerken: project + steenzagerij heroes */
.ewo-hero-sm { --ewo-hero-max: 460px; } /* zuidemametselwerken: over-ons hero */
