/* ========================================
   Scroll Reveal Animation System
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ========================================
   Floating Animation for Hero Cards
   ======================================== */
@keyframes float-gentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.hero-card-main {
    animation: float-slow 6s ease-in-out infinite;
}

.hero-card-stats {
    animation: float-gentle 5s ease-in-out infinite 0.5s;
}

.hero-card-tech {
    animation: float-gentle 7s ease-in-out infinite 1s;
}

.hero-card-float {
    animation: float-slow 5.5s ease-in-out infinite 1.5s;
}

.hero-card:hover {
    animation-play-state: paused;
}

/* ========================================
   Pulse animation for badge dot
   ======================================== */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.hero-badge::before {
    position: relative;
}

.hero-badge::after {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: pulse-ring 2s ease-in-out infinite;
    pointer-events: none;
}

/* ========================================
   Card hover micro-interactions
   ======================================== */
.bento-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease;
}

.feature-card {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.4s ease;
}

/* ========================================
   Step number pulse on scroll
   ======================================== */
@keyframes step-pop {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.process-step.revealed .step-number {
    animation: step-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ========================================
   CTA gradient shift
   ======================================== */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cta-banner {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* ========================================
   Mini chart bar animation
   ======================================== */
@keyframes bar-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.hero-card-stats.revealed .bar,
.hero-card-stats .bar {
    transform-origin: bottom;
    animation: bar-grow 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-card-stats .bar:nth-child(1) { animation-delay: 0.1s; }
.hero-card-stats .bar:nth-child(2) { animation-delay: 0.2s; }
.hero-card-stats .bar:nth-child(3) { animation-delay: 0.3s; }
.hero-card-stats .bar:nth-child(4) { animation-delay: 0.4s; }
.hero-card-stats .bar:nth-child(5) { animation-delay: 0.5s; }
.hero-card-stats .bar:nth-child(6) { animation-delay: 0.6s; }
.hero-card-stats .bar:nth-child(7) { animation-delay: 0.7s; }

/* ========================================
   Number counting animation placeholder
   ======================================== */
.stat-number,
.stat-num,
.float-value,
.card-value {
    transition: color 0.3s ease;
}

/* ========================================
   Smooth scroll anchor offset
   ======================================== */
[id] {
    scroll-margin-top: 80px;
}

/* ========================================
   Loading animation
   ======================================== */
@keyframes page-load {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: page-load 0.6s ease-out;
}

/* ========================================
   Reduced motion preference
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-card-main,
    .hero-card-stats,
    .hero-card-tech,
    .hero-card-float {
        animation: none;
    }
}
