/* ============================================
   UNDANGAN DIGITAL KHITANAN - Custom Styles
   ============================================ */

/* ---------- Custom Scrollbar ---------- */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(200, 168, 78, 0.3);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 168, 78, 0.5);
}

/* ---------- Scroll Snap ---------- */
.snap-container {
    scroll-snap-type: y proximity;
    -webkit-overflow-scrolling: touch;
}

.snap-section {
    scroll-snap-align: start;
}

/* ---------- Cover Page Transition ---------- */
#cover-page {
    transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1),
        opacity 0.8s ease 0.3s;
}

.cover-opened {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

.delay-7 {
    transition-delay: 0.7s;
}

.delay-8 {
    transition-delay: 0.8s;
}

/* ---------- Vinyl Player ---------- */
@keyframes vinyl-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.vinyl-disc {
    animation: vinyl-spin 4s linear infinite;
    animation-play-state: paused;
}

.vinyl-disc.spinning {
    animation-play-state: running;
}

/* Tonearm */
#tonearm {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Float Animation ---------- */
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ---------- Pulse Glow ---------- */
@keyframes pulse-glow {
    0%,
    100% {
        box-shadow: 0 0 15px rgba(200, 168, 78, 0.2);
    }

    50% {
        box-shadow: 0 0 35px rgba(200, 168, 78, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

/* ---------- Parallax / Fixed BG ---------- */
.bg-fixed-cover {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@supports (-webkit-touch-callout: none) {
    .bg-fixed-cover {
        background-attachment: scroll;
    }
}

/* ---------- Particle Effects ---------- */
@keyframes particle-rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-100vh) translateX(30px) scale(0.3);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 168, 78, 0.8), rgba(200, 168, 78, 0.2));
    pointer-events: none;
    animation: particle-rise linear infinite;
}

/* ---------- Wiggle (QRIS) ---------- */
@keyframes wiggle {
    0%,
    100% {
        transform: rotate(-1.5deg);
    }

    50% {
        transform: rotate(1.5deg);
    }
}

.wiggle {
    animation: wiggle 2.5s ease-in-out infinite;
}

/* ---------- Photo Hover ---------- */
.photo-frame {
    overflow: hidden;
    position: relative;
}

.photo-frame img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-frame:hover img {
    transform: scale(1.08);
}

/* ---------- Collage Box ---------- */
.collage-box {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(200, 168, 78, 0.12);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.collage-box:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(200, 168, 78, 0.25);
}

/* ---------- Ornamental Divider ---------- */
.ornament-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ornament-divider::before,
.ornament-divider::after {
    content: '';
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
}

/* ---------- Map Pin Bounce ---------- */
@keyframes pin-bounce {
    0%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-16px);
    }

    50% {
        transform: translateY(-8px);
    }

    70% {
        transform: translateY(-12px);
    }
}

.pin-bounce {
    animation: pin-bounce 2s ease-in-out infinite;
}

/* ---------- Fade In Up (for cover elements) ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

/* ---------- Bounce Arrow ---------- */
@keyframes bounce-down {
    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

.bounce-arrow {
    animation: bounce-down 1.5s ease-in-out infinite;
}

/* ---------- Shimmer ---------- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

/* ---------- Groove rings for vinyl ---------- */
.groove-ring {
    position: absolute;
    border-radius: 50%;
    border: 0.5px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

/* ---------- Button Ripple ---------- */
.btn-gold {
    position: relative;
    overflow: hidden;
}

.btn-gold::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* ---------- Section Divider Waves ---------- */
.wave-top {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 40px;
}

.wave-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.wave-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 40px;
}

/* ---------- Counter Card Glow ---------- */
.counter-glow {
    box-shadow: 0 0 0 1px rgba(200, 168, 78, 0.15), inset 0 0 30px rgba(200, 168, 78, 0.03);
}

/* ---------- Mobile Music Button ---------- */
#mobile-music-btn {
    transition: opacity 0.5s ease, transform 0.3s ease;
}

#mobile-music-btn:active {
    transform: scale(0.9);
}

/* ---------- Arabic Text Styling ---------- */
.arabic-text {
    font-family: 'Amiri', serif;
    direction: rtl;
    line-height: 2;
}

/* ---------- Glass Effect ---------- */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-light {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 767px) {
    .snap-section {
        min-height: 100dvh;
    }
}

@media (min-width: 768px) {
    .snap-section {
        min-height: 100vh;
    }
}
