/* High-Performance GPU-Accelerated Animations for PhranakornSoft Block Theme */

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale3d(0.92, 0.92, 1);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes floatSmooth {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -12px, 0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(1, 49, 182, 0.4);
    }
    50% {
        box-shadow: 0 0 0 16px rgba(1, 49, 182, 0);
    }
}

/* Scroll Animation Initial States (Managed by IntersectionObserver) */
.animate-fade-up,
.animate-fade-in,
.animate-scale-in,
.animate-slide-left,
.animate-slide-right {
    opacity: 0;
    will-change: opacity, transform;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-up {
    transform: translate3d(0, 35px, 0);
}

.animate-scale-in {
    transform: scale3d(0.94, 0.94, 1);
}

.animate-slide-left {
    transform: translate3d(-40px, 0, 0);
}

.animate-slide-right {
    transform: translate3d(40px, 0, 0);
}

/* Visible State Triggered by JS */
.animate-fade-up.is-visible,
.animate-fade-in.is-visible,
.animate-scale-in.is-visible,
.animate-slide-left.is-visible,
.animate-slide-right.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
}

/* Continuous Animations */
.animate-float {
    animation: floatSmooth 5s ease-in-out infinite;
}

.animate-pulse {
    animation: pulseGlow 2.5s infinite;
}

/* Stagger 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; }

/* Interactive UI Effects */
.hover-lift {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: 0 20px 40px -15px rgba(1, 49, 182, 0.15);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
}

.glass-card-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
}

/* Gradient Text Effect */
.text-gradient {
    background: linear-gradient(135deg, #0131b6 0%, #231bd0 50%, #fcb900 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #fcb900 0%, #fcee21 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Badge Style */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(1, 49, 182, 0.08);
    color: var(--wp--preset--color--primary);
    border: 1px solid rgba(1, 49, 182, 0.15);
}
