/* Scroll-triggered animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Base state for animated elements */
.anim-fade-up,
.anim-fade-left,
.anim-fade-right,
.anim-scale-in {
    opacity: 0;
}

/* Visible state */
.anim-fade-up.visible {
    animation: fadeInUp 0.7s ease-out forwards;
}

.anim-fade-left.visible {
    animation: fadeInLeft 0.7s ease-out forwards;
}

.anim-fade-right.visible {
    animation: fadeInRight 0.7s ease-out forwards;
}

.anim-scale-in.visible {
    animation: scaleIn 0.6s ease-out forwards;
}

/* Staggered delays for children */
.stagger-children > *.visible:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *.visible:nth-child(2) { animation-delay: 100ms; }
.stagger-children > *.visible:nth-child(3) { animation-delay: 200ms; }
.stagger-children > *.visible:nth-child(4) { animation-delay: 300ms; }
.stagger-children > *.visible:nth-child(5) { animation-delay: 400ms; }
.stagger-children > *.visible:nth-child(6) { animation-delay: 500ms; }
.stagger-children > *.visible:nth-child(7) { animation-delay: 600ms; }
.stagger-children > *.visible:nth-child(8) { animation-delay: 700ms; }

/* Hover lift effect for cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Subtle float animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.anim-float {
    animation: float 6s ease-in-out infinite;
}

/* Smooth gradient text shimmer for hero */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background: linear-gradient(135deg, #e2e8f0, #ffffff, #94a3b8, #ffffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease infinite;
}

/* Icon pulse on hover */
.icon-hover {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.icon-hover:hover {
    transform: scale(1.1);
    background-color: rgb(51 65 85); /* slate-700 */
}

/* Smooth section transitions */
section {
    transition: background-color 0.3s ease;
}

/* Number badge pop */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.anim-pop.visible {
    animation: popIn 0.5s ease-out forwards;
}

.anim-pop {
    opacity: 0;
}

/* Nav link underline animation */
.nav-link-animated {
    position: relative;
}

.nav-link-animated::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #f1f5f9;
    transition: width 0.3s ease;
}

.nav-link-animated:hover::after {
    width: 100%;
}

/* Smooth image reveal */
.img-reveal {
    overflow: hidden;
}

.img-reveal img {
    transition: transform 0.6s ease;
}

.img-reveal:hover img {
    transform: scale(1.03);
}

/* Sticky FAB buttons animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fab-animated > * {
    animation: slideInRight 0.5s ease-out forwards;
}

.fab-animated > *:nth-child(1) { animation-delay: 200ms; }
.fab-animated > *:nth-child(2) { animation-delay: 350ms; }

/* Badge pill modern style */
.badge-modern {
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .anim-fade-up,
    .anim-fade-left,
    .anim-fade-right,
    .anim-scale-in,
    .anim-pop {
        opacity: 1;
        animation: none !important;
    }

    .hover-lift:hover {
        transform: none;
    }

    .anim-float {
        animation: none;
    }

    .gradient-text {
        animation: none;
        -webkit-text-fill-color: white;
    }
}
