/* ═══════════════════════════════════════════════════════════════
   LogoBot — Ambient Animations
   Pure CSS + GPU-composited. Zero network cost.
   ═══════════════════════════════════════════════════════════════ */

/* ── Gradient Mesh (Hero) ─────────────────────────────────────
   Soft morphing color blobs — Stripe/Apple technique.
   3 blobs with blur, slow orbit, mix-blend for depth.          */

.gradient-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.gradient-mesh__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
  mix-blend-mode: multiply;
}

.gradient-mesh__blob:nth-child(1) {
  width: 45%;
  padding-bottom: 45%;
  top: -10%;
  left: -5%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.35) 0%, rgba(0, 113, 227, 0) 70%);
  animation: meshDrift1 18s ease-in-out infinite;
}

.gradient-mesh__blob:nth-child(2) {
  width: 40%;
  padding-bottom: 40%;
  top: 20%;
  right: -8%;
  background: radial-gradient(circle, rgba(88, 86, 214, 0.28) 0%, rgba(88, 86, 214, 0) 70%);
  animation: meshDrift2 22s ease-in-out infinite;
}

.gradient-mesh__blob:nth-child(3) {
  width: 35%;
  padding-bottom: 35%;
  bottom: -5%;
  left: 25%;
  background: radial-gradient(circle, rgba(48, 209, 88, 0.18) 0%, rgba(48, 209, 88, 0) 70%);
  animation: meshDrift3 20s ease-in-out infinite;
}

@keyframes meshDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12%, 8%) scale(1.08); }
  66% { transform: translate(-5%, 15%) scale(0.95); }
}
@keyframes meshDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-10%, -6%) scale(1.05); }
  66% { transform: translate(8%, 10%) scale(0.92); }
}
@keyframes meshDrift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8%, -12%) scale(1.1); }
  66% { transform: translate(-10%, 5%) scale(0.97); }
}


/* ── Sound Wave Bars ──────────────────────────────────────────
   Rhythmic bar visualization — speech/audio metaphor.          */

.wave-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  opacity: 0.5;
}

.wave-bars--lg {
  height: 80px;
  gap: 4px;
}

.wave-bars__bar {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: waveBar 1.6s ease-in-out infinite;
  will-change: transform;
}

.wave-bars--lg .wave-bars__bar {
  width: 4px;
  border-radius: 3px;
}

.wave-bars__bar:nth-child(1)  { animation-delay: 0s;    height: 30%; }
.wave-bars__bar:nth-child(2)  { animation-delay: 0.1s;  height: 50%; }
.wave-bars__bar:nth-child(3)  { animation-delay: 0.15s; height: 70%; }
.wave-bars__bar:nth-child(4)  { animation-delay: 0.2s;  height: 90%; }
.wave-bars__bar:nth-child(5)  { animation-delay: 0.25s; height: 100%; }
.wave-bars__bar:nth-child(6)  { animation-delay: 0.3s;  height: 85%; }
.wave-bars__bar:nth-child(7)  { animation-delay: 0.35s; height: 60%; }
.wave-bars__bar:nth-child(8)  { animation-delay: 0.4s;  height: 40%; }
.wave-bars__bar:nth-child(9)  { animation-delay: 0.45s; height: 55%; }
.wave-bars__bar:nth-child(10) { animation-delay: 0.5s;  height: 75%; }
.wave-bars__bar:nth-child(11) { animation-delay: 0.55s; height: 95%; }
.wave-bars__bar:nth-child(12) { animation-delay: 0.6s;  height: 80%; }
.wave-bars__bar:nth-child(13) { animation-delay: 0.65s; height: 55%; }
.wave-bars__bar:nth-child(14) { animation-delay: 0.7s;  height: 35%; }
.wave-bars__bar:nth-child(15) { animation-delay: 0.75s; height: 50%; }
.wave-bars__bar:nth-child(16) { animation-delay: 0.8s;  height: 70%; }
.wave-bars__bar:nth-child(17) { animation-delay: 0.85s; height: 45%; }
.wave-bars__bar:nth-child(18) { animation-delay: 0.9s;  height: 30%; }
.wave-bars__bar:nth-child(19) { animation-delay: 0.95s; height: 50%; }
.wave-bars__bar:nth-child(20) { animation-delay: 1.0s;  height: 65%; }

@keyframes waveBar {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.3); }
}


/* ── Glow Orb ─────────────────────────────────────────────────
   Soft pulsing radial glow behind hero elements.               */

.glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}

.glow-orb--hero {
  width: 500px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 113, 227, 0.12) 0%, transparent 70%);
  animation: glowPulse 6s ease-in-out infinite;
}

