/* ============================================================
   HR Trading Company — Animations
   Lightweight, performance-friendly animations
   ============================================================ */

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Hero visual entrances */
.hero-visual .dashboard-card { animation: fade-up 0.8s ease both; }
.hero-visual .hero-float-cards { animation: fade-up 0.8s ease 0.15s both; }

/* Live indicator for the dashboard mockup */
.live-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* Subtle attention pulse on primary CTAs (respects reduced motion) */
@keyframes attention-pulse {
    0%, 100% { box-shadow: 0 8px 20px rgba(49, 86, 232, 0.28); }
    50% { box-shadow: 0 8px 20px rgba(49, 86, 232, 0.28), 0 0 0 8px rgba(49, 86, 232, 0.08); }
}
.animate-attention { animation: attention-pulse 2.6s ease-in-out infinite; }

/* Page fade-in to avoid a hard flash */
body { animation: fade-in 0.35s ease both; }

/* ============================================================
   ADVANCED CARD ANIMATIONS
   ============================================================ */

/* Service card image parallax on hover */
@keyframes card-shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.service-card:hover .service-card-img {
    background: linear-gradient(
        90deg,
        var(--surface-soft) 0%,
        var(--primary-soft) 25%,
        #fff 50%,
        var(--primary-soft) 75%,
        var(--surface-soft) 100%
    );
    background-size: 200% 100%;
    animation: card-shimmer 1.5s ease-in-out;
}

/* Feature card icon bounce on hover */
@keyframes icon-bounce {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.15) rotate(-4deg); }
    60% { transform: scale(1.05) rotate(2deg); }
}
.feature-card--visual:hover .feature-icon {
    animation: icon-bounce 0.5s ease;
}

/* Step card number glow */
@keyframes step-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(49, 86, 232, 0); }
    50% { box-shadow: 0 0 0 8px rgba(49, 86, 232, 0.08); }
}
.step-card--advanced:hover {
    animation: step-glow 1.5s ease-in-out infinite;
}

/* Pricing card popular pulse */
@keyframes pricing-glow {
    0%, 100% { box-shadow: 0 20px 50px rgba(49, 86, 232, 0.2); }
    50% { box-shadow: 0 20px 50px rgba(49, 86, 232, 0.3), 0 0 0 6px rgba(49, 86, 232, 0.06); }
}
.pricing-card--advanced.is-popular {
    animation: pricing-glow 3s ease-in-out infinite;
}

/* Testimonial card subtle float */
@keyframes testimonial-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.testimonial-card--advanced:hover {
    animation: testimonial-float 0.6s ease;
}

/* Portfolio card image zoom on hover */
.portfolio-card:hover .portfolio-thumb {
    animation: none;
}
.portfolio-card .portfolio-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(17, 24, 39, 0.4) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}
.portfolio-card:hover .portfolio-thumb::after {
    opacity: 1;
}

/* Avatar pulse ring */
@keyframes avatar-ring {
    0%, 100% { border-color: var(--primary-soft); }
    50% { border-color: var(--primary); }
}
.testimonial-card--advanced:hover .testimonial-avatar {
    animation: avatar-ring 1s ease-in-out infinite;
}

/* Feature index number fade on hover */
.feature-card--visual:hover .feature-index {
    opacity: 0.7;
    transition: opacity var(--transition);
}
