/* LUM360 · experiencias inmersivas 360° v3 · capa 2 de 4 · layout: base de página, hero fijo por capítulos y composición de cada sección */

html:has(body.im-page) { overflow-x: clip; scroll-padding-top: calc(72px + 1rem); }
@media (prefers-reduced-motion: reduce) { html:has(body.im-page) { scroll-behavior: auto; } }

body.im-page { overflow-x: clip; color: var(--ws-ink); background: #07080a; font-family: var(--ws-font-body); }
.im-page main { position: relative; z-index: var(--ws-z-base); display: block; background: #07080a; }
.im-page main *, .im-page main *::before, .im-page main *::after { box-sizing: border-box; }
.im-page main :where(h1, h2, h3, h4) { min-width: 0; margin: 0; color: var(--ws-ink); font-family: var(--ws-font-display); font-weight: 500; letter-spacing: -0.015em; overflow-wrap: anywhere; text-wrap: balance; }
.im-page main :where(p, ul, ol, figure, dl, dd) { margin: 0; padding: 0; }
.im-page main :where(ul, ol) { list-style: none; }
.im-page main :where(img, video, canvas, svg) { display: block; max-width: 100%; }
.im-page main :where(a) { color: inherit; }
.im-page main :where(button) { font: inherit; }
.im-page main :focus-visible { outline: 2px solid var(--ws-focus); outline-offset: 3px; }

.im-skip { position: fixed; z-index: 3000; top: 0.5rem; left: 0.5rem; padding: 0.6rem 1rem; transform: translateY(-200%); color: #111; background: #f2d675; font-weight: 600; }
.im-skip:focus { transform: none; }

.im-shell { width: var(--ws-shell); margin-inline: auto; }
.im-section { position: relative; padding-block: clamp(4.5rem, 9vw, 8rem); background: var(--ws-paper); }
.im-section--tint { background: var(--ws-paper-2); }
.im-head { display: grid; gap: var(--ws-space-md); margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.im-head__body { display: grid; gap: var(--ws-space-md); max-width: 46rem; color: var(--ws-muted); font-size: var(--ws-text-md); line-height: 1.6; }
.im-head__body strong { color: var(--ws-ink); font-weight: 600; }
@media (min-width: 60rem) { .im-head--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--ws-space-2xl); align-items: end; } }

/* ============================ HERO FIJO POR CAPÍTULOS ============================ */
.im-hero { --p: 0; position: relative; height: 400svh; background: #040405; }
.im-hero__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; }
.im-hero__stage { position: absolute; inset: 0; z-index: -4; }
.im-hero__stage .ws-stage { border-radius: 0; background: #040405; }
.im-hero__stage .ws-stage__poster { background: #040405 url("/assets/img/real-estate-tours/pano/olimpo5-poster.webp") center / cover no-repeat; }
.im-hero__veil { position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 40%, oklch(5% 0.01 82 / 0.7) 100%),
    linear-gradient(90deg, oklch(5% 0.01 82 / 0.82) 0%, oklch(5% 0.01 82 / 0.38) 38%, transparent 70%),
    linear-gradient(0deg, oklch(5% 0.01 82 / 0.8) 0%, transparent 38%); }
.im-hero[data-chapter="3"] .im-hero__veil { background: radial-gradient(120% 90% at 50% 50%, transparent 30%, oklch(5% 0.01 82 / 0.75) 100%), linear-gradient(0deg, oklch(5% 0.01 82 / 0.85) 0%, transparent 34%); }
.im-hero__leak { position: absolute; inset: -20%; z-index: -2; pointer-events: none; mix-blend-mode: screen; opacity: 0.5;
  background: radial-gradient(30% 22% at 78% 22%, oklch(80% 0.15 70 / 0.5), transparent 70%), radial-gradient(26% 26% at 14% 82%, oklch(70% 0.12 230 / 0.28), transparent 70%);
  animation: im-leak 14s ease-in-out infinite alternate; }
@keyframes im-leak { to { transform: translate3d(4%, -3%, 0) scale(1.08); opacity: 0.32; } }
.im-hero__grain { position: absolute; inset: -50%; z-index: -1; opacity: 0.09; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: im-grain 0.9s steps(6) infinite; }
@keyframes im-grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.im-hero__bar { position: absolute; left: 0; right: 0; z-index: 6; background: #000; pointer-events: none; height: max(0px, calc(9svh - var(--p) * 60svh)); transition: height 0.2s linear; }
.im-hero__bar--top { top: 0; }
.im-hero__bar--bottom { bottom: 0; }

.im-ch { position: absolute; z-index: 5; left: max(1.5rem, calc((100% - 74rem) / 2)); bottom: 15svh; display: grid; gap: var(--ws-space-md); width: min(44rem, calc(100% - 3rem)); opacity: 0; transform: translateY(2.2rem); filter: blur(10px); pointer-events: none; transition: opacity 0.7s var(--ws-ease-out), transform 0.9s var(--ws-ease-out), filter 0.7s var(--ws-ease-out); }
.im-hero[data-chapter="0"] .im-ch[data-ch="0"], .im-hero[data-chapter="1"] .im-ch[data-ch="1"], .im-hero[data-chapter="2"] .im-ch[data-ch="2"], .im-hero[data-chapter="3"] .im-ch[data-ch="3"] { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.im-ch--end { left: 50%; bottom: 10svh; transform: translate(-50%, 2.2rem); text-align: center; justify-items: center; width: min(54rem, calc(100% - 3rem)); }
.im-hero[data-chapter="3"] .im-ch--end { transform: translate(-50%, 0); }
.im-hero__title { font-size: clamp(3.6rem, 12.5vw, 10.5rem); line-height: 0.86; letter-spacing: -0.045em; }
.im-hero__title em { display: block; color: var(--ws-accent-strong); font-weight: 400; }
.im-ch h2 { font-size: clamp(2.2rem, 5.4vw, 4.6rem); line-height: 0.98; letter-spacing: -0.03em; }
.im-ch h2 em { color: var(--ws-accent-strong); font-weight: 400; }
.im-hero__lead { max-width: 34rem; color: oklch(90% 0.01 82); font-size: clamp(1rem, 0.7vw + 0.85rem, 1.25rem); line-height: 1.55; }
.im-hero__rail { position: absolute; z-index: 5; right: max(1.2rem, calc((100% - 74rem) / 2)); top: 50%; display: grid; gap: 0.9rem; transform: translateY(-50%); }
.im-hero__rail i { position: relative; display: block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: oklch(100% 0 0 / 0.3); transition: background 0.4s, transform 0.4s, box-shadow 0.4s; }
.im-hero[data-chapter="0"] .im-hero__rail i:nth-child(1), .im-hero[data-chapter="1"] .im-hero__rail i:nth-child(2), .im-hero[data-chapter="2"] .im-hero__rail i:nth-child(3), .im-hero[data-chapter="3"] .im-hero__rail i:nth-child(4) { background: var(--ws-accent-fill, var(--ws-accent-strong)); transform: scale(1.7); box-shadow: 0 0 1rem var(--ws-accent-strong); }
.im-hero__cue { position: absolute; z-index: 5; left: 50%; bottom: 3.2svh; display: grid; justify-items: center; gap: 0.5rem; transform: translateX(-50%); color: oklch(100% 0 0 / 0.7); font-family: var(--im-mono); font-size: 0.625rem; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none; transition: opacity 0.5s; }
.im-hero[data-chapter="3"] .im-hero__cue, .im-hero[data-chapter="2"] .im-hero__cue { opacity: 0; pointer-events: none; }
.im-hero__cue span { width: 1px; height: 2.6rem; background: linear-gradient(180deg, var(--ws-accent-fill, var(--ws-accent-strong)), transparent); animation: im-cue 1.8s var(--ws-ease-out) infinite; transform-origin: top; }
@keyframes im-cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* HUD */
.im-hud { position: absolute; inset: 0; z-index: 4; pointer-events: none; font-family: var(--im-mono); color: oklch(100% 0 0 / 0.82); }
.im-hud__bracket { position: absolute; width: 1.8rem; height: 1.8rem; border: 0 solid oklch(100% 0 0 / 0.7); }
.im-hud__bracket--tl { top: calc(var(--ws-nav-h) + 1.2rem); left: 1.2rem; border-top-width: 1px; border-left-width: 1px; }
.im-hud__bracket--tr { top: calc(var(--ws-nav-h) + 1.2rem); right: 1.2rem; border-top-width: 1px; border-right-width: 1px; }
.im-hud__bracket--bl { bottom: 1.2rem; left: 1.2rem; border-bottom-width: 1px; border-left-width: 1px; }
.im-hud__bracket--br { bottom: 1.2rem; right: 1.2rem; border-bottom-width: 1px; border-right-width: 1px; }
.im-hud__badge { position: absolute; top: calc(var(--ws-nav-h) + 1.5rem); left: 3.4rem; display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; }
.im-hud__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--im-rec); animation: im-blink 1.4s steps(1) infinite; }
@keyframes im-blink { 50% { opacity: 0.2; } }
.im-hud__compass { position: absolute; top: calc(var(--ws-nav-h) + 1.5rem); right: 3.4rem; display: grid; justify-items: end; gap: 0.15rem; font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; }
.im-hud__compass b { font-size: 1.15rem; font-weight: 500; letter-spacing: 0.06em; }
.im-hud__hint { position: absolute; left: 50%; bottom: 3.4svh; transform: translateX(-50%); padding: 0.4rem 0.9rem; border: 1px solid oklch(100% 0 0 / 0.25); border-radius: 999px; background: var(--im-glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; transition: opacity 0.5s; display: none; }
.im-hero[data-chapter="0"] .im-hud__hint { display: block; bottom: 11svh; }
.im-hero:not([data-chapter="0"]) .im-hud__hint { opacity: 0; }

@media (max-width: 59.999rem) {
  .im-hero { height: 340svh; }
  .im-ch { bottom: 12svh; }
  .im-hero__veil { background: radial-gradient(120% 90% at 50% 40%, transparent 30%, oklch(5% 0.01 82 / 0.7) 100%), linear-gradient(0deg, oklch(5% 0.01 82 / 0.92) 0%, oklch(5% 0.01 82 / 0.5) 45%, transparent 75%); }
  .im-hero__rail { display: none; }
  .im-hud__badge { left: 2.8rem; } .im-hud__compass { right: 2.8rem; }
  .im-hero[data-chapter="0"] .im-hud__hint { bottom: 5svh; }
}
/* sin WebGL ni movimiento: el hero es una portada normal */
html[data-ws-hero="static"] .im-hero { height: auto; }
html[data-ws-hero="static"] .im-hero__pin { position: relative; min-height: 100svh; }
html[data-ws-hero="static"] .im-ch:not([data-ch="0"]), html[data-ws-hero="static"] .im-hero__rail, html[data-ws-hero="static"] .im-hud__hint { display: none; }
html[data-ws-hero="static"] .im-ch[data-ch="0"] { opacity: 1; transform: none; filter: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .im-hero__grain, .im-hero__leak, .im-hero__cue span { animation: none; } .im-ch { transition: none; } }

/* Cinta */
.im-ticker { position: relative; display: flex; border-block: 1px solid var(--im-line); background: linear-gradient(180deg, oklch(10% 0.01 82), oklch(8% 0.008 82)); overflow: hidden; }
.im-ticker__rows { position: relative; flex: 1; min-width: 0; padding-block: 1.1rem; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.im-ticker__row { display: flex; width: max-content; }
.im-ticker__group { display: flex; flex: none; gap: 0.7rem; padding-right: 0.7rem; animation: im-slide 60s linear infinite; }
.im-ticker:hover .im-ticker__group, .im-ticker:focus-within .im-ticker__group, .im-ticker:focus .im-ticker__group { animation-play-state: paused; }
@keyframes im-slide { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .im-ticker__rows { -webkit-mask-image: none; mask-image: none; } .im-ticker__row { width: auto; flex-wrap: wrap; } .im-ticker__group { flex-wrap: wrap; animation: none; } .im-ticker__group[aria-hidden="true"] { display: none; } }

/* ============================ QUÉ ES 360 ============================ */
.im-cap__lead { max-width: 56rem; font-family: var(--ws-font-display); font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.18; color: var(--ws-ink); margin-bottom: clamp(2.5rem, 5vw, 4.5rem); text-wrap: pretty; }
.im-cap__lead strong { color: var(--ws-accent-strong); font-weight: 500; font-style: italic; }
.im-cap__work { display: grid; gap: var(--ws-space-lg); }
.im-cap__stage { position: sticky; top: calc(var(--ws-nav-h) + 0.5rem); z-index: 5; }
.im-cap__steps { display: grid; }
@media (min-width: 60rem) {
  .im-cap__work { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: var(--ws-space-2xl); align-items: start; }
  .im-cap__stage { top: calc(var(--ws-nav-h) + 2rem); }
}
.im-cap__where { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: clamp(2rem, 4vw, 3.5rem); }

/* ============================ CONCIERTO ============================ */
.im-venue__work { display: grid; gap: var(--ws-space-lg); min-width: 0; }
.im-venue__side { display: grid; gap: var(--ws-space-md); align-content: start; }
@media (min-width: 60rem) { .im-venue__work { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: var(--ws-space-xl); align-items: start; } }
.im-venue__ideas { display: grid; gap: var(--ws-space-md); margin-top: clamp(3rem, 6vw, 5rem); }
@media (min-width: 48rem) { .im-venue__ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .im-venue__ideas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.im-cases { display: grid; gap: var(--ws-space-lg); margin-top: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 48rem) { .im-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============================ FOTO + DRONE ============================ */
.im-viewer__work { display: grid; gap: var(--ws-space-lg); }
.im-viewer__cards { display: grid; gap: var(--ws-space-md); margin-top: var(--ws-space-lg); }
@media (min-width: 48rem) { .im-viewer__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ws-space-lg); } }

/* ============================ ENTREGABLES (horizontal) ============================ */
.im-hs { position: relative; overflow: hidden; padding-block: clamp(4.5rem, 9vw, 7rem); background: var(--ws-paper-2); }
.im-hs.is-pinned { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: 5rem 3rem; }
.im-hs__head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.im-hs__track { display: flex; gap: var(--ws-space-lg); padding: 0.5rem max(1.5rem, calc((100vw - 74rem) / 2)) 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.im-hs.is-pinned .im-hs__track { overflow: visible; scroll-snap-type: none; width: max-content; will-change: transform; }
.im-hs__bar { height: 2px; margin: var(--ws-space-md) max(1.5rem, calc((100vw - 74rem) / 2)) 0; background: var(--ws-rule); display: none; }
.im-hs.is-pinned .im-hs__bar { display: block; }
.im-hs__bar i { display: block; height: 100%; width: calc(var(--h, 0) * 100%); background: var(--ws-accent-fill, var(--ws-accent-strong)); box-shadow: 0 0 1rem var(--ws-accent-strong); }

/* ============================ APLICA ============================ */
.im-needs__work { display: grid; gap: var(--ws-space-lg); }
@media (min-width: 60rem) { .im-needs__work { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--ws-space-xl); align-items: start; } }

/* ============================ PROCESO ============================ */
.im-proc { --fill: 0%; position: relative; display: grid; gap: var(--ws-space-lg); }
@media (min-width: 60rem) { .im-proc { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ws-space-lg); } }

/* ============================ FAQ ============================ */
.im-faq__grid { display: grid; gap: var(--ws-space-sm); max-width: 54rem; }

/* ============================ CIERRE ============================ */
.im-cta { position: relative; isolation: isolate; min-height: min(100svh, 56rem); display: grid; align-items: center; padding-block: clamp(5rem, 10vw, 9rem); overflow: hidden; background: #040405; }
.im-cta__stage { position: absolute; inset: 0; z-index: -2; }
.im-cta__stage .ws-stage { border-radius: 0; }
.im-cta__stage .ws-stage__poster { background: #040405 url("/assets/img/real-estate-tours/pano/olimpo5-poster.webp") center / cover no-repeat; }
.im-cta__veil { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(75% 75% at 50% 50%, oklch(5% 0.01 82 / 0.88), oklch(5% 0.01 82 / 0.45) 70%, transparent), linear-gradient(0deg, oklch(5% 0.01 82 / 0.7), transparent 40%); }
.im-cta__copy { display: grid; gap: var(--ws-space-md); justify-items: center; text-align: center; max-width: 52rem; margin-inline: auto; }
.im-cta__copy .im-h2 { font-size: clamp(2.4rem, 6vw, 5.2rem); line-height: 0.98; }
@media (max-width: 59.999rem) {
  .im-hud__badge { right: 8.5rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: 0.12em; }
  .im-hud__badge { display: block; }
  .im-hud__dot { display: inline-block; margin-right: 0.5rem; }
}
