/* =========================================
   Scroll Animations
   ========================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays if needed */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* =========================================
   Hover Sparkle Effect
   ========================================= */
.sparkle-hover {
    position: relative;
    overflow: hidden; /* Contains sparkles inside */
}

.hover-sparkle-particle {
    position: absolute;
    pointer-events: none;
    background: radial-gradient(circle, #fff 10%, transparent 70%);
    border-radius: 50%;
    animation: sparkle-anim 0.8s linear forwards;
    width: 10px;
    height: 10px;
    top: 0;
    left: 0;
    z-index: 100;
}

@keyframes sparkle-anim {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

/* =========================================
   Background Global Sparkles
   ========================================= */
#global-sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1; /* Behind everything */
    overflow: hidden;
    pointer-events: none;
}

.bg-sparkle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3); /* Subtle white */
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    animation: float-sparkle linear infinite;
}

/* Dark mode adjustment if theme is dark */
@media (prefers-color-scheme: light) {
    .bg-sparkle {
        background: rgba(100, 149, 237, 0.2); /* Cornflower blue ish for light mode */
        box-shadow: 0 0 4px rgba(100, 149, 237, 0.3);
    }
}

@keyframes float-sparkle {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}
