/* ============================================================
   CASA EDGAR — Propuesta de remodelación · rediseño 2026
   Sitio negro de 5 páginas; solo el footer revelado es blanco.
   Paleta: blanco y negro estricto · Host Grotesk + Anton
   ============================================================ */

:root {
  /* página (negro primero) */
  --bg: #0a0a0a;
  --bg-2: #141414;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, .6);
  /* footer blanco */
  --paper: #ffffff;
  --paper-ink: #0a0a0a;
  --paper-soft: #6a6a6a;
  --line: rgba(255, 255, 255, .2);
  --line-dark: rgba(10, 10, 10, .16);
  --em-stroke: #fff;
  /* Host Grotesk (texto, idéntica a steven.com) y Libertinus Serif
     Display (titulares serif transicionales, con trazo que aguanta el
     video detrás — decisión del usuario; Bodoni se perdía en el fondo) */
  --grotesk: "Host Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display: "Libertinus Serif Display", "Times New Roman", Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --rail-h: 72px;
  --footer-h: 60svh;   /* js/site.js la afina con la altura real */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--grotesk);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
/* sin flash de toque en móvil (el recuadro al tocar enlaces/botones) */
a, button { -webkit-tap-highlight-color: transparent; }

/* textura de grano sutil sobre todo el sitio */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 60;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.only-desktop { display: none; }
@media (min-width: 720px) { .only-desktop { display: inline; } }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: #fff; color: var(--paper-ink);
  padding: .8rem 1.2rem; font-weight: 600;
}
.skip:focus { left: 0; }

/* etiquetas de sección */
.label {
  font-size: .72rem; font-weight: 600;
  letter-spacing: .32em; text-transform: uppercase;
  display: flex; align-items: center; gap: .9rem;
  margin-bottom: 1.4rem;
}
.label::before { content: ""; width: 2.2rem; height: 1px; background: currentColor; }

/* acento tipográfico: texto delineado (firma del diseño);
   el footer blanco redefine --em-stroke en negro */
em {
  font-style: normal;
  font-weight: 500;
  -webkit-text-stroke: 1px var(--em-stroke, var(--ink));
  color: transparent;
}
@supports not (-webkit-text-stroke: 1px black) {
  em { color: inherit; opacity: .55; }
}

