/* Global Animations - Subtle and Smooth */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Animation classes for scroll-triggered elements */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered animations for lists/grids */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-animation.animated > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation.animated > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation.animated > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation.animated > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation.animated > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-animation.animated > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-animation.animated > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-animation.animated > *:nth-child(8) { transition-delay: 0.8s; }

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

/* Card hover animations - subtle */
.card-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-4px);
}

/* Text reveal animation */
.text-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.text-reveal.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Hero title appear animation - first load only */
.hero-section--with-nav .hero-title,
.hero-section--with-nav .hero-title--large {
    opacity: 0;
    transform: translateY(30px);
    animation: heroTitleAppear 1s ease-out 0.3s forwards;
}

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

/* Hero "Currently at" appear animation - starts after title animation completes */
.hero-section--with-nav .hero-currently {
    opacity: 0;
    transform: translateY(20px);
    animation: heroCurrentlyAppear 0.8s ease-out 1.3s forwards;
}

@keyframes heroCurrentlyAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for accessibility */
@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;
    }
}
