/* ============================================================
   ACTIVISIONVR — Animations & Transitions
   Keyframes, scroll-reveal, micro-interactions
   ============================================================ */

/* ── Keyframe Animations ────────────────────────────── */

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

@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 scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

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

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
  50% { box-shadow: 0 0 20px 8px var(--primary-glow); }
}

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

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes lineExpand {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

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

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 50% { border-color: var(--primary); }
  51%, 100% { border-color: transparent; }
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.06; }
}

@keyframes orbitFloat {
  0% { transform: rotate(0deg) translateX(20px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(20px) rotate(-360deg); }
}

/* ── Scroll Reveal System ───────────────────────────── */
/* Elements start invisible and animate in when they enter the viewport */

.reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-down {
  opacity: 0;
  transform: translateY(-30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-down.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ── Stagger Delays ─────────────────────────────────── */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.4s; }
.stagger-9 { transition-delay: 0.45s; }
.stagger-10 { transition-delay: 0.5s; }

/* ── Animated Background ────────────────────────────── */
.animated-gradient-bg {
  background: linear-gradient(-45deg, #0A0E17, #1F2937, #111827, #0A0E17);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

.animated-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 4s ease-in-out infinite;
}

/* ── Glow Effects ───────────────────────────────────── */
.glow-primary {
  box-shadow: var(--shadow-glow);
}

.glow-blue {
  box-shadow: var(--shadow-blue-glow);
}

.glow-pulse {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* ── Hover Micro-interactions ───────────────────────── */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow);
}

.hover-scale {
  transition: transform var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* ── Loading Skeleton ───────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* ── Counter Animation Helper ───────────────────────── */
.counter-animated {
  display: inline-block;
  animation: countUp 0.5s var(--ease-out) forwards;
}

/* ── Hero-specific animations ───────────────────────── */
.hero-animate-title {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-animate-text {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-animate-actions {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.hero-animate-label {
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* ── Floating elements ──────────────────────────────── */
.float-slow {
  animation: float 6s ease-in-out infinite;
}

.float-medium {
  animation: float 4s ease-in-out infinite;
}

.float-fast {
  animation: float 3s ease-in-out infinite;
}

/* ── Line reveal ────────────────────────────────────── */
.line-reveal {
  transform-origin: left;
  animation: lineExpand 1s var(--ease-out) forwards;
}

/* ── Reduce Motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-up,
  .reveal-down,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}

/* ================================================================
   HERO VISUAL — Floating Interactive Animation
   ================================================================ */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(1deg); }
  50% { transform: translateY(-5px) rotate(-0.5deg); }
  75% { transform: translateY(-18px) rotate(0.5deg); }
}

@keyframes heroGlowPulse {
  0%, 100% { 
    opacity: 0.4; 
    transform: scale(1);
    filter: blur(100px) saturate(1.2);
  }
  50% { 
    opacity: 0.85; 
    transform: scale(1.12);
    filter: blur(120px) saturate(1.8);
  }
}

@keyframes heroOrbit {
  0% { transform: rotateX(70deg) rotateY(-15deg) rotateZ(0deg); }
  100% { transform: rotateX(70deg) rotateY(-15deg) rotateZ(360deg); }
}

@keyframes heroOrbitReverse {
  0% { transform: rotateX(60deg) rotateY(20deg) rotateZ(360deg); }
  100% { transform: rotateX(60deg) rotateY(20deg) rotateZ(0deg); }
}

@keyframes heroParticle {
  0% { opacity: 0; transform: translateY(20px) scale(0.4) translateZ(0); }
  20% { opacity: 0.8; }
  80% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-80px) scale(1) translateZ(50px); }
}

.hero-visual-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.hero-visual-float {
  position: relative;
  animation: heroFloat 6s ease-in-out infinite;
  width: 100%;
  max-width: 460px;
  transition: all var(--transition-slow);
  z-index: 2;
  transform-style: preserve-3d;
}

.hero-visual-float img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  filter: drop-shadow(0 15px 45px rgba(139, 92, 246, 0.4)) drop-shadow(0 5px 15px rgba(59, 130, 246, 0.2));
  position: relative;
  z-index: 2;
  transition: all var(--transition-slow);
}

/* Interactive Hover state for the VR Device */
.hero-visual-container:hover .hero-visual-float {
  transform: scale(1.04) translateZ(30px);
}

.hero-visual-container:hover .hero-visual-float img {
  filter: drop-shadow(0 25px 60px rgba(139, 92, 246, 0.6)) drop-shadow(0 10px 25px rgba(59, 130, 246, 0.4));
}

/* Pulsing glow behind the image - blending purple and blue */
.hero-visual-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  max-width: 400px;
  max-height: 400px;
  background: radial-gradient(circle, 
    rgba(139, 92, 246, 0.35) 0%, 
    rgba(59, 130, 246, 0.2) 45%, 
    transparent 70%);
  border-radius: 50%;
  animation: heroGlowPulse 5s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

/* 3D Orbiting ring 1 (Purple Theme) */
.hero-visual-ring {
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  border-radius: 50%;
  animation: heroOrbit 16s linear infinite;
  z-index: 1;
  transform-style: preserve-3d;
  pointer-events: none;
}

.hero-visual-ring::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--primary), 0 0 35px var(--primary);
  transform: translateY(-50%);
}

