/* ─────────────────────────────────────────────
   Auto-play das animações em LOOP infinito.
   Quando o IntersectionObserver adiciona `.is-in-view` no elemento,
   as animações começam a rodar e ficam loopando até a página fechar.
   `:hover` continua valendo (mostra o estado completo enquanto hover).
   ───────────────────────────────────────────── */

/* ─── Profundidade cards (Decifrado) ─── */

/* Visual e número: pulso suave de cor */
@keyframes profNumPulse {
  0%, 100% { color: var(--text-3); }
  40%, 70% { color: var(--purple); }
}
.prof-card.is-in-view .prof-card__num {
  animation: profNumPulse 5s var(--ease-out) infinite;
}
.prof-card:hover .prof-card__num { color: var(--purple); }

@keyframes profVisualBg {
  0%, 100% { background: var(--bg-2); }
  40%, 70% { background: rgba(124, 58, 237, 0.08); }
}
.prof-card.is-in-view .prof-card__visual {
  animation: profVisualBg 5s var(--ease-out) infinite;
}
.prof-card:hover .prof-card__visual { background: rgba(124, 58, 237, 0.06); }

/* viz-bars: stagger fill em loop */
@keyframes barsFill {
  0%, 8% { transform: scaleX(0); }
  35%, 75% { transform: scaleX(1); }
  92%, 100% { transform: scaleX(0); }
}
.prof-card.is-in-view .viz-bars i::after {
  background: var(--purple);
  animation: barsFill 5s var(--ease-out) infinite;
}
.prof-card.is-in-view .viz-bars i:nth-child(1)::after { animation-delay: 0ms; }
.prof-card.is-in-view .viz-bars i:nth-child(2)::after { animation-delay: 120ms; opacity: 0.85; }
.prof-card.is-in-view .viz-bars i:nth-child(3)::after { animation-delay: 240ms; opacity: 0.7; }
.prof-card.is-in-view .viz-bars i:nth-child(4)::after { animation-delay: 360ms; opacity: 0.55; }
.prof-card.is-in-view .viz-bars i:nth-child(5)::after { animation-delay: 480ms; opacity: 0.4; }
.prof-card:hover .viz-bars i::after { transform: scaleX(1); }

/* viz-cal: calendário com today highlight em loop */
@keyframes calFill {
  0%, 10% { background: rgba(10, 10, 18, 0.08); }
  35%, 75% { background: rgba(124, 58, 237, 0.18); }
  95%, 100% { background: rgba(10, 10, 18, 0.08); }
}
@keyframes calToday {
  0%, 10% { background: rgba(10, 10, 18, 0.08); box-shadow: 0 0 0 0 transparent; }
  40%, 75% { background: var(--purple); box-shadow: 0 0 0 2px var(--terracota); }
  95%, 100% { background: rgba(10, 10, 18, 0.08); box-shadow: 0 0 0 0 transparent; }
}
.prof-card.is-in-view .viz-cal i {
  animation: calFill 5s var(--ease-out) infinite;
}
.prof-card.is-in-view .viz-cal i.today {
  animation: calToday 5s var(--ease-out) infinite;
}
.prof-card.is-in-view .viz-cal i:nth-child(1)  { animation-delay: 0ms; }
.prof-card.is-in-view .viz-cal i:nth-child(2)  { animation-delay: 30ms; }
.prof-card.is-in-view .viz-cal i:nth-child(3)  { animation-delay: 60ms; }
.prof-card.is-in-view .viz-cal i:nth-child(4)  { animation-delay: 90ms; }
.prof-card.is-in-view .viz-cal i:nth-child(5)  { animation-delay: 120ms; }
.prof-card.is-in-view .viz-cal i:nth-child(6)  { animation-delay: 150ms; }
.prof-card.is-in-view .viz-cal i:nth-child(7)  { animation-delay: 180ms; }
.prof-card.is-in-view .viz-cal i:nth-child(8)  { animation-delay: 210ms; }
.prof-card.is-in-view .viz-cal i:nth-child(9)  { animation-delay: 240ms; }
.prof-card.is-in-view .viz-cal i:nth-child(10) { animation-delay: 270ms; }

/* viz-tasks: pulse já em loop infinito (definição original).
   Mantemos cores via animação loop. */
@keyframes taskDotIdle { 0%, 100% { background: rgba(10, 10, 18, 0.2); } }
@keyframes taskDotDone {
  0%, 15% { background: rgba(10, 10, 18, 0.2); }
  40%, 75% { background: var(--pulse-green); }
  95%, 100% { background: rgba(10, 10, 18, 0.2); }
}
.prof-card.is-in-view .viz-tasks i:nth-child(1)::before {
  animation: taskDotDone 5s var(--ease-out) infinite;
}
.prof-card.is-in-view .viz-tasks i:nth-child(2)::before {
  background: var(--purple);
  animation: pulsePurple 1.4s ease-out infinite;
}

/* viz-line: line chart redraw em loop */
@keyframes lineDraw {
  0%, 8%   { stroke-dashoffset: 200; stroke: rgba(10, 10, 18, 0.25); }
  45%, 80% { stroke-dashoffset: 0;   stroke: var(--purple); }
  95%, 100%{ stroke-dashoffset: 200; stroke: rgba(10, 10, 18, 0.25); }
}
.prof-card.is-in-view .viz-line .data-line {
  animation: lineDraw 5s var(--ease-out) infinite;
  filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.4));
}

@keyframes lineDot {
  0%, 35% { opacity: 0; }
  55%, 78% { opacity: 1; }
  90%, 100% { opacity: 0; }
}
.prof-card.is-in-view .viz-line .data-dot {
  animation: lineDot 5s var(--ease-out) infinite;
}

/* ─── Mecanismo: bar-row tooltips em loop sutil ─── */
@keyframes barTipPulse {
  0%, 30% { opacity: 0; transform: translateY(4px); }
  50%, 80% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; transform: translateY(4px); }
}
.bar-row.is-in-view .bar-row__tip {
  animation: barTipPulse 5s var(--ease-out) infinite;
}
.bar-row:hover .bar-row__tip {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}
