/* In-view animation for .side-by-side rows and slider slides: the image
   and the text fade in (animation.js). Opacity only: no rise, zoom or
   growing backdrop. (.rewards-slider scales its slides in animation.js.) */
.side-by-side,
.slider-layout {
  .img-container {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    &:before {
      content: '';
      display: block;
      position: absolute;
      z-index: -1;
      background-color: var(--accent-200);
      height: 100%;
      width: 100%;
      bottom: 0;
      opacity: 0.5;
    }

    img {
      opacity: 0;
      background: var(--background);
    }
  }

  .img-container:has(video) {
    &:before {
      display: none;
    }
  }

  .description>* {
    opacity: 0;
  }
}

.motion-word {
  display: inline-block;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(20%);
}