/* ============================================================
   FX.CSS — nivel de efectos (data-fx / data-scene en <html>)
   Cargar al final, después de extras.css.
   - Fundido entre el fondo ligero y el 3D
   - Escena ligera (sala nocturna en SVG/CSS, sin 3D)
   - Modo ligero: sin blur costoso, entradas escalonadas, pulido
   - Mapa bajo demanda (todos los niveles)
   ============================================================ */
@keyframes fxIn{from{opacity:0}}
@keyframes settle{from{transform:scale(1.14);opacity:0}}
@keyframes mote{0%{transform:translate3d(0,0,0);opacity:0}20%{opacity:.55}80%{opacity:.35}100%{transform:translate3d(var(--dx),-130px,0);opacity:0}}
@keyframes btnRip{to{transform:scale(1);opacity:0}}

/* ================ 3D: el canvas aparece con fundido cuando ya está listo ================ */
#scene-canvas{opacity:0;transition:opacity 1s var(--ease)}
html[data-scene="on"] #scene-canvas{opacity:1}
html[data-fx="lite"] #scene-canvas{display:none}
/* capas que solo tienen sentido sobre el 3D */
html:not([data-scene="on"]) .vignette,
html:not([data-scene="on"]) .grain,
html:not([data-scene="on"]) .aurora{display:none}
html[data-scene="on"] .vignette,html[data-scene="on"] .grain{animation:fxIn 1s var(--ease) backwards}
html[data-scene="on"] .aurora{animation:fxIn 1s var(--ease) backwards,drift 20s ease-in-out infinite alternate}

