/* Estilo 2 — Noche.
 * La foto ocupa todo y la interfaz flota encima en vidrio oscuro. El panel de
 * amenidades vive fijo a la izquierda, siempre visible, y el menú completo se
 * abre a pantalla entera. Lo más inmersivo de los tres.
 */

:root {
  --negro: #08192c;
  --vidrio: rgba(7,20,35, .74);
  --vidrio-2: rgba(16,34,55, .82);
  --borde: rgba(255, 255, 255, .15);
  --claro: #eef2f3;
  --tenue: rgba(238, 242, 243, .72);
  --agua: #e5aa44;
  --sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* tema de las flechas */
  --pt-acento: #e5aa44;
  --pt-acento-txt: #0a1626;
  --pt-panel: rgba(7,20,35, .74);
  --pt-borde: rgba(255, 255, 255, .17);
  --pt-texto: #eef2f3;
  /* el riel izquierdo se corre para no chocar con el panel de amenidades */
  --pt-riel-izq: 356px;
  --pt-riel-der: 14px;
  --pt-velo: #08192c;

}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--negro); font-family: var(--sans); color: var(--claro); -webkit-font-smoothing: antialiased; }

#pano { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; }
.vineta {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(130% 95% at 50% 45%, transparent 44%, rgba(6,17,30,.5) 100%),
    linear-gradient(to bottom, rgba(6,17,30,.45), transparent 20%, transparent 66%, rgba(6,17,30,.68));
}

.cristal {
  background: var(--vidrio); border: 1px solid var(--borde);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-radius: 16px;
}

/* ------------------------------------------------------------- cabecera */

.rotulo {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top)); left: 16px; z-index: 12;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 17px 9px 13px; border-radius: 999px;
}
.rotulo__logo { height: 21px; width: auto; flex: none; display: block; }
.rotulo__m { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }

.mandos {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 12;
  display: flex; gap: 7px;
  /* Deja libre el ancho del rótulo: si no, en pantalla angosta se le encima. */
  max-width: calc(100vw - 150px); flex-wrap: wrap; justify-content: flex-end;
}
.past {
  appearance: none; cursor: pointer; color: var(--claro); font-family: var(--sans);
  font-size: 12px; font-weight: 500; height: 40px; padding: 0 15px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.past:hover { background: rgba(229,170,68,.18); border-color: rgba(229,170,68,.5); }
.past:active { transform: scale(.96); }
.past--ic { width: 40px; padding: 0; }
.past svg { width: 16px; height: 16px; }
.past--ppal { background: var(--agua); color: #0a1626; border-color: var(--agua); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; padding: 0 20px; }
.past--ppal:hover { background: #f2bd63; border-color: #f2bd63; color: #0a1626; }

.lengua { display: flex; padding: 4px 4px 4px 11px; border-radius: 999px; height: 40px; align-items: center; gap: 7px; }
/* El globo deja claro de un vistazo que ES|EN es el selector de idioma y no
   dos botones cualquiera. */
.lengua__globo { width: 16px; height: 16px; color: var(--tenue); flex: none; }
.lengua button {
  appearance: none; border: 0; background: transparent; cursor: pointer; color: var(--tenue);
  font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .1em;
  padding: 0 11px; height: 32px; border-radius: 999px; transition: background .18s, color .18s;
}
.lengua button[aria-pressed='true'] { background: var(--agua); color: #0a1626; }

/* -------------------------------------------- panel lateral: amenidades */

.panel {
  position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 11;
  width: 324px; max-height: 74vh; overflow-y: auto; padding: 22px;
}
.panel__cat { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--agua); margin-bottom: 9px; }
.panel__t { font-size: 26px; font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.panel__x { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--tenue); }

.amen { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--borde); }
.amen__t { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tenue); margin-bottom: 12px; }
.amen ul { list-style: none; display: grid; gap: 9px; }
.amen li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.42; }
.amen li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--agua); margin-top: 6px; }
.amen li:first-child { font-weight: 600; }


/* ------------------------------------------------------- firma de Nuva */

.firma-nuva {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 12; display: flex; align-items: center; gap: 9px;
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  background: var(--vidrio); border: 1px solid var(--borde);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  overflow: hidden; isolation: isolate;
}
.firma-nuva > * { position: relative; z-index: 2; }

/* La lucecita: un abanico dorado girando debajo, y encima una tapa que sólo
 * deja ver el borde. Se hace con un cuadrado que rota —no con un gradiente
 * animado— para que también gire en Safari viejo. */
