/* Video inside display type. The heading stays real text: white letters on a
   black ground, blended with multiply over the video, so the video shows only
   through the letters. Built on media-stack (pause button, poster under
   reduced motion, autoplay recovery, off-screen pause):

   .mw-media-stack.mw-text-mask
     > video.mw-media-stack__media (autoplay muted loop playsinline, poster)
     > .mw-text-mask__text (the heading; its box sets the size of the block)

   --mw-mask-tint is the colour under the video: footage shot on white turns
   that colour inside the letters while darker subjects keep theirs. Default
   white (the footage as it is). The ground around the letters is black; with
   .mw-text-mask--light it is white and the letters are drawn in black (use a
   dark tint there). Put the block on a page of the same ground colour.
   --mw-mask-zoom scales the footage inside the letters (default 1).
   --mw-mask-blend blends the whole block onto the page (default normal: the
   block shows its own ground). screen on the black ground, or multiply on the
   white one (.mw-text-mask--light), makes the ground vanish into a page of
   any colour, dark or light respectively, so the block needs no band of pure
   black or white; the letters then carry the footage over the page colour. */

.mw-text-mask {
  --mw-media-bg: var(--mw-mask-tint, #fff);
  display: block;
  mix-blend-mode: var(--mw-mask-blend, normal);
  width: fit-content;
  max-width: 100%;
}

.mw-text-mask > .mw-media-stack__media {
  mix-blend-mode: multiply;
  transform: scale(var(--mw-mask-zoom, 1));
}

.mw-text-mask__text {
  position: relative;
  z-index: 0;
  margin: 0;
  color: #fff;
  background: #000;
  mix-blend-mode: multiply;
}

.mw-text-mask--light .mw-text-mask__text {
  color: #000;
  background: #fff;
  mix-blend-mode: screen;
}

/* Forced colours replace the ground and the letters: show plain text. */
@media (forced-colors: active) {
  .mw-text-mask,
  .mw-text-mask__text { mix-blend-mode: normal; }
  .mw-text-mask > .mw-media-stack__media { display: none; }
}
