/* Cinematic home layer. Loaded after home.css so it can compose with, not
   replace, the editorial base and the shared scroll-motion system. */

body.home-cinematic {
  --hc-ease: cubic-bezier(.16, .84, .28, 1);
}

/* 1. Opening: a quiet staggered title card over the photographic spread. */
.home-cinematic.home-intro .hero-copy > * {
  opacity: 0;
  animation: hc-rise .9s var(--hc-ease) both;
}
.home-cinematic.home-intro .hero-copy > .home-eyebrow { animation-delay: .05s; }
.home-cinematic.home-intro .hero-copy > h1 { animation-delay: .13s; }
.home-cinematic.home-intro .hero-copy > p:not(.home-eyebrow) { animation-delay: .28s; }
.home-cinematic.home-intro .hero-copy > .hero-actions { animation-delay: .42s; }
.home-cinematic.home-intro .hero-copy > .hero-rate { animation-delay: .52s; }
.home-cinematic.home-intro .hero-foot,
.home-cinematic.home-intro .hero-credit {
  opacity: 0;
  animation: hc-rise-small .8s var(--hc-ease) .62s both;
}
@keyframes hc-rise {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes hc-rise-small {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}

/* 2. Hero scroll depth: the photograph drifts slower than the copy. */
@media (min-width: 701px) {
  .home-cinematic .hero-scenes {
    transform: translate3d(0, var(--hc-hero-y, 0px), 0) scale(var(--hc-hero-scale, 1));
    will-change: transform;
  }
  .home-cinematic .hero-copy {
    transform: translateY(calc(-37% + var(--hc-copy-y, 0px)));
    opacity: var(--hc-copy-opacity, 1);
    will-change: transform, opacity;
  }
  .home-cinematic .hero-foot {
    transform: translate3d(0, var(--hc-foot-y, 0px), 0);
    opacity: var(--hc-foot-opacity, 1);
  }
}

/* 3. Scroll cue, in the empty centre of the hero footer. */
.home-scroll-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #f4eee0;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: opacity .3s ease, transform .3s ease;
}
.home-scroll-cue i {
  display: block;
  width: 1px;
  height: 29px;
  background: linear-gradient(#f4eee0, transparent);
  transform-origin: top;
  animation: hc-cue 1.8s ease-in-out infinite;
}
.home-scroll-cue.is-hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
}
@keyframes hc-cue {
  0%, 100% { transform: scaleY(.55); opacity: .55; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (max-width: 1000px) {
  .home-scroll-cue { display: none; }
}

/* 4. Story photography: slow focal parallax inside the clipped frames. */
.home-cinematic .story img {
  transform: translate3d(0, var(--hc-story-y, 0px), 0) scale(1.065);
  will-change: transform;
}
.home-cinematic .story:hover img {
  transform: translate3d(0, var(--hc-story-y, 0px), 0) scale(1.085);
  filter: brightness(.94);
}
@media (max-width: 700px) {
  .home-cinematic .story img { transform: scale(1.035); }
  .home-cinematic .story:hover img { transform: scale(1.045); }
}

/* 5. City collection: a pinned horizontal rail on desktop. */
.home-guide-rail {
  position: relative;
  isolation: isolate;
}
.home-guide-sticky {
  position: sticky;
  z-index: 2;
  top: 96px;
  overflow: hidden;
  padding: 10px 0 30px;
  background: var(--home-paper);
}
.home-guide-rail .home-guide-grid {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  max-width: none;
  gap: 18px;
  margin: 0;
}
.home-guide-rail .home-guide-card {
  flex: 0 0 clamp(250px, 18vw, 300px);
  height: auto;
  min-height: 0;
}
.home-guide-rail .home-guide-copy {
  min-height: 185px;
}
.home-guide-rail .home-guide-image {
  height: 205px;
}
.home-guide-track {
  will-change: transform;
}
.home-guide-sticky::before,
.home-guide-sticky::after {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 54px;
  pointer-events: none;
}
.home-guide-sticky::before {
  left: 0;
  background: linear-gradient(90deg, var(--home-paper), transparent);
}
.home-guide-sticky::after {
  right: 0;
  background: linear-gradient(270deg, var(--home-paper), transparent);
}
.home-guide-meter {
  position: relative;
  z-index: 4;
  height: 2px;
  margin-top: 24px;
  background: #d9ded3;
}
.home-guide-meter span {
  display: block;
  height: 100%;
  background: #8c3e48;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .08s linear;
}
.home-guide-rail.is-static .home-guide-meter { display: none; }

@media (max-width: 1100px), (prefers-reduced-motion: reduce) {
  .home-guide-rail { position: static; }
  .home-guide-sticky {
    position: static;
    overflow: visible;
    padding: 0;
    background: transparent;
  }
  .home-guide-sticky::before,
  .home-guide-sticky::after,
  .home-guide-meter { display: none; }
  .home-guide-rail .home-guide-grid {
    display: grid;
    width: auto;
  }
  .home-guide-rail .home-guide-card {
    flex: initial;
  }
}

/* 6. Reduced-motion contract. */
@media (prefers-reduced-motion: reduce) {
  .home-cinematic.home-intro .hero-copy > *,
  .home-cinematic.home-intro .hero-foot,
  .home-cinematic.home-intro .hero-credit {
    opacity: 1;
    animation: none;
    transform: none;
  }
  .home-cinematic .hero-scenes,
  .home-cinematic .hero-copy,
  .home-cinematic .hero-foot,
  .home-cinematic .story img {
    transform: none !important;
    opacity: 1 !important;
  }
  .home-scroll-cue i { animation: none; }
  .home-guide-track { transform: none !important; }
}

/* The pinned rail is a full-height scene, not a short row followed by empty
   page height: the section heading travels with the cards. */
.home-guide-sticky {
  min-height: calc(100svh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.home-guide-sticky .section-top {
  margin-bottom: 28px;
}
.home-guide-sticky .section-top h2 {
  font-size: clamp(34px, 3.6vw, 52px);
}
.home-guide-sticky .section-top > p {
  max-width: 360px;
}
.home-guide-sticky .home-guide-meter {
  margin-top: 30px;
}

.home-guide-rail-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  color: #8a978d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-guide-rail-count { color: #8c3e48; }
.home-guide-rail-hint { text-align: right; }
.home-guide-sticky .home-guide-meter { margin-top: 9px; }