/* ================ ESCENA LIGERA: sala nocturna en SVG + gradientes ================ */
.lite-stage{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;contain:layout paint;
  background:radial-gradient(ellipse at 50% 30%,#141d31 0%,#0a0e18 70%)}
html[data-scene="on"] .lite-stage{opacity:0;visibility:hidden;transition:opacity 1s var(--ease),visibility 0s 1s}
.ls-hex{position:absolute;left:0;right:0;top:-130px;bottom:-130px;opacity:.07;will-change:transform;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='35'%3E%3Cpath fill='none' stroke='%23f3ede0' stroke-width='1' d='M-20 0l10-17.5h20L20 0 10 17.5h-20zM40 0l10-17.5h20L80 0 70 17.5H50zM-20 35l10-17.5h20L20 35 10 52.5h-20zM40 35l10-17.5h20L80 35 70 52.5H50zM10 17.5l10-17.5h20l10 17.5L40 35H20z'/%3E%3C/svg%3E");
  -webkit-mask-image:radial-gradient(ellipse at 50% 45%,transparent 22%,#000 82%);mask-image:radial-gradient(ellipse at 50% 45%,transparent 22%,#000 82%)}
/* la sala mantiene proporción 16:10 y se ancla abajo (como una foto "cover") */
.ls-room{position:absolute;inset:0;display:flex;justify-content:center;align-items:flex-end;will-change:transform}
.ls-room-in{flex:none;position:relative;width:160vh;height:100vh;width:max(100vw,125vh);height:max(62.5vw,78.125vh)}
.ls-room-in svg{position:absolute;inset:0;width:100%;height:100%;display:block}
.ls-moonlight,.ls-lamplight{will-change:opacity}
.ls-dust i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);border-radius:50%;background:#ffe0b0;opacity:0;animation:mote var(--d) ease-in-out var(--dl) infinite}
.ls-dust i:nth-child(3n){background:#a9c0ff}
.ls-vig{position:absolute;inset:0;
  background:linear-gradient(90deg,rgba(10,14,24,.72) 0,rgba(10,14,24,.4) 40%,transparent 70%),radial-gradient(ellipse at center,rgba(10,14,24,.2) 30%,rgba(10,14,24,.55) 78%,rgba(10,14,24,.92) 100%)}
@media(max-width:899px){.ls-vig{background:radial-gradient(ellipse at center,rgba(10,14,24,.45) 20%,rgba(10,14,24,.78) 80%,rgba(10,14,24,.94) 100%)}}

/* ================ MODO LIGERO ================ */
/* sin sombras de texto ni blur: lo más caro de pintar en equipos modestos */
html[data-fx="lite"]{--surface:rgba(14,19,32,.9)}
html[data-fx="lite"] body{text-shadow:none}
html[data-fx="lite"] .hero h1,html[data-fx="lite"] .sec-head h2,html[data-fx="lite"] .cta-final h2{text-shadow:none}
html[data-fx="lite"] nav,html[data-fx="lite"] .rating-card,html[data-fx="lite"] .rev-card,html[data-fx="lite"] .loc-card,
html[data-fx="lite"] .offer,html[data-fx="lite"] footer,html[data-fx="lite"] .marquee,html[data-fx="lite"] .toast,
html[data-fx="lite"] .lightbox{-webkit-backdrop-filter:none;backdrop-filter:none}
html[data-fx="lite"] footer{background:rgba(8,11,19,.94)}
html[data-fx="lite"] .marquee{background:rgba(10,14,24,.82)}
html[data-fx="lite"] .lightbox{background:rgba(10,14,24,.97)}
html[data-fx="lite"] .hexes i:nth-child(n+6){display:none}
/* estrellas: sin animar el texto recortado (repinta cada cuadro) */
html[data-fx="lite"] .rev-stars{animation:none}

/* barra de navegación que "asienta" al hacer scroll */
html[data-fx="lite"] nav{transition:background .35s var(--ease),border-color .35s var(--ease),box-shadow .35s var(--ease)}
html[data-fx="lite"] nav.is-scrolled{background:rgba(10,14,24,.95);border-bottom-color:var(--line);box-shadow:0 14px 30px -22px rgba(0,0,0,.95)}

/* entradas escalonadas */
html[data-fx="lite"] .reveal.has-sr{opacity:1;transform:none}
html[data-fx="lite"] .sr{opacity:0;transform:translate3d(0,18px,0);
  transition:opacity .7s var(--ease),transform .7s var(--ease),border-color .3s var(--ease);transition-delay:calc(var(--i,0)*75ms)}
html[data-fx="lite"] .reveal.in .sr{opacity:1;transform:none}
/* las fotos "se asientan" al aparecer */
html[data-fx="lite"] .reveal.in .gal-item img{animation:settle 1.1s var(--ease) backwards;animation-delay:calc(var(--i,0)*90ms)}
html[data-fx="lite"] .offer.in .offer-img img{animation:settle 1.2s var(--ease) .1s backwards}
/* la línea del kicker se dibuja */
html[data-fx="lite"] .reveal .kicker::before{transform:scaleX(0);transform-origin:left;transition:transform .8s var(--ease) .25s}
html[data-fx="lite"] .reveal.in .kicker::before{transform:none}

/* respuesta al toque / clic */
html[data-fx="lite"] .btn,html[data-fx="lite"] .chip{position:relative;overflow:hidden}
html[data-fx="lite"] .btn:active,html[data-fx="lite"] .chip:active{transform:scale(.97)}
.btn-rip{position:absolute;border-radius:50%;pointer-events:none;background:rgba(243,237,224,.32);transform:scale(0);animation:btnRip .6s var(--ease) forwards}
@media(hover:hover){
  html[data-fx="lite"] .rev-card:hover,html[data-fx="lite"] .rating-card:hover{border-color:var(--blue-400)}
}

/* modo ligero "bajo": si ni así rinde bien, se apagan los adornos que se repiten sin parar */
html[data-fx="lite"].fx-low .ls-dust,html[data-fx="lite"].fx-low .hexes,html[data-fx="lite"].fx-low .cursor-glow{display:none}
html[data-fx="lite"].fx-low .mq-track,html[data-fx="lite"].fx-low .contact-card,html[data-fx="lite"].fx-low .fs-wa::before,
html[data-fx="lite"].fx-low .open-pill::before,html[data-fx="lite"].fx-low .map-pin .pulse{animation:none}
html[data-fx="lite"].fx-low .sr{transition-delay:0s}
html[data-fx="lite"].fx-low .reveal.in .gal-item img,html[data-fx="lite"].fx-low .offer.in .offer-img img{animation:none}
html[data-fx="lite"].fx-low .ls-hex{display:none}

@media(prefers-reduced-motion:reduce){
  .ls-dust{display:none}
  html[data-fx="lite"] .sr{transition-delay:0s}
}

/* ================ MAPA BAJO DEMANDA ================ */
.map-facade{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;padding:26px 20px;text-align:center;
  background:radial-gradient(60% 50% at 50% 46%,rgba(74,114,209,.2),transparent 70%);transition:opacity .5s var(--ease),visibility 0s .5s}
.map-facade b{font-family:var(--font-head);font-size:1.15rem;font-weight:600}
.map-facade>span{font-size:.85rem;color:var(--cream-dim)}
.map-facade .btn{margin-top:14px}
.map-visual.is-live .map-facade{opacity:0;visibility:hidden;pointer-events:none}
.map-visual iframe:not([src]){visibility:hidden}

/* en pantallas verticales la sala se corre para que se vea la ventana y el sofá, no el borde de la lámpara */
@media(max-aspect-ratio:4/5){.ls-room-in{transform:translateX(-14%)}}

/* ================ 3D en celulares: el blur sobre un canvas vivo se recalcula en cada cuadro ================
   Es lo más pesado que había sobre el 3D en pantallas táctiles; se cambia por fondo sólido (casi igual a la vista). */
@media(pointer:coarse),(max-width:899px){
  html[data-fx="full"]{--surface:rgba(14,19,32,.88)}
  html[data-fx="full"] nav,html[data-fx="full"] .rating-card,html[data-fx="full"] .rev-card,html[data-fx="full"] .loc-card,
  html[data-fx="full"] .offer,html[data-fx="full"] footer,html[data-fx="full"] .marquee,html[data-fx="full"] .toast,
  html[data-fx="full"] .lightbox{-webkit-backdrop-filter:none;backdrop-filter:none}
  html[data-fx="full"] footer{background:rgba(8,11,19,.92)}
  html[data-fx="full"] .marquee{background:rgba(10,14,24,.8)}
}
