/* ============================================================
   MinerCore — Animation Keyframes & Motion Utilities
   ============================================================ */

/* ── 1. Neon Glow Pulse ── */
@keyframes glowPulse {
    0%   { box-shadow: 0 0 5px  rgba(0, 225, 217, 0.2); }
    50%  { box-shadow: 0 0 20px rgba(0, 225, 217, 0.5); }
    100% { box-shadow: 0 0 5px  rgba(0, 225, 217, 0.2); }
}

.glow-active {
    animation: glowPulse 2.5s infinite ease-in-out;
}

/* ── 2. Slide Down (hero elements, dropdowns) ── */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-down {
    opacity: 0;
    animation: slideDown 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Staggered delays for hero children */
.animate-slide-down:nth-child(1) { animation-delay: 0.05s; }
.animate-slide-down:nth-child(2) { animation-delay: 0.12s; }
.animate-slide-down:nth-child(3) { animation-delay: 0.20s; }
.animate-slide-down:nth-child(4) { animation-delay: 0.28s; }
.animate-slide-down:nth-child(5) { animation-delay: 0.36s; }

/* ── 3. Fade In ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* ── 4. Slide Up (cards on scroll) ── */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    opacity: 0;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── 6. Hover Scale (interactive cards) ── */
.hover-scale {
    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-scale:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 225, 217, 0.08);
}

/* ── 7. ROI bar animated fill (triggered by JS) ── */
.roi-bar-fill {
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 8. Spinning loader ── */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* ── 9. Pulsing dot (status indicator) ── */
@keyframes statusPulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.6; }
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: statusPulse 2s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 5px;
}

/* ── 10. Number counter increment (for trust stats section) ── */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* ── 11. Shimmer / skeleton loading effect ── */
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.skeleton {
    background: linear-gradient(90deg,
        var(--color-card-bg) 25%,
        var(--color-border-solid) 50%,
        var(--color-card-bg) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ── 12. 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;
    }
}