/* animaciones de entrada */
.reveal-load { opacity: 0; transform: translateY(26px); animation: rise 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   CHROME DE PÁGINAS INTERIORES
   .page (negro, z-1) se desliza sobre .reveal-footer (blanco,
   fijo al fondo, z-0); el rail de navegación queda encima (z-70).
   ============================================================ */

.page {
  position: relative; z-index: 1;
  background: var(--bg);
  min-height: 100svh;
  margin-bottom: var(--footer-h);
  padding-bottom: calc(var(--rail-h) + 2.5rem);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}

/* barra superior: volver al inicio */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: clamp(1.1rem, 3vw, 1.8rem);
}
.topbar__back {
  display: inline-flex; align-items: center; gap: .6rem;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 99px;
  padding: .8rem 1.4rem;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.topbar__back:hover, .topbar__back:focus-visible { background: #fff; border-color: #fff; color: var(--paper-ink); }
.topbar__brand { font-weight: 700; font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; }
.topbar__brk { display: none; }
/* en pantallas angostas la marca baja a dos renglones para que el botón
   de volver quepa en uno solo */
@media (max-width: 760px) {
  .topbar__brk { display: block; }
  .topbar__brand {
    text-align: right;
    line-height: 1.6;
    font-size: .58rem;
    letter-spacing: .24em;
    color: rgba(255, 255, 255, .75);
  }
}

/* encabezado de página */
.phead { padding-top: clamp(2.2rem, 6vw, 4rem); }
.phead__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.04;
  letter-spacing: -.06em;  /* -6% solo en la serif de titulares */
  text-transform: uppercase;
}
.phead__hint { margin-top: 1rem; max-width: 44rem; color: var(--ink-soft); font-size: .95rem; }

/* rail inferior de navegación */
.rail {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  min-height: var(--rail-h);
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem max(1rem, env(safe-area-inset-left)) calc(.8rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-right));
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
/* centrado que no corta el inicio cuando desborda */
.rail__pill:first-child { margin-left: auto; }
.rail__pill:last-child { margin-right: auto; }
.rail__pill {
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex; align-items: center;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  background: rgba(10, 10, 10, .78);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 99px;
  padding: .9rem 1.35rem;
  backdrop-filter: blur(8px);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.rail__pill:hover { border-color: #fff; }
.rail__pill.is-active { background: #fff; color: var(--paper-ink); border-color: rgba(10, 10, 10, .35); }

/* ---------- footer blanco revelado (planta + ficha) ---------- */
.reveal-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 0;
  background: var(--paper); color: var(--paper-ink);
  --em-stroke: var(--paper-ink);
  padding: clamp(2.5rem, 6vw, 4rem) 0 calc(var(--rail-h) + 1.2rem);
}
.rfoot__plano { width: 100%; max-height: 52svh; object-fit: contain; }
.rfoot__bottom {
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
}
.rfoot__brand { font-weight: 700; font-size: .92rem; letter-spacing: .3em; text-transform: uppercase; }
.rfoot__legal { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-soft); }
.rfoot__disclaimer { margin-top: .9rem; font-size: .72rem; line-height: 1.5; color: var(--paper-soft); max-width: 62ch; }

/* pantallas muy bajas: el footer vuelve al flujo normal */
@media (max-height: 620px) {
  .page { margin-bottom: 0; }
  .reveal-footer { position: static; z-index: auto; }
}

/* ============================================================
   PORTADA (index.html) — menú de páginas sobre el video
   ============================================================ */
body.home { height: 100svh; overflow: hidden; }
@media (max-height: 500px) { body.home { height: auto; overflow: auto; } }

.home__video {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;             /* a color (decisión del usuario); el velo lo oscurece */
}
/* velo que lava el video (ligero: el video se deja ver bastante;
   el blend en negativo mantiene legible el texto sobre zonas claras) */
.home__veil {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, .52);
}

.home__top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(1.1rem, 3vw, 2rem) clamp(1.2rem, 4vw, 3rem);
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
}
.home__brand { font-weight: 700; font-size: .92rem; letter-spacing: .3em; }
.home__tag { opacity: .85; text-align: right; }

.home__center {
  position: relative; z-index: 3;
  height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(1.6rem, 4svh, 2.6rem);
  padding: clamp(4rem, 10svh, 5.5rem) 1rem 1.5rem;
  text-align: center;
}
/* el titular y el menú reaccionan en negativo al video (difference);
   OJO: la animación de entrada va en el elemento mezclado mismo — un
   ancestro animándose (opacity/transform) aísla el blend y lo apaga */
.home__rows {
  display: grid; gap: .2rem; text-transform: uppercase;
  font-family: var(--display);
  mix-blend-mode: difference;
}
/* ambos renglones sólidos (el usuario retiró el delineado del segundo) */
.home__row--t, .home__row--e {
  font-size: clamp(1.9rem, 3.4vw, 3.2rem); font-weight: 400;
  letter-spacing: -.06em; line-height: 1.1;  /* -6% solo en la serif */
}

/* menú de páginas: filas numeradas con flecha ↗ */
.menu {
  width: min(920px, 92vw);
  display: grid; gap: clamp(.7rem, 1.6vw, 1rem);
}
@media (min-width: 720px) { .menu { grid-template-columns: 1fr 1fr; } }
.menu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(1.05rem, 2.4vw, 1.5rem) clamp(1.1rem, 2.6vw, 1.7rem);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.2;
  mix-blend-mode: difference;
  transition: border-color .25s ease, background .25s ease;
}
.menu__txt { display: inline-flex; align-items: baseline; gap: .6em; text-align: left; }
.menu__num { font-size: .68em; font-weight: 600; letter-spacing: .1em; color: rgba(255, 255, 255, .7); }
.menu__arrow { flex: 0 0 auto; transition: transform .3s var(--ease); }
.menu__item:hover, .menu__item:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, .09);
}
.menu__item:hover .menu__arrow, .menu__item:focus-visible .menu__arrow { transform: translate(4px, -4px); }

