/* The Lagoon Tower hero, ported from the approved preview (preview/style.css).
   Every rule is scoped to #story so the rest of the site can't disturb it. */

/* ---- the pinned story ---- */
#story { position: relative; height: 1000vh; }
#story .viewport { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #c9b9a0; }
#story .plate { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
#story .plate > img, #story .plate > video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
#story .film { opacity: 0; transition: opacity .4s ease; }
#story .film.is-shown { opacity: 1; }
#story .still--floors, #story .still--interior { opacity: 0; }

/* floor highlight: a luminous white band, as in the film and image 3 */
#story .floors { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
#story .band__fill { fill: rgb(255 255 255 / .8); }
#story .band__glow { fill: rgb(255 255 255 / .5); }

/* floor-number tiles in film pixels: the film's column, 1.3x larger so the numbers read at laptop size */
#story .tiles { position: absolute; left: 0; top: 0; margin: 0; padding: 0; list-style: none; opacity: 0; pointer-events: none; }
#story .tile { position: absolute; left: 1601px; width: 82px; height: 81px; border-radius: 11px; display: grid; place-items: center;
  font: 400 36px/1 var(--font); color: #f4f2ee; background: rgb(66 62 58 / .8); }
#story .tile__w { position: absolute; inset: 0; border-radius: inherit; background: #f8f4ee; opacity: var(--on, 0); }
#story .tile span { position: relative; }

/* cinematic shading behind the copy; JS sets each layer's opacity per stage */
#story .shade { position: absolute; pointer-events: none; opacity: 0; }
#story .shade--l { inset: 0 auto 0 0; width: 62%; background: linear-gradient(90deg, rgb(var(--shade) / .78), rgb(var(--shade) / .42) 45%, rgb(var(--shade) / 0)); }
#story .shade--r { inset: 0 0 0 auto; width: 52%; background: linear-gradient(270deg, rgb(var(--shade) / .74), rgb(var(--shade) / .38) 45%, rgb(var(--shade) / 0)); }
#story .shade--b { inset: auto 0 0 0; height: 58%; background: linear-gradient(0deg, rgb(var(--shade) / .8), rgb(var(--shade) / .35) 50%, rgb(var(--shade) / 0)); }
#story .shade--t { inset: 0 0 auto 0; height: 150px; opacity: 1; background: linear-gradient(180deg, rgb(var(--shade) / .5), rgb(var(--shade) / 0)); }

/* thin teal load line while the film downloads */
#story .load { position: absolute; left: 0; top: 0; height: 2px; z-index: 45; background: var(--accent-2); width: calc(var(--load, 0) * 100%); transition: opacity .4s; }
body.film-ready #story .load, body.film-failed #story .load { opacity: 0; }

/* copy */
#story .copy { position: absolute; z-index: 20; opacity: 0; pointer-events: none; text-shadow: var(--tshadow); }
#story .copy.is-on { pointer-events: auto; }
#story .copy h1, #story .copy h2 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; margin: 0; color: #fff; }
#story .copy h1 { font-size: clamp(36px, 4.4vw, 66px); line-height: 1.03; }
#story .copy h2 { font-size: clamp(30px, 3.3vw, 50px); line-height: 1.07; }
#story .copy p { font-size: clamp(16px, 1.2vw, 19px); line-height: 1.55; color: rgb(237 241 242 / .86); margin: 18px 0 0; max-width: 28rem; }
#story .copy .btn { text-shadow: none; }
#story .copy__actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; }
#story .copy--l { left: 6vw; top: 50%; transform: translateY(-50%); max-width: min(34rem, 36vw); }
#story .copy--r { right: 6vw; top: 50%; transform: translateY(-50%); max-width: min(24rem, 30vw); text-align: right; }
#story .copy--r p.floor-readout { margin-left: auto; font-size: 15px; letter-spacing: .02em; }
#story .copy--b { left: 6vw; bottom: 11vh; max-width: 40rem; }
#story .copy--b .btn { margin-top: 24px; }

/* scroll cue: faded white, bottom center; JS fades it out once the visitor reaches the interior */
#story .scroll-cue { position: absolute; z-index: 25; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column;
  align-items: center; gap: 8px; color: rgb(255 255 255 / .62); font: 500 13px/1 var(--font); letter-spacing: .04em;
  text-shadow: var(--tshadow); pointer-events: none; transition: opacity .3s ease; }
#story .scroll-cue__icon { filter: drop-shadow(0 1px 3px rgb(5 8 10 / .5)); }
#story .scroll-cue__dot { animation: hero-cue 1.8s ease-in-out infinite; }
@keyframes hero-cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #story .scroll-cue__dot { animation: none; } }

/* stage menu */
#story .stages { position: absolute; z-index: 30; right: 18px; bottom: 18px; margin: 0; padding: 8px; list-style: none;
  background: rgb(11 18 21 / .72); border-radius: 6px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#story .stages button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--muted);
  font: 500 12px/1 var(--font); padding: 7px 10px; border-radius: 3px; cursor: pointer; }
#story .stages button[aria-current="step"] { color: #fff; background: var(--accent); }

/* phones: all copy sits at the bottom over the bottom shading, so the tower stays clear */
@media (max-width: 760px) {
  #story .copy--l, #story .copy--r, #story .copy--b { left: 20px; right: 20px; top: auto; bottom: 150px; transform: none; max-width: none; text-align: left; }
  #story .scroll-cue { bottom: 72px; gap: 6px; font-size: 12px; }
  #story .copy--r p.floor-readout { margin-left: 0; }
  #story .shade--l, #story .shade--r { display: none; }
  #story .shade--b { height: 62%; }
  #story .stages { display: none; }
}
