/**
 * Zenthamizh Innovations - Animation System
 */

/* Glowing Pulse on 3D Z Logo */
@keyframes glowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.45)) drop-shadow(0 0 45px rgba(124, 58, 237, 0.25));
    transform: translateY(0) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 35px rgba(167, 139, 250, 0.7)) drop-shadow(0 0 70px rgba(139, 92, 246, 0.45));
    transform: translateY(-8px) scale(1.02);
  }
}

.glow-pulse {
  animation: glowPulse 5s ease-in-out infinite;
}

/* Subtle Floating */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* Rotating Loop Diagram on About page */
@keyframes rotateClockwise {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate-loop {
  animation: rotateClockwise 35s linear infinite;
}

.rotate-loop:hover {
  animation-play-state: paused;
}

/* Connecting Line Glow Beam */
@keyframes beamFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.growth-line-active {
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent-glow), transparent);
  background-size: 200% 100%;
  animation: beamFlow 3s linear infinite;
}

/* Radar Pulse / Ping for Status indicator */
@keyframes radarPing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.radar-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  animation: radarPing 2s infinite cubic-bezier(0.45, 0, 0.2, 1);
}

/* Card Hover Lift & Border Shimmer */
.card-hover-effect {
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card-hover-effect:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* Expand-on-hover capability card */
.expand-card {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.expand-card:hover {
  background: var(--surface-2);
  border-color: var(--primary);
  transform: translateY(-4px);
}

.expand-card .expand-icon {
  transition: transform 0.35s ease, color 0.35s ease;
}

.expand-card:hover .expand-icon {
  transform: rotate(8deg) scale(1.15);
  color: var(--accent-glow);
}

/* Drawer transitions */
.drawer-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease-out, visibility 0.32s;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer-panel {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-panel.active {
  transform: translateX(0);
}

/* Button hover ripple effect */
.btn-magnetic {
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-magnetic:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}

.btn-magnetic:active {
  transform: translateY(0);
}

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

.skeleton-shimmer {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Accessibility: Prefers Reduced 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;
  }

  .glow-pulse,
  .float-slow,
  .rotate-loop,
  .growth-line-active,
  .radar-dot {
    animation: none !important;
  }

  .drawer-panel {
    transition: none !important;
  }
}
