/* Modern animations & micro-interactions - ClarvoTech */

/* Tech Grid / Dot Background animation for Hero */
.tech-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: 
    radial-gradient(var(--border-color) 1.5px, transparent 1.5px),
    radial-gradient(var(--border-color) 1.5px, transparent 1.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  opacity: 0.45;
  mask-image: radial-gradient(circle at 50% 50%, black 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 60%, transparent 100%);
  pointer-events: none;
  animation: gridShift 40s linear infinite;
}

@keyframes gridShift {
  0% {
    background-position: 0 0, 20px 20px;
  }
  100% {
    background-position: 400px 400px, 420px 420px;
  }
}

/* Ambient Radial Glow */
.ambient-glow {
  position: absolute;
  width: 1000px;
  height: 1000px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, rgba(6, 182, 212, 0.28) 40%, rgba(59, 130, 246, 0.18) 70%, transparent 100%);
  filter: blur(130px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.9;
}

.ambient-glow-1 {
  top: -5%;
  right: -10%;
}

.ambient-glow-2 {
  top: 30%;
  left: -20%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(99, 102, 241, 0.28) 50%, transparent 100%);
}

.ambient-glow-3 {
  top: 60%;
  right: -20%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45) 0%, rgba(236, 72, 153, 0.28) 50%, transparent 100%);
}

.ambient-glow-4 {
  bottom: 0;
  left: 10%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, rgba(59, 130, 246, 0.28) 50%, transparent 100%);
}

.ambient-glow-5 {
  top: 80%;
  left: -15%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.40) 0%, rgba(244, 63, 94, 0.25) 50%, transparent 100%);
}

/* Interactive Floating Logo animation */
.float-logo {
  animation: logoFloat 6s ease-in-out infinite;
}

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

/* Viewport Scroll Entry Transitions */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Delay modifiers for sequential item entrance animations */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Micro hover scaling for active buttons */
.hover-grow {
  transition: transform var(--transition-fast);
}

.hover-grow:hover {
  transform: scale(1.03);
}

/* Pulse animation for active system elements (e.g. AI engine active) */
.pulse-glow {
  position: relative;
}

.pulse-glow::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: #10b981;
  top: 50%;
  left: -15px;
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}
