/* ============================================
   UTECH Design System — Animations
   ============================================ */

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

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

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ── Stagger Delays ── */
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }
.delay-5 { transition-delay: 500ms; }
.delay-6 { transition-delay: 600ms; }

/* ── Gradient Text Shimmer ── */
@keyframes gradientShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.text-gradient-animated {
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShimmer 4s ease infinite;
}

/* ── Hero Background Pulse ── */
@keyframes heroPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

/* ── Float Animation ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* ── Glow Pulse ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
  50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(16, 185, 129, 0.1); }
}

.animate-glow {
  animation: glowPulse 3s ease-in-out infinite;
}

/* ── Spin ── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 8s linear infinite;
}

/* ── Fade In ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

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

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

/* ── Counter Tick ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Particle Dots ── */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.2;
  animation: float 8s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { top: 60%; left: 20%; animation-delay: 1s; animation-duration: 9s; }
.particle:nth-child(3) { top: 30%; left: 70%; animation-delay: 2s; animation-duration: 8s; }
.particle:nth-child(4) { top: 80%; left: 80%; animation-delay: 0.5s; animation-duration: 10s; }
.particle:nth-child(5) { top: 10%; left: 50%; animation-delay: 3s; animation-duration: 6s; }
.particle:nth-child(6) { top: 50%; left: 90%; animation-delay: 1.5s; animation-duration: 11s; }
.particle:nth-child(7) { top: 70%; left: 40%; animation-delay: 2.5s; animation-duration: 7s; }
.particle:nth-child(8) { top: 40%; left: 30%; animation-delay: 0.8s; animation-duration: 9s; }

/* ── Gradient Orb (Hero Background) ── */
.hero-orb {
  position: absolute;
  border-radius: 0;
  filter: blur(70px);
  opacity: 0.12;
  pointer-events: none;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--primary), transparent);
  top: -100px;
  right: -100px;
  animation: heroPulse 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, transparent, var(--secondary));
  bottom: -50px;
  left: -50px;
  animation: heroPulse 10s ease-in-out infinite;
  animation-delay: 2s;
}

/* ── Grid Lines Background ── */
.grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(53, 217, 195, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 217, 195, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── Typing Cursor ── */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.typing-cursor::after {
  content: '|';
  color: var(--primary);
  animation: blink 1s infinite;
  margin-left: 2px;
}

/* ── Accordion Animation ── */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.accordion-item.active .accordion-content {
  max-height: 500px;
}

/* ── Loading Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--text-white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
