/* --- SECTION BACKDROP (section-backdrop.html.twig) ---
   A section with a decorative picture behind its content. Every rule is scoped to
   .section-backdrop. */

.section-backdrop {
    margin: var(--section-backdrop-margin, 0);
    padding: var(--section-backdrop-padding, 0);
    background-color: var(--section-backdrop-bg, transparent);
    background-image: var(--section-backdrop-image, none);
    background-repeat: var(--section-backdrop-repeat, no-repeat);
    background-position: var(--section-backdrop-position, center bottom);
    background-size: var(--section-backdrop-size, auto);
}

@media (max-width: 991px) {
    .section-backdrop {
        padding: var(--section-backdrop-padding-mobile, var(--section-backdrop-padding, 0));
        background-image: var(--section-backdrop-image-mobile, var(--section-backdrop-image, none));
        background-repeat: var(--section-backdrop-repeat-mobile, var(--section-backdrop-repeat, no-repeat));
        background-position: var(--section-backdrop-position-mobile, var(--section-backdrop-position, center bottom));
        background-size: var(--section-backdrop-size-mobile, var(--section-backdrop-size, auto));
    }
}

/* a curved seam at the top of the band: the band above bulges into it (opt-in: --section-backdrop-curve
   set to '', on a positioned band; --section-backdrop-curve-color: the colour of the band above) */
.section-backdrop::before {
    content: var(--section-backdrop-curve, none);
    position: absolute;
    z-index: 1;
    top: -1px;
    left: 0;
    right: 0;
    height: var(--section-backdrop-curve-height, 50px);
    background: var(--section-backdrop-curve-color, transparent);
    --sb-curve-mask: var(--section-backdrop-curve-mask, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M1000,4.3V0H0v4.3C0.9,23.1,126.7,99.2,500,100S1000,22.7,1000,4.3z'/%3E%3C/svg%3E"));
    -webkit-mask: var(--sb-curve-mask) center / 100% 100% no-repeat;
    mask: var(--sb-curve-mask) center / 100% 100% no-repeat;
    pointer-events: none;
}

/* flush: no padding of its own, the content sets the spacing */
.section-backdrop.section-backdrop--flush {
    padding: 0;
}

/* --- Optional tokens on properties section-backdrop did not set before ---
   Their fallbacks (transparent) are only placeholders: the rules sit in a cascade layer, so
   with no token they lose to every unlayered rule (a brand's `h2 { text-transform }`, an earlier
   rule on the same element…) whatever its weight or order, exactly as before they existed. A brand
   that sets the token gets its value, unless one of its own rules sets the same property on the
   same element. Browsers without cascade layers skip the block: no token, as before. */
@layer section-backdrop-tokens {
    .section-backdrop {
        background-color: var(--section-backdrop-bg, transparent);
    }
}
