/* ========================================
   HeavyParts Pro - Animation Library
   Scroll-triggered & micro-interaction animations
   ======================================== */

/* === SCROLL ANIMATION BASE === */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* === FADE ANIMATIONS === */
[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-down"] {
    transform: translateY(-40px);
}

[data-aos="fade-down"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-left"] {
    transform: translateX(40px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-right"] {
    transform: translateX(-40px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

/* === ZOOM ANIMATIONS === */
[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

[data-aos="zoom-out"] {
    transform: scale(1.2);
}

[data-aos="zoom-out"].aos-animate {
    transform: scale(1);
}

/* === FLIP ANIMATIONS === */
[data-aos="flip-up"] {
    transform: perspective(1000px) rotateX(45deg);
}

[data-aos="flip-up"].aos-animate {
    transform: perspective(1000px) rotateX(0);
}

/* === DELAY UTILITIES === */
[data-aos-delay="100"] {
    transition-delay: 0.1s;
}

[data-aos-delay="200"] {
    transition-delay: 0.2s;
}

[data-aos-delay="300"] {
    transition-delay: 0.3s;
}

[data-aos-delay="400"] {
    transition-delay: 0.4s;
}

[data-aos-delay="500"] {
    transition-delay: 0.5s;
}

[data-aos-delay="600"] {
    transition-delay: 0.6s;
}

[data-aos-delay="700"] {
    transition-delay: 0.7s;
}

[data-aos-delay="800"] {
    transition-delay: 0.8s;
}

/* === DURATION UTILITIES === */
[data-aos-duration="400"] {
    transition-duration: 0.4s;
}

[data-aos-duration="600"] {
    transition-duration: 0.6s;
}

[data-aos-duration="800"] {
    transition-duration: 0.8s;
}

[data-aos-duration="1000"] {
    transition-duration: 1s;
}

/* === FLOATING ANIMATIONS === */
@keyframes float {

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

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

@keyframes floatSlow {

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

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

@keyframes floatReverse {

    0%,
    100% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(10px);
    }
}

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

.animate-float-slow {
    animation: floatSlow 5s ease-in-out infinite;
}

.animate-float-reverse {
    animation: floatReverse 4s ease-in-out infinite;
}

/* === PULSE ANIMATIONS === */
@keyframes pulse-soft {

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

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
    }

    50% {
        box-shadow: 0 0 20px 10px rgba(251, 191, 36, 0.1);
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

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

/* === PARTICLE EFFECTS === */
@keyframes particle-float {
    0% {
        transform: translateY(0) opacity(0);
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) opacity(0);
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: particle-float linear infinite;
    pointer-events: none;
}

/* === GRADIENT ANIMATIONS === */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

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

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

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

/* === TEXT REVEAL === */
@keyframes text-reveal {
    0% {
        clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
        opacity: 0;
    }

    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
        opacity: 1;
    }
}

.animate-text-reveal {
    animation: text-reveal 0.8s ease forwards;
}

/* === COUNTER ANIMATION === */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-count {
    animation: count-up 0.6s ease forwards;
}

/* === STAGGER ANIMATIONS FOR CHILDREN === */
.stagger-children>*:nth-child(1) {
    animation-delay: 0.1s;
}

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

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

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

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

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

.stagger-children>*:nth-child(7) {
    animation-delay: 0.7s;
}

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

/* === SCROLL INDICATOR === */
@keyframes scroll-indicator {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    75% {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-scroll-indicator {
    animation: scroll-indicator 1.5s ease infinite;
}

/* === SHIMMER EFFECT === */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* === GLASSMORPHISM UTILITIES === */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* === GLOW EFFECTS === */
.glow-primary {
    box-shadow: 0 0 20px rgba(30, 58, 138, 0.3);
}

.glow-secondary {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.glow-success {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}