/* Tu escaparate, el edificio de los sectores, el teléfono sin contestar y la última puerta. */

/* ---------- 1 · tu escaparate ---------- */
#tu-rotulo { font-size: calc(34px * var(--s, 1) * var(--rf, 1)); }
.placa--tuyo { width: min(1040px, calc(100% - 28px)); }
.tu-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tu-form input, .tu-form select { font: 500 .95rem "Inter Tight", sans-serif; color: var(--texto); background: #1c1612; border: 1px solid rgba(255,255,255,.24); border-radius: 99px; padding: .62rem 1rem; min-width: 0; }
.tu-form input { width: 230px; }
.tu-form input:focus-visible, .tu-form select:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 2px; }
.tu-form .boton { padding: .66rem 1.2rem; font-size: .9rem; box-shadow: none; white-space: nowrap; }
.mini { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; background: #14100d; color: var(--texto); text-align: left; opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.lleno .mini { opacity: 1; visibility: visible; }
.lleno .tu-vacio { visibility: hidden; }
.mini-barra { flex: none; display: flex; align-items: center; justify-content: space-between; gap: calc(12px * var(--s, 1)); padding: calc(10px * var(--s, 1)) calc(15px * var(--s, 1)); border-bottom: 1px solid rgba(217,170,85,.3); }
.mini-barra b { font: 600 max(12px, calc(18px * var(--s, 1))) "Fraunces", serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-barra > span { display: flex; flex: none; gap: calc(11px * var(--s, 1)); font-size: max(8px, calc(11px * var(--s, 1))); color: var(--suave); }
.mini-foto { position: relative; flex: 1; overflow: hidden; }
.mini-foto > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: acerca 12s ease-in-out infinite alternate; }
.mini-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,6,.1) 30%, rgba(10,8,6,.86)); }
.mini-foto > div { position: absolute; z-index: 1; left: 6%; right: 6%; bottom: 7%; }
.escaparate--tuyo .mini-foto p { font: 500 max(17px, calc(40px * var(--s, 1)))/1.08 "Fraunces", serif; color: var(--texto); text-shadow: 0 2px 14px rgba(0,0,0,.8); }
.mini-foto i { display: inline-block; font-style: normal; font-weight: 700; font-size: max(10px, calc(14px * var(--s, 1))); color: #1b140a; background: linear-gradient(180deg, var(--oro-claro), var(--oro)); border-radius: 99px; padding: .55em 1.2em; margin-top: calc(11px * var(--s, 1)); }
.mini-aviso { position: absolute; z-index: 2; right: 3%; top: 4%; font-size: max(8px, calc(9.5px * var(--s, 1))); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; background: rgba(10,7,5,.72); border: 1px solid rgba(255,255,255,.28); border-radius: 99px; padding: .25em .7em; }
@keyframes acerca { to { transform: scale(1.09); } }

/* ---------- 2 · el edificio de los sectores ---------- */
.torre { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid rgba(217,170,85,.3); box-shadow: 0 50px 110px rgba(0,0,0,.6); }
.torre picture, .torre-foto { display: block; width: 100%; height: auto; }
.ventanas { list-style: none; position: absolute; inset: 0; }
.ventanas li { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); }
.ventanas button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: var(--texto); font: inherit; cursor: pointer; }
.luz { position: absolute; inset: 0; opacity: 0; box-shadow: 0 0 46px 8px rgba(255,180,80,.42); transition: opacity 1s ease var(--dc, 0s); }
.luz::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, transparent calc(50% - 1px), rgba(42,26,14,.85) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(180deg, transparent 30%, #2a1a0e 30% calc(30% + 3px), transparent calc(30% + 3px)); box-shadow: inset 0 0 0 3px #2a1a0e, inset 0 0 16px rgba(60,30,5,.4); }
.luz img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(1.22) sepia(.14) saturate(1.12); }
.encendida .luz { opacity: 1; }
.letrero { position: absolute; z-index: 2; left: 50%; top: calc(100% + 9px); transform: translateX(-50%); display: flex; align-items: center; gap: .5rem; white-space: nowrap; padding: .42rem .85rem; border-radius: 12px; background: rgba(14,10,7,.88); border: 1px solid rgba(217,170,85,.28); box-shadow: 0 8px 20px rgba(0,0,0,.5); color: var(--suave); transition: color .6s, border-color .6s, background .25s; }
.letrero svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--oro-claro); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.letrero b { font: 500 1rem "Fraunces", serif; }
.encendida .letrero { color: var(--texto); border-color: rgba(217,170,85,.7); }
.ventanas button:hover .letrero, .ventanas button:focus-visible .letrero { background: linear-gradient(180deg, var(--oro-claro), var(--oro)); color: #1b140a; }
.ventanas button:hover .letrero svg, .ventanas button:focus-visible .letrero svg { stroke: #1b140a; }
.ventanas button:focus-visible { outline: 3px solid var(--oro-claro); outline-offset: 6px; }
.torre-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.5rem; }
.torre-pie p { flex: 1 1 320px; min-height: 3.2em; color: var(--texto); text-shadow: 0 1px 12px rgba(0,0,0,.8); }

.ficha { margin: auto; width: min(800px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto; padding: 0; border-radius: 26px; border: 1px solid rgba(217,170,85,.5); background: #15100c; color: var(--texto); box-shadow: 0 50px 120px rgba(0,0,0,.7); }
.ficha[open] { display: grid; grid-template-columns: .85fr 1.15fr; animation: sube .35s ease; }
.ficha::backdrop { background: rgba(6,4,3,.76); }
.ficha > img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.ficha-cuerpo { padding: clamp(20px, 3.4vw, 36px); }
.ficha h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 1rem; }
.ficha dl div { padding: .75rem 0; border-top: 1px solid rgba(255,255,255,.12); }
.ficha dt { color: var(--oro); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.ficha dd { font-size: .98rem; line-height: 1.45; }
.ficha .botones { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.ficha form { position: absolute; right: 12px; top: 12px; }
.ficha-cerrar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(10,7,5,.75); color: var(--texto); font-size: 1.5rem; line-height: 1; cursor: pointer; }

/* ---------- 3 · el teléfono sin contestar ---------- */
.local-tel { position: relative; aspect-ratio: 16 / 11; overflow: hidden; margin: calc(-1 * clamp(24px, 3vw, 44px)) calc(-1 * clamp(24px, 3vw, 44px)) 1.4rem; border-radius: 27px 27px 0 0; text-align: left; }
.local-tel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.local-tel > .lt-luz { opacity: 0; transition: opacity 1.1s ease; }
.local-tel.on > .lt-luz { opacity: 1; }
.local-tel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 62%, rgba(18,13,9,.92)); }
.lt-aros { position: absolute; left: 50.7%; top: 69%; }
.lt-aros i { position: absolute; left: -80px; top: -80px; width: 160px; height: 160px; border-radius: 50%; border: 2px solid rgba(255,170,100,.85); opacity: 0; animation: suena 1.9s ease-out infinite; }
.lt-aros i:nth-child(2) { animation-delay: .35s; } .lt-aros i:nth-child(3) { animation-delay: .7s; }
.on .lt-aros { display: none; }
@keyframes suena { 0% { transform: scale(.3); opacity: .95; } 100% { transform: scale(1.35); opacity: 0; } }
.lt-hoy { position: absolute; z-index: 2; left: 14px; top: 14px; display: flex; align-items: center; gap: .6rem; padding: .35rem .95rem .35rem .4rem; border-radius: 99px; background: rgba(12,9,7,.88); border: 1px solid rgba(255,255,255,.16); font-size: .82rem; }
.lt-hoy b { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 .4rem; border-radius: 99px; background: #c2483a; font: 600 1.25rem "Fraunces", serif; font-variant-numeric: tabular-nums; transition: background .5s; }
.on .lt-hoy b { background: #2f8a5b; }
.lt-avisos { position: absolute; z-index: 2; right: 12px; top: 66px; display: grid; gap: .35rem; list-style: none; justify-items: end; }
.lt-avisos li { display: flex; align-items: center; gap: .8rem; padding: .34rem .7rem; border-radius: 10px; background: rgba(12,9,7,.88); border-left: 3px solid #e0604c; font-size: .76rem; font-weight: 600; animation: sube .4s ease; }
.lt-avisos time { color: var(--suave); font-weight: 400; font-variant-numeric: tabular-nums; }
.on .lt-avisos li { border-left-color: #5fbf8a; }
.lt-boton { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; }
#lt-nota { margin-top: .4rem; color: #a5e3bd; font-weight: 600; }
#lt-nota[hidden] { display: none; }

/* en pantallas anchas la foto es más baja para que la cuenta quepa de un vistazo */
@media (min-width: 981px) {
  .local-tel { aspect-ratio: 16 / 9; }
  .local-tel > img { object-position: center 72%; }
  .lt-aros { top: 66%; }
  .lt-boton { bottom: 8px; padding: .62rem 1.2rem; }
  .resultado .grande { font-size: clamp(3rem, 5vw, 4.4rem); }
  .resultado .comparar { margin: .9rem 0; }
}

/* portátiles bajos: el edificio entero y la cuenta caben en la pantalla */
@media (min-width: 821px) { .torre { max-width: max(760px, calc((100vh - 110px) * 1.7708)); margin-inline: auto; } }
@media (min-width: 981px) and (max-height: 760px) { .local-tel { aspect-ratio: 11 / 5; } .lt-aros { top: 64%; } .resultado .comparar { margin: .6rem 0; } }

/* ---------- 4 · la última puerta ---------- */
.final { position: relative; isolation: isolate; }
.final-fija { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: #0d0b10; }
.final-espacio { height: 270vh; margin-top: -100vh; margin-top: -100lvh; pointer-events: none; }
.pf-escena { position: absolute; will-change: transform; }
.pf-escena > img { display: block; width: 100%; height: 100%; }
.pf-marca { position: absolute; left: 50%; top: 17%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: calc(9px * var(--s, 1)); white-space: nowrap; font: 600 calc(32px * var(--s, 1))/1 "Fraunces", serif; color: #ffe3a6; text-shadow: 0 0 10px rgba(255,190,100,.7), 0 0 34px rgba(255,170,80,.45), 0 2px 3px rgba(0,0,0,.9); }
.pf-marca img { height: calc(38px * var(--s, 1)); width: auto; filter: drop-shadow(0 0 10px rgba(255,190,100,.6)); }
.pf-dentro { position: absolute; inset: 0; overflow: hidden; visibility: hidden; }
.pf-dentro img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf-hojas { pointer-events: none; }
.pf-vano { position: absolute; }
.hoja { position: absolute; top: 0; width: 50%; height: 100%; background: url("img/ideas/puerta.webp") no-repeat; }
.hoja--izq { left: 0; transform-origin: left center; }
.hoja--der { left: 50%; transform-origin: right center; }
.hoja::after { content: ""; position: absolute; inset: 0; background: #060403; opacity: var(--sombra, 0); }
.pf-velo { position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, rgba(14,11,9,.9) 0%, rgba(14,11,9,.62) 46%, rgba(14,11,9,.18) 100%); }
.pf-texto { position: absolute; left: 0; right: 0; bottom: max(6vh, 34px); padding: 0 16px; text-align: center; font: 500 clamp(1.9rem, 4.2vw, 3.6rem)/1.12 "Fraunces", serif; text-shadow: 0 4px 30px #000, 0 0 12px rgba(0,0,0,.9); }
.final .contacto::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 22vh; background: linear-gradient(180deg, transparent, #14100d); }

@media (max-width: 820px) {
  .tu-form { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tu-form input { grid-column: 1 / -1; width: 100%; }
  .tu-form input, .tu-form select { font-size: 16px; padding: .5rem .85rem; width: 100%; }   /* 16px: el iPhone no hace zoom al escribir */
  .tu-form .boton { padding: .5rem .6rem; font-size: .86rem; }
  .placa--tuyo p { display: none; }
  .mini-barra > span span:nth-child(n+3) { display: none; }

  .torre { width: min(100vw, 520px); margin-inline: calc(50% - min(50vw, 260px)); border: 0; border-radius: 0; }
  .torre::before, .torre::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; height: 6%; pointer-events: none; background: linear-gradient(180deg, #14100d, transparent); }
  .torre::before { top: 0; } .torre::after { bottom: 0; transform: scaleY(-1); }
  .ventanas { z-index: 2; }
  .ventanas li { left: var(--mx); top: var(--my); width: var(--mw); height: var(--mh); }
  .luz { transition-delay: var(--dm, 0s); box-shadow: 0 0 30px 5px rgba(255,180,80,.42); }
  .letrero { top: calc(100% + 5px); gap: .35rem; padding: .26rem .5rem; border-radius: 9px; white-space: normal; width: max-content; max-width: min(138px, 35vw); text-align: center; line-height: 1.12; justify-content: center; }
  .letrero svg { width: 15px; height: 15px; }
  .letrero b { font-size: .78rem; }

  .lt-hoy { font-size: .74rem; left: 10px; top: 10px; }
  .lt-hoy b { min-width: 32px; height: 32px; font-size: 1.05rem; }
  .lt-avisos { right: 8px; top: 54px; }
  .lt-avisos li { font-size: .68rem; padding: .26rem .55rem; }
  .lt-aros i { left: -55px; top: -55px; width: 110px; height: 110px; }
  .lt-boton { font-size: .86rem; padding: .7rem 1.2rem; bottom: 10px; }

  .pf-dentro img { object-position: 32% center; }
  .pf-velo { background: rgba(14,11,9,.66); }
}
@media (max-width: 680px) {
  .ficha[open] { grid-template-columns: 1fr; }
  .ficha > img { height: 170px; min-height: 0; }
}
@media (max-height: 640px) { .placa--tuyo p { display: none; } }
@media (max-height: 520px) { .placa--tuyo h3 { display: none; } }
