/* ====================================================================
   Parallax primitives. Loaded by every page that uses <parallax-section>.
   Mobile-safe: no `background-attachment: fixed` (broken on iOS Safari).
   Honors prefers-reduced-motion AND a localStorage flag set by the footer
   toggle.
   ==================================================================== */

.parallax {
    position: relative;
    min-height: var(--parallax-min-h, 100vh);
    overflow: clip;
    isolation: isolate;
    contain: layout paint;
}

.parallax__layer {
    position: absolute;
    /* -18% bleed absorbs peak translate without revealing edges. */
    inset: -18% 0;
    z-index: 0;
    will-change: transform;
    pointer-events: none;
}

.parallax__layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.parallax__copy {
    position: relative;
    z-index: 2;
    padding: clamp(2rem, 8vw, 6rem) clamp(1rem, 5vw, 4rem);
}
.parallax__copy--center {
    display: grid;
    place-content: center;
    text-align: center;
    min-height: inherit;
}

@media (max-width: 768px) {
    .parallax { --parallax-strength: 0.55; }
}
@media (min-width: 769px) {
    .parallax { --parallax-strength: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .parallax__layer { transform: none !important; }
}
.motion-reduced .parallax__layer { transform: none !important; }