.firma-nuva::before {
  content: ''; position: absolute; z-index: 0;
  left: 50%; top: 50%; width: 260%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(from 0deg, transparent 0 80%, rgba(229,170,68,.28) 89%,
              #e5aa44 95%, #fff3d8 97.5%, #e5aa44 99%, transparent 100%);
  animation: firma-giro 3.2s linear infinite;
}
.firma-nuva::after {
  content: ''; position: absolute; z-index: 1; inset: 1.5px;
  border-radius: inherit; background: rgba(7,20,35,.96);
}
@keyframes firma-giro { to { rotate: 360deg; } }

/* Si alguien pidió menos movimiento en su teléfono, la luz se queda quieta. */
@media (prefers-reduced-motion: reduce) {
  .firma-nuva::before { animation: none; }
}

.firma-nuva__pw {
  font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(238,242,243,.5);
}
.firma-nuva img { display: block; height: 28px; width: auto; }

/* ---------------------------------------------------------- barra abajo */

.barra {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 12;
  display: flex; align-items: center; gap: 5px; padding: 5px; border-radius: 999px;
}
.barra .past { border: 0; background: transparent; }
/* Va después del reset de arriba: si no, la regla `.barra .past` le gana por
 * especificidad al botón principal y lo deja transparente. */
.barra .past--ppal { background: var(--agua); color: #0a1626; }
.barra .past--ppal:hover { background: #f2bd63; }
.barra__c { font-size: 12px; color: var(--tenue); padding: 0 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- explorador */

.explorador {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 40; overflow-y: auto; padding: 80px 26px 40px;
  background: rgba(6,17,30,.9);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.explorador[data-abierto='true'] { opacity: 1; visibility: visible; }
.explorador__x { position: fixed; top: 16px; right: 16px; z-index: 42; }
.grupo + .grupo { margin-top: 40px; }
.grupo__t {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--agua);
  font-weight: 700; margin-bottom: 15px; padding-bottom: 11px; border-bottom: 1px solid var(--borde);
}
.rejilla { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.celda { appearance: none; border: 0; padding: 0; background: transparent; cursor: pointer; text-align: left; font-family: var(--sans); color: var(--claro); }
/* La caja se reserva con padding, no con aspect-ratio: así existe desde el primer
   pintado, antes de que baje la miniatura. Con aspect-ratio el alto dependía de la
   imagen; mientras cargaban las 34 la rejilla se reacomodaba sola y los títulos de
   categoría terminaban montados sobre los nombres de escena. */
.celda__m { display: block; position: relative; height: 0; padding-top: 50%; border-radius: 11px; overflow: hidden; background: #12171d; border: 1px solid transparent; transition: border-color .2s, transform .2s; }
.celda:hover .celda__m { transform: translateY(-3px); border-color: rgba(229,170,68,.55); }
.celda[aria-current='true'] .celda__m { border-color: var(--agua); box-shadow: inset 0 0 0 1px var(--agua); }
.celda__m img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.celda__n { display: block; margin-top: 8px; font-size: 13px; font-weight: 500; }

/* -------------------------------------------------------------- la villa */

.hoja {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.97); z-index: 52;
  width: min(520px, calc(100vw - 32px)); max-height: 82vh; overflow-y: auto; padding: 32px;
  background: var(--vidrio-2); border: 1px solid var(--borde); border-radius: 20px;
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  opacity: 0; visibility: hidden; transition: opacity .28s, transform .28s, visibility .28s;
}
.hoja[data-abierta='true'] { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.hoja h2 { font-size: 26px; font-weight: 500; letter-spacing: -.025em; margin-bottom: 20px; }
.hoja dt { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--agua); font-weight: 700; padding-top: 15px; }
.hoja dd { font-size: 14px; line-height: 1.55; padding: 5px 0 15px; border-bottom: 1px solid rgba(255,255,255,.09); }
.hoja__nota { margin-top: 18px; font-size: 12.5px; color: rgba(238,242,243,.45); line-height: 1.5; }
.hoja__x { position: absolute; top: 14px; right: 14px; }

.sombra { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 50; background: rgba(6,17,30,.6); opacity: 0; pointer-events: none; transition: opacity .28s; }
.sombra[data-abierta='true'] { opacity: 1; pointer-events: auto; }

/* -------------------------------------------------------------- portada */

.portada {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 70; display: grid; place-items: center;
  background: var(--negro); text-align: center; padding: 24px;
  transition: opacity .7s, visibility .7s;
}
.portada[data-oculta='true'] { opacity: 0; visibility: hidden; }
.portada__caja { max-width: 460px; width: 100%; }

/* Firma de Nuva en la portada. La del recorrido (.firma-nuva) queda tapada
 * mientras la portada está abierta, así que el crédito se repite acá. */
.portada__firma {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 34px auto 0; text-decoration: none; opacity: .75;
  transition: opacity .2s;
}
.portada__firma:hover { opacity: 1; }
.portada__firma-pw {
  font-size: 9.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(238,242,243,.5);
}
.portada__firma img { display: block; height: 34px; width: auto; }
.portada__logo { display: block; height: 150px; width: auto; margin: 0 auto 30px; }
.portada__lengua { position: absolute; top: calc(20px + env(safe-area-inset-top)); right: 20px; }
.portada__m { font-size: clamp(38px, 8.5vw, 68px); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.portada__m em { font-style: normal; color: var(--agua); }
.portada__s { margin: 14px 0 0; font-size: 11.5px; letter-spacing: .25em; text-transform: uppercase; color: var(--tenue); }

/* Cómo funciona: tres líneas antes de entrar. Un recorrido 360 no se explica
 * solo — sin esto mucha gente no descubre que la foto gira. */
.comofunciona {
  list-style: none; text-align: left; margin: 30px 0; display: grid; gap: 15px;
  padding: 20px 22px; border-radius: 14px;
  background: rgba(255,255,255,.045); border: 1px solid var(--borde);
}
.comofunciona li { display: flex; gap: 13px; align-items: flex-start; }
.comofunciona svg { width: 21px; height: 21px; flex: none; color: var(--agua); margin-top: 1px; }
.comofunciona b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.comofunciona em {
  display: block; font-style: normal; font-size: 12.5px; line-height: 1.45;
  color: var(--tenue); margin-top: 2px;
}
.portada .past--ppal { height: 50px; padding: 0 30px; font-size: 11.5px; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  :root {
    --pt-riel-izq: 12px; --pt-riel-der: 12px;
    /* Los rieles suben: abajo a la izquierda manda la tarjeta. */
    --pt-riel-y: 34%;
  }

  /* Abajo se apilan tres filas, de arriba a abajo: panel, barra y firma.
   * Las tres cuelgan de la zona segura para no quedar bajo el indicador
   * de inicio del iPhone. */
  /* Angosta y pegada a la izquierda: ocupando todo el ancho tapaba la mitad
     de la foto, que es lo que el huésped vino a ver.
     El ancho lo pone el contenido, no un número fijo: las amenidades son
     líneas cortas ("TV", "Caja fuerte") y con ancho fijo sobraba media tarjeta
     vacía tapando la habitación al pedo. El máximo sigue siendo el tope. */
  .panel {
    left: 12px; right: auto; width: fit-content; max-width: min(62%, 250px);
    top: auto; transform: none;
    bottom: calc(104px + env(safe-area-inset-bottom));
    max-height: 34vh; max-height: 34dvh; padding: 12px 14px;
  }
  .panel__cat { font-size: 9px; margin-bottom: 5px; }
  .panel__t { font-size: 17px; line-height: 1.15; }
  .panel__x { display: none; }
  .amen { margin-top: 10px; padding-top: 9px; }
  .amen__t { display: none; }
  .amen ul { gap: 5px; }
  .amen li { font-size: 12px; gap: 8px; line-height: 1.35; }
  .amen li::before { width: 5px; height: 5px; margin-top: 5px; }

  .barra { bottom: calc(52px + env(safe-area-inset-bottom)); }
  .barra__c { display: none; }

  /* La firma queda en su propia fila: al lado de la barra no entra en un
   * teléfono angosto y se encimarían. */
  .firma-nuva {
    right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 5px 11px; gap: 7px;
  }
  .firma-nuva__pw { display: none; }
  .firma-nuva img { height: 22px; }

  .rotulo { padding: 8px 14px 8px 11px; }
  .past { height: 36px; padding: 0 12px; font-size: 11px; }
  .past--ic { width: 36px; }
  .lengua { height: 36px; padding-left: 9px; gap: 5px; }
  .lengua__globo { width: 14px; height: 14px; }
  .lengua button { padding: 0 9px; height: 28px; }
  #btn-villa span { display: none; }
  #btn-villa { width: 36px; padding: 0; }

  .portada { padding: 24px 20px; }
  .portada__logo { height: 116px; margin-bottom: 22px; }
  .portada__lengua { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
  .comofunciona { margin: 24px 0; gap: 13px; padding: 16px 18px; }
  .comofunciona b { font-size: 13px; }
  .comofunciona em { font-size: 12px; }

  .explorador { padding: calc(72px + env(safe-area-inset-top)) 14px calc(30px + env(safe-area-inset-bottom)); }
  .rejilla { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 10px; }
  .hoja { padding: 24px 20px; }
  .hoja h2 { font-size: 22px; }
}

/* Teléfonos angostos de verdad: el rótulo y los mandos comparten fila. */
@media (max-width: 430px) {
  .rotulo__m { font-size: 11px; letter-spacing: .14em; }
  .rotulo__logo { height: 18px; }
  .past { height: 34px; padding: 0 10px; }
  .past--ic, #btn-villa { width: 34px; }
  .lengua { height: 34px; }
  .lengua button { padding: 0 8px; }
  .panel { max-width: min(66%, 230px); max-height: 34vh; max-height: 34dvh; }
}
