/* =========================================================
   Efeitos de entrada e acessibilidade de movimento
   ========================================================= */

/* Revelação no scroll (só quando o JS está ativo) */
.js .reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s var(--ease-out) var(--delay, 0ms),
    transform 0.9s var(--ease-out) var(--delay, 0ms);
}

.js .reveal-up.is-visible {
  opacity: 1;
  transform: none;
}

/* Cards da matilha entram "em formação" */
.js .pack-card.reveal-up {
  transform: translateY(60px) rotate(2deg);
}

.js .pack-card.reveal-up.is-visible {
  transform: none;
}

/* Intro do hero: palavras sobem em sequência */
.js .hero-title .word {
  transform: translateY(110%);
  animation: word-up 1s var(--ease-out) forwards;
}

.js .hero-title .line:nth-child(1) .word:nth-child(1) { animation-delay: 0.15s; }
.js .hero-title .line:nth-child(1) .word:nth-child(2) { animation-delay: 0.22s; }
.js .hero-title .line:nth-child(1) .word:nth-child(3) { animation-delay: 0.29s; }
.js .hero-title .line:nth-child(2) .word:nth-child(1) { animation-delay: 0.38s; }
.js .hero-title .line:nth-child(2) .word:nth-child(2) { animation-delay: 0.45s; }
.js .hero-title .line:nth-child(2) .word:nth-child(3) { animation-delay: 0.52s; }
.js .hero-title .line:nth-child(2) .word:nth-child(4) { animation-delay: 0.59s; }
.js .hero-title .line:nth-child(2) .word:nth-child(5) { animation-delay: 0.66s; }
.js .hero-title .line:nth-child(3) .word { animation-delay: 0.8s; opacity: 0; transform: translateY(40%) skewX(-8deg); animation-name: word-up-fade; }

@keyframes word-up {
  to { transform: none; }
}

@keyframes word-up-fade {
  to { transform: none; opacity: 1; }
}

.js .hero-meta-row,
.js .hero-bottom,
.js .hero-stats,
.js .scroll-cue {
  animation: soft-in 1s var(--ease-out) both;
}

.js .hero-meta-row { animation-delay: 0.05s; }
.js .hero-bottom { animation-delay: 1s; }
.js .hero-stats { animation-delay: 1.2s; }
.js .scroll-cue { animation-delay: 1.6s; }

@keyframes soft-in {
  from { opacity: 0; transform: translateY(24px); }
}

.ridge-forest,
.ridge-mid {
  animation: ridge-in 1.6s var(--ease-out) both;
}

.ridge-mid { animation-delay: 0.1s; }

@keyframes ridge-in {
  from { transform: translateY(30%); }
}

/* Olhos do emblema piscam de vez em quando */
.brand-emblem .emblem-eye,
.footer-emblem .emblem-eye {
  animation: emblem-glow 4s ease-in-out infinite;
}

@keyframes emblem-glow {
  0%, 100% { stroke: var(--ember); }
  50% { stroke: var(--amber); }
}

/* Pausa animações contínuas quando a aba ou seção não está visível */
.is-offscreen *,
.is-offscreen *::before,
.is-offscreen *::after {
  animation-play-state: paused !important;
}

/* =========================================================
   prefers-reduced-motion: tudo estático e legível
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal-up,
  .js .hero-title .word {
    opacity: 1 !important;
    transform: none !important;
  }

  .claw-marks path {
    stroke-dashoffset: 0;
  }

  .eyes {
    opacity: 1;
  }

  .howl-waves {
    display: none;
  }

  .ticker-track {
    animation: none !important;
  }

  .scrub-text .sw {
    opacity: 1 !important;
  }
}
