/* ===================== SCROLL REVEAL (AOS replacement) ===================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-reveal[data-scroll-reveal="fade-in"] {
    transform: none;
}
.scroll-reveal[data-scroll-reveal="fade-right"] {
    transform: translateX(-40px);
}
.scroll-reveal[data-scroll-reveal="fade-left"] {
    transform: translateX(40px);
}
.scroll-reveal[data-scroll-reveal="zoom-out"] {
    transform: scale(1.08);
}
.scroll-reveal[data-scroll-reveal="zoom-in"] {
    transform: scale(0.92);
}
.scroll-reveal.visible {
    opacity: 1;
    transform: none;
}

/* ===================== MOUSE GLOW ===================== */
#mouse-glow {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 3;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(212, 175, 55, 0.035), transparent 60%);
    transition: background 0.3s ease;
}

/* ===================== SCROLLYTELLING CONTAINERS ===================== */
.scrollytelling {
    position: relative;
    width: 100%;
}
.scrollytelling-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 0 1.5rem;
}

/* ===================== CARD TILT ===================== */
.tilt-card {
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    will-change: transform;
}

/* ===================== DRAW LINE ===================== */
.draw-line {
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.draw-line.visible {
    transform: scaleX(1);
}

/* ===================== SCROLL INDICATOR ===================== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.4s ease;
    z-index: 10;
}
.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}
.scroll-indicator-track {
    width: 20px;
    height: 36px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
.scroll-indicator-dot {
    width: 3px;
    height: 8px;
    background: #D4AF37;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDot 1.8s infinite;
}
.scroll-indicator-text {
    font-size: 0.5625rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.4;
    font-weight: 600;
}

/* ===================== EMBER PARTICLES ===================== */
.cta-embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.ember {
    position: absolute;
    bottom: 30%;
    width: 3px; height: 3px;
    background: #D4AF37;
    border-radius: 50%;
    opacity: 0;
    animation: ember 4s infinite;
}
.ember:nth-child(1) { left: 42%; animation-delay: 0s; animation-duration: 3.5s; }
.ember:nth-child(2) { left: 48%; animation-delay: 0.8s; animation-duration: 4.2s; }
.ember:nth-child(3) { left: 54%; animation-delay: 1.5s; animation-duration: 3.8s; }
.ember:nth-child(4) { left: 46%; animation-delay: 2.2s; animation-duration: 4.5s; }
.ember:nth-child(5) { left: 52%; animation-delay: 3s; animation-duration: 3.2s; }
.ember:nth-child(6) { left: 44%; animation-delay: 0.5s; animation-duration: 3.9s; }
.ember:nth-child(7) { left: 50%; animation-delay: 1.8s; animation-duration: 4.1s; }
.ember:nth-child(8) { left: 56%; animation-delay: 2.8s; animation-duration: 3.4s; }

/* ===================== PAIN CARD (scrollytelling) ===================== */
.pain-card {
    position: absolute;
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.15s cubic-bezier(0.1, 0.5, 0.5, 1);
    z-index: 5;
}

/* ===================== PAIN RESOLVE TEXT ===================== */
.pain-resolve {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    z-index: 10;
    position: relative;
}
.pain-resolve.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== PROCESS STEP PROGRESSIVE REVEAL ===================== */
.process-step {
    opacity: 0.3;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.process-step.active {
    opacity: 1;
}

/* ===================== KEYFRAMES ===================== */
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollDot {
    0% { top: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 32px; opacity: 0; }
}
@keyframes ember {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    20% { opacity: 0.6; }
    80% { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-120px) scale(0.5); }
}

/* ===================== MOBILE SCROLLYTELLING ===================== */
@media (max-width: 768px) {
    .scrollytelling {
        height: auto !important;
    }
    .scrollytelling-sticky {
        position: relative;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 3rem 1.25rem;
        gap: 1rem;
    }
    .pain-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        max-width: 100%;
        transform: none !important;
    }
    .pain-resolve {
        margin-top: 1.5rem;
        width: 100%;
    }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .scrollytelling-sticky *,
    .pain-card,
    .pain-resolve,
    .process-step {
        transition: none !important;
        animation: none !important;
    }
    .process-step {
        opacity: 1 !important;
    }
    .pain-resolve {
        opacity: 1 !important;
        transform: none !important;
    }
    .draw-line {
        transform: scaleX(1) !important;
        transition: none !important;
    }
    .cta-embers,
    .ember {
        display: none !important;
    }
    #mouse-glow {
        display: none;
    }
    .scroll-indicator {
        display: none;
    }
}
