/* INDEX · medidas del frame "INDEX (DESKTOP ORIGINAL)" del Figma (1920×1080). */

.ix {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #fff;
  --s: 1;
}

/* Diapositivas: el frame entero entra en la pantalla (escala desde JS). */
.ix-escena {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
}

.ix-slide {
  position: absolute;
  inset: 0;
  /* Se recorta al frame, más lo que sangra hasta los bordes de la ventana (ver js/encuadre.js). */
  overflow: visible;
  clip-path: inset(0);
  background: #fff;
  /* Nada de la diapositiva recibe clicks (navegan las mitades), salvo la barra de los videos. */
  pointer-events: none;
  animation: ix-in var(--fade, 150ms) ease-out both;
}

@keyframes ix-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ix-node {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  transform-origin: 0 0;
}

.ix-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Fotos pegadas una al lado de la otra (Ciudad del Sol 15): el navegador deja una línea clara entre
   ellas (el fondo blanco se ve por el borde suavizado). Cada foto se agranda medio píxel por lado. */
.ix-slide .ix-node > .ix-fill:has(> img, > video) {
  inset: -0.5px;
}

.ix-fill img,
.ix-fill video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ix-fill .ix-img-libre {
  position: absolute;
  max-width: none;
  object-fit: fill;
}

.ix-text {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* Con los cortes de Figma ya puestos, el navegador no vuelve a partir los renglones. */
.ix-text--cortes {
  white-space: pre;
}

/* Links dentro de los textos (URL, mails, @instagram): se ven igual que el texto, con manito. */
.ix-text a.ix-link {
  color: inherit;
  text-decoration: inherit;
  pointer-events: auto;
  cursor: pointer;
}

.ix-svg {
  display: block;
  overflow: visible;
}

/* --- Videos (fichas 04) -------------------------------------------------------- */
.ix-video {
  overflow: hidden;
  background: #000;
}

.ix-video video {
  display: block;
  width: 100%;
  height: 100%;
  /* PROPUESTA DE CLAUDE, SIN CONFIRMAR: el video llena su recuadro (recorta si la proporción no coincide). */
  object-fit: cover;
}

.ix-video:fullscreen,
.ix-video:fullscreen * {
  pointer-events: auto;
}

.ix-video:fullscreen video {
  object-fit: contain;
}

/* Barra: franja fina abajo, centrada, ~60 % del ancho del video, fondo oscuro translúcido
   con desenfoque casi invisible. Solo texto, blanco, minúscula. Siempre visible.
   PROPUESTA DE CLAUDE, SIN CONFIRMAR: tipografía, tamaño, alto y margen inferior de la barra. */
.ix-barra {
  position: absolute;
  pointer-events: auto;
  left: 20%;
  right: 20%;
  /* Si el video sangra (js/encuadre.js), la barra sube lo que el video se pasa de la ventana
     y se achica lo que el video creció: queda igual que sin sangrar. */
  bottom: calc(14px + var(--barra-extra, 0px));
  transform: scale(var(--barra-k, 1));
  transform-origin: 50% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 1px;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  color: #fff;
  font: 500 13px/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Botón de la canción de fondo (ver CANCIONES en js/index.js): igual que la barra de los videos,
   abajo al centro. PROPUESTA DE CLAUDE, SIN CONFIRMAR: lugar del botón. */
.ix-barra--cancion {
  left: 50%;
  right: auto;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 0 4px 1px;
}

.ix-barra--cancion[hidden] {
  display: none;
}

.ix-video:fullscreen .ix-barra {
  transform: none;
  bottom: 24px;
  height: 34px;
  font-size: 15px;
}

.ix-barra button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 4px 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: lowercase;
  cursor: pointer;
  /* DECIDIDO: hover sobre un botón cambia el fondo en 0,15 s lineal. */
  transition: background-color 0.15s linear;
}

.ix-barra button:hover {
  /* PROPUESTA DE CLAUDE, SIN CONFIRMAR: color del fondo en el hover. */
  background-color: rgba(255, 255, 255, 0.16);
}

.ix-barra button:focus-visible {
  outline: 1px solid #fff;
  outline-offset: -1px;
}

.ix-barra-sep {
  opacity: 0.7;
}

/* Barra de progreso de 1 px: reproducido en blanco, resto gris tenue, sin marcador. */
.ix-barra-progreso {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.ix-barra-progreso::before {
  /* zona de click más alta que la línea, invisible */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 10px;
}

.ix-barra-progreso span {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}

.ix-video-pendiente {
  display: grid;
  place-items: center;
  background: #1a1a1a;
  color: #8a8a8a;
  font: 16px/1.3 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* --- Interfaz: anclada a los bordes de la pantalla, escalada como el frame ------- */
.ix-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.211;
  /* DECIDIDO: el texto toma el color opuesto a lo que tiene debajo (referencia Agustín Gómez).
     #d3d3d3 en "difference" da #2c2c2c sobre blanco y gris claro sobre negro. */
  color: #d3d3d3;
  mix-blend-mode: difference;
}

.ix-ui a,
.ix-ui span {
  color: inherit;
  text-decoration: none;
}

.ix-ui a {
  pointer-events: auto;
  cursor: pointer;
}

.ix-menu a {
  position: absolute;
  white-space: nowrap;
}

/* DECIDIDO: todas las palabras del menú del mismo tamaño y a la misma altura.
   SEPPA (14/10): un poco más chicas (13 → 12,4 px) y más contra los bordes (−25 %). */
.ix-menu a {
  top: calc(24px * var(--s));
  font-size: calc(12.4px * var(--s));
}

.ix-menu a[data-room="index"] {
  left: calc(33px * var(--s));
}

.ix-menu a[data-room="paintings"] {
  left: calc(90.2px * var(--s));
}

.ix-menu a[data-room="newsletter"] {
  right: calc(78.7px * var(--s));
}

.ix-menu a[data-room="info"] {
  right: calc(32px * var(--s));
}

/* Lista de proyectos: abajo a la izquierda. */
.ix-lista {
  position: absolute;
  /* SEPPA (14/10): un poco más chica (15 → 14,3 px) y más contra los bordes (−25 %). */
  left: calc(38px * var(--s));
  bottom: calc(24px * var(--s));
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: calc(14.3px * var(--s));
  line-height: 1.79;
}

.ix-lista li {
  white-space: nowrap;
}

.ix-nombre-mobile {
  display: none;
}

/* DECIDIDO: hover de Helvetica a Baskerville, instantáneo. */
.ix-lista a:hover {
  font-family: Baskerville, "Baskervville", "Libre Baskerville", serif;
}

/* Contador: abajo a la derecha. */
.ix-contador {
  position: absolute;
  /* SEPPA (14/10): más contra el borde (−25 %). La altura la ajusta js/index.js (misma línea que la lista). */
  right: calc(32px * var(--s));
  bottom: calc(32px * var(--s));
  margin: 0;
  /* DECIDIDO: mismo tamaño que el menú. */
  font-size: calc(12.4px * var(--s));
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Mobile: frame "INDEX (MOBILE ORIGINAL)" (1080 px de ancho = ancho de la pantalla) -------- */
.ix--mobile .ix-nombre-desktop {
  display: none;
}

.ix--mobile .ix-nombre-mobile {
  display: inline;
}

.ix--mobile .ix-menu a {
  top: calc(54px * var(--s));
  font-size: calc(32px * var(--s));
}

.ix--mobile .ix-menu a[data-room="index"] {
  left: calc(41px * var(--s));
}

.ix--mobile .ix-menu a[data-room="paintings"] {
  left: calc(177px * var(--s));
}

.ix--mobile .ix-menu a[data-room="newsletter"] {
  right: calc(137px * var(--s));
}

.ix--mobile .ix-menu a[data-room="info"] {
  right: calc(41px * var(--s));
}

/* Pantalla de lista: grande, arriba a la izquierda. */
.ix--mobile .ix-lista {
  left: calc(41px * var(--s));
  top: calc(214px * var(--s));
  bottom: auto;
  font-size: calc(83px * var(--s));
  line-height: 1.49;
}

/* Dentro de un proyecto, la lista no se ve: se vuelve con INDEX. */
.ix--mobile.ix--proyecto .ix-lista {
  display: none;
}

.ix--mobile .ix-lista a.is-tocado {
  font-family: Baskerville, "Baskervville", "Libre Baskerville", serif;
}

/* Contador: abajo a la derecha. PROPUESTA DE CLAUDE, SIN CONFIRMAR: mismo tamaño que el menú
   (en el Figma mobile dice 15 px, que en el celu queda de ~5 px). */
.ix--mobile .ix-contador {
  right: calc(69px * var(--s));
  bottom: calc(88px * var(--s));
  font-size: calc(32px * var(--s));
}

/* En el celu no hay hover: el cambio a Baskerville es solo al tocar. */
@media (hover: none) {
  .ix-lista a:hover {
    font-family: inherit;
  }
}

/* --- Imágenes que se agrandan (Other Projects 4, pósters) ---------------------------------- */
.ix-slide .ix-ampliable {
  pointer-events: auto;
  cursor: pointer;
}

/* PROPUESTA DE CLAUDE, SIN CONFIRMAR: abierta a alto completo, centrada, sobre blanco. */
.ix-visor {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: #fff;
  opacity: 0;
  transition: opacity var(--fundido, 300ms) ease-out;
  cursor: pointer;
}

.ix-visor.is-on {
  opacity: 1;
}

.ix-visor img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ix-visor-close {
  position: absolute;
  right: calc(32px * var(--s));
  top: calc(24px * var(--s));
  font: 500 calc(12.4px * var(--s)) "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
  color: #2c2c2c;
  text-decoration: none;
}

.ix--mobile .ix-visor-close {
  right: calc(41px * var(--s));
  top: calc(54px * var(--s));
  font-size: calc(32px * var(--s));
}

/* En los costados de la pantalla los pósters no se abren: cursor normal. */
.ix--costado .ix-slide .ix-ampliable {
  cursor: default;
}

/* Renglones ubicados como en Figma (textos con tamaños distintos). */
.ix-text--lineas {
  white-space: normal;
}

.ix-text--lineas .ix-linea {
  position: absolute;
  left: 0;
  right: 0;
  white-space: pre;
}

/* --- Cara del búho arriba al medio (SEPPA, 3/11; reemplaza a la llave) ------------------
   Solo diseño, no se puede apretar. Figma (.fig del 3/11, 21:13): el búho más chico y fino, 35,9×36,2.
   Va centrado y con su centro a la altura del centro del menú de la web: centro del renglón
   (24 + 12,4 × 1,211 / 2 ≈ 31,5) menos 18,1 = 13,4. (En el Figma quedó 7,6 px a la derecha del
   centro y 7 px más abajo que el menú.)
   Blanco dentro de .ix-ui ("difference"): negro sobre blanco, blanco sobre fotos oscuras. */
.ix-buho {
  position: absolute;
  left: 50%;
  top: calc(13.4px * var(--s));
  width: calc(35.9px * var(--s));
  height: calc(36.2px * var(--s));
  transform: translateX(-50%);
  pointer-events: none;
  color: #fff;
}

.ix-buho svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* INFO (SEPPA, 3/11): blanca, sin "difference" (va fuera de .ix-ui, encima de la foto). */
.ix-buho--blanco {
  z-index: 6;
  mix-blend-mode: normal;
}

/* Mobile: no hay frame con el búho. PROPUESTA DE CLAUDE, SIN CONFIRMAR: 74 de 1080, con su centro
   a la altura del centro del menú (54 + 32 × 1,211 / 2 ≈ 73,4). */
.ix--mobile .ix-buho {
  top: calc(36px * var(--s));
  width: calc(74px * var(--s));
  height: calc(74.6px * var(--s));
}
