/* ============================================
   CLIENTI360 — Animation Helper Classes
   GSAP + ScrollTrigger driven
   ============================================ */

/* — Base reveal states (JS adds .is-visible) — */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  will-change: transform, opacity;
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  will-change: transform, opacity;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  will-change: transform, opacity;
}

/* — Split text — */
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  will-change: transform, opacity;
}

.split-text .word {
  display: inline-block;
  overflow: hidden;
}

/* — Counter — */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* — Stagger children — */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity;
}

/* — Parallax — */
.parallax-layer {
  will-change: transform;
}

/* — Pin section indicator — */
.pin-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0%;
  background: var(--c-teal);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--c-teal-glow);
}

/* — Marquee — */
.marquee-track {
  display: flex;
  gap: 60px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* — Gradient animation — */
.gradient-animate {
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
}

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

/* — Orb glow (AI character placeholder) — */
.orb {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c-teal) 0%, rgba(0, 212, 170, 0.3) 40%, transparent 70%);
  filter: blur(40px);
  animation: orb-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes orb-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* — Waveform — */
.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 40px;
}

.waveform span {
  width: 3px;
  background: var(--c-teal);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}

.waveform span:nth-child(2) { animation-delay: 0.1s; }
.waveform span:nth-child(3) { animation-delay: 0.2s; }
.waveform span:nth-child(4) { animation-delay: 0.3s; }
.waveform span:nth-child(5) { animation-delay: 0.4s; }
.waveform span:nth-child(6) { animation-delay: 0.5s; }
.waveform span:nth-child(7) { animation-delay: 0.6s; }

@keyframes wave {
  0%, 100% { height: 10px; opacity: 0.5; }
  50% { height: 35px; opacity: 1; }
}

/* — Chatbot widget — */
.chatbot-fab {
  position: fixed;
  bottom: var(--s-24);
  right: var(--s-24);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--c-teal);
  color: var(--c-dark);
  border: none;
  cursor: pointer;
  z-index: var(--z-chatbot);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow-teal), 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all var(--duration-normal) var(--ease-spring);
}

.chatbot-fab:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-teal-lg), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.chatbot-fab__pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--c-teal);
  animation: fab-pulse 2s ease-out infinite;
  z-index: -1;
}

@keyframes fab-pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* — Video in hero — */
.hero-video-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-video-container video {
  width: 100%;
  height: auto;
  display: block;
}

/* — Reduced motion — */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale,
  .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .marquee-track { animation: none !important; }
  .orb { animation: none !important; }
  .waveform span { animation: none !important; height: 20px !important; }
  .gradient-animate { animation: none !important; }
  .chatbot-fab__pulse { animation: none !important; }
}
