/* Opt-in motion for public content pages; live timing and the wall do not load this. */
body[data-motion="editorial"] {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Content remains visible if the enhancement script cannot run. */
body[data-motion="editorial"] :is(.reveal, .reveal-speed) {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity .65s var(--motion-ease), transform .65s var(--motion-ease);
}
body[data-motion="editorial"].pm-motion-ready :is(.reveal, .reveal-speed):not(.in) {
  opacity: 0;
  transform: translateY(16px);
}
body[data-motion="editorial"] .reveal[data-delay="1"] { transition-delay: .08s; }
body[data-motion="editorial"] .reveal[data-delay="2"] { transition-delay: .16s; }
body[data-motion="editorial"] .reveal[data-delay="3"] { transition-delay: .24s; }

body[data-motion="editorial"] .btn {
  transition: background-color .25s, border-color .25s, translate .35s var(--motion-ease);
}
body[data-motion="editorial"] .btn:hover { transform: none; }
body[data-motion="editorial"] .btn .arrow { transition: transform .35s var(--motion-ease); }
body[data-motion="editorial"] :is(.panel-hover, .teaser) {
  transition: opacity .65s var(--motion-ease), transform .65s var(--motion-ease),
    translate .4s var(--motion-ease), border-color .3s, box-shadow .4s;
}
body[data-motion="editorial"] :is(.panel-hover, .teaser):hover { transform: none; }
body[data-motion="editorial"] .teaser .t-img img {
  transition: opacity .5s, transform .8s var(--motion-ease);
}
body[data-motion="editorial"] .marquee-track {
  animation-duration: 64s;
  animation-play-state: paused;
}
body[data-motion="editorial"] .marquee.is-motion-visible .marquee-track { animation-play-state: running; }
body[data-motion="editorial"] .marquee:is(:hover, :focus-within) .marquee-track,
body[data-motion="editorial"].pm-motion-paused .marquee-track { animation-play-state: paused; }

@media (hover: hover) and (pointer: fine) {
  body[data-motion="editorial"] .btn:is(:hover, :focus-visible) { translate: 0 -2px; }
  body[data-motion="editorial"] :is(.panel-hover, .teaser):is(:hover, :focus-visible) {
    translate: 0 -4px;
    border-color: var(--accent);
    box-shadow: 0 14px 32px -20px rgba(0,0,0,.8);
  }
}

@keyframes editorial-out { to { opacity: 0; } }
@keyframes editorial-in { from { opacity: 0; } }
::view-transition-old(root) { animation: editorial-out .14s ease-out both; }
::view-transition-new(root) { animation: editorial-in .24s ease-out both; }

/* Keep the decorative ticker still on touch layouts. */
@media (max-width: 1000px), (hover: none), (pointer: coarse) {
  body[data-motion="editorial"] .marquee-track { animation-play-state: paused !important; }
}

/* Keep long footer links inside the same narrow phone layout as the new hero. */
@media (max-width: 480px) {
  body[data-motion="editorial"] .site-footer .inner { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body[data-motion="editorial"] :is(.reveal, .reveal-speed),
  body[data-motion="editorial"].pm-motion-ready :is(.reveal, .reveal-speed):not(.in) {
    opacity: 1; transform: none; filter: none; transition: none;
  }
  body[data-motion="editorial"] :is(.btn, .btn .arrow, .panel-hover, .teaser, .teaser .t-img img) {
    transform: none !important; translate: none !important; transition: none;
  }
  body[data-motion="editorial"] :is(.marquee-track, .status-dot) { animation: none; }
  body[data-motion="editorial"] .btn::after { display: none; }
  body[data-motion="editorial"] .hero-backdrop { transform: none; opacity: 1; }
  body[data-motion="editorial"] .hero-outline { opacity: 1; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
