/* ========================================
   Hour Gaming Ion – Animations
   hg-animations.css
   ======================================== */

/* ── Keyframes ──────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

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

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,212,255,0.2); }
  50% { box-shadow: 0 0 40px rgba(0,212,255,0.45), 0 0 80px rgba(124,58,237,0.2); }
}

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

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

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

@keyframes blink-caret {
  0%, 100% { border-color: transparent; }
  50% { border-color: var(--accent-cyan); }
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes hero-glow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.08);
  }
}

@keyframes data-stream {
  0% { transform: translateY(0) scaleY(0.3); opacity: 0; }
  20% { opacity: 1; scaleY: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-200px) scaleY(0.3); opacity: 0; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes bounce-in {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Animation utility classes ──────────── */
.anim-float { animation: float 4s ease-in-out infinite; }
.anim-glow { animation: glow-pulse 3s ease-in-out infinite; }
.anim-fade-up { animation: fade-in-up 0.7s ease forwards; }
.anim-fade-in { animation: fade-in 0.6s ease forwards; }

/* ── Hero animated orbs ─────────────────── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: hero-glow 6s ease-in-out infinite;
}

.hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, transparent 70%);
  top: -100px; right: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(0,212,255,0.2) 0%, transparent 70%);
  bottom: 50px; left: -50px;
  animation-delay: -3s;
}

.hero-orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(224,64,251,0.15) 0%, transparent 70%);
  top: 40%; left: 40%;
  animation-delay: -1.5s;
}

/* ── Particle dots ──────────────────────── */
.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: var(--accent-cyan);
  border-radius: 50%;
  opacity: 0;
  animation: data-stream linear infinite;
}

/* ── Gradient text animation ─────────────── */
.gradient-text-anim {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink), var(--accent-cyan));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

/* ── Scan line overlay ──────────────────── */
.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  opacity: 0.5;
}

/* ── Typing cursor ──────────────────────── */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent-cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-caret 1.2s step-end infinite;
}

/* ── Button ripple ──────────────────────── */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  animation: ripple 0.6s linear;
}

/* ── Hover lift cards ────────────────────── */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ── Staggered reveal ────────────────────── */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ── Chart bars ─────────────────────────── */
.chart-bar {
  transform-origin: bottom;
  transition: height 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Glitch effect ──────────────────────── */
@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 95% 0); transform: translateX(-4px); }
  20% { clip-path: inset(40% 0 50% 0); transform: translateX(4px); }
  40% { clip-path: inset(80% 0 5% 0); transform: translateX(-2px); }
}

@keyframes glitch-2 {
  0%, 100% { clip-path: inset(15% 0 60% 0); transform: translateX(4px); }
  20% { clip-path: inset(60% 0 10% 0); transform: translateX(-4px); }
  40% { clip-path: inset(5% 0 80% 0); transform: translateX(2px); }
}

.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}

.glitch-text::before {
  color: var(--accent-cyan);
  animation: glitch-1 2s infinite linear;
  opacity: 0;
}

.glitch-text::after {
  color: var(--accent-purple);
  animation: glitch-2 2s infinite linear;
  animation-delay: 0.1s;
  opacity: 0;
}

.glitch-text:hover::before,
.glitch-text:hover::after { opacity: 0.7; }

/* ── Loading spinner ────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(0,212,255,0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin-slow 0.8s linear infinite;
}

/* ── Progress ring ──────────────────────── */
.progress-ring circle {
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4,0,0.2,1);
}

/* ── Notification pulse ─────────────────── */
@keyframes notification-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.pulse-ring {
  position: relative;
}

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

/* ── Section entrance ───────────────────── */
.section-enter {
  animation: fade-in-up 0.8s ease both;
}

/* ── Neon border animation ──────────────── */
@keyframes neon-border {
  0%, 100% { border-color: rgba(0,212,255,0.3); box-shadow: 0 0 10px rgba(0,212,255,0.1); }
  50% { border-color: rgba(124,58,237,0.5); box-shadow: 0 0 20px rgba(124,58,237,0.2); }
}

.neon-border-anim {
  animation: neon-border 3s ease-in-out infinite;
}
