/* Entrada do topo: roda uma vez ao carregar. */
.entrada {
  opacity: 0;
  transform: translateY(28px);
  animation: surgir 1s var(--suave) forwards;
  animation-delay: var(--atraso, 0s);
}

/* Revelação ao rolar: o JS adiciona .visivel quando o bloco entra na tela. */
.revelar {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--suave), transform 1s var(--suave);
  transition-delay: var(--atraso, 0s);
}
.revelar.visivel { opacity: 1; transform: none; }

/* Traço que se desenha, como as linhas finas dos posts. */
.desenhar {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: desenhar 2.6s var(--suave) forwards .3s;
}
.desenhar + .desenhar { animation-delay: .8s; }

.balancar { transform-origin: 50% 100%; animation: balancar 6s ease-in-out infinite; }

.bolha { animation: flutuar 9s ease-in-out infinite; }
.bolha-2 { animation-duration: 12s; animation-delay: -4s; }

.faixa-trilho { animation: deslizar 28s linear infinite; }

@keyframes surgir { to { opacity: 1; transform: none; } }
@keyframes desenhar { to { stroke-dashoffset: 0; } }
@keyframes balancar {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@keyframes flutuar {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(14px, -22px); }
}
@keyframes deslizar { to { transform: translateX(-50%); } }
@keyframes pulsar {
  0%, 100% { box-shadow: 0 12px 28px -10px rgba(52, 58, 33, .6), 0 0 0 0 rgba(107, 116, 73, .35); }
  50% { box-shadow: 0 12px 28px -10px rgba(52, 58, 33, .6), 0 0 0 14px rgba(107, 116, 73, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .entrada, .revelar { opacity: 1; transform: none; }
  .desenhar { stroke-dashoffset: 0; }
}
