/* =========================================================
   MOVIMENTO
   O fundo respira o tempo todo; o conteúdo entra por partes,
   na ordem em que a pessoa lê. Desligado na impressão e para
   quem pediu menos movimento no sistema.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  /* ---------- fundo vivo ---------- */
  @keyframes hf-deriva-a {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-70px, 52px, 0) scale(1.14); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
  }
  @keyframes hf-deriva-b {
    0% { transform: translate3d(0, 0, 0) scale(1.06); }
    50% { transform: translate3d(64px, -44px, 0) scale(1); }
    100% { transform: translate3d(0, 0, 0) scale(1.06); }
  }
  @keyframes hf-grade {
    from { background-position: 0 0, 0 0; }
    to { background-position: 80px 80px, 80px 80px; }
  }
  @keyframes hf-fita {
    from { background-position: 0% 0; }
    to { background-position: 200% 0; }
  }

  .glow.a { animation: hf-deriva-a 24s ease-in-out infinite; }
  .glow.b { animation: hf-deriva-b 31s ease-in-out infinite; }
  .grid-bg { animation: hf-grade 34s linear infinite; }
  .slide::before { background-size: 200% 100%; animation: hf-fita 14s linear infinite; }

  /* ---------- entradas ---------- */
  @keyframes hf-sobe { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
  @keyframes hf-desce { from { opacity: 0; transform: translateY(-22px); } to { opacity: 1; transform: none; } }
  @keyframes hf-escala { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
  @keyframes hf-lado { from { opacity: 0; transform: translateX(46px) scale(0.97); } to { opacity: 1; transform: none; } }
  @keyframes hf-risco { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes hf-cresce { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes hf-surge { from { opacity: 0; } to { opacity: 1; } }

  .slide.ativo { animation: hf-surge 0.34s linear both; }

  /* cabeçalho */
  .slide.ativo .kicker { animation: hf-desce 0.5s 0.04s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.ativo .head h1 { animation: hf-sobe 0.66s 0.1s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.ativo .head .rule { animation: hf-risco 0.55s 0.34s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* capa */
  .slide.capa.ativo .marca { animation: hf-escala 0.9s 0.06s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.capa.ativo .selo { animation: hf-sobe 0.6s 0.3s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.capa.ativo h1 { animation: hf-sobe 0.8s 0.4s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.capa.ativo .sub { animation: hf-sobe 0.7s 0.62s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.capa.ativo .meta { animation: hf-sobe 0.7s 0.76s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* divisor de seção */
  .slide.divisor.ativo .n { animation: hf-escala 0.8s 0.06s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.divisor.ativo h2 { animation: hf-sobe 0.7s 0.24s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.divisor.ativo .rule { animation: hf-risco 0.6s 0.46s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.divisor.ativo .desc { animation: hf-sobe 0.7s 0.54s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* frase de impacto */
  .slide.impacto.ativo .aspas { animation: hf-escala 0.7s 0.06s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.impacto.ativo p { animation: hf-sobe 0.85s 0.22s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.impacto.ativo .assina { animation: hf-sobe 0.7s 0.62s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* encerramento */
  .slide.fim.ativo h1 { animation: hf-sobe 0.8s 0.18s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.fim.ativo .sub { animation: hf-sobe 0.7s 0.52s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.fim.ativo .passagem { animation: hf-sobe 0.7s 0.68s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.fim.ativo .marca { animation: hf-escala 0.9s 0.82s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* blocos, cartões e listas entram um a um */
  .slide.ativo .blocos > *,
  .slide.ativo .duas > *,
  .slide.ativo .tipos > *,
  .slide.ativo .pilares > *,
  .slide.ativo .numeros > *,
  .slide.ativo .cats > *,
  .slide.ativo .funil > *,
  .slide.ativo .abc-legenda > *,
  .slide.ativo .antes-depois > *,
  .slide.ativo .fecho-grade > *,
  .slide.ativo .recap > * { animation: hf-sobe 0.62s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  .slide.ativo .blocos > *:nth-child(1),
  .slide.ativo .duas > *:nth-child(1),
  .slide.ativo .tipos > *:nth-child(1),
  .slide.ativo .pilares > *:nth-child(1),
  .slide.ativo .numeros > *:nth-child(1),
  .slide.ativo .cats > *:nth-child(1),
  .slide.ativo .funil > *:nth-child(1),
  .slide.ativo .abc-legenda > *:nth-child(1),
  .slide.ativo .antes-depois > *:nth-child(1),
  .slide.ativo .fecho-grade > *:nth-child(1),
  .slide.ativo .recap > *:nth-child(1) { animation-delay: 0.3s; }

  .slide.ativo .blocos > *:nth-child(2),
  .slide.ativo .duas > *:nth-child(2),
  .slide.ativo .tipos > *:nth-child(2),
  .slide.ativo .pilares > *:nth-child(2),
  .slide.ativo .numeros > *:nth-child(2),
  .slide.ativo .cats > *:nth-child(2),
  .slide.ativo .funil > *:nth-child(2),
  .slide.ativo .abc-legenda > *:nth-child(2),
  .slide.ativo .antes-depois > *:nth-child(2),
  .slide.ativo .fecho-grade > *:nth-child(2),
  .slide.ativo .recap > *:nth-child(2) { animation-delay: 0.4s; }

  .slide.ativo .tipos > *:nth-child(3),
  .slide.ativo .pilares > *:nth-child(3),
  .slide.ativo .numeros > *:nth-child(3),
  .slide.ativo .cats > *:nth-child(3),
  .slide.ativo .funil > *:nth-child(3),
  .slide.ativo .abc-legenda > *:nth-child(3),
  .slide.ativo .fecho-grade > *:nth-child(3),
  .slide.ativo .recap > *:nth-child(3) { animation-delay: 0.5s; }

  .slide.ativo .tipos > *:nth-child(4),
  .slide.ativo .numeros > *:nth-child(4),
  .slide.ativo .cats > *:nth-child(4),
  .slide.ativo .funil > *:nth-child(4),
  .slide.ativo .fecho-grade > *:nth-child(4),
  .slide.ativo .recap > *:nth-child(4) { animation-delay: 0.6s; }

  .slide.ativo .numeros > *:nth-child(5),
  .slide.ativo .cats > *:nth-child(5),
  .slide.ativo .funil > *:nth-child(5) { animation-delay: 0.7s; }

  .slide.ativo .numeros > *:nth-child(6),
  .slide.ativo .cats > *:nth-child(6) { animation-delay: 0.8s; }
  .slide.ativo .cats > *:nth-child(7) { animation-delay: 0.88s; }
  .slide.ativo .cats > *:nth-child(8) { animation-delay: 0.96s; }
  .slide.ativo .cats > *:nth-child(9) { animation-delay: 1.04s; }
  .slide.ativo .cats > *:nth-child(10) { animation-delay: 1.12s; }
  .slide.ativo .cats > *:nth-child(11) { animation-delay: 1.2s; }

  /* itens de lista dentro dos blocos, bem sutis */
  .slide.ativo .bloco li { animation: hf-sobe 0.5s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.ativo .bloco li:nth-child(1) { animation-delay: 0.46s; }
  .slide.ativo .bloco li:nth-child(2) { animation-delay: 0.53s; }
  .slide.ativo .bloco li:nth-child(3) { animation-delay: 0.6s; }
  .slide.ativo .bloco li:nth-child(4) { animation-delay: 0.67s; }
  .slide.ativo .bloco li:nth-child(5) { animation-delay: 0.74s; }

  /* prints e fotos chegam pelo lado */
  .slide.ativo .print,
  .slide.ativo .bio-foto { animation: hf-lado 0.8s 0.34s both cubic-bezier(0.16, 0.84, 0.3, 1); }
  .slide.ativo .bio-txt { animation: hf-sobe 0.7s 0.18s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* barras do funil crescem de baixo */
  .slide.ativo .etapa .barra .fill {
    transform-origin: bottom;
    animation: hf-cresce 0.7s 0.62s both cubic-bezier(0.16, 0.84, 0.3, 1);
  }

  /* rosca da curva ABC */
  .slide.ativo .abc-rosca { animation: hf-escala 0.9s 0.3s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* faixa de destaque entra por último */
  .slide.ativo .def,
  .slide.ativo .funil-nota { animation: hf-sobe 0.65s 0.82s both cubic-bezier(0.16, 0.84, 0.3, 1); }

  /* rodapé */
  .slide.ativo .foot { animation: hf-surge 0.6s 0.5s both linear; }
  .slide.ativo .foot .bar i { transform-origin: left; animation: hf-risco 0.9s 0.6s both cubic-bezier(0.16, 0.84, 0.3, 1); }
}

@media print {
  .glow,
  .grid-bg,
  .slide::before { animation: none !important; }
}
