/* ============================================================
   CryptoX — Animations
   ============================================================ */

/* ---------- Keyframes ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
    from { opacity: 0; transform: translateX(-36px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
    from { opacity: 0; transform: translateX(36px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.05); opacity: 0.9; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 82, 255, 0.25); }
    50%      { box-shadow: 0 0 42px rgba(0, 82, 255, 0.5); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes spinReverse {
    from { transform: rotate(360deg); }
    to   { transform: rotate(0deg); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ============================================================
   Scroll Reveal Animation Classes
   ============================================================ */
.fade-up,
.fade-down,
.fade-left,
.fade-right,
.fade-in,
.scale-in {
    opacity: 0;
    will-change: opacity, transform;
}

.fade-up     { transform: translateY(28px); }
.fade-down   { transform: translateY(-28px); }
.fade-left   { transform: translateX(-36px); }
.fade-right  { transform: translateX(36px); }
.scale-in    { transform: scale(0.92); }
.fade-in     { transform: none; }

.in-view.fade-up,
.in-view.fade-down,
.in-view.fade-left,
.in-view.fade-right,
.in-view.fade-in,
.in-view.scale-in {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Delay utilities */
.delay-1 { transition-delay: 0.08s !important; }
.delay-2 { transition-delay: 0.16s !important; }
.delay-3 { transition-delay: 0.24s !important; }
.delay-4 { transition-delay: 0.32s !important; }
.delay-5 { transition-delay: 0.40s !important; }
.delay-6 { transition-delay: 0.48s !important; }

/* Utility */
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse 4s ease-in-out infinite; }
.animate-spin  { animation: spin 22s linear infinite; }

/* Hero chart card animations */
.chart-card-1 { animation: float 6s ease-in-out infinite; }
.chart-card-2 { animation: float 7s ease-in-out infinite 0.5s; }
.chart-card-3 { animation: float 5.5s ease-in-out infinite 1s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-up,
    .fade-down,
    .fade-left,
    .fade-right,
    .fade-in,
    .scale-in {
        opacity: 1 !important;
        transform: none !important;
    }

    .animate-float,
    .animate-pulse,
    .animate-spin,
    .chart-card-1,
    .chart-card-2,
    .chart-card-3 {
        animation: none !important;
    }
}