/* ==========================================================================
   JPC VELORA — home · "Floor plans" cinematic (fp3d.js)
   Desktop: pinned scroll film — tower floors explode in 3D → the typical floor flattens →
   three residences lift off the plate → each turns from 3D cutaway into its plan.
   Mobile: calm swipeable explorer with the same 3D ⇄ plan flip.
   ========================================================================== */
.rs-fx { position: relative; z-index: 4; color: var(--cream); background: var(--navy); }
.rs-fx__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background:
    radial-gradient(60% 55% at 66% 50%, rgba(229,222,209,.10), transparent 70%),
    radial-gradient(40% 40% at 20% 100%, rgba(184,154,82,.10), transparent 70%), var(--navy); }
.rs-fx__stage::before { /* soft floor grid */
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -34%; height: 78%; opacity: .35; pointer-events: none;
  background-image: linear-gradient(rgba(184,154,82,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(184,154,82,.22) 1px, transparent 1px);
  background-size: 64px 64px; transform: perspective(700px) rotateX(64deg); transform-origin: 50% 0;
  -webkit-mask-image: radial-gradient(60% 70% at 55% 40%, #000, transparent 75%); mask-image: radial-gradient(60% 70% at 55% 40%, #000, transparent 75%); }

/* ----- copy column ----- */
.rs-fx__copy { position: absolute; z-index: 6; left: var(--gutter); top: 50%; transform: translateY(-50%); width: min(30vw, 420px); }
.rs-fx__eyebrow { display: block; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); }
.rs-fx__h { margin: 16px 0 0; font-family: var(--head); font-weight: 300; font-size: clamp(32px, 3.6vw, 60px); line-height: 1.06; letter-spacing: -1px; color: var(--cream); }
.rs-fx__sub { margin: 18px 0 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.7; color: var(--taupe); max-width: 30em; }
.rs-fx__panel { position: relative; margin-top: clamp(26px, 4vh, 46px); min-height: 190px; }
.rs-fx__slide { position: absolute; left: 0; top: 0; right: 0; opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .8s var(--ease); pointer-events: none; }
.rs-fx__slide.is-on { opacity: 1; transform: none; pointer-events: auto; }
.rs-fx__no { display: block; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); }
.rs-fx__name { margin: 8px 0 0; font-family: var(--head); font-weight: 300; font-size: clamp(26px, 2.6vw, 42px); line-height: 1.1; color: var(--cream); }
.rs-fx__meta { margin: 10px 0 0; font-size: 14px; letter-spacing: .5px; color: var(--sand); }
.rs-fx__facts { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rs-fx__facts li { font-size: 13px; line-height: 1.5; letter-spacing: .4px; color: var(--sand); }
.rs-fx__facts li::before { content: '—'; margin-right: 10px; color: var(--gold); }
.rs-fx__mode { display: inline-flex; gap: 6px; margin-top: 18px; border: 1px solid var(--line-l); border-radius: 100px; padding: 4px; }
.rs-fx__mode span { padding: 7px 16px; border-radius: 100px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--mist); transition: background-color .4s, color .4s; }
.rs-fx__mode span.is-on { background: var(--gold); color: var(--navy); }
.rs-fx__dl { margin-top: 26px; }
.rs-fx__cta { display: none; position: absolute; z-index: 7; left: var(--gutter); bottom: 6vh; display: flex; flex-wrap: wrap; gap: 12px; opacity: 0; visibility: hidden; }
.rs-fx__cta .rs-btn:not(.rs-btn--solid) { border-color: rgba(248,246,240,.5); color: var(--cream); }
.rs-fx__cta .rs-btn:not(.rs-btn--solid):hover { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.rs-fx__hint { display: none; position: absolute; z-index: 6; left: var(--gutter); bottom: 5vh; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--mist); display: flex; align-items: center; gap: 12px; }
.rs-fx__hint i { display: block; width: 1px; height: 38px; background: var(--line-l); position: relative; overflow: hidden; }
.rs-fx__hint i::after { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: var(--gold); animation: fx-cue 2.2s var(--ease) infinite; }
@keyframes fx-cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* progress ticks */
.rs-fx__ticks { display: none; position: absolute; z-index: 6; right: calc(var(--gutter) + 38px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 14px; }
.rs-fx__ticks i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(229,222,209,.35); transition: background-color .4s, border-color .4s, transform .5s var(--ease); }
.rs-fx__ticks i.is-on { background: var(--gold); border-color: var(--gold); transform: scale(1.5); }

/* ----- the 3D world ----- */
.rs-fx__world { position: absolute; z-index: 3; left: 34vw; right: 4vw; top: 0; bottom: 0; perspective: 2100px; perspective-origin: 50% 38%; }
.rs-fx__tilt { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.rs-fx__stack { position: absolute; left: 50%; top: 52%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.rs-fx__plate { position: absolute; left: 0; top: 0; transform-style: preserve-3d; will-change: transform, opacity; }
.rs-fx__plate picture, .rs-fx__plate img { display: block; width: 100%; height: 100%; }
.rs-fx__plate img { object-fit: contain; filter: drop-shadow(0 26px 30px rgba(0,0,0,.5)); }
.rs-fx__plate::after { content: ''; position: absolute; inset: -3%; border: 1px solid var(--gold); border-radius: 6px; opacity: 0; transition: opacity .5s; pointer-events: none; }
.rs-fx__plate.is-hot::after { opacity: .85; box-shadow: 0 0 40px rgba(184,154,82,.4); }
.rs-fx__plate.is-hot img { filter: drop-shadow(0 26px 30px rgba(0,0,0,.5)) brightness(1.12) saturate(1.1); }
.rs-fx__tag { position: absolute; left: 100%; top: 50%; margin-left: 34px; transform: translateY(-50%); white-space: nowrap; font-family: var(--head); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--cream); display: flex; align-items: center; gap: 12px; opacity: 0; }
.rs-fx__tag::before { content: ''; width: 46px; height: 1px; background: var(--gold); }
.rs-fx__tag b { color: var(--gold); font-weight: 500; }

/* lifted residences */
.rs-fx__lifts { position: absolute; left: 34vw; right: 4vw; top: 0; bottom: 0; z-index: 4; perspective: 1800px; pointer-events: none; }
.rs-fx__flat { position: absolute; left: 50%; top: 52%; transform-style: preserve-3d; will-change: transform, opacity; pointer-events: auto; cursor: pointer; opacity: 0; }
.rs-fx__card { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.rs-fx__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.rs-fx__face--back { transform: rotateY(180deg); }
.rs-fx__face picture, .rs-fx__face img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.rs-fx__face img { object-fit: contain; filter: drop-shadow(0 34px 36px rgba(0,0,0,.55)); }
.rs-fx__face--back .rs-fx__plan { position: relative; display: inline-block; max-width: 100%; max-height: 100%; }
.rs-fx__face--back .rs-fx__plan img { width: 100%; height: 100%; }
.rs-fx__pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); border: 1px solid var(--gold); color: var(--gold); font-family: var(--head); font-size: 10px; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.rs-fx__pin.is-entry { width: auto; height: auto; padding: 3px 8px; margin: 0; transform: translate(-50%, -50%); border-radius: 100px; font-size: 8px; letter-spacing: 2px; }
.rs-fx__glow { position: absolute; left: 50%; bottom: -6%; width: 74%; height: 12%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); filter: blur(8px); }
.rs-fx__flatname { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 14px); font-family: var(--head); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--cream); white-space: nowrap; opacity: .0; transition: opacity .5s; }
.rs-fx__flat.is-sel .rs-fx__flatname { opacity: 1; }

