/* ============================================================
   Entrada suave (fade + subida) dos blocos ao carregar a página.
   Aplicado por CSS, sem depender de JavaScript.
   Respeita "prefers-reduced-motion" (acessibilidade).
   ============================================================ */

@keyframes feito-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes feito-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Base: o elemento começa invisível e anima ao aparecer. */
.feito-reveal {
  opacity: 0;
  animation: feito-fade-up .5s cubic-bezier(.22, .9, .28, 1) forwards;
  will-change: opacity, transform;
}

/* Variações por posição, para dar sensação de cascata. */
.feito-reveal--fade { animation-name: feito-fade; }
.feito-reveal--d1 { animation-delay: .06s; }
.feito-reveal--d2 { animation-delay: .12s; }
.feito-reveal--d3 { animation-delay: .18s; }
.feito-reveal--d4 { animation-delay: .24s; }
.feito-reveal--d5 { animation-delay: .30s; }
.feito-reveal--d6 { animation-delay: .36s; }

/* Cascata automática dos itens de listas e grids:
   cada filho entra um pouco depois do anterior. */
.feito-stagger > * {
  opacity: 0;
  animation: feito-fade-up .45s cubic-bezier(.22, .9, .28, 1) forwards;
}
.feito-stagger > *:nth-child(1) { animation-delay: .04s; }
.feito-stagger > *:nth-child(2) { animation-delay: .10s; }
.feito-stagger > *:nth-child(3) { animation-delay: .16s; }
.feito-stagger > *:nth-child(4) { animation-delay: .22s; }
.feito-stagger > *:nth-child(5) { animation-delay: .28s; }
.feito-stagger > *:nth-child(6) { animation-delay: .34s; }
.feito-stagger > *:nth-child(7) { animation-delay: .40s; }
.feito-stagger > *:nth-child(8) { animation-delay: .46s; }
.feito-stagger > *:nth-child(n+9) { animation-delay: .52s; }

/* Itens que entram depois de carregar dados (ex.: cards de produto):
   o JS adiciona a classe quando o conteúdo está pronto. */
.feito-reveal-late {
  animation: feito-fade-up .45s cubic-bezier(.22, .9, .28, 1) both;
}

/* Acessibilidade: quem pediu menos movimento não recebe animação. */
@media (prefers-reduced-motion: reduce) {
  .feito-reveal,
  .feito-stagger > *,
  .feito-reveal-late {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
}
