/* Animações das telas do diagnóstico v2. Só apresentação: nenhuma regra muda conteúdo ou layout.
   Ficam fora da impressão e são desligadas para quem configurou o sistema para reduzir movimento.
   O estado "a revelar" (.reveal) só existe quando animations.js adiciona .anim-ready ao <html>. */
@media screen and (prefers-reduced-motion: no-preference) {
  @keyframes diag-fade-in { from { opacity: 0 } to { opacity: 1 } }
  @keyframes diag-fade-up { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
  @keyframes diag-slide-in { from { opacity: 0; transform: translateX(-14px) } to { opacity: 1; transform: none } }
  @keyframes diag-scale-in { from { opacity: 0; transform: scale(.9) } to { opacity: 1; transform: none } }
  @keyframes diag-float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
  @keyframes diag-select { 0% { transform: scale(1) } 40% { transform: scale(1.015) } 100% { transform: scale(1) } }
  @keyframes diag-bounce { 0%, 100% { transform: translateY(0) } 35% { transform: translateY(-6px) } 65% { transform: translateY(1px) } }
  @keyframes diag-wiggle { 0%, 100% { transform: rotate(0) } 25% { transform: rotate(-9deg) } 75% { transform: rotate(9deg) } }
  @keyframes diag-ring { 0% { box-shadow: 0 0 0 0 rgba(4, 155, 166, .45) } 75%, 100% { box-shadow: 0 0 0 14px rgba(4, 155, 166, 0) } }
  @keyframes diag-toast { from { opacity: 0; translate: 0 14px } to { opacity: 1; translate: 0 0 } }

  .button { transition: transform .18s ease, filter .18s ease, box-shadow .2s ease; }
  .button:hover:not(:disabled) { transform: translateY(-2px); }
  .button:active:not(:disabled) { transform: translateY(0) scale(.98); }
  #toast[style*='block'] { animation: diag-toast .35s cubic-bezier(.2, .7, .2, 1); }

  /* Revelação ao rolar (animations.js). fill-mode backwards para não travar o hover. */
  .anim-ready .reveal { opacity: 0; }
  .anim-ready .reveal.is-visible { opacity: 1; animation: diag-fade-up .7s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * 70ms) backwards; }

  /* Início */
  .hero h1, .hero-inner > div:first-child > p, .hero .start { animation: diag-fade-up .75s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-inner > div:first-child > p { animation-delay: .12s; }
  .hero .start { animation-delay: .24s; position: relative; }
  .hero .start::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: diag-ring 2.6s ease-out 1.4s infinite; }
  .hero .micro { animation: diag-fade-in .8s ease .45s both; }
  .hero-art > img { animation: diag-scale-in .9s cubic-bezier(.2, .7, .2, 1) .1s both, diag-float 7s ease-in-out 1.1s infinite; }
  .principles > div { transition: transform .25s ease, box-shadow .25s ease; }
  .principles > div:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(18, 60, 64, .1); }
  .principles > div:hover .dimension-icon { animation: diag-wiggle .5s ease; }
  .profile-card { transition: transform .3s ease, box-shadow .3s ease; }
  .profile-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(18, 60, 64, .12); }
  .profile-illustration img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
  .profile-card:hover .profile-illustration img { transform: scale(1.05); }

  /* Perguntas */
  .track i { transition: width .6s cubic-bezier(.2, .8, .2, 1); }
  .current-dimension .dimension-icon { animation: diag-bounce .7s ease .15s; }
  .answers > div { animation: diag-slide-in .45s cubic-bezier(.2, .7, .2, 1) backwards; }
  .answers > div:nth-child(2) { animation-delay: .04s; }
  .answers > div:nth-child(3) { animation-delay: .08s; }
  .answers > div:nth-child(4) { animation-delay: .12s; }
  .answers > div:nth-child(5) { animation-delay: .16s; }
  .answers > div:nth-child(6) { animation-delay: .2s; }
  .answers > div:nth-child(n+7) { animation-delay: .24s; }
  .option.selected { animation: diag-select .3s ease; }
  .nav .button:not(:disabled) { animation: diag-ready .45s ease; }
  @keyframes diag-ready { 0% { transform: scale(1) } 45% { transform: scale(1.05) } 100% { transform: scale(1) } }

  /* Resultado */
  .result-title { animation: diag-fade-up .6s cubic-bezier(.2, .7, .2, 1) both; }
  .result-profile.is-visible .result-profile-art img { animation: diag-scale-in .8s cubic-bezier(.3, 1.4, .5, 1) .15s backwards; }
  .criterion-card.is-visible .dimension-icon { animation: diag-bounce .7s ease calc(var(--i, 0) * 90ms + .2s) backwards; }
}
