/* ==========================================================================
   Home page: parallax scrolling (layers move at different speeds on scroll).
   Driven by assets/js/page-parallax.js. Uses the CSS `translate` property so it
   never fights the hover/tilt/reveal rules that use `transform`.
   ========================================================================== */

/* ---------- Floating depth layers inside sections ---------- */
.px-host {
    position: relative;
    overflow: hidden;
    overflow: clip;
}

.px-host > .container {
    position: relative;
    z-index: 1;
}

.px-deco {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.px-deco > span {
    position: absolute;
    display: block;
    border-radius: 50%;
    will-change: translate;
}

.px-b1 {
    width: min(46vw, 640px);
    aspect-ratio: 1;
    left: -12%;
    top: 2%;
    background: radial-gradient(circle at 50% 50%, rgba(229, 57, 53, .16), transparent 68%);
}

.px-b2 {
    width: min(52vw, 720px);
    aspect-ratio: 1;
    right: -14%;
    bottom: -8%;
    background: radial-gradient(circle at 50% 50%, rgba(32, 98, 150, .20), transparent 68%);
}

.px-ring {
    width: clamp(180px, 22vw, 340px);
    aspect-ratio: 1;
    right: 7%;
    top: 10%;
    border: 1px solid rgba(160, 170, 185, .22);
    box-shadow: inset 0 0 0 28px rgba(160, 170, 185, .035);
}

.px-ring-2 {
    width: clamp(90px, 11vw, 170px);
    aspect-ratio: 1;
    left: 6%;
    bottom: 12%;
    border: 1px solid rgba(229, 57, 53, .25);
}

html[data-theme="light"] .px-b1 { background: radial-gradient(circle at 50% 50%, rgba(229, 57, 53, .09), transparent 68%); }
html[data-theme="light"] .px-b2 { background: radial-gradient(circle at 50% 50%, rgba(32, 98, 150, .11), transparent 68%); }
html[data-theme="light"] .px-ring { border-color: rgba(20, 23, 28, .10); box-shadow: inset 0 0 0 28px rgba(20, 23, 28, .02); }

/* sections with a coloured background: white glows instead */
.w3-stats .px-b1,
.w3l-call-to-action-6 .px-b1 { background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .10), transparent 68%); }
.w3-stats .px-b2,
.w3l-call-to-action-6 .px-b2 { background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .07), transparent 68%); }
.w3-stats .px-ring,
.w3l-call-to-action-6 .px-ring,
.w3-stats .px-ring-2,
.w3l-call-to-action-6 .px-ring-2 { border-color: rgba(255, 255, 255, .18); box-shadow: none; }

/* smaller layers on phones */
@media (max-width: 767px) {
    .px-ring-2 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .px-deco > span { will-change: auto; translate: none !important; }
}