/* ----- phone / tablet: same scene, stacked (text on top, the floors below) ----- */
.rs-fx__m { display: none !important; }
@media (max-width: 899.98px) {
  .rs-fx__stage { height: auto; min-height: 100svh; overflow: hidden; padding: 96px 0 40px; display: flex; flex-direction: column; }
  .rs-fx__copy { position: relative; left: auto; top: auto; transform: none; width: auto; padding: 0 20px; }
  .rs-fx__panel { min-height: 0; margin-top: 22px; }
  .rs-fx__world { position: relative; left: 0; right: 0; top: auto; bottom: auto; width: 100%; height: clamp(460px, 134vw, 740px); margin-top: 8px; perspective: 1500px; }
  .rs-fx__lifts { left: 0; right: 0; }
  .rs-fx__cta { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rs-fx__hint i::after { animation: none; } }

.rs-fx__world[data-floorplans], .rs-fx__mview[data-floorplans] { cursor: pointer; }
.rs-fx__world:focus-visible, .rs-fx__mview:focus-visible { outline: 1px solid var(--gold); outline-offset: -6px; }

/* hide the old progress dots, scroll hint and the hidden CTA row for good (later display:flex rules above were overriding display:none) */
.rs-fx__ticks, .rs-fx__hint, .rs-fx__cta { display: none !important; }
