/* ============================================================
   DIGITALLY CONNECTED — Animations
   ============================================================ */

/* ── Scroll-based Animations ── */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.7s ease forwards;
}

.animate-fade-up.delay-1 {
    animation-delay: 0.1s;
}

.animate-fade-up.delay-2 {
    animation-delay: 0.2s;
}

.animate-fade-up.delay-3 {
    animation-delay: 0.35s;
}

.animate-fade-up.delay-4 {
    animation-delay: 0.5s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scroll Observer Animations ── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll:nth-child(1) {
    transition-delay: 0s;
}

.animate-on-scroll:nth-child(2) {
    transition-delay: 0.1s;
}

.animate-on-scroll:nth-child(3) {
    transition-delay: 0.2s;
}

.animate-on-scroll:nth-child(4) {
    transition-delay: 0.3s;
}

.animate-on-scroll:nth-child(5) {
    transition-delay: 0.4s;
}

.animate-on-scroll:nth-child(6) {
    transition-delay: 0.5s;
}

/* ── Pulse Animation ── */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ── Shimmer ── */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ── Glow ── */
@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(79, 70, 229, 0.6);
    }
}

/* ── Rotate ── */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ── Slide In ── */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Number Counter ── */
.count-up {
    display: inline-block;
}

/* ── Loading Spinner ── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
    display: inline-block;
}

/* ── Hover Lift ── */
.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
}

/* ── Page Transition ── */
.page-enter {
    animation: pageEnter 0.4s ease forwards;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Floating Badge ── */
@keyframes floatBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.float-badge {
    animation: floatBadge 3s ease-in-out infinite;
}

/* ── Gradient Shift ── */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

/* ── Ripple Effect ── */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.ripple:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}