/* LankaLux scroll motion — pairs with lankalux-flow.js (only active when the script adds .flow) */

/* Reading progress */
.flow-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1200;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Hero scroll-away */
.flow .hero-carousel,
.flow .hero-content {
  will-change: transform;
}

/* Words slide up out of masks */
.flow-split .flow-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.hero h1.flow-split span.flow-mask,
.hero h1.flow-split span.flow-word {
  display: inline-block;
}

.flow-word {
  display: inline-block;
  transform: translate3d(0, 105%, 0);
}

.flow .hero.is-ready .hero-content h1.flow-split {
  animation: none;
}

.flow .hero.is-ready h1.flow-split .flow-word {
  animation: flowWordUp 1.05s var(--ease) both;
  animation-delay: calc(0.25s + var(--i) * 0.06s);
}

.flow-heading .flow-word {
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
.flow-heading.flow-in .flow-word { transform: none; }

@keyframes flowWordUp {
  from { transform: translate3d(0, 105%, 0); }
  to { transform: none; }
}

.flow .hero.is-ready .hero-content > p {
  animation: flowRise 1s var(--ease) 0.8s both;
}
.flow .hero.is-ready .hero-buttons {
  animation: flowRise 1s var(--ease) 0.95s both;
}
.flow .hero.is-ready .hero-points {
  animation: flowRise 1s var(--ease) 1.1s both;
}

@keyframes flowRise {
  from { opacity: 0; transform: translate3d(0, 28px, 0); }
  to { opacity: 1; transform: none; }
}

/* Text and cards rise */
.flow-rise {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.flow-rise.flow-in {
  opacity: 1;
  transform: none;
}

/* Photos open up */
.flow-open {
  clip-path: inset(10% 8% 10% 8% round 18px);
  transition: clip-path 1.3s var(--ease);
  transition-delay: var(--d, 0ms);
}
.flow-open.flow-in {
  clip-path: inset(0 0 0 0 round 0);
}

/* Journey cards drift at different speeds */
.flow .journey-item {
  translate: 0 var(--drift, 0);
}

/* Beach photo opens to full width */
.flow-film {
  will-change: clip-path;
}
.flow-film .film-moment-media {
  animation: none;
  will-change: transform;
}

/* Lines that light up as they pass */
.flow-light {
  opacity: calc(0.18 + var(--lit, 0) * 0.82);
  transform: translate3d(0, calc((1 - var(--lit, 0)) * 14px), 0);
}

@media (prefers-reduced-motion: reduce) {
  .flow-word,
  .flow-rise,
  .flow-open,
  .flow-light { transform: none !important; opacity: 1 !important; clip-path: none !important; }
}