.glow-orb--chat {
  width: 300px;
  height: 300px;
  bottom: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.08) 0%, transparent 70%);
  animation: glowPulse 8s ease-in-out infinite;
}

.glow-orb--accent {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(88, 86, 214, 0.1) 0%, transparent 70%);
  animation: glowDrift 12s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

@keyframes glowDrift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  33% { transform: translate(20px, -15px) scale(1.1); opacity: 0.9; }
  66% { transform: translate(-15px, 10px) scale(0.95); opacity: 0.7; }
}


/* ── Particle Canvas ──────────────────────────────────────────
   Positioned behind content, sized via JS.                     */

.particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.particle-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}


/* ── Section Gradient Divider ─────────────────────────────────
   Animated gradient band between sections.                     */

.gradient-divider {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--accent-soft) 20%,
    var(--accent) 50%,
    var(--accent-soft) 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: gradientSlide 4s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes gradientSlide {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 0%; }
}


/* ── Floating Dots ────────────────────────────────────────────
   Subtle floating dots for data/clinical sections.
   Pure CSS, no JS needed.                                      */

.floating-dots {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-dots__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.15;
  will-change: transform;
}

.floating-dots__dot:nth-child(1)  { top: 12%; left: 8%;  animation: floatDot 14s ease-in-out infinite; }
.floating-dots__dot:nth-child(2)  { top: 25%; left: 85%; animation: floatDot 18s ease-in-out infinite 2s; }
.floating-dots__dot:nth-child(3)  { top: 45%; left: 15%; animation: floatDot 16s ease-in-out infinite 4s; width: 4px; height: 4px; }
.floating-dots__dot:nth-child(4)  { top: 60%; left: 72%; animation: floatDot 20s ease-in-out infinite 1s; }
.floating-dots__dot:nth-child(5)  { top: 78%; left: 40%; animation: floatDot 15s ease-in-out infinite 3s; width: 5px; height: 5px; }
.floating-dots__dot:nth-child(6)  { top: 35%; left: 55%; animation: floatDot 17s ease-in-out infinite 5s; width: 4px; height: 4px; }
.floating-dots__dot:nth-child(7)  { top: 88%; left: 22%; animation: floatDot 19s ease-in-out infinite 2.5s; }
.floating-dots__dot:nth-child(8)  { top: 15%; left: 65%; animation: floatDot 21s ease-in-out infinite 1.5s; width: 5px; height: 5px; }

@keyframes floatDot {
  0%, 100% { transform: translate(0, 0); opacity: 0.15; }
  25% { transform: translate(12px, -18px); opacity: 0.25; }
  50% { transform: translate(-8px, -10px); opacity: 0.12; }
  75% { transform: translate(15px, 8px); opacity: 0.2; }
}


/* ── Shimmer Line ─────────────────────────────────────────────
   Subtle scanning light effect for cards.                      */

.shimmer-line {
  position: relative;
  overflow: hidden;
}

.shimmer-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  animation: shimmerScan 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmerScan {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}


/* ── Hero relative positioning ────────────────────────────────
   Ensure hero content sits above animations.                   */

.hero--animated {
  position: relative;
  overflow: hidden;
}

.hero--animated > .wrap {
  position: relative;
  z-index: 1;
}

.hero--animated .hero-grid {
  position: relative;
  z-index: 1;
}


/* ── Section relative positioning ─────────────────────────────*/

.section--animated {
  position: relative;
  overflow: hidden;
}

.section--animated > .wrap {
  position: relative;
  z-index: 1;
}


/* ── Accessibility: Reduced motion ────────────────────────────
   Respect user preferences. Disable all motion.                */

@media (prefers-reduced-motion: reduce) {
  .gradient-mesh__blob,
  .wave-bars__bar,
  .glow-orb,
  .glow-orb--hero,
  .glow-orb--chat,
  .glow-orb--accent,
  .floating-dots__dot,
  .gradient-divider,
  .shimmer-line::after {
    animation: none !important;
  }

  .particle-canvas {
    display: none !important;
  }

  .wave-bars__bar {
    transform: scaleY(0.7) !important;
  }
}

/* ── Mobile: reduce complexity ────────────────────────────────*/
@media (max-width: 768px) {
  .gradient-mesh__blob {
    filter: blur(60px);
  }
  .gradient-mesh { opacity: 0.4; }
  .glow-orb--hero { width: 300px; height: 300px; }
  .floating-dots__dot:nth-child(n+5) { display: none; }
  .particle-canvas { opacity: 0.25; }
}
