
/*
 THE PEAKS ON 76
 Mobile Parallax Stabilization - Step 7
 Desktop unaffected.
*/

@media (max-width: 991.98px) {

  .parallax-img-section__block,
  .page-hero {
    overflow: hidden;
  }

  /*
   Universal Parallax is not initialized on mobile.
   Render the image as a stable local layer.
  */

  .parallax-img-section__block > .parallax,
  .page-hero > .parallax {
    display: block !important;
    position: absolute !important;
    inset: -70px 0 !important;
    width: 100% !important;
    height: calc(100% + 140px) !important;
    min-height: 0 !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    transform: none !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }

  .parallax-img-section__dimmer {
    position: absolute;
    z-index: 2 !important;
  }

  .parallax-img-section__content {
    position: absolute;
    z-index: 3 !important;
  }

  /*
   Native CSS scroll animation.
   Supported browsers receive subtle movement.
   Unsupported browsers retain a stable image.
  */

  @supports (animation-timeline: view()) {

    @keyframes peaksMobileImageDrift {
      from {
        transform: translate3d(0, -30px, 0);
      }
      to {
        transform: translate3d(0, 30px, 0);
      }
    }

    .parallax-img-section__block > .parallax,
    .page-hero > .parallax {
      animation-name: peaksMobileImageDrift;
      animation-duration: 1s;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view();
      animation-range: cover;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .parallax-img-section__block > .parallax,
  .page-hero > .parallax {
    animation: none !important;
    transform: none !important;
  }
}


/* ==========================================
   PEAKS STEP 7B MOBILE IMAGE RESTORATION
   Map existing data-parallax-image attributes
   to actual CSS background images.
========================================== */

@media (max-width: 991.98px) {

  .parallax[data-parallax-image="img/floorplans.webp"] {
    background-image: url("/img/floorplans.webp") !important;
  }

  .parallax[data-parallax-image="img/amenities.webp"] {
    background-image: url("/img/amenities.webp") !important;
  }

  .parallax[data-parallax-image="img/schedule-tour.webp"] {
    background-image: url("/img/schedule-tour.webp") !important;
  }

  .parallax-img-section__block > .parallax,
  .page-hero > .parallax {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }
}


/* ==========================================
   PEAKS STEP 8B MOBILE STABILITY TEST
   Disable mobile image movement temporarily.
   Desktop remains unchanged.
========================================== */

@media (max-width: 991.98px) {

  .parallax-img-section__block > .parallax,
  .page-hero > .parallax {
    animation: none !important;
    animation-timeline: auto !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  .parallax-img-section__block > .parallax {
    top: -70px !important;
    height: calc(100% + 140px) !important;
  }

  .page-hero > .parallax {
    top: -70px !important;
    height: calc(100% + 140px) !important;
  }
}
