/* Page-to-page transition for every noshade.tv page: red halftone flood.
   The old page breaks into brand-red halftone dots until the screen is solid red, then the new page grows back through the dots.
   The browser runs it on its own (cross-document view transitions); browsers without support keep the plain cut. */
@view-transition { navigation: auto; }
@property --hr { syntax: "<length>"; inherits: false; initial-value: 0px; }

::view-transition-group(root) { animation-duration: .8s; }
::view-transition-image-pair(root) { background: #EF2D38; }
::view-transition-old(root) {
  mask: radial-gradient(circle, transparent var(--hr), #000 calc(var(--hr) + 1px)) 0 0 / 22px 22px;
  animation: ns-dots-out .4s cubic-bezier(.7, 0, .84, 0) both;
}
::view-transition-new(root) {
  mask: radial-gradient(circle, #000 var(--hr), transparent calc(var(--hr) + 1px)) 0 0 / 22px 22px;
  animation: ns-dots-in .42s cubic-bezier(.16, 1, .3, 1) .38s both;
}
@keyframes ns-dots-out { from { --hr: 0px; } to { --hr: 16px; } }
@keyframes ns-dots-in  { from { --hr: 0px; } to { --hr: 16px; } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
