/* ========================================
   Animation Styles
   ======================================== */

/* ---- Keyframes ---- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes float-delayed {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(-2deg);
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 4px 40px rgba(139, 92, 246, 0.6), 0 0 60px rgba(139, 92, 246, 0.3);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ---- Animation Classes ---- */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-float-slow {
    animation: float-slow 10s ease-in-out infinite;
    animation-delay: 2s;
}

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

.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Stagger Children ---- */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible>*:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.visible>*:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.visible>*:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.visible>*:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children.visible>*:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-children.visible>*:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-children.visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Hero Text Reveal ---- */
.hero-text-reveal {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease forwards;
}

.hero-text-reveal:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-text-reveal:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-text-reveal:nth-child(3) {
    animation-delay: 0.6s;
}

/* ---- Scroll Animation Trigger ---- */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Infinite Scroll (Trust Logos) ---- */
.trust-logos {
    display: flex;
    gap: var(--space-3xl);
    animation: scroll 30s linear infinite;
}

.trust-logos:hover {
    animation-play-state: paused;
}

/* ---- Scale Up Animation ---- */
.animate-scale-up {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale-up.visible {
    opacity: 1;
    transform: scale(1);
}

/* ---- Fade In Animation ---- */
.animate-fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.animate-fade-in.visible {
    opacity: 1;
}

/* ---- Fade Left/Right ---- */
.animate-fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Card Hover Effects ---- */
.card-hover {
    transition: transform 0.15s ease-out,
        box-shadow 0.15s ease-out;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ---- Button Hover Effects ---- */
.btn-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(19, 127, 236, 0.3);
}

/* Arrow slide on hover */
.btn-arrow-hover .arrow-icon {
    transition: transform 0.2s ease;
}

.btn-arrow-hover:hover .arrow-icon {
    transform: translateX(4px);
}

/* ---- Progress Bar Animation ---- */
.progress-bar {
    background: #e2e8f0;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #137fec, #0ea5e9);
    border-radius: 9999px;
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Width is set inline via data-progress attribute and JS */

/* ---- Gradient Background Animation ---- */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* ---- Counter Animation Styling ---- */
[data-counter] {
    font-variant-numeric: tabular-nums;
}

/* ---- Stagger with more children ---- */
.stagger-children.visible>*:nth-child(7) {
    transition-delay: 0.7s;
}

.stagger-children.visible>*:nth-child(8) {
    transition-delay: 0.8s;
}

.stagger-children.visible>*:nth-child(9) {
    transition-delay: 0.9s;
}

.stagger-children.visible>*:nth-child(10) {
    transition-delay: 1s;
}

/* ---- Accessibility: Reduced Motion ---- */
@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;
    }

    .animate-fade-up,
    .animate-fade-in,
    .animate-fade-left,
    .animate-fade-right,
    .animate-scale-up {
        opacity: 1;
        transform: none;
    }

    .stagger-children>* {
        opacity: 1;
        transform: none;
    }
}