/* ==========================================================================
   Future Rize — scroll layer
   Smooth scrolling and effects tied to the scroll position: text that
   lights up as you read, sections that stack, labels that decode, a
   marquee that follows your scroll speed, images that arrive in tiles.
   Remove the scroll.css / lenis / scroll.js lines in layouts/app.blade.php
   to switch it off.
   ========================================================================== */

/* Lenis (smooth scrolling) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ── Paragraphs light up word by word as you scroll through them ───────── */
.sx-scrub.reveal { opacity: 1; transform: none; }
.sx-scrub .sx-w { opacity: 0.16; transition: opacity 0.15s linear; }

/* ── Hero drifts away as you scroll past it ─────────────────────────────── */
.hero h1 {
    translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 8px + var(--hy, 0px));
}
.hero h1, .hero-stats { transition: translate 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.hero-stats {
    translate: calc(var(--px, 0) * -14px) calc(var(--py, 0) * -10px + var(--hy3, 0px));
}

/* ── Services page: sections stack on top of each other ─────────────────── */
@media (min-width: 901px) {
    .sx-stack .service-item {
        position: sticky;
        top: var(--sx-top, 90px);
        background: #fff;
        border-top: 1px solid rgba(26,58,42,0.1);
    }
    .sx-dim {
        position: absolute; inset: 0; z-index: 4;
        background: #0f2218;
        opacity: 0;
        pointer-events: none;
        will-change: opacity;
    }
}

/* ── Gold strip on the homepage becomes a scroll-driven marquee ─────────── */
.sx-marquee .intro-strip-items {
    flex-wrap: nowrap;
    min-width: 0;
    will-change: transform;
}
.sx-marquee .intro-strip-label {
    position: relative; z-index: 2;
    background: var(--gold);
    padding-right: 1.5rem;
    margin-right: -1.5rem;
    box-shadow: 18px 0 16px -2px var(--gold);
}
.sx-marquee .intro-strip-item::after {
    content: '✦';
    margin-left: 3rem;
    font-size: 0.7em;
    opacity: 0.6;
}
.sx-marquee { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
              mask-image: linear-gradient(90deg, #000 85%, transparent); }

/* ── Images arrive in tiles ─────────────────────────────────────────────── */
.sx-tiles {
    position: absolute; inset: 0; z-index: 3;
    display: grid;
    grid-template-columns: repeat(var(--cols, 8), 1fr);
    grid-template-rows: repeat(var(--rows, 6), 1fr);
    pointer-events: none;
}
.sx-tiles i {
    background: var(--tile, var(--cream));
    transition: opacity 0.35s steps(2, end);
    transition-delay: var(--d, 0ms);
}
.sx-tiles.is-in i { opacity: 0; }
.sx-tile-host { position: relative; }


/* "Reduce motion": no hero drift (smooth scrolling is skipped in scroll.js);
   the rest stays. */
@media (prefers-reduced-motion: reduce) {
    .hero h1, .hero-sub, .hero-actions, .hero-eyebrow, .hero-stats { translate: none; }
}
