/* Entrance Animations */
.fade-in-up {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-right {
    animation: fadeInRight 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.scale-in {
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* AOS Override — enable for all viewports */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Raindrop Keyframes */
.raindrop {
    position: fixed;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(14, 165, 233, 0.3));
    pointer-events: none;
    z-index: 9997;
    animation: raindrop-fall linear infinite;
}

@keyframes raindrop-fall {
    0% { transform: translateY(-10vh) scaleY(0.5); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(110vh) scaleY(1); opacity: 0; }
}

/* Liquid Flow */
.liquid-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(0, 212, 170, 0.05));
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: liquid-flow 8s ease-in-out infinite;
}

@keyframes liquid-flow {
    0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    25% { opacity: 0.5; transform: scale(1.02) rotate(1deg); }
    50% { opacity: 0.4; transform: scale(0.98) rotate(-1deg); }
    75% { opacity: 0.6; transform: scale(1.01) rotate(0.5deg); }
}

/* Ripple Burst */
@keyframes ripple-burst {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

/* Shimmer Text */
.shimmer {
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--accent-blue) 50%, var(--text-primary) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer-text 3s ease-in-out infinite;
}

@keyframes shimmer-text {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Glow Pulse */
.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(14, 165, 233, 0.2); }
    50% { box-shadow: 0 0 40px rgba(14, 165, 233, 0.4); }
}

/* Gradient Shift */
.gradient-shift {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal), var(--accent-purple), var(--accent-blue));
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* WhatsApp Pulse */
@keyframes wa-pulse {
    0% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 35px rgba(37, 211, 102, 0.6); }
    100% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.4); }
}

/* Water Waves */
.wave-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: auto;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

.waves {
    position: relative;
    width: 100%;
    height: 60px;
    min-height: 60px;
}

.parallax-waves > use {
    animation: wave-move 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}

.parallax-waves > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax-waves > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax-waves > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax-waves > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

@keyframes wave-move {
    0% { transform: translateX(-90px); }
    100% { transform: translateX(85px); }
}

/* Particle */
.particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9996;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.4), transparent);
    animation: particle-float linear infinite;
}

@keyframes particle-float {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* Water Cursor */
.water-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    mix-blend-mode: screen;
}

.water-cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.15);
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
}

/* Stats Counter */
.stat-number {
    display: inline-block;
}

/* Back-to-Top */
@keyframes back-to-top-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.back-to-top.visible {
    animation: back-to-top-bounce 2s ease-in-out infinite;
}

/* Page Transition */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

.page-transition .loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Reading Progress Bar */
.progress-bar {
    animation: progress-glow 2s ease-in-out infinite;
}

@keyframes progress-glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

/* prefers-reduced-motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .water-cursor, .water-cursor-trail,
    .raindrop, .particle,
    .parallax-waves > use,
    .liquid-layer {
        display: none !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }

    .progress-bar {
        display: none !important;
    }
}
