/* Demos animados — serviços Soft em “live” */

.demo-live {
  position: relative;
  overflow: hidden;
}

.demo-live__ticker {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--cyan);
  font-size: 0.62rem;
  white-space: nowrap;
  overflow: hidden;
}

.demo-live__ticker span {
  display: inline-block;
  animation: demoTicker 12s linear infinite;
}

@keyframes demoTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-40%); }
}

/* AI */
.demo-live--ai .demo-live__core {
  position: relative;
  animation: demoPulse 2.2s ease-in-out infinite;
}

.demo-live--ai .demo-live__wave {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 2px;
  animation: demoRipple 2.2s ease-out infinite;
  pointer-events: none;
}

.demo-live--ai .demo-live__agent {
  animation: demoAgent 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.35s);
}

.demo-live--ai .demo-live__blink {
  animation: demoBlink 2.8s ease-in-out infinite;
}

.demo-live--ai .demo-live__out {
  animation: demoOut 2.4s ease-in-out infinite;
}

@keyframes demoPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(0, 229, 255, 0.12); }
  50% { box-shadow: 0 0 36px rgba(0, 229, 255, 0.35); transform: scale(1.03); }
}

@keyframes demoRipple {
  0% { opacity: 0.6; transform: scale(0.92); }
  100% { opacity: 0; transform: scale(1.2); }
}

@keyframes demoAgent {
  0%, 100% { border-color: var(--line); background: rgba(255, 255, 255, 0.02); }
  40% { border-color: rgba(0, 229, 255, 0.55); background: rgba(0, 229, 255, 0.1); color: var(--cyan); }
}

@keyframes demoBlink {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; border-color: rgba(0, 229, 255, 0.4); }
}

@keyframes demoOut {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); border-color: rgba(0, 194, 168, 0.45); }
}

/* CRM */
.demo-live--crm .demo-live__deal {
  animation: demoDeal 4.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.25s);
}

.demo-live--crm .demo-live__deal--move {
  animation: demoDealMove 5.5s ease-in-out infinite;
}

.demo-live--crm .ui-nav-item.is-on {
  animation: demoNav 3s ease-in-out infinite;
}

@keyframes demoDeal {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50% { transform: translateY(-4px); opacity: 1; border-color: rgba(0, 229, 255, 0.35); }
}

@keyframes demoDealMove {
  0%, 20% { transform: translateX(0); box-shadow: none; }
  35% { transform: translateX(6px); box-shadow: 0 0 18px rgba(0, 229, 255, 0.25); }
  55% { transform: translateX(0); }
  100% { transform: translateX(0); }
}

@keyframes demoNav {
  0%, 100% { background: rgba(0, 229, 255, 0.06); }
  50% { background: rgba(0, 229, 255, 0.14); }
}

/* Automation */
.demo-live--auto {
  overflow: hidden;
}

.demo-live--auto .demo-live__step {
  position: relative;
  animation: demoStep 4.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.55s);
}

.demo-live--auto .demo-live__dot {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.25;
  animation: demoDot 4.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.55s);
}

.demo-live--auto .demo-live__packet {
  position: absolute;
  top: 55%;
  left: 8%;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: demoPacket 4.8s linear infinite;
}

@keyframes demoStep {
  0%, 100% { border-color: var(--line); background: rgba(0, 0, 0, 0.2); }
  30%, 45% { border-color: rgba(0, 229, 255, 0.55); background: rgba(0, 229, 255, 0.08); }
}

@keyframes demoDot {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  30%, 45% { opacity: 1; transform: scale(1.3); }
}

@keyframes demoPacket {
  0% { left: 10%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 86%; opacity: 0; }
}

/* Web */
.demo-live--web .demo-live__live {
  color: var(--teal);
  animation: demoLiveBadge 1.6s ease-in-out infinite;
}

.demo-live--web .ui-app__cards > div {
  animation: demoCardPulse 3.2s ease-in-out infinite;
}

.demo-live--web .ui-app__cards > div:nth-child(2) { animation-delay: 0.4s; }
.demo-live--web .ui-app__cards > div:nth-child(3) { animation-delay: 0.8s; }

.demo-live__code {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.demo-live__code span {
  display: block;
  height: 0.35rem;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.35), rgba(0, 229, 255, 0.05));
  animation: demoCode 2.4s ease-in-out infinite;
}

.demo-live__code span:nth-child(2) {
  width: 78%;
  animation-delay: 0.2s;
}

.demo-live__code span:nth-child(3) {
  width: 56%;
  animation-delay: 0.4s;
}

@keyframes demoLiveBadge {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; text-shadow: 0 0 8px rgba(0, 194, 168, 0.6); }
}

@keyframes demoCardPulse {
  0%, 100% { border-color: transparent; }
  50% { box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.25); }
}

@keyframes demoCode {
  0%, 100% { opacity: 0.45; transform: scaleX(1); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1.04); }
}

/* BI */
.demo-live--bi .demo-live__kpi {
  animation: demoKpi 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.25s);
}

.demo-live--bi .demo-live__bars i {
  transform-origin: bottom;
  animation: demoBar 2.8s ease-in-out infinite;
}

.demo-live--bi .demo-live__bars i:nth-child(2) { animation-delay: 0.15s; }
.demo-live--bi .demo-live__bars i:nth-child(3) { animation-delay: 0.3s; }
.demo-live--bi .demo-live__bars i:nth-child(4) { animation-delay: 0.45s; }
.demo-live--bi .demo-live__bars i:nth-child(5) { animation-delay: 0.6s; }
.demo-live--bi .demo-live__bars i:nth-child(6) { animation-delay: 0.75s; }

@keyframes demoKpi {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); border-color: rgba(0, 229, 255, 0.35); }
}

@keyframes demoBar {
  0%, 100% { transform: scaleY(0.72); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* Consultoria */
.demo-live--consult .demo-live__phase {
  animation: demoPhase 5.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.45s);
}

.demo-live__progress {
  height: 3px;
  margin: 0.85rem 1rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.demo-live__progress i {
  display: block;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: demoProgress 3.2s ease-in-out infinite;
}

@keyframes demoPhase {
  0%, 100% { border-color: var(--line); opacity: 0.75; }
  35%, 50% { border-color: rgba(0, 229, 255, 0.55); opacity: 1; box-shadow: 0 0 18px rgba(0, 229, 255, 0.15); }
}

@keyframes demoProgress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .demo-live *,
  .demo-live__ticker span {
    animation: none !important;
  }
}
