/* Animation blocks copied verbatim from styles.css; selectors scoped to the ad. */

.campaign-lesson-scroll .lesson-intro-scroll-opening {

  position: absolute;

  inset: 0;

  opacity: 0;

  transform: scaleX(0.05);

  transform-origin: center;

  animation: lesson-scroll-open 1900ms cubic-bezier(0.16, 0.72, 0.14, 1) 1160ms forwards;

}

.campaign-lesson-scroll .lesson-intro-scroll-opened {
  opacity: 1;
  transform: scaleX(1);
}

.campaign-lesson-scroll .closed-scroll-throw {
  position: absolute;
  z-index: 3;
  left: calc(91% - 12px);
  top: calc(9.3% + 12px);
  width: 18%;
  height: 30%;
  object-fit: contain;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.1) rotate(0deg);
  transform-origin: center;
  filter: none;
  will-change: left, top, transform, opacity;
  animation: closed-scroll-throw 1100ms ease-in-out 60ms forwards;
}

@keyframes lesson-scroll-open {
  from {
    opacity: 1;
    transform: scaleX(0.05);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes closed-scroll-throw {
  0% {
    left: calc(91% - 12px);
    top: calc(9.3% + 12px);
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.1) rotate(0deg);
  }

  99.9% {
    left: 50%;
    top: 50%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5) rotate(720deg);
  }

  100% {
    left: 50%;
    top: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5) rotate(720deg);
  }
}

.ad-exercise > .island-speech { transform: none; }
.campaign-lesson-scroll { overflow: hidden !important; }
@media(prefers-reduced-motion:reduce){.campaign-lesson-scroll .closed-scroll-throw{display:none;animation:none}.campaign-lesson-scroll .lesson-intro-scroll-opening{opacity:1;transform:none;animation:none}}

.campaign-lesson-scroll .scroll-seam-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
