/**
 * ============================================================
 * Project: InvitRAZ Demo Wedding Website - Fulan & Siti
 * Standard: RAZ Enterprise Standard
 * File: css/RAZSmoothScroll.css
 * Updated: 2026-10-24 14:42 WIB (Versi 2.3.0)
 * Deskripsi: Stylesheet modular untuk Animasi Smooth Scrolling,
 *            Momentum Inertia Scroll (Creamy ala Lenis),
 *            Floating Auto-Scroll Button (Play/Pause),
 *            Scroll Progress Bar Emas, dan Scroll Reveal Transitions.
 * ============================================================
 */

/* === 1. TOP SCROLL PROGRESS INDICATOR (BAR EMAS MEWAH) === */
#raz-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3.5px;
    background: linear-gradient(90deg, #997949, #dfc498, #997949);
    box-shadow: 0 1px 8px rgba(153, 121, 73, 0.45);
    z-index: 10005;
    transition: width 0.08s linear;
    pointer-events: none;
}

/* === 2. FLOATING CONTROLS WRAPPER (AUDIO & AUTO-SCROLL STACK) === */
.raz-floating-controls {
    position: fixed;
    z-index: 9998;
    bottom: 85px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.raz-floating-controls .raz-audio-box {
    position: static !important;
    bottom: auto !important;
    right: auto !important;
    z-index: auto !important;
}

@media screen and (max-width: 480px) {
    .raz-floating-controls {
        bottom: 78px;
        right: 14px;
        gap: 10px;
    }
}

/* === 3. FLOATING AUTO-SCROLL BUTTON === */
.raz-btn-autoscroll {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(153, 121, 73, 0.5);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(153, 121, 73, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #997949;
    font-size: 16px;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transform: scale(0.8);
}

.raz-btn-autoscroll.raz-show {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.raz-btn-autoscroll:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(153, 121, 73, 0.35);
    color: #7a603a;
    border-color: #997949;
}

/* Tooltip Tag pada Hover / Tap */
.raz-autoscroll-tag {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(46, 38, 28, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(214, 183, 136, 0.3);
}

.raz-btn-autoscroll:hover .raz-autoscroll-tag {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

/* State Aktif: Auto-Scroll Sedang Berjalan */
.raz-btn-autoscroll.raz-autoscroll-active {
    background: linear-gradient(135deg, #997949, #bfa373);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 0 0 rgba(153, 121, 73, 0.6);
    animation: raz-autoscroll-glow 2s infinite;
}

.raz-btn-autoscroll.raz-autoscroll-active i {
    animation: raz-bounce-flow 1.5s ease-in-out infinite;
}

@keyframes raz-autoscroll-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(153, 121, 73, 0.65), 0 4px 14px rgba(0, 0, 0, 0.15);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(153, 121, 73, 0), 0 4px 14px rgba(0, 0, 0, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(153, 121, 73, 0), 0 4px 14px rgba(0, 0, 0, 0.15);
    }
}

@keyframes raz-bounce-flow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

/* === 4. HARDWARE ACCELERATED SCROLL REVEAL ANIMATIONS === */
.raz-reveal {
    opacity: 0;
    transform: translate3d(0, 32px, 0);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.raz-reveal.raz-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* Variasi Reveal: Scale / Zoom In Halus */
.raz-reveal-scale {
    opacity: 0;
    transform: scale(0.92) translate3d(0, 20px, 0);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.raz-reveal-scale.raz-visible {
    opacity: 1 !important;
    transform: scale(1) translate3d(0, 0, 0) !important;
}

/* Variasi Reveal: Masuk dari Kiri */
.raz-reveal-left {
    opacity: 0;
    transform: translate3d(-36px, 0, 0);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.raz-reveal-left.raz-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* Variasi Reveal: Masuk dari Kanan */
.raz-reveal-right {
    opacity: 0;
    transform: translate3d(36px, 0, 0);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.raz-reveal-right.raz-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* Stagger Delay Classes */
.raz-delay-1 { transition-delay: 0.12s !important; }
.raz-delay-2 { transition-delay: 0.24s !important; }
.raz-delay-3 { transition-delay: 0.36s !important; }
.raz-delay-4 { transition-delay: 0.48s !important; }
.raz-delay-5 { transition-delay: 0.60s !important; }

/* === 5. OPTIMASI MOMENTUM SCROLL GLOBAL === */
html {
    scroll-behavior: smooth !important;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    .raz-reveal,
    .raz-reveal-scale,
    .raz-reveal-left,
    .raz-reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
