/* Start the elements at the top of the product and comparison pages on first paint. */
@media (prefers-reduced-motion: no-preference) {
  html[data-anio-wf-page-intro] body:not([data-motion-disabled="true"]) {
    & .ad-product-seven .ap-gallery {
      animation: anio7-detail-fade 1000ms var(--anio-wf-out) backwards;
    }

    & .ad-product-seven .ap-product-info > h1,
    & .a7c-heading--hero .a7c-intro-line {
      animation: anio7-detail-title 1300ms var(--anio-wf-out) var(--anio7-line-delay, 0ms) backwards;
    }

    & .a7c-heading--hero .a7c-intro-line {
      display: inline-block;
      max-width: 100%;
      vertical-align: top;
    }

    & .ad-product-seven .ap-product-info > .a7-new {
      animation: anio7-detail-chip 1100ms var(--anio-wf-back) 240ms backwards;
    }

    & .ad-product-seven .ap-product-info > .a7-script,
    & .a7c-heading--hero > .a7c-script {
      animation: anio7-detail-draw 1200ms var(--anio-wf-io) 180ms backwards;
    }

    & .ad-product-seven .ap-product-info > .ad-product-six__proof,
    & .ad-product-seven .ap-product-info > .ap-product-subtitle,
    & .a7c-heading--hero > p:last-child {
      animation: anio7-detail-rise 1200ms var(--anio-wf-out) 180ms backwards;
    }

    & .a7c-heading--hero::before,
    & .a7c-heading--hero::after {
      animation: anio7-detail-rise 1200ms var(--anio-wf-out) 360ms backwards;
    }

    & .a7c-heading--hero::after { animation-delay: 540ms; }

    & .a7c-hero .a7c-model:nth-child(-n + 2) {
      animation: anio7-detail-fade 600ms var(--anio-wf-out) backwards;
      & .a7c-model__image > img {
        animation: anio7-detail-watch 1600ms var(--anio-wf-out) 150ms backwards;
      }
    }

    /* The second card enters on scroll in the stacked mobile layout. */
    @media (max-width: 767px) {
      & .a7c-hero .a7c-model:nth-child(2) {
        &, & .a7c-model__image > img { animation-name: none; }
      }
    }
  }

  /* Below the fold, the scroll observer owns the entrance instead. */
  html[data-anio-wf-page-intro] [data-anio-wf-scroll-intro],
  html[data-anio-wf-page-intro] [data-anio-wf-scroll-intro] .a7c-intro-line {
    animation: none !important;
  }
}

@keyframes anio7-detail-fade {
  from { opacity: 0; }
}

@keyframes anio7-detail-rise {
  from { opacity: 0; translate: 0 1.25em; }
}

@keyframes anio7-detail-title {
  from { clip-path: inset(0 -12% 100% -12%); translate: 0 1.1em; rotate: 2.5deg; }
  to { clip-path: inset(-20% -12% -20% -12%); translate: 0 0; rotate: 0deg; }
}

@keyframes anio7-detail-draw {
  from { clip-path: inset(-25% 100% -25% -5%); }
  to { clip-path: inset(-25% -5% -25% -5%); }
}

@keyframes anio7-detail-chip {
  from { opacity: 0; translate: 0 1.25em; scale: .9; }
}

@keyframes anio7-detail-watch {
  from { opacity: 0; translate: 0 calc(5 * var(--anio-wf-motion-unit)); scale: .82; rotate: -7deg; }
}
