/* ============================================
   CodePro Association — CSS Animations v2
   More vivid: fade-left, fade-right, scale-in,
   parallax, stat counter, progress-driven
   ============================================ */

/* ----- Fade Up ----- */
.anim-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.anim-fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Fade Left ----- */
.anim-fade-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.anim-fade-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* ----- Fade Right ----- */
.anim-fade-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.anim-fade-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* ----- Scale In ----- */
.anim-scale-in {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.anim-scale-in.in-view {
    opacity: 1;
    transform: scale(1);
}

/* ----- Stagger delays ----- */
.anim-delay-1 {
    transition-delay: 0.1s;
}

.anim-delay-2 {
    transition-delay: 0.2s;
}

.anim-delay-3 {
    transition-delay: 0.3s;
}

.anim-delay-4 {
    transition-delay: 0.4s;
}

.anim-delay-5 {
    transition-delay: 0.5s;
}

.anim-delay-6 {
    transition-delay: 0.6s;
}

/* ----- Shape Float (organic, varied) ----- */
@keyframes cpro-float {

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

    33% {
        transform: translateY(-14px) rotate(2.5deg);
    }

    66% {
        transform: translateY(7px) rotate(-1.5deg);
    }
}

@keyframes cpro-float-slow {

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

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

@keyframes cpro-drift {

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

    25% {
        transform: translate(10px, -12px) rotate(1.5deg);
    }

    50% {
        transform: translate(-6px, -18px) rotate(-1deg);
    }

    75% {
        transform: translate(8px, -8px) rotate(2deg);
    }
}

/* Shape animation assignments */
.shape--hex {
    animation: cpro-float 9s ease-in-out infinite;
}

.shape--triangle {
    animation: cpro-drift 11s ease-in-out infinite 0.5s;
}

.shape--wave {
    animation: cpro-float-slow 10s ease-in-out infinite 1s;
}

.shape--cross {
    animation: cpro-float 12s ease-in-out infinite 2s;
}

.shape--diamond {
    animation: cpro-drift 13s ease-in-out infinite 1.5s;
}

.shape--dots-grid {
    animation: cpro-float-slow 14s ease-in-out infinite;
}

.shape--bar {
    animation: cpro-float 8s ease-in-out infinite 0.5s;
}

.shape--ring {
    animation: cpro-drift 10s ease-in-out infinite 1s;
}

/* Hero accents */
.hero-accent--triangle {
    animation: cpro-float 7s ease-in-out infinite;
}

.hero-accent--bar {
    animation: cpro-float-slow 9s ease-in-out infinite 0.5s;
}

.hero-accent--dots {
    animation: cpro-drift 11s ease-in-out infinite 1s;
}

/* ----- Hero entrance ----- */
@keyframes hero-slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

.cpro-hero__title {
    animation: hero-slide-up 0.9s ease-out 0.2s both;
}

.cpro-hero__subtitle {
    animation: hero-slide-up 0.9s ease-out 0.4s both;
}

.cpro-hero__cta {
    animation: hero-slide-up 0.9s ease-out 0.6s both;
}

.cpro-hero__img-wrapper {
    animation: hero-slide-up 1s ease-out 0.5s both;
}

/* ----- Hover lift ----- */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* ----- Pulse CTA ----- */
@keyframes cpro-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(255, 209, 102, 0);
    }
}

.pulse-attention {
    animation: cpro-pulse 2s ease-in-out infinite;
}

/* ----- Wave shape animation ----- */
@keyframes wave-drift {
    0% {
        transform: translateX(0);
    }

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

/* ----- Stat count animation ----- */
.cpro-stat__number {
    transition: all 0.05s linear;
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {

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

    .shape,
    .hero-accent,
    [class*="hero-accent--"] {
        animation: none !important;
    }

    .cpro-hero__title,
    .cpro-hero__subtitle,
    .cpro-hero__cta,
    .cpro-hero__img-wrapper {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}