/* Animated-route-only lower motion polish.
   Loaded only on /, /home, /meet-sunny, and /modern-apartments. */

/* Lower-section motion polish for the lightweight marketing routes. The JS helper
   adds `.cerasia-lower-motion`, `.cerasia-lower-card`, and `.is-inview` only on:
   /, /home, /meet-sunny, /modern-apartments. */
html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card,
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card,
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card,
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card {
  will-change: transform, opacity, box-shadow;
  transition:
    transform 650ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 650ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 450ms ease;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:not(.is-inview),
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:not(.is-inview),
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:not(.is-inview),
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:not(.is-inview) {
  opacity: 0;
  transform: translate3d(0, 1.4rem, 0) scale(0.985);
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card.is-inview,
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card.is-inview,
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card.is-inview,
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card.is-inview {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card img,
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card img,
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card img,
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card img {
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card.is-inview:hover,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card.is-inview:hover,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card.is-inview:hover,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card.is-inview:hover {
    transform: translate3d(0, -0.35rem, 0) scale(1.012);
    box-shadow: 0 18px 34px rgba(25, 23, 20, 0.08);
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card.is-inview:hover img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card.is-inview:hover img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card.is-inview:hover img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card.is-inview:hover img {
    transform: scale(1.028);
  }
}

/* Lower-page motion polish v2.
   This keeps the hero/nav/ornament contract untouched and only adds movement
   below the hero on the four marketing routes that already use the lightweight
   lower-motion runtime. */
html.cerasia-lower-motion body[data-path="/"] section:not(:first-of-type),
html.cerasia-lower-motion body[data-path="home"] section:not(:first-of-type),
html.cerasia-lower-motion body[data-path="meet-sunny"] section:not(:first-of-type),
html.cerasia-lower-motion body[data-path="modern-apartments"] section:not(:first-of-type) {
  --cerasia-lower-section-shift: 1.12rem;
  --cerasia-lower-section-scale: 0.986;
  --cerasia-lower-image-shift: 0.62rem;
  --cerasia-lower-image-scale: 1.02;
}

html.cerasia-lower-motion body[data-path="/"] section:nth-of-type(2),
html.cerasia-lower-motion body[data-path="home"] section:nth-of-type(2),
html.cerasia-lower-motion body[data-path="meet-sunny"] section:nth-of-type(2),
html.cerasia-lower-motion body[data-path="modern-apartments"] section:nth-of-type(2) {
  --cerasia-lower-section-shift: 0.98rem;
  --cerasia-lower-section-scale: 0.988;
  --cerasia-lower-image-shift: 0.54rem;
  --cerasia-lower-image-scale: 1.015;
}

html.cerasia-lower-motion body[data-path="/"] section:nth-of-type(3),
html.cerasia-lower-motion body[data-path="home"] section:nth-of-type(3),
html.cerasia-lower-motion body[data-path="meet-sunny"] section:nth-of-type(3),
html.cerasia-lower-motion body[data-path="modern-apartments"] section:nth-of-type(3) {
  --cerasia-lower-section-shift: 1.25rem;
  --cerasia-lower-section-scale: 0.983;
  --cerasia-lower-image-shift: 0.7rem;
  --cerasia-lower-image-scale: 1.025;
}

html.cerasia-lower-motion body[data-path="/"] section:nth-of-type(4),
html.cerasia-lower-motion body[data-path="home"] section:nth-of-type(4),
html.cerasia-lower-motion body[data-path="meet-sunny"] section:nth-of-type(4),
html.cerasia-lower-motion body[data-path="modern-apartments"] section:nth-of-type(4) {
  --cerasia-lower-section-shift: 1.38rem;
  --cerasia-lower-section-scale: 0.979;
  --cerasia-lower-image-shift: 0.78rem;
  --cerasia-lower-image-scale: 1.028;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card,
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card,
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card,
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card {
  transform-origin: center center;
  backface-visibility: hidden;
  transition-property: transform, opacity, box-shadow, filter;
  transition-duration: 650ms, 650ms, 450ms, 450ms;
  transition-timing-function:
    cubic-bezier(0.22, 1, 0.36, 1),
    cubic-bezier(0.22, 1, 0.36, 1),
    ease,
    ease;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 1),
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 1),
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 1),
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 1) {
  --cerasia-lower-stagger: 0ms;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 2),
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 2),
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 2),
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 2) {
  --cerasia-lower-stagger: 72ms;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 3),
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 3),
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 3),
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 3) {
  --cerasia-lower-stagger: 144ms;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 4),
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 4),
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 4),
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 4) {
  --cerasia-lower-stagger: 216ms;
}

html.cerasia-lower-motion body[data-path="/"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview),
html.cerasia-lower-motion body[data-path="home"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview),
html.cerasia-lower-motion body[data-path="meet-sunny"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview),
html.cerasia-lower-motion body[data-path="modern-apartments"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) {
  opacity: 0;
  transform: translate3d(0, var(--cerasia-lower-section-shift, 1.12rem), 0)
    scale(var(--cerasia-lower-section-scale, 0.986));
  filter: saturate(0.97);
  transition-delay: var(--cerasia-lower-stagger, 0ms);
}