/* 3D Orbiting ring 2 (Blue Theme, Reverse direction) */
.hero-visual-ring-2 {
  position: absolute;
  width: 580px;
  height: 580px;
  border: 1.2px dashed rgba(59, 130, 246, 0.18);
  border-radius: 50%;
  animation: heroOrbitReverse 24s linear infinite;
  z-index: 1;
  transform-style: preserve-3d;
  pointer-events: none;
}

.hero-visual-ring-2::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent-blue);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-blue), 0 0 25px var(--accent-blue);
  transform: translateX(-50%);
}

/* Interactive speed up on hover */
.hero-visual-container:hover .hero-visual-ring {
  animation-duration: 8s;
  border-color: rgba(139, 92, 246, 0.45);
}

.hero-visual-container:hover .hero-visual-ring-2 {
  animation-duration: 12s;
  border-color: rgba(59, 130, 246, 0.35);
}

/* Floating particles rising up in 3D space */
.hero-visual-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform-style: preserve-3d;
}

.hero-visual-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: heroParticle 4s ease-in-out infinite;
  box-shadow: 0 0 8px var(--primary);
}

.hero-visual-particles span:nth-child(1) { left: 15%; bottom: 20%; animation-delay: 0s; }
.hero-visual-particles span:nth-child(2) { left: 80%; bottom: 30%; animation-delay: 1s; background: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }
.hero-visual-particles span:nth-child(3) { left: 25%; bottom: 15%; animation-delay: 2s; }
.hero-visual-particles span:nth-child(4) { left: 70%; bottom: 25%; animation-delay: 2.8s; background: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }
.hero-visual-particles span:nth-child(5) { left: 45%; bottom: 10%; animation-delay: 0.7s; width: 3px; height: 3px; }
.hero-visual-particles span:nth-child(6) { left: 85%; bottom: 15%; animation-delay: 1.8s; background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); }

/* Two Column Hero Layout */
.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-12);
  align-items: center;
  text-align: left;
  width: 100%;
}

.hero-split .hero-content {
  text-align: left;
  z-index: 5;
}

.hero-split .hero-content h1 {
  text-align: left;
}

/* Breakpoints optimization - Keep side-by-side layout on laptops (down to 992px) */
@media (max-width: 991px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    text-align: center;
  }
  
  .hero-split .hero-content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
  }
  
  .hero-split .hero-content h1 {
    text-align: center;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual-container {
    min-height: 360px;
  }
  
  .hero-visual-float {
    max-width: 380px;
  }
  
  .hero-visual-ring {
    width: 440px;
    height: 440px;
  }
  
  .hero-visual-ring-2 {
    width: 490px;
    height: 490px;
  }
}

@media (max-width: 640px) {
  .hero-visual-container {
    min-height: 280px;
  }
  
  .hero-visual-float {
    max-width: 290px;
  }
  
  .hero-visual-ring,
  .hero-visual-ring-2 {
    display: none;
  }
}

