@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion='reduce']) {
    & [data-flash-in] {
      --flash-alpha: 0;
      --flash-charge: 0;
      --flash-light: color-mix(in srgb, var(--signal) calc(var(--flash-charge) * 100%), transparent);
    }

    & [data-flash-in]:where(:not(.hero-stage)) { opacity: var(--flash-alpha); }

    & :where(.hero-title-glyph, .hero-period, .blog-metrics strong, .section-title h2)[data-flash-in] {
      filter: drop-shadow(0 0 .32rem var(--flash-light));
    }
    & :where(.action, .article-row, .timeline-panel, .reading-shelf, .archive-inspector, .filter-panel,
      .project-record, .gallery-thumb, .blog-metrics > div, .quick-result)[data-flash-in]:where(:not(:focus-within)) {
      outline: 1px solid var(--flash-light);
      outline-offset: 1px;
    }
    & [data-flash-in]:where(:focus-within) { opacity: 1; filter: none; }

    & .hero-stage[data-flash-in] { --hero-grid-level: var(--flash-alpha); }
    & .hero-stage[data-flash-in]::before,
    & .hero-stage[data-flash-in]::after { opacity: var(--flash-alpha); }

    & .hero-wordmark[data-wordmark-entry='waiting'] { opacity: 0; }
    & .hero-wordmark[data-wordmark-entry='playing'] {
      --scan-x: var(--wordmark-scan-x, -12%);
      --scan-reveal: polygon(0 0, calc(var(--scan-x) + 4%) 0, calc(var(--scan-x) - 4%) 100%, 0 100%);
    }
    & .hero-wordmark[data-wordmark-entry='playing'] :is(.wordmark-letters, .wordmark-light) {
      clip-path: var(--scan-reveal);
    }
    & .hero-wordmark[data-wordmark-entry='playing'] .wordmark-guides {
      clip-path: inset(calc(47% * (1 - var(--guide-spread, 0))) 0);
      opacity: calc(.57 * var(--flash-alpha));
      filter: drop-shadow(0 0 2px var(--flash-light));
    }
    & .hero-wordmark[data-wordmark-entry='playing'] .wordmark-light {
      visibility: visible;
      opacity: calc(.8 * var(--wordmark-beam-alpha, 0));
      mask-image: linear-gradient(105deg, transparent calc(var(--scan-x) - 13%), #000 calc(var(--scan-x) - 2%));
    }
    & .hero-wordmark[data-wordmark-entry='playing'] .wordmark-art::after {
      position: absolute;
      inset: 76.3% auto auto var(--scan-x);
      width: 18%;
      height: 1px;
      transform: translateX(-86%);
      background: linear-gradient(90deg, transparent, var(--signal) 56%, #ffdbc4 85%, transparent);
      filter: drop-shadow(0 0 3px var(--signal));
      opacity: var(--wordmark-beam-alpha, 0);
      pointer-events: none;
      content: '';
    }
  }
}
