/* ============================================
   ANIMATIONS CSS — Explore Jordan
   Keyframes, animation classes, utilities
   ============================================ */

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-36px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(36px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%      { transform: translateY(-10px) rotate(0.3deg); }
    66%      { transform: translateY(-4px) rotate(-0.2deg); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-14px) rotate(0.5deg); }
    50%      { transform: translateY(-6px) rotate(-0.3deg); }
    75%      { transform: translateY(-12px) rotate(0.2deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.7; transform: scale(0.97); }
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 8px rgba(184, 132, 77, 0.35); }
    50%      { box-shadow: 0 0 20px rgba(184, 132, 77, 0.65); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   ANIMATION CLASSES
   ============================================ */
.animate-fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.7s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.animate-fade-in-down {
    opacity: 0;
    animation: fadeInDown 0.65s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.animate-slide-in-left {
    opacity: 0;
    animation: slideInLeft 0.75s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.animate-slide-in-right {
    opacity: 0;
    animation: slideInRight 0.75s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.animate-scale-in {
    opacity: 0;
    animation: scaleIn 0.65s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-fast {
    animation: floatFast 3.5s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2.5s ease-in-out infinite;
}

.animate-spin {
    animation: spin 0.8s linear infinite;
}

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

.animate-slide-down {
    opacity: 0;
    animation: slideDown 0.5s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

/* ============================================
   SPINNER (button loading)
   ============================================ */
.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

/* ============================================
   DELAY UTILITIES
   ============================================ */
.delay-0   { animation-delay: 0ms !important; }
.delay-50  { animation-delay: 50ms !important; }
.delay-100 { animation-delay: 100ms !important; }
.delay-150 { animation-delay: 150ms !important; }
.delay-200 { animation-delay: 200ms !important; }
.delay-250 { animation-delay: 250ms !important; }
.delay-300 { animation-delay: 300ms !important; }
.delay-400 { animation-delay: 400ms !important; }
.delay-500 { animation-delay: 500ms !important; }
.delay-600 { animation-delay: 600ms !important; }
.delay-700 { animation-delay: 700ms !important; }

/* ============================================
   STAGGER CHILDREN
   ============================================ */
.stagger-children > * {
    opacity: 0;
    animation: fadeInUp 0.6s var(--ease-smooth, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.stagger-children > :nth-child(1) { animation-delay: 50ms; }
.stagger-children > :nth-child(2) { animation-delay: 120ms; }
.stagger-children > :nth-child(3) { animation-delay: 190ms; }
.stagger-children > :nth-child(4) { animation-delay: 260ms; }
.stagger-children > :nth-child(5) { animation-delay: 330ms; }

/* ============================================
   TRANSITION UTILITIES
   ============================================ */
.transition-fast   { transition: all 0.15s ease; }
.transition-normal { transition: all 0.28s var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1)); }
.transition-slow   { transition: all 0.5s var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1)); }
.transition-spring { transition: all 0.4s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)); }

/* ============================================
   HOVER UTILITIES
   ============================================ */
.hover-lift {
    transition: transform 0.3s var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)),
                box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .animate-float      { animation-duration: 5s; }
    .animate-float-fast { animation-duration: 3s; }
    .animate-bounce     { animation: none; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .btn-spinner {
        animation: spin 1.5s linear infinite !important;
    }
}
