/* 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;
}

/* Mobile (SEPPA, 12/11): la barra en px de la pantalla (--bz lo pone js/index.js), con solo "unmute" y
   "fullscreen" (SEPPA: "que pongan play quizás no me interesa tanto"; que puedan agrandarlos o desmutearlos).
   En los videos que ocupan toda la pantalla, más grande.
   PROPUESTA DE CLAUDE, SIN CONFIRMAR: los botones que quedan y los tamaños. */
.ix--mobile .ix-barra {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  /* SEPPA (12/11): más chicos y más pegados al borde de abajo; play · unmute · fullscreen. */
  bottom: calc(5px * var(--bz, 1) + var(--barra-extra, 0px));
  height: calc(20px * var(--bz, 1));
  gap: 0;
  padding: 0 calc(3px * var(--bz, 1)) calc(1px * var(--bz, 1));
  font-size: calc(10px * var(--bz, 1));
}

.ix--mobile .ix-barra button {
  padding: calc(4px * var(--bz, 1)) calc(6px * var(--bz, 1));
}

.ix--mobile .ix-barra-sep,
.ix--mobile .ix-barra-tiempo {
  display: none;
}

.ix--mobile .ix-barra-progreso {
  height: calc(1px * var(--bz, 1));
}

.ix--mobile .ix-video--grande .ix-barra {
  bottom: calc(6px * var(--bz, 1) + var(--barra-extra, 0px));
  height: calc(24px * var(--bz, 1));
  font-size: calc(11px * var(--bz, 1));
}

.ix--mobile .ix-video:fullscreen .ix-barra {
  transform: translateX(-50%);
  bottom: 24px;
  height: 44px;
  font-size: 16px;
}

.ix--mobile .ix-video:fullscreen .ix-barra button {
  padding: 8px 12px;
}

.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;
  /* SEPPA (5/11): sin Helvetica Neue (Windows, Android), Nimbus Sans Regular (ver css/base.css). */
  font-family: "Helvetica Neue", "Nimbus Sans Web", 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.
   DECIDIDO (SEPPA, 8/11): el proyecto abierto queda en Baskerville. */
.ix-lista a:hover,
.ix-lista a.is-elegido {
  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;
}

/* SEPPA (12/11, Figma): menú más chico. En el frame INDEX (MOBILE ORIGINAL) las palabras están pasadas
   a trazo: mayúsculas de 16,6 px de alto (Helvetica Neue Medium de ~23,3 px), arriba de las letras a 27 px;
   INDEX empieza en x 33, PAINTINGS en 365, NEWSLETTER termina en 731 e INFO en 1047.
   Las posiciones de la caja descuentan el aire de la letra (arriba ~6 px, a los costados ~1,5 px). */
.ix--mobile .ix-menu a {
  top: calc(20.9px * var(--s));
  font-size: calc(23.3px * var(--s));
}

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

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

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

.ix--mobile .ix-menu a[data-room="info"] {
  right: calc(32px * 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 (SEPPA, 12/11, frames mobile de gris): abajo al medio, Helvetica Neue Medium 15 px,
   la caja de 1867 a 1885 del frame (35 px del borde de abajo). Contra el borde de la pantalla. */
.ix--mobile .ix-contador {
  right: auto;
  left: 50%;
  translate: -50% 0;
  /* SEPPA (12/11): un poco más arriba, para que no lo tape la barra de los videos (antes 34,8). */
  bottom: calc(150px * var(--s));
  font-size: calc(15px * var(--s));
  text-align: center;
  white-space: nowrap;
}

/* 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", "Nimbus Sans Web", Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
  color: #2c2c2c;
  text-decoration: none;
}

.ix--mobile .ix-visor-close {
  right: calc(32px * var(--s));
  top: calc(20.9px * var(--s));
  font-size: calc(23.3px * 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));
}

/* una cosa viva 8 (SEPPA, 11/11): en algunos cuadros del video aparece una tirita negra en el borde.
   Se achica un poco el cuadrado (4 px por lado, en px del frame) para cortarla. La imagen no se mueve. */
.ix-node[data-id="398:231"] {
  clip-path: inset(4px);
}

/* Textos a trazo (SEPPA, 5/11; ver js/index.js): el texto real queda invisible encima del dibujo. */
.ix-text--trazo,
.ix-text--trazo * {
  color: transparent !important;
  text-decoration-color: transparent !important;
}
.ix-trazo {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  pointer-events: none;
}
