/* ═══════════════════════════════════════════════════════════════
   TERRAMATCH NEXUS — Animation CSS
   All keyframes, transitions, and continuous animations
   ═══════════════════════════════════════════════════════════════ */

/* ── Logo Pulse ── */
@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0,245,212,0.2); }
    50%      { box-shadow: 0 0 20px rgba(0,245,212,0.5); }
}

.logo-mark {
    animation: logoPulse 3s ease-in-out infinite;
}

/* ── Status Dot Pulse ── */
@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
}

.status-dot {
    animation: dotPulse 2s ease-in-out infinite;
}

.status-dot.green { animation-delay: 0s; }
.status-dot.amber { animation-delay: 0.5s; }

/* ── Alert Shimmer ── */
@keyframes alertShimmer {
    0%, 100% { border-color: rgba(0,245,212,0.15); }
    50%      { border-color: rgba(0,245,212,0.35); }
}

/* ── Fade In Up (panel entrance) ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ── Shake (alert banner) ── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 50%, 90% { transform: translateX(-4px); }
    30%, 70% { transform: translateX(4px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* ── Glow Pulse (hotspot markers) ── */
@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.3;
    }
}

/* ── Ring Expand (hotspot rings on globe) ── */
@keyframes ringExpand {
    0% {
        transform: scale(0.8);
        opacity: 0.9;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ── Particle Trail ── */
@keyframes particleMove {
    0%   { offset-distance: 0%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* ── Counter Glow ── */
@keyframes counterGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(0,245,212,0.2); }
    50%      { text-shadow: 0 0 40px rgba(0,245,212,0.5); }
}

.stat-value {
    animation: counterGlow 4s ease-in-out infinite;
}

/* ── Scanning Line (for map overlays) ── */
@keyframes scanLine {
    0%   { transform: translateY(-100%); opacity: 0; }
    20%  { opacity: 0.3; }
    80%  { opacity: 0.3; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* ── Breathing (for drought/heatwave overlays) ── */
@keyframes breathing {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(1.05); }
}

/* ── Coast Shimmer (sea rise) ── */
@keyframes coastShimmer {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 0.5; }
}

/* ── Cyclone Dash (animated stroke-dashoffset) ── */
@keyframes cycloneDash {
    to { stroke-dashoffset: -40; }
}

/* ── Flash Border (new alert column flash) ── */
@keyframes flashBorder {
    0%   { border-color: var(--teal); box-shadow: 0 0 12px rgba(0,245,212,0.3); }
    100% { border-color: var(--border); box-shadow: none; }
}

.flash-border {
    animation: flashBorder 0.6s ease-out;
}

/* ── Slide In Right (toast) ── */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Slide Out Right (toast dismiss) ── */
@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ── Bar Fill (for progress bars) ── */
@keyframes barFill {
    from { width: 0%; }
}

/* ── Gauge Stroke Draw ── */
@keyframes gaugeStroke {
    from { stroke-dasharray: 0, 999; }
}

/* ── Confidence Ring Rotation ── */
@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Soft Float (for idle elements) ── */
@keyframes softFloat {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-4px); }
}

/* ── Alert Ticker Scroll ── */
@keyframes tickerScroll {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}

/* ── Teal Glow Underline ── */
@keyframes glowUnderline {
    0%, 100% {
        box-shadow: 0 2px 0 var(--teal), 0 4px 12px rgba(0,245,212,0.2);
    }
    50% {
        box-shadow: 0 2px 0 var(--teal), 0 4px 24px rgba(0,245,212,0.4);
    }
}

.glow-underline {
    animation: glowUnderline 3s ease-in-out infinite;
    padding-bottom: 4px;
}

/* ── Stagger delay utilities (for GSAP fallback) ── */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.40s; }

/* ── Transition utilities ── */
.transition-fast { transition: all 0.15s ease; }
.transition-med  { transition: all 0.3s ease; }
.transition-slow { transition: all 0.6s ease; }
