/* «Remodelación y rediseño»: escena 3D fija a pantalla completa mientras se baja. */
.rm { position: relative; background: #0c1218; color: var(--marfil, #f8f7f3); }
.rm * { box-sizing: border-box; }
.rm-pin { position: relative; height: 460vh; }
.rm-escenario { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.rm-cine { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rm-fotos { position: absolute; inset: 0; opacity: 0; }
.rm-fotos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 46% 50%; display: block; }
.rm-despues { -webkit-mask-image: linear-gradient(90deg, #000 -6%, transparent 0%); mask-image: linear-gradient(90deg, #000 -6%, transparent 0%); }
.rm-escenario { touch-action: pan-y; }
.rm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rm-barriendo .rm-linea { opacity: 1; }
.rm-tirador, .rm-etq { opacity: 0; transition: opacity .35s ease; }
.rm-comparar .rm-tirador, .rm-comparar .rm-etq { opacity: 1; }
.rm-linea { transform: none; }
.rm-escenario::before, .rm-escenario::after { content: ''; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.rm-escenario::before { top: 0; height: 42%; background: linear-gradient(to bottom, rgb(8 12 16 / .78), rgb(8 12 16 / 0)); }
.rm-escenario::after { bottom: 0; height: 40%; background: linear-gradient(to top, rgb(8 12 16 / .82), rgb(8 12 16 / 0)); }

.rm-cabeza { position: absolute; z-index: 2; top: calc(var(--barra-alto, 56px) + 28px); left: var(--contenedor-padding-inline, 20px); right: var(--contenedor-padding-inline, 20px); max-width: 34rem; }
.rm-cabeza .eco-bajada { max-width: 40ch; }

/* textos por fase */
.rm-fases { position: absolute; z-index: 2; left: var(--contenedor-padding-inline, 20px); bottom: clamp(24px, 6vh, 56px); width: min(30rem, calc(100% - 40px)); display: grid; }
.rm-fase { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.22, .9, .28, 1); }
.rm-fase.activa { opacity: 1; transform: none; }
.rm-fase b { display: flex; align-items: center; gap: 10px; font: 600 12px/1.2 var(--f-display, inherit); letter-spacing: .16em; text-transform: uppercase; color: var(--acento, #8fb55a); }
.rm-fase b::after { content: ''; width: 40px; height: 1px; background: currentColor; }
.rm-fase strong { display: block; margin: 10px 0 6px; font: 700 clamp(24px, 3vw, 38px)/1.05 var(--f-display, inherit); text-transform: uppercase; letter-spacing: .01em; }
.rm-fase span { display: block; font-size: 16px; line-height: 1.5; color: rgb(248 247 243 / .78); max-width: 38ch; }

/* casa / apartamento y llamado */
.rm-control { position: absolute; z-index: 3; right: var(--contenedor-padding-inline, 20px); bottom: clamp(24px, 6vh, 56px); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.rm-tipos { display: flex; padding: 4px; border-radius: 999px; background: rgb(10 16 22 / .6); border: 1px solid rgb(248 247 243 / .16); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rm-tipos button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: rgb(248 247 243 / .72); font: 500 14px/1 var(--f-ui, inherit); cursor: pointer; transition: background .25s ease, color .25s ease; }
.rm-tipos button[aria-pressed="true"] { background: var(--marfil, #f8f7f3); color: #10161c; }

/* línea de antes y después */
.rm-linea { position: absolute; z-index: 2; top: 0; bottom: 0; left: 0; width: 0; opacity: 0; pointer-events: none; transition: opacity .4s ease; outline: none; }
.rm-comparar .rm-linea { opacity: 1; pointer-events: auto; }
.rm-linea::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: rgb(214 250 180 / .9); box-shadow: 0 0 18px rgb(180 240 140 / .8); }
.rm-tirador { position: absolute; top: 50%; left: 0; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--marfil, #f8f7f3); color: #10161c; display: grid; place-items: center; cursor: ew-resize; box-shadow: 0 8px 30px rgb(0 0 0 / .45); font-size: 18px; letter-spacing: -2px; touch-action: none; }
.rm-linea:focus-visible .rm-tirador { outline: 3px solid var(--acento, #6f8f3b); outline-offset: 3px; }
.rm-etq { position: absolute; top: calc(50% + 40px); padding: 6px 12px; border-radius: 999px; background: rgb(10 16 22 / .7); font: 600 11px/1 var(--f-display, inherit); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.rm-etq--antes { right: 14px; }
.rm-etq--despues { left: 14px; color: #d6fab4; }

.rm-sin3d .rm-pin { height: auto; }
.rm-sin3d .rm-escenario { position: relative; height: auto; min-height: 60vh; }
.rm-sin3d canvas, .rm-sin3d .rm-linea, .rm-sin3d .rm-tipos { display: none; }

@media (max-width: 47.99em) {
  .rm-pin { height: 420vh; }
  .rm-cabeza { top: calc(var(--barra-alto, 56px) + 16px); }
  .rm-cabeza .eco-bajada { display: none; }
  .rm-fases { bottom: 140px; }
  .rm-fase span { font-size: 14.5px; }
  .rm-control { left: var(--contenedor-padding-inline, 20px); right: auto; bottom: 18px; align-items: flex-start; gap: 8px; }
  .rm-control .boton-linea { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) { .rm-fase { transition: none; } }
