/* ===================================================================
   ea/closing-band — what phase 4 ADDS to the band.

   The band's geometry is not here. `.ea-closing`, `.ea-closing__shell`,
   `__row`, `__text`, `__title`, `__lead`, `__actions`, `__more`, `__cue` and
   the `--document` and `--statement` modifiers are all in ea-content.css §5.2,
   ported value for value from the signed-off mockup. This file carries the star
   arc, which the port could not carry because it was an `<img>`.
   ===================================================================*/

/* -------------------------------------------------------------------
   THE CORNER ARC, AS A BACKGROUND RATHER THAN AN <img>

   Same three reasons as the identity band: an editor-placeable image
   invalidates the collision sweep that proved no polygon lands behind type, an
   `<img>` in a block is a broken box in the editor canvas, and the wrapper it
   sat in existed only to clip it, which `.ea-band { overflow: hidden }` already
   does.

   THIS ONE HAS A DEFAULT, AND THE IDENTITY BAND'S DOES NOT. ea-content.css §5.5
   is headed "star placements the pages agree on" and holds exactly two, one of
   which is `.ea-stars--closing-corner`: `right: -104px; top: -84px; width:
   300px; transform: rotate(90deg)`. Thirteen of the fifteen closing bands draw
   it at those numbers, so it ships as the default here and the two that differ
   pass their own slug. The identity band's hero arc has five different measured
   offsets and no agreed default, so it ships off.

   THE ROTATION IS WHY THIS IS A PSEUDO-ELEMENT AND NOT A `background-image` ON
   THE SECTION. A background cannot be rotated; an element can. `clip-path`
   would resolve in the untransformed box either way, which is what makes the
   map's insets portable across a rotation.

   NO CLIP BY DEFAULT, AND THAT IS THE MOCKUP'S OWN BEHAVIOUR RATHER THAN AN
   OMISSION. Of the fifteen built closing bands only two declare a clip on this
   placement, methodology under `max-width: 767px` and press-kit unconditionally,
   both `inset(20% 0 0 20%)` (ea_star_clip_map()). The other thirteen ship the
   arc as drawn. A default clip here would remove a star from thirteen
   signed-off pages.
   ------------------------------------------------------------------- */

.ea-closing::before {
    content: "";
    position: absolute;
    z-index: 0;
    display: none;
    aspect-ratio: 1;
    background-image: url("../../assets/stars/stars-arc-corner.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    pointer-events: none;
}

/* The one agreed placement, value for value with ea-content.css §5.5's
   `.ea-stars--closing-corner`. `height` follows from the 1:1 aspect ratio,
   where the mockup's `<img>` got it from the asset's own 240 by 240 viewBox. */
.ea-closing--stars-closing-corner::before {
    display: block;
    top: -84px;
    right: -104px;
    width: 300px;
    transform: rotate(90deg);
}

/* `.ea-closing__shell` already carries `position: relative; z-index: 1`, so the
   content sits above the arc. Not restated here: a second owner for one
   declaration is how a component drifts. */

/* ====================================================================
   THE GERMAN LAYER'S OWN COLLISION, WHICH THE MOCKUPS COULD NOT HAVE SEEN.

   Every star offset on this portal is a sweep against the ENGLISH copy,
   because the mockups are English. At 320 the German closing band puts gold
   ink on its own onward link and on the button beside it: measured 12x19 and
   11x17 on `/de/`, and 11x17 on `/de/service/matomo/`, while the identical
   English pages are clean.

   THE BAND IS NOT THE DIFFERENCE, which is what makes this a language defect
   rather than a layout one. Measured at 320 on both: band height 629, bottom
   padding 32, actions column at y=504 and 93 tall, the onward link wrapping to
   two lines. Identical. What differs is the width of the last line: "Wie wir
   Services listen und prüfen" ends 19px further right than "How we list and
   check services", and those 19px reach the arc's ink where the English line
   stops short of it.

   TWO LEVERS TOGETHER, because neither alone is enough, and both were swept
   with the polygon sweep rather than with a box comparison. Padding alone
   clears the record page at 56px and leaves one hit on the front page at every
   value up to 80, because that hit is horizontal. Capping the link alone
   clears the record page and leaves the same one. Together at 56px and 60 per
   cent they clear all four contexts, and 55 per cent clears them no better, so
   60 is the looser of two values that both work.

   SCOPED TO `.translatepress-de_DE` ON PURPOSE. Every English page currently
   matches its mockup at these widths, and a shared rule would move all of them
   to fix a defect none of them has. The cost is that a third language will
   need its own sweep, which is the honest position: the offsets are English
   measurements and any language that sets a wider line has to be measured.
   ==================================================================== */
@media (max-width: 360px) {
    .translatepress-de_DE .ea-closing {
        padding-bottom: 56px;
    }
    .translatepress-de_DE .ea-closing__more {
        max-width: 60%;
    }
}
