/* ============================================
   TrustiWP - Animations
   ============================================ */

/* --- Keyframes --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Scroll-triggered animation classes --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.animate-fade-in.animated {
    opacity: 1;
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-slide-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-slide-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 100ms; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 200ms; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 300ms; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 400ms; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 500ms; }

/* --- Hero animations --- */
.hero-content {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-label {
    animation: fadeInDown 0.6s ease 0.2s both;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.5s both;
}

.hero-actions {
    animation: fadeInUp 0.8s ease 0.7s both;
}

.hero-stats {
    animation: fadeIn 0.8s ease 0.9s both;
}

/* --- Gradient text animation --- */
.text-gradient-animated {
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

/* --- Loading shimmer --- */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-bg-alt) 25%,
        var(--color-border-light) 50%,
        var(--color-bg-alt) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

/* --- Floating elements --- */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation-delayed {
    animation: float 6s ease-in-out 2s infinite;
}

/* --- Glow pulse --- */
@keyframes glowPulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.45; }
}

.hero-glow-1 {
    animation: glowPulse 4s ease-in-out infinite;
}

.hero-glow-speed {
    animation: glowPulse 4s ease-in-out 2s infinite;
}
