/* Multicultural block – scroll-scrubbed video (we-understand headline is baked into the video).
 * Selectors don't depend on parent elements, because the player is moved to <body>
 * while it's pinned. */
.mc-scrub {
  --mc-bg: #A4ADA5;            /* = .our-story-section background; the video is encoded to render in it */
  --mc-cover: #A4ADA5;
  position: relative;
  width: 100%;
  max-width: 100%;             /* fills the block like the old graphic did; set a px value to cap it */
  margin-inline: auto;
  aspect-ratio: 1 / 1;
  background: var(--mc-bg);
}

.mc-scrub-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The finished-frame still keeps the box's size but stays invisible during load, so it
 * can't flash before the video takes over. The script shows it only when the animation
 * won't run (reduced motion). opacity rather than visibility keeps its alt text readable
 * by screen readers. */
.mc-scrub-fallback { opacity: 0; }
.mc-scrub.is-static .mc-scrub-fallback { opacity: 1; }

.mc-scrub-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--mc-bg) center / contain no-repeat;  /* poster until frames are ready */
  pointer-events: none;
}

.mc-scrub-stage video,
.mc-scrub-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* The theme fixes .our-story-section to calc(100vh - 90px). When the columns stack,
 * the pinned video's scroll space has to live inside this section, so let it size to
 * its content. (No full-screen minimum here: the section centres its content, and a
 * minimum height would make the content jump when the pin adds its scroll space.)
 * Desktop is untouched: there the whole section is pinned and the space is added
 * outside it. */
@media (max-width: 991.98px) {
  body .our-story-section {      /* "body" so this wins whatever order the stylesheets load in */
    height: auto;
    min-height: 0;
  }
}

/* "WE UNDERSTAND" is baked into the video's top-left corner. Cover it in the video's
 * own background colour until the visitor starts scrolling, then fade the cover out.
 * Pure CSS, so it's hidden from the first paint, before the script has loaded. */
.mc-scrub::after {
  content: "";
  position: absolute;
  left: 2.3%;
  top: 4%;
  width: 41%;
  height: 7%;
  background: var(--mc-cover);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.35s ease-out;
}
.mc-scrub.mc-revealed::after { opacity: 0; }

/* Fade-up starting state for the Our Story row, loaded in <head> with this file.
 * standalone-style.css has the same rules, but it's linked in the page body, so without
 * these the row is drawn fully visible first, then hidden when that file arrives, then
 * faded in: a flicker on load. Values match standalone-style.css; the extra class in the
 * selectors makes these win whichever file loads last. */
.our-story-section .fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s, transform 0.65s;
}
.our-story-section .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
