/* v25 — home only. Effects taken from dsgninterior.se/en, adapted to our brand.
   Lenis smooth scroll, 100svh cinematic bands, scroll parallax, split typography.
   Photos stay straight (v24). Photo choices unchanged. */

.page-home{
  --fx-expo: cubic-bezier(.16, 1, .3, 1);
}

/* Lenis */
html.lenis, html.lenis body{ height: auto; }
html.lenis{ scroll-behavior: auto; }

/* ----- Full-bleed bands: 100svh like DSGN banners, room for parallax ----- */
.page-home .gallery .g-vista{
  height: 100svh;
  height: 100vh;
  max-height: none;
  overflow: hidden;
  position: relative;
  background: #1a1c1b;
}
/* Taller than the crop so translateY never shows the band edges (DSGN media 60%). */
.page-home .gallery .g-vista-media{
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 140%;
  overflow: hidden;
  will-change: transform;
}
.page-home .gallery .g-vista img,
.page-home .gallery .g-vista-img,
.page-home main .gallery .g-vista img{
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover !important;
  object-position: var(--pos, center center);
  will-change: clip-path, transform;
  pointer-events: none;
}

/* Title over the band — same role as DSGN .banner-title, our typography */
.page-home .vista-title{
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  margin: 0;
  padding: 5rem 1.25rem 4rem;
  text-align: center;
  color: #f6f3ee;
  font-family: var(--display), "Times New Roman", Times, serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(2.4rem, 6.4vw, 6.25rem);
  line-height: .95;
  letter-spacing: 0.01em;
  background: rgba(20, 24, 22, 0.18);
  pointer-events: none;
  will-change: transform;
  z-index: 2;
}
.page-home .vista-title-inner{
  display: block;
  max-width: 11.5em;
  overflow: hidden;
  text-wrap: balance;
}
.page-home .vista-title-inner .fx-word{
  text-shadow: 0 2px 24px rgba(20, 24, 22, .28);
}

/* ----- Split typography (GSAP SplitText "lines/words" on DSGN) ----- */
.page-home .fx-mask{
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.page-home .fx-word{
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--fx-expo);
  transition-delay: calc(var(--i, 0) * .1s);
  will-change: transform;
}
.page-home .is-in .fx-word,
.page-home .fx-split.is-in .fx-word{
  transform: translateY(0);
}

/* Vista title words wait for the curtain, then rise */
.page-home .g-vista .vista-title .fx-word{
  transition-delay: calc(.35s + var(--i, 0) * .1s);
}
.page-home .g-vista.is-in .vista-title .fx-word{
  transform: translateY(0);
}

/* Pair images: subtle scroll parallax lives on .g-shot, frame stays unrotated */
.page-home .gallery .g-shot{
  overflow: hidden;
}

@media (max-width: 720px){
  .page-home .gallery .g-vista{
    height: 100svh;
    height: 100vh;
    max-height: none;
    margin-top: .5rem;
  }
  .page-home .vista-title{
    font-size: clamp(2rem, 11vw, 3.25rem);
    padding: 4.5rem 1.1rem 3.5rem;
    line-height: 1.02;
  }
}

@media (prefers-reduced-motion: reduce){
  .page-home .fx-word,
  .page-home .is-in .fx-word,
  .page-home .g-vista .vista-title .fx-word,
  .page-home .g-vista.is-in .vista-title .fx-word{
    transform: none !important;
    transition: none !important;
  }
  .page-home .gallery .g-vista-media,
  .page-home .vista-title,
  .page-home .vista-title-inner{
    transform: none !important;
  }
}