html.cerasia-lower-motion body[data-path="/"] section:not(:first-of-type) .cerasia-lower-card.is-inview,
html.cerasia-lower-motion body[data-path="home"] section:not(:first-of-type) .cerasia-lower-card.is-inview,
html.cerasia-lower-motion body[data-path="meet-sunny"] section:not(:first-of-type) .cerasia-lower-card.is-inview,
html.cerasia-lower-motion body[data-path="modern-apartments"] section:not(:first-of-type) .cerasia-lower-card.is-inview {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: none;
  transition-delay: 0ms;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card .card-image,
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card .card-image,
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card .card-image,
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card .card-image {
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
}

html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card .card-image img,
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card .card-image img,
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card .card-image img,
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card .card-image img,
html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card > img,
html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card > img,
html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card > img,
html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card > img {
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  transition:
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 520ms ease,
    filter 520ms ease;
}

html.cerasia-lower-motion body[data-path="/"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) .card-image img,
html.cerasia-lower-motion body[data-path="home"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) .card-image img,
html.cerasia-lower-motion body[data-path="meet-sunny"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) .card-image img,
html.cerasia-lower-motion body[data-path="modern-apartments"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) .card-image img,
html.cerasia-lower-motion body[data-path="/"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) > img,
html.cerasia-lower-motion body[data-path="home"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) > img,
html.cerasia-lower-motion body[data-path="meet-sunny"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) > img,
html.cerasia-lower-motion body[data-path="modern-apartments"] section:not(:first-of-type) .cerasia-lower-card:not(.is-inview) > img {
  opacity: 0;
  transform: translate3d(0, var(--cerasia-lower-image-shift, 0.62rem), 0)
    scale(var(--cerasia-lower-image-scale, 1.02));
  filter: saturate(0.96) contrast(0.98);
  transition-delay: calc(var(--cerasia-lower-stagger, 0ms) + 45ms);
}

html.cerasia-lower-motion body[data-path="/"] section:not(:first-of-type) .cerasia-lower-card.is-inview .card-image img,
html.cerasia-lower-motion body[data-path="home"] section:not(:first-of-type) .cerasia-lower-card.is-inview .card-image img,
html.cerasia-lower-motion body[data-path="meet-sunny"] section:not(:first-of-type) .cerasia-lower-card.is-inview .card-image img,
html.cerasia-lower-motion body[data-path="modern-apartments"] section:not(:first-of-type) .cerasia-lower-card.is-inview .card-image img,
html.cerasia-lower-motion body[data-path="/"] section:not(:first-of-type) .cerasia-lower-card.is-inview > img,
html.cerasia-lower-motion body[data-path="home"] section:not(:first-of-type) .cerasia-lower-card.is-inview > img,
html.cerasia-lower-motion body[data-path="meet-sunny"] section:not(:first-of-type) .cerasia-lower-card.is-inview > img,
html.cerasia-lower-motion body[data-path="modern-apartments"] section:not(:first-of-type) .cerasia-lower-card.is-inview > img {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: none;
  transition-delay: calc(var(--cerasia-lower-stagger, 0ms) + 45ms);
}

@media (hover: hover) and (pointer: fine) and (min-width: 992px) {
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card.is-inview:hover,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card.is-inview:hover,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card.is-inview:hover,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card.is-inview:hover {
    transform: translate3d(0, -0.35rem, 0) scale(1.012);
    box-shadow: 0 18px 34px rgba(25, 23, 20, 0.08);
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card.card-big.is-inview:hover .card-image img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card.card-big.is-inview:hover .card-image img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card.card-big.is-inview:hover .card-image img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card.card-big.is-inview:hover .card-image img,
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card.feature-grid-card.is-inview:hover img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card.feature-grid-card.is-inview:hover img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card.feature-grid-card.is-inview:hover img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card.feature-grid-card.is-inview:hover img {
    transform: translate3d(0, -0.45rem, 0) scale(1.03);
  }
}

@media (max-width: 767px) {
  html.cerasia-lower-motion body[data-path="/"] section[data-cerasia-section-reveal="1"],
  html.cerasia-lower-motion body[data-path="home"] section[data-cerasia-section-reveal="1"],
  html.cerasia-lower-motion body[data-path="meet-sunny"] section[data-cerasia-section-reveal="1"],
  html.cerasia-lower-motion body[data-path="modern-apartments"] section[data-cerasia-section-reveal="1"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card {
    transition-duration: 420ms, 420ms, 280ms, 280ms;
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:not(.is-inview),
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:not(.is-inview),
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:not(.is-inview),
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:not(.is-inview) {
    transform: translate3d(0, 0.5rem, 0) scale(0.996);
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 1),
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 1),
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 1),
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 1) {
    --cerasia-lower-stagger: 0ms;
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 2),
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 2),
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 2),
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 2) {
    --cerasia-lower-stagger: 36ms;
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 3),
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 3),
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 3),
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 3) {
    --cerasia-lower-stagger: 72ms;
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:nth-child(4n + 4),
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:nth-child(4n + 4),
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:nth-child(4n + 4),
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:nth-child(4n + 4) {
    --cerasia-lower-stagger: 108ms;
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card > img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card > img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card > img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card > img {
    transition:
      transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 360ms ease,
      filter 360ms ease;
  }

  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:not(.is-inview) .card-image img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:not(.is-inview) .card-image img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:not(.is-inview) .card-image img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:not(.is-inview) .card-image img,
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card:not(.is-inview) > img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card:not(.is-inview) > img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card:not(.is-inview) > img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card:not(.is-inview) > img {
    transform: translate3d(0, 0.14rem, 0) scale(1.004);
    transition-delay: calc(var(--cerasia-lower-stagger, 0ms) + 10ms);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card,
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card .card-image img,
  html.cerasia-lower-motion body[data-path="/"] .cerasia-lower-card > img,
  html.cerasia-lower-motion body[data-path="home"] .cerasia-lower-card > img,
  html.cerasia-lower-motion body[data-path="meet-sunny"] .cerasia-lower-card > img,
  html.cerasia-lower-motion body[data-path="modern-apartments"] .cerasia-lower-card > img {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
}
