/* Active Digit — homepage motion layer v20261008 */

/* ---------- Hero: cinemagraph loop over the static LCP image ---------- */
.hero-image--motion img { animation: none !important; }
.hero-image--motion > video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0; transition: opacity 1s ease;
  pointer-events: none;
}
.hero-image--motion.is-playing > video { opacity: 1; }

/* ---------- Process: 3D step icons + connector that draws itself ---------- */
.proc--media::before { top: 60px; }
.proc--media::after {
  content: ''; position: absolute; top: 59px; height: 3px; border-radius: 3px;
  inset-inline-start: 12%; inset-inline-end: 12%;
  background: linear-gradient(90deg, #A8BC1F, #C5DA2C);
  box-shadow: 0 0 12px rgba(197,218,44,0.45);
  transform: scaleX(0); transform-origin: right center;
  transition: transform 1.8s cubic-bezier(0.65,0,0.35,1) 0.3s;
}
[dir="ltr"] .proc--media::after { transform-origin: left center; }
.proc--media.is-drawn::after { transform: scaleX(1); }

.proc__media {
  position: relative; flex: none;
  width: 120px; height: 120px; border-radius: 28px;
  background: #0B1220;
  box-shadow: 0 18px 40px -18px rgba(11,18,32,0.65), 0 0 0 1px rgba(15,23,41,0.06);
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s ease;
}
.proc__media img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.proc__media .proc__num {
  position: absolute; top: -8px; inset-inline-start: -8px;
  width: 34px; height: 34px; font-size: 0.9rem;
  background: var(--lime); color: var(--navy);
  border: 3px solid var(--gray-50);
  box-shadow: 0 6px 14px -6px rgba(15,23,41,0.45);
}
.proc__step:hover .proc__media {
  transform: translateY(-6px) rotate(-1.5deg);
  box-shadow: 0 28px 50px -20px rgba(11,18,32,0.7), 0 0 0 1px rgba(197,218,44,0.45), 0 0 32px -6px rgba(197,218,44,0.35);
}
.proc__step:hover .proc__media .proc__num { border-color: var(--gray-50); }

@media (max-width: 1024px) { .proc--media::after { display: none; } }
@media (max-width: 720px) { .proc__media { width: 88px; height: 88px; border-radius: 22px; } }

/* ---------- CTA: ambient light-ribbon loop ---------- */
.cta--motion { isolation: isolate; background-size: cover; background-position: center bottom; }
.cta--motion .cta__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;
  z-index: 0; opacity: 0; transition: opacity 1.2s ease;
  pointer-events: none;
}
.cta--motion.is-playing .cta__bg { opacity: 1; }
.cta--motion::before {
  z-index: 1;
  background:
    radial-gradient(ellipse at center top, rgba(197,218,44,0.12), transparent 60%),
    linear-gradient(180deg, rgba(10,24,48,0.30) 0%, rgba(10,24,48,0.10) 45%, rgba(10,24,48,0.40) 100%);
}
.cta--motion .cta__in { z-index: 2; }

/* ---------- CRM band: chat plays out like a live conversation ---------- */
.ai__chat--seq { padding-bottom: 3.25rem; }
.ai__chat--seq .bub {
  opacity: 0; transform: translateY(10px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.ai__chat--seq .bub.is-shown { opacity: 1; transform: none; }
.ai__chat--seq.is-fading .bub { opacity: 0; transform: translateY(-6px); transition-duration: 0.4s; }
.ai__typing {
  position: absolute; bottom: 1rem; inset-inline-end: 1.5rem;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.55rem 0.8rem; border-radius: 14px;
  background: rgba(197,218,44,0.16);
  opacity: 0; transition: opacity 0.25s ease;
}
.ai__typing.is-me { inset-inline-end: auto; inset-inline-start: 1.5rem; background: rgba(255,255,255,0.1); }
.ai__typing.is-on { opacity: 1; }
.ai__typing i { width: 6px; height: 6px; border-radius: 50%; background: #C5DA2C; animation: adTyping 1s ease-in-out infinite; }
.ai__typing.is-me i { background: rgba(255,255,255,0.75); }
.ai__typing i:nth-child(2) { animation-delay: 0.15s; }
.ai__typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes adTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .hero-image--motion > video, .cta--motion .cta__bg, .ai__typing { display: none; }
  .ai__chat--seq .bub { opacity: 1; transform: none; }
  .proc--media::after { transition: none; transform: scaleX(1); }
}
