/* Home page motion: parallax hero, sheet-over-sheet sections, scroll reveals.
   Everything animated is gated on html.fx (off for prefers-reduced-motion). */

/* ── Scroll progress ── */
.fx-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10000; pointer-events: none;
  background: linear-gradient(90deg, var(--olive-dark), var(--accent));
  transform-origin: 0 50%; transform: scaleX(var(--sp, 0));
}

/* ── Hero: pinned, layers drift at different depths ── */
.hero { --p: 0; --mx: 0; --my: 0; z-index: 0; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(28,40,32,0.2), #0f1a13 90%);
  opacity: calc(var(--p) * 0.95);
}
html.fx .hero-split {
  transform: translate3d(calc(var(--mx) * -16px), calc(var(--p) * 24vh + var(--my) * -10px), 0) scale(calc(1.12 + var(--p) * 0.12));
  will-change: transform;
}
html.fx .lanterns { translate: calc(var(--mx) * 22px) calc(var(--p) * -46vh); }
html.fx .bamboo-left { translate: calc(var(--mx) * 30px) calc(var(--p) * -18vh); }
html.fx .bamboo-right { translate: calc(var(--mx) * 30px) calc(var(--p) * -18vh); }
html.fx .hero-title { translate: calc(var(--mx) * -8px) calc(var(--p) * -17vh); opacity: calc(1 - var(--p) * 1.5); animation: none; }
html.fx .hero-eyebrow { translate: 0 calc(var(--p) * -24vh); }
html.fx .hero-divider { translate: 0 calc(var(--p) * -14vh); }
html.fx .hero-info { translate: 0 calc(var(--p) * -9vh); }
html.fx .hero-paths { translate: 0 calc(var(--p) * -5vh); }

/* headline lines rise out of a mask */
.hero-title .ln { display: block; overflow: hidden; padding: 0.04em 0.06em 0.1em; margin-bottom: -0.1em; }
.hero-title .ln > span { display: inline-block; }
html.fx .hero-title .ln > span { transform: translateY(115%) rotate(2deg); animation: lineUp 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
html.fx .hero-title .ln:nth-child(1) > span { animation-delay: 0.25s; }
html.fx .hero-title .ln:nth-child(2) > span { animation-delay: 0.4s; }
html.fx .hero-title .ln:nth-child(3) > span { animation-delay: 0.55s; }
html.fx .hero-title .ln:nth-child(4) > span { animation-delay: 0.7s; }
@keyframes lineUp { to { transform: none; } }
html.fx .hero-eyebrow { animation: blurIn 1s 0.1s both; }
html.fx .hero-divider { animation: growX 1s 0.9s cubic-bezier(.2,.8,.2,1) both; }
html.fx .hero-info-item { animation: blurIn 0.9s both; }
html.fx .hero-info-item:nth-child(1) { animation-delay: 1.05s; }
html.fx .hero-info-item:nth-child(2) { animation-delay: 1.15s; }
html.fx .hero-info-item:nth-child(3) { animation-delay: 1.25s; }
html.fx .hero-paths { animation: blurIn 0.9s 1.4s both; }
@keyframes blurIn { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: blur(0); } }
@keyframes growX { from { clip-path: inset(0 50% 0 50%); opacity: 0; } to { clip-path: inset(-10px -20px); opacity: 1; } }

/* drifting gold dust */
.hero-dust { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hero-dust i {
  position: absolute; bottom: -12px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,226,150,0.95), rgba(196,163,90,0) 70%);
  opacity: 0; animation: dust var(--t) linear var(--dl) infinite;
}
@keyframes dust {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  10% { opacity: var(--o); }
  90% { opacity: var(--o); }
  100% { transform: translate3d(var(--dx), -108vh, 0); opacity: 0; }
}

.scroll-cue {
  position: absolute; z-index: 4; left: 50%; bottom: 1.4rem; translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none;
  font: 500 0.66rem/1 'Jost', sans-serif; letter-spacing: 0.4em; text-transform: uppercase; color: var(--accent);
  opacity: calc(1 - var(--p) * 7);
}
.scroll-cue i { display: block; width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); transform-origin: top; animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-width: 767px) { .scroll-cue { display: none; } }

