/* ============================================================
   NEXUS ORACLE — Animations & Effects
   ============================================================ */

/* ──── Keyframes ──── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 194, 255, 0.2), 0 0 40px rgba(0, 102, 255, 0.1); }
  50%       { box-shadow: 0 0 40px rgba(0, 194, 255, 0.4), 0 0 80px rgba(0, 102, 255, 0.2); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

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

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-8px) rotate(1deg); }
  66%       { transform: translateY(-4px) rotate(-1deg); }
}

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

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

@keyframes scan-line {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

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

@keyframes border-pulse {
  0%, 100% { border-color: rgba(0, 102, 255, 0.15); }
  50%       { border-color: rgba(0, 194, 255, 0.4); }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes grid-fade {
  0%, 100% { opacity: 0.03; }
  50%       { opacity: 0.07; }
}

@keyframes orb-move {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(60px, -40px) scale(1.1); }
  66%  { transform: translate(-30px, 30px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes orb-move-2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-80px, 40px) scale(1.05); }
  66%  { transform: translate(50px, -50px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes text-reveal {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    clip-path: inset(0 0% 0 0);
  }
}

@keyframes progress-fill {
  from { width: 0; }
  to   { width: var(--target-width); }
}

@keyframes chain-flow {
  0%   { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

/* ──── Scroll Animation Classes ──── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(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; }
.reveal-delay-7 { transition-delay: 0.7s; }
.reveal-delay-8 { transition-delay: 0.8s; }

/* ──── Background Effects ──── */
.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-mesh::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation: orb-move 18s ease-in-out infinite;
}

.bg-mesh::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91, 110, 245, 0.07) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation: orb-move-2 22s ease-in-out infinite;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 102, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-fade 6s ease-in-out infinite;
  pointer-events: none;
}

/* ──── Utility Animations ──── */
.animate-float     { animation: float 4s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 7s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
.animate-rotate    { animation: rotate-slow 20s linear infinite; }
.animate-rotate-rev { animation: rotate-rev 25s linear infinite; }
.animate-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(0,194,255,0.15) 50%, transparent 100%);
  background-size: 200% auto;
  animation: shimmer 2.5s linear infinite;
}

/* ──── Glow Effects ──── */
.glow-blue {
  text-shadow: 0 0 20px rgba(0, 194, 255, 0.5), 0 0 40px rgba(0, 102, 255, 0.3);
}

.glow-box {
  box-shadow: 0 0 30px rgba(0, 194, 255, 0.15), 0 0 60px rgba(0, 102, 255, 0.08);
}

.glow-box-intense {
  box-shadow: 0 0 40px rgba(0, 194, 255, 0.25), 0 0 80px rgba(0, 102, 255, 0.15);
}

/* ──── Dot Live ──── */
.dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
  animation: pulse-dot 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent-mint);
}

/* ──── Scan Line ──── */
.scan-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scan-overlay::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,194,255,0.4), transparent);
  animation: scan-line 6s linear infinite;
}

/* ──── Loading shimmer for skeleton ──── */
.shimmer-card {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    rgba(0, 194, 255, 0.04) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}