/* el titular va centrado sobre el menú en todos los tamaños */

/* ============================================================
   RECORRIDO 360 (tour.html)
   ============================================================ */
.tour__stage {
  position: relative;
  margin-top: clamp(1.8rem, 5vw, 3rem);
  width: min(1500px, 96vw);
  margin-left: auto; margin-right: auto;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-2);
}
.tour__viewer {
  width: 100%;
  height: clamp(400px, 68svh, 860px);
  background: var(--bg-2);
  /* estado de llegada: la nueva escena asienta suavemente */
  transition: transform .45s var(--ease), opacity .3s ease;
  will-change: transform, opacity;
}
/* instante previo a revelar la nueva escena (sin transición) */
.tour__viewer.is-zoom-in {
  transform: scale(1.12);
  transition: none;
}
/* captura de la vista anterior: cubre el visor mientras carga la
   nueva escena y luego avanza hacia ti disolviéndose sobre ella */
.tour__snap {
  position: absolute; inset: 0; z-index: 4;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.tour__snap.is-gone {
  transform: scale(1.4);
  opacity: 0;
  transition: transform .5s cubic-bezier(.5, 0, .75, .35), opacity .42s ease-in;
}
@media (prefers-reduced-motion: reduce) {
  .tour__viewer, .tour__snap { transition: none; }
}
.tour__fs { position: absolute; right: 1rem; bottom: 1rem; z-index: 6; }
.tour__now {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 6;
  display: flex; align-items: baseline; gap: .8rem;
  padding: .55rem 1rem;
  border-radius: 99px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.tour__nowName { font-weight: 600; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; }
.tour__nowCount { font-size: .68rem; letter-spacing: .3em; color: rgba(255, 255, 255, .55); }

/* recorrido en pantalla completa (nativa o simulada) */
.tour__stage:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.tour__stage:fullscreen .tour__viewer { height: 100%; }
.tour__stage:-webkit-full-screen { width: 100%; height: 100%; border-radius: 0; }
.tour__stage:-webkit-full-screen .tour__viewer { height: 100%; }
.tour__stage.is-fakefull {
  position: fixed; inset: 0; z-index: 120;
  width: 100%; height: 100%; max-width: none;
  margin: 0; border-radius: 0;
}
.tour__stage.is-fakefull .tour__viewer { height: 100%; }

/* selector de espacios */
.tour__rooms {
  margin-top: 1.4rem;
  display: flex; gap: .55rem;
  overflow-x: auto;
  padding-bottom: .4rem;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 900px) { .tour__rooms { flex-wrap: wrap; overflow: visible; } }
.tour__room {
  flex: 0 0 auto;
  display: inline-flex; align-items: baseline; gap: .55rem;
  font-family: var(--grotesk); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: .68rem 1.15rem;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.tour__room:hover { border-color: #fff; }
.tour__room.is-active { background: #fff; color: var(--paper-ink); border-color: #fff; }
.tour__roomNum { font-size: .62rem; letter-spacing: .08em; opacity: .5; }

/* punto de enlace entre escenas (hotspot) */
.tour-hotspot { width: 1px; height: 1px; cursor: pointer; }
.tour-hotspot__inner {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
}
.tour-hotspot__dot {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  display: grid; place-items: center;
  backdrop-filter: blur(4px);
  transition: background .25s ease, color .25s ease, transform .25s var(--ease);
}
.tour-hotspot:hover .tour-hotspot__dot { background: #fff; color: var(--paper-ink); transform: scale(1.1); }
.tour-hotspot__label {
  font-family: var(--grotesk); font-size: .62rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  border-radius: 99px;
  padding: .32rem .7rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* controles de Pannellum en blanco y negro */
.pnlm-container { font-family: var(--grotesk); background: var(--bg-2); }
.pnlm-controls {
  border: 1px solid rgba(10, 10, 10, .25);
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}
.pnlm-load-box {
  background: rgba(0, 0, 0, .75);
  border-radius: 6px;
  font-family: var(--grotesk);
  font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
}
.pnlm-load-box p { margin: 0; }
.pnlm-lbar { border: 1px solid #fff; border-radius: 99px; overflow: hidden; }
.pnlm-lbar-fill { background: #fff; }
.pnlm-tooltip span {
  font-family: var(--grotesk); font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  border-radius: 99px;
  background: rgba(0, 0, 0, .7);
}

/* ============================================================
   ANTES / DESPUÉS (antes-despues.html) — comparadores apilados
   ============================================================ */
.cmp-list {
  width: min(1320px, 96vw);
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  display: grid;
  gap: clamp(3.5rem, 9vw, 6.5rem);
}
.cmp-item__head {
  width: min(1120px, 100%);
  margin: 0 auto .9rem;
  display: flex; align-items: baseline; gap: 1rem;
}
.cmp-item__num { font-size: .7rem; font-weight: 600; letter-spacing: .3em; color: var(--ink-soft); }
.cmp-item__name { font-weight: 500; font-size: clamp(1.4rem, 3.4vw, 2.2rem); letter-spacing: -.02em; }

.cmp {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 78vh;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-2);
  touch-action: pan-y;          /* permite scroll vertical, captura el arrastre horizontal */
  user-select: none; -webkit-user-select: none;
  --pos: 50%;
}
@media (min-width: 900px) { .cmp { aspect-ratio: 16 / 9; } }
/* espacios con foto vertical: el escenario se vuelve retrato */
.cmp.cmp--v {
  aspect-ratio: 3 / 4;
  height: min(78vh, 124vw);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}
.cmp__after, .cmp__before {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.cmp__beforeWrap {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  pointer-events: none;
}

.cmp__badge {
  position: absolute; top: 1rem; z-index: 3;
  font-size: .66rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  padding: .45rem .85rem;
  border-radius: 99px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.cmp__badge--a { left: 1rem; background: rgba(0, 0, 0, .6); color: #fff; }
.cmp__badge--b { right: 1rem; background: rgba(255, 255, 255, .88); color: var(--paper-ink); }

.cmp__handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 2px; margin-left: -1px;
  background: #fff;
  z-index: 4;
  cursor: ew-resize;
}
.cmp__handle:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.cmp__grip {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff; color: var(--paper-ink);
  display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .45);
}
/* zona táctil generosa alrededor de la línea */
.cmp__handle::before { content: ""; position: absolute; inset: 0 -26px; }

/* comparador en pantalla completa (nativa o simulada) */
.cmp:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; max-height: none; border-radius: 0; background: var(--bg); }
.cmp:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; max-height: none; border-radius: 0; background: var(--bg); }
.cmp.is-fakefull {
  position: fixed; inset: 0; z-index: 120;
  aspect-ratio: auto; width: 100%; height: 100%; max-height: none;
  margin: 0; border-radius: 0;
}

/* botón genérico de pantalla completa sobre medios */
.fsbtn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease);
}
.fsbtn:hover { background: #fff; border-color: #fff; color: var(--paper-ink); transform: scale(1.08); }
.cmp__fs { position: absolute; right: 1rem; bottom: 1rem; z-index: 5; }

/* ---------- en pantalla completa (nativa o simulada) ----------
   sin rail de navegación, y el botón se vuelve "cerrar" arriba-derecha */
body.is-fs .rail { display: none; }
.is-fakefull .fsbtn svg { display: none; }
:fullscreen .fsbtn svg { display: none; }
.tour__stage:-webkit-full-screen .fsbtn svg, .cmp:-webkit-full-screen .fsbtn svg { display: none; }
.is-fakefull .fsbtn::after { content: "✕"; font-size: 1.05rem; line-height: 1; }
:fullscreen .fsbtn::after { content: "✕"; font-size: 1.05rem; line-height: 1; }
.tour__stage:-webkit-full-screen .fsbtn::after, .cmp:-webkit-full-screen .fsbtn::after { content: "✕"; font-size: 1.05rem; line-height: 1; }
.is-fakefull .tour__fs, .is-fakefull .cmp__fs {
  top: max(1rem, env(safe-area-inset-top)); bottom: auto;
  right: max(1rem, env(safe-area-inset-right));
}
:fullscreen .tour__fs, :fullscreen .cmp__fs { top: 1rem; bottom: auto; }
.tour__stage:-webkit-full-screen .tour__fs, .cmp:-webkit-full-screen .cmp__fs { top: 1rem; bottom: auto; }
/* la etiqueta "Después" baja para no chocar con la ✕ */
.cmp.is-fakefull .cmp__badge--b { top: calc(max(1rem, env(safe-area-inset-top)) + 3.4rem); }
.cmp:fullscreen .cmp__badge--b { top: 4.4rem; }
.cmp:-webkit-full-screen .cmp__badge--b { top: 4.4rem; }

/* ============================================================
   GALERÍA (galeria.html) — secuencia editorial
   ============================================================ */
.galeria__grid {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: clamp(1.6rem, 5vw, 3.2rem) clamp(1rem, 2.5vw, 2rem);
}
@media (min-width: 760px) {
  .galeria__grid { grid-template-columns: repeat(12, 1fr); }
  .gtile:nth-child(7n+1) { grid-column: 1 / -1; }
  .gtile:nth-child(7n+2) { grid-column: 1 / 8; }
  .gtile:nth-child(7n+3) { grid-column: 8 / 13; margin-top: clamp(2rem, 6vw, 4rem); }
  .gtile:nth-child(7n+4) { grid-column: 3 / 13; }
  .gtile:nth-child(7n+5) { grid-column: 1 / 7; }
  .gtile:nth-child(7n+6) { grid-column: 7 / 13; margin-top: clamp(2rem, 6vw, 4rem); }
  .gtile:nth-child(7n)   { grid-column: 2 / 12; }
  .gtile:nth-child(7n+1) .gtile__media,
  .gtile:nth-child(7n+4) .gtile__media,
  .gtile:nth-child(7n) .gtile__media { aspect-ratio: 16 / 9; }
}
.gtile {
  position: relative;
  display: block; width: 100%;
  background: none; border: none; padding: 0;
  cursor: pointer; text-align: left; color: inherit;
  font-family: var(--grotesk);
}
.gtile__media {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
}
.gtile__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease);
}
.gtile:hover img, .gtile:focus-visible img { transform: scale(1.04); }
.gtile__cap {
  display: flex; align-items: baseline; gap: .7rem;
  margin-top: .75rem;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink);
}
.gtile__num { font-size: .62rem; color: var(--ink-soft); }

/* módulo pendiente: aún no existe la imagen */
.gtile.gtile--pending { cursor: default; }
.gtile.gtile--pending .gtile__media { border: 1px dashed var(--line); background: transparent; }
.gtile.gtile--pending img { display: none; }
.gtile.gtile--pending::before {
  content: attr(data-num);
  position: absolute; top: .4rem; right: .9rem;
  font-size: clamp(3.4rem, 9vw, 6.5rem); font-weight: 600; line-height: 1;
  letter-spacing: -.04em;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .3);
  color: transparent;
}
@supports not (-webkit-text-stroke: 1px black) {
  .gtile.gtile--pending::before { color: rgba(255, 255, 255, .12); }
}

/* ---------- visor de la galería (lightbox) ---------- */
.vista { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.vista[hidden] { display: none; }
.vista__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .85); backdrop-filter: blur(8px); }
.vista__panel {
  position: relative; z-index: 1;
  max-width: min(1080px, 96vw);
  background: var(--bg-2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: vistaIn .35s var(--ease);
}
@keyframes vistaIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.vista__img { width: 100%; max-height: min(72vh, 700px); object-fit: contain; background: #000; }
.vista__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.3rem;
  color: #fff;
}
.vista__name { font-weight: 500; font-size: clamp(1rem, 3vw, 1.3rem); letter-spacing: .04em; text-transform: uppercase; }
.vista__nav { display: flex; align-items: center; gap: .6rem; }
.vista__count { font-size: .7rem; letter-spacing: .3em; color: rgba(255, 255, 255, .55); margin-right: .4rem; }
.vista__arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4);
  background: transparent; color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.vista__arrow:hover { background: #fff; border-color: #fff; color: var(--paper-ink); }
.vista__close {
  position: absolute; top: .8rem; right: .8rem; z-index: 2;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .25s ease, color .25s ease;
}
.vista__close:hover { background: #fff; color: var(--paper-ink); }
@media (prefers-reduced-motion: reduce) { .vista__panel { animation: none; } }

/* ============================================================
   PLANOS (planos.html) — plano con puntos y modales in situ
   ============================================================ */
.pmode {
  margin-top: clamp(1.4rem, 3.5vw, 2.2rem);
  display: flex; gap: .55rem; flex-wrap: wrap;
}
.pmode__btn {
  display: inline-flex; align-items: center;
  font-family: var(--grotesk); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: .8rem 1.3rem;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.pmode__btn:hover { border-color: #fff; }
.pmode__btn.is-active { background: #fff; color: var(--paper-ink); border-color: #fff; }

/* sin padding: los % de los puntos se miden sobre la imagen misma */
.plano {
  position: relative;
  width: min(1120px, 92vw);
  margin: clamp(1.6rem, 4vw, 2.6rem) auto 0;
  background: var(--paper);
  border-radius: 6px;
  overflow: hidden;
}
.plano img { width: 100%; display: block; }
.plano__spots { position: absolute; inset: 0; }

/* punto sobre el plano (fondo blanco → punto negro) */
.spot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #0a0a0a;
  box-shadow: 0 2px 10px rgba(10, 10, 10, .35);
  cursor: pointer;
  padding: 0;
}
.spot::before {
  content: "";
  position: absolute; inset: -7px;
  border-radius: 50%;
  border: 2px solid #0a0a0a;
  opacity: 0;
  animation: spotPulse 2.4s ease-out infinite;
}
@keyframes spotPulse {
  0% { transform: scale(.6); opacity: .9; }
  70%, 100% { transform: scale(1.25); opacity: 0; }
}
/* zona táctil generosa */
.spot::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.spot span {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%);
  background: #0a0a0a; color: #fff;
  font-family: var(--grotesk); font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 4px;
  white-space: nowrap;
  opacity: 0; transition: opacity .2s ease;
  pointer-events: none;
  z-index: 2;
}
.spot:hover span, .spot:focus-visible span { opacity: 1; }
.spot:hover { background: #4a4a4a; }
.spot:focus-visible { outline: 2px solid #0a0a0a; outline-offset: 3px; }

/* cono de visión (solo fotos y antes/después) */
.spot-cone {
  position: absolute;
  width: clamp(52px, 8vw, 88px);
  transform: translate(-50%, -100%) rotate(var(--dir, 0deg));
  transform-origin: 50% 100%;
  pointer-events: none;
}
.spot-cone svg { display: block; width: 100%; height: auto; }

/* modales del plano (visor 360 y comparador) */
.pmodal {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.pmodal[hidden] { display: none; }
.pmodal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .85); backdrop-filter: blur(8px); }
.pmodal__panel {
  position: relative; z-index: 1;
  width: min(1080px, 96vw);
  max-height: 94svh;
  overflow: auto;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 3.4rem 1rem 1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
  animation: vistaIn .35s var(--ease);
}
.pmodal__name {
  margin: -2.2rem 0 .8rem .3rem;
  font-weight: 600; font-size: .82rem;
  letter-spacing: .18em; text-transform: uppercase;
}
.pmodal__panel--360 { width: min(1320px, 96vw); padding: 0; overflow: hidden; }
.pmodal .tour__stage { margin: 0; width: 100%; border-radius: 8px 8px 0 0; }
.pmodal .tour__viewer { height: min(72svh, 640px); }
.pmodal .tour__rooms { margin-top: 0; padding: .9rem 1rem 1rem; }
@media (min-width: 900px) { .pmodal .tour__rooms { flex-wrap: nowrap; overflow-x: auto; } }

/* ============================================================
   ACCESIBILIDAD DE MOVIMIENTO
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-load { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .spot::before { animation: none; }
  .pmodal__panel { animation: none; }
}
