/* ============================================
   Orange Bytes — Animation System v2.0
   Enhanced with creative micro-interactions
   ============================================ */

/* ---------- Scroll-reveal keyframes ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

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

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

/* ---------- Creative floating orbs ---------- */
.floating-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.12;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #ff6b00 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: orb-drift-1 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #0ea5e9 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: orb-drift-2 25s ease-in-out infinite;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #a855f7 0%, transparent 70%);
  top: 50%;
  left: 50%;
  animation: orb-drift-3 18s ease-in-out infinite;
}

@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-80px, 60px) scale(1.1); }
  50% { transform: translate(-40px, 120px) scale(0.95); }
  75% { transform: translate(60px, 40px) scale(1.05); }
}

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

@keyframes orb-drift-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.08; }
  50% { transform: translate(-50%, -55%) scale(1.2); opacity: 0.15; }
}

/* ---------- Glow & Pulse (enhanced) ---------- */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 0, 0.15), 0 0 60px rgba(255, 107, 0, 0.05); }
  50% { box-shadow: 0 0 40px rgba(255, 107, 0, 0.3), 0 0 80px rgba(255, 107, 0, 0.1); }
}

@keyframes border-glow {
  0%, 100% { border-color: rgba(255, 107, 0, 0.2); }
  50% { border-color: rgba(255, 107, 0, 0.5); }
}

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

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

/* ---------- Magnetic Pull Effect ---------- */
@keyframes magnetic-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ---------- Neon Flicker ---------- */
@keyframes neon-flicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(255,107,0,0.5), 0 0 40px rgba(255,107,0,0.2); }
  8% { opacity: 0.8; }
  9% { opacity: 1; }
  12% { opacity: 0.85; }
  13% { opacity: 1; }
}

/* ---------- Typing Cursor (enhanced) ---------- */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent-orange);
  margin-left: 4px;
  animation: cursor-blink 0.8s step-end infinite;
  vertical-align: text-bottom;
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.6);
}

/* ---------- Gradient Border Animation ---------- */
@keyframes gradient-rotate {
  0% { --angle: 0deg; }
  100% { --angle: 360deg; }
}

.animated-border {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.animated-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(
    from var(--angle, 0deg),
    var(--accent-orange),
    var(--accent-amber),
    var(--neon-blue),
    var(--accent-orange)
  );
  border-radius: inherit;
  animation: gradient-rotate 4s linear infinite;
  z-index: -1;
}

/* ---------- Orbiting Dots ---------- */
@keyframes orbit {
  from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

@keyframes orbit-reverse {
  from { transform: rotate(360deg) translateX(150px) rotate(-360deg); }
  to { transform: rotate(0deg) translateX(150px) rotate(0deg); }
}

/* ---------- Shimmer (enhanced) ---------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer-bg {
  background: linear-gradient(
    90deg,
    transparent 25%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 75%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

/* ---------- Scan Line Effect ---------- */
@keyframes scan-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

/* ---------- Staggered Children ---------- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.active > *:nth-child(1) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0s; }
.stagger-children.active > *:nth-child(2) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0.08s; }
.stagger-children.active > *:nth-child(3) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0.16s; }
.stagger-children.active > *:nth-child(4) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0.24s; }
.stagger-children.active > *:nth-child(5) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0.32s; }
.stagger-children.active > *:nth-child(6) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0.40s; }
.stagger-children.active > *:nth-child(7) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0.48s; }
.stagger-children.active > *:nth-child(8) { animation: fadeInUp 0.5s var(--ease-spring) forwards; animation-delay: 0.56s; }

/* ---------- Marquee ---------- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  gap: var(--space-2xl);
  animation: marquee 30s linear infinite;
  width: max-content;
}

.marquee-track:hover { animation-play-state: paused; }

/* ---------- Mouse Follower Glow ---------- */
.glow-follow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s;
}

/* ---------- Pulse Dot (for How It Works) ---------- */
@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-orange);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.6);
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-orange);
  animation: pulse-ring 2s ease-out infinite;
}

/* ---------- VS Badge ---------- */
@keyframes vs-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 0, 0.3), 0 0 40px rgba(255, 107, 0, 0.1); }
  50% { box-shadow: 0 0 30px rgba(255, 107, 0, 0.5), 0 0 60px rgba(255, 107, 0, 0.2); }
}

/* ---------- Button ripple ---------- */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-expand 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* ---------- Skeleton loader ---------- */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ---------- Text reveal ---------- */
@keyframes text-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Number morph ---------- */
@keyframes number-morph {
  0% { transform: translateY(100%); opacity: 0; }
  20% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}

/* ---------- Mobile performance ---------- */
@media (max-width: 768px) {
  .floating-orb {
    opacity: 0.06;
  }

  .orb-1 { width: 300px; height: 300px; }
  .orb-2 { width: 250px; height: 250px; }
  .orb-3 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-orb { display: none; }
}