/* ── Sections: stacked sheets with ghost lettering ── */
.home-sec { position: relative; z-index: 1; overflow-x: clip; --gx: 0px; --gy: 0px; }
.hero + .home-sec, .home-sec + .home-sec { border-radius: 32px 32px 0 0; margin-top: -32px; box-shadow: 0 -18px 50px rgba(0,0,0,0.16); padding-top: calc(6rem + 32px); }
@media (max-width: 900px) { .hero + .home-sec, .hero + .home-sec, .home-sec + .home-sec { padding-top: calc(5rem + 32px); } }
.home-sec > * { position: relative; z-index: 1; }
.home-sec::before {
  content: attr(data-ghost); position: absolute; z-index: 0; left: 0; top: 5%; white-space: nowrap; pointer-events: none;
  font: italic 600 clamp(7rem, 24vw, 22rem)/1 'Cormorant Garamond', serif; color: transparent;
  -webkit-text-stroke: 1px rgba(196,163,90,0.35); translate: var(--gx) var(--gy); user-select: none;
}
.story-sec::before, .loc-sec::before { -webkit-text-stroke-color: rgba(74,122,88,0.28); }
footer { position: relative; z-index: 1; }

/* ── Reveals (classes added by JS) ── */
html.fx .rv { opacity: 0; transform: translate3d(0, 46px, 0); filter: blur(6px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1), filter 0.9s; transition-delay: var(--d, 0ms); }
html.fx .rv.in { opacity: 1; transform: none; filter: none; }

html.fx .rv-clip { clip-path: inset(-12% 100% -12% 0); transform: translate3d(-30px, 0, 0);
  transition: clip-path 1.2s cubic-bezier(.7,0,.2,1), transform 1.2s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
html.fx .rv-clip.in { clip-path: inset(-12% -6% -12% 0); transform: none; }

html.fx .rv-curtain { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s cubic-bezier(.7,0,.2,1); transition-delay: var(--d, 0ms); }
html.fx .rv-curtain.in { clip-path: inset(0); }
.story-photo { overflow: hidden; border-radius: 6px; box-shadow: 0 16px 40px rgba(28,40,32,0.2); }
.story-photo img { border-radius: 0; box-shadow: none; transform: scale(1.22); transform-origin: 50% 50%; }

html.fx .rv-left { opacity: 0; transform: translate3d(-80px, 0, 0); transition: opacity 1s, transform 1.1s cubic-bezier(.2,.7,.2,1); }
html.fx .rv-left.in { opacity: 1; transform: none; }
html.fx .rv-right { opacity: 0; transform: translate3d(80px, 0, 0); transition: opacity 0.9s, transform 1s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
html.fx .rv-right.in { opacity: 1; transform: none; }

html.fx .rv-tilt { opacity: 0; transform: perspective(900px) rotateX(18deg) translate3d(0, 70px, 0) scale(0.94); transform-origin: 50% 100%;
  transition: opacity 0.9s, transform 1.1s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
html.fx .rv-tilt.in { opacity: 1; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition-duration: 0.9s, 1.1s; }
html.fx .rv-tilt.in.live { transition: transform 0.15s linear, opacity 0.9s; transition-delay: 0ms; }
.pay-card { will-change: transform; }

html.fx .rv-diamond { opacity: 0; transform: scale(0.2) rotate(-90deg);
  transition: opacity 0.7s, transform 1.1s cubic-bezier(.3,1.3,.5,1); transition-delay: var(--d, 0ms); }
html.fx .rv-diamond.in { opacity: 1; transform: none; }
.g-item img { transform: scale(1.18); }
.g-item:hover img { transform: scale(1.26); }

html.fx .rv-pop { opacity: 0; transform: scale(0.7) rotate(-6deg); transition: opacity 0.8s, transform 1.1s cubic-bezier(.3,1.4,.5,1); }
html.fx .rv-pop.in { opacity: 1; transform: none; }

/* eyebrow rules draw outward */
html.fx .rv-label::before, html.fx .rv-label::after { transform: scaleX(0); transition: transform 1s 0.3s cubic-bezier(.2,.7,.2,1); }
html.fx .rv-label::before { transform-origin: right; }
html.fx .rv-label::after { transform-origin: left; }
html.fx .rv-label.in::before, html.fx .rv-label.in::after { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-dust i, .scroll-cue i { animation: none; }
}

/* story opener */
.story-copy p.story-dream {
  font: italic 500 clamp(1.4rem, 2.3vw, 1.9rem)/1.4 'Cormorant Garamond', serif; color: var(--olive-darker);
  border-left: 2px solid var(--accent); padding-left: 1.1rem; margin-top: 1.5rem;
}

/* burger diamond is pre-fitted so nothing may crop or shift it */
.g-item.nz img, .g-item.nz:hover img { transform: none; translate: none !important; }
