/* 2026-11 scroll motion (Apple-style): soft reveals, photo zoom-in, hero parallax, sticky zoom stage.
   Everything is gated on html.has-motion, which js/motion-202611.js adds only when
   JavaScript runs and the visitor has not asked for reduced motion. */

:root {
  --ease-out-soft: cubic-bezier(0.2, 0.65, 0.2, 1);
}

/* ---- Text and card reveals ---- */
html.has-motion .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.8s var(--ease-out-soft), transform 0.8s var(--ease-out-soft);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

html.has-motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---- Photographs settle from a slight zoom as they enter ---- */
html.has-motion .photo-reveal {
  overflow: hidden;
}

html.has-motion .photo-reveal img {
  transform: scale(1.08);
  transition: transform 1.4s var(--ease-out-soft), opacity 0.9s var(--ease-out-soft);
  will-change: transform;
}

html.has-motion .photo-reveal.is-in img {
  transform: scale(1);
}

html.has-motion .property-card.photo-reveal:hover .card-photo img {
  transform: scale(1.03);
}

/* ---- Hero image drifts and grows slightly as you scroll away from it ---- */
html.has-motion .hero-visual img,
html.has-motion .inner-hero-visual img,
html.has-motion .screening-hero-media img {
  height: 118%;
  top: -9%;
  will-change: transform;
}

html.has-motion .hero-visual picture,
html.has-motion .inner-hero-visual picture,
html.has-motion .screening-hero-media {
  overflow: hidden;
}

/* ---- Property photo grows into place as it scrolls into view.
   No pinning and no extra page height: the frame scales from 92% to 100%
   while the photo inside eases out from a slight zoom. ---- */
.zoom-stage + .property-grid {
  margin-top: 1.5rem;
}

html.has-motion .zoom-stage .property-image-frame {
  transform: scale(calc(0.92 + 0.08 * var(--p, 1)));
  transform-origin: center center;
  will-change: transform;
}

html.has-motion .zoom-stage .property-image-frame img {
  transform: scale(calc(1.12 - 0.12 * var(--p, 1)));
  will-change: transform;
}

@media (max-width: 768px) {
  html.has-motion .reveal {
    transform: translate3d(0, 18px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.has-motion .reveal,
  html.has-motion .photo-reveal img {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
