* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
 
/* -----------------------------------------------------------
   MOBILE FIRST
   Todo lo de aquí abajo es la base para pantallas chicas.
   Los ajustes para tablet/desktop van al final en @media (min-width).
   ----------------------------------------------------------- */

html {
  scrollbar-gutter: stable;
}

.boton-menu {
  display: block;
  text-decoration: none;
  /* ...lo demás igual */
}


body {
  background-color: #FE3500; /* rojo base (estado "negativo") */
  color: #000;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}
 
/* al presionar/tocar CUALQUIER parte de la pantalla, script.js le pone
   esta clase al <body> y todo lo de abajo reacciona a ella */
body.activo {
  background-color: #000;
  color: #fdfcfc;
}
 

.container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 28px 40px;
}
 
.logo {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: 2px;
  color: inherit;
  /* Se agrega font-size para que el cambio de tamaño sea suave */
  transition: color 0.4s ease, font-size 0.4s ease; 
  margin-top: 4px;
}


.bbh-bartle-regular {
  font-family: "BBH Bartle", sans-serif;

  /* Se eliminaron font-weight y font-style para no sobreescribir a .logo */
}

.boton-menu {
  display: block;            /* nuevo */
  text-decoration: none;     /* nuevo */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #000;
  border: none;
  cursor: pointer;
  color: transparent;
  flex-shrink: 0;
  transition: background-color 0.4s ease;
  margin-left: 50px;
}
 
body.activo .boton-menu {
  background-color: #ff0000;
}
 
/* =========================================================
   BLOQUES GRANDES: Arquitectura / Audiovisual / Poesia
   Cada div trae 2 <img>: [0]=negativo (visible) [1]=normal (oculto)
 
   Acomodo (apuntando directo a las clases del HTML):
   - .Arquitectura (1): pegada a la izquierda, número a la derecha
   - .Audiovisual (2): pegada a la derecha, número a la izquierda
   - .Poesia (3): a todo el ancho, sin margen rojo (imagen full-bleed)
   ========================================================= */
.container_img {
  counter-reset: seccion;
  display: flex;
  flex-direction: column;
}
 
.container_img > div {
  position: relative;
  cursor: pointer;
  margin-bottom: 55px;
}
 
.container_img > div img {
  display: block;
  width: 100%;
  height: auto;
}
 
/* cada bloque cuenta para la numeración, en el orden en que aparece en el HTML */
.Arquitectura,
.Audiovisual,
.Poesia {
  counter-increment: seccion;
}
 
/* .Arquitectura: pegada a la izquierda, gutter/número a la derecha */
.Arquitectura {
  width: calc(85% - 45px);
  margin-left: 20px;
  margin-right: auto;
}
 
/* .Audiovisual: pegada a la derecha, gutter/número a la izquierda */
.Audiovisual {
  width: calc(85% - 45px);
  margin-left: 110px;
  margin-right: auto;
}
 
/* .Poesia: a todo el ancho, sin gutter (imagen full-bleed) */
.Poesia {
  width: calc(85% - 45px);
  margin-left: 15px;
  margin-right: auto;
}
 
/* la imagen "normal" se monta encima de la negativa y aparece con el hover */
.container_img > div img:last-child {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* =========================================================
   PALETA DE COLORES — barra fija chica, esquina superior derecha
   ========================================================= */
.paleta-lateral {
  position: fixed;
  top: 90px;
  right: 0;
  width: 5px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.paleta-lateral.visible {
  opacity: 1;
}

.paleta-lateral .swatch {
  width: 14px;
  height: 120px;
  transition: background-color 0.5s ease;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
 
/* El cambio ya NO es por bloque individual: reacciona a body.activo,
   que se agrega/quita en script.js al presionar CUALQUIER parte de la pantalla */
body.activo .container_img > div img:first-child {
  opacity: 0;
}
 
body.activo .container_img > div img:last-child {
  opacity: 1;
}
 

 
/* circulo: es el punto donde se da clic para ir a otra página.
   Queda fijo y centrado sobre la imagen, con cursor de link.
   Envuelve la imagen (o este div) en un <a href="..."> para que navegue de verdad. */

body.activo .container_img > div::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* ===== FIN DEL NUEVO CÓDIGO ===== */

/* =========================================================
   GALERÍA / CUADRÍCULA (grid de miniaturas)
   ========================================================= */
.galeria {
  padding: 0 10px 30px;
  margin-right: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

/* SOLO la primera fila */
.grid .foto1:nth-child(-n+5) {
  width: 100%;
}
 
.foto1 {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  cursor: pointer;
}

.foto1:nth-child(10) {
  grid-column-start: 1;
}
 
.foto1 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}
 
.foto1 img:last-child {
  opacity: 0;
}
 
/* El cambio también reacciona a body.activo (global), igual que los bloques grandes */
body.activo .foto1 img:first-child {
  opacity: 0;
}
 
body.activo .foto1 img:last-child {
  opacity: 1;
}
 

 
body.activo .foto1::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
 
/* =========================================================
   FOOTER
   ========================================================= */
footer {
  padding: 16px 18px;   /* mismo margen lateral que la galería + aire abajo */
}

footer a:first-child {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.7rem;
  margin-bottom: 10px;
  text-align: right;
  color: #000;
  text-decoration: none;
  transition: color 0.4s ease;
}

footer hr {
  border: none;
  border-top: 2px solid #000;
  margin-bottom: 13px;
  transition: border-color 0.4s ease;
}

footer p:last-child {
  font-weight: 700;
  margin-top: 1px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #000;
  transition: color 0.4s ease;
}

/* Modo activo: todo el footer en blanco */
body.activo footer a:first-child,
body.activo footer p:last-child {
  color: #fff;
}

body.activo footer hr {
  border-top-color: #fff;
}
 
/* =========================================================
   RESPONSIVE — MOBILE FIRST
   Todo lo de arriba ES la versión mobile (base).
   De aquí para abajo solo se agregan/ajustan estilos
   conforme crece la pantalla (min-width), nunca se quitan.
   ========================================================= */
 
@media (min-width: 1024px) {
  body {
    max-width: 1660px;
  }

  .container {
    padding: 40px 69px 40px;
  }

  .logo {
    font-size: 1.6rem;
  }

  .boton-menu {
    width: 80px;
    height: 80px;
    margin: 10px -13px 0 0;
    transition: background-color 0.4s ease;
  }

  .container_img {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 70px;
    padding: 20px 60px;
    box-sizing: border-box;
  }

  .container_img > div {
    margin-bottom: -140px;
    box-sizing: border-box;
  }

  .Arquitectura,
  .Audiovisual,
  .Poesia {
    width: calc(30% - 10px);
    margin: 0;
  }

  .Arquitectura {
    margin-left: 20px;
  }

  .Audiovisual {
    margin-top: 2%;
  }

  .Poesia {
    margin-top: 4%;
  }

  .Arquitectura::after,
  .Audiovisual::after,
  .Poesia::after {
    font-size: 1.6rem;
  }

  .paleta-lateral {
    top: 120px;
    width: 7px;
  }

  .paleta-lateral .swatch {
    width: 20px;
    height: 100px;
  }

  .galeria {
    padding: 90px 100px 90px;
    margin-top: 100px;
  }

  .grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    grid-auto-flow: row;
  }

  .grid > :nth-child(10) {
    grid-column: 4;
    grid-row: 2;
  }

  .grid > :nth-child(11) {
    grid-column: 5;
    grid-row: 2;
  }

  footer {
    padding: 0 100px 50px;     /* alineado con .galeria */
    margin-bottom: 0;
  }

  footer a:first-child {
    font-size: 0.9rem;
  }

  footer p:last-child {
    font-size: 0.8rem;
  }
}

/* ===== PANTALLA DE CARGA ===== */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;

  background: #000;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 2.5rem;

  box-sizing: border-box;
  overflow: hidden;

  transition: opacity 0.6s ease;
}

.loading-screen.loaded {
  opacity: 0;
  pointer-events: none;
}

.loading-counter {
  position: absolute;
  top: 24px;
  right: 24px;

  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 8px;

  font-family: "BBH Bartle", sans-serif;
}

.loading-counter span {
  color: #3a1010;
  transition: color 0.3s ease;
}

.loading-counter span.active {
  color: #ff0000;
}

.loading-img {
  width: auto;
  max-width: 90%;
  max-height: 50vh;

  object-fit: contain;
  margin-top: 0;
}

.loading-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  line-height: 1.4;

  font-family: "BBH Bartle", sans-serif;

  background-color: #000000;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

.fill-text {
  position: relative;
  display: inline-block;
  color: #3a1010;
}

.fill-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;

  color: #ff0000;

  clip-path: inset(0 calc(100% - var(--progress, 0%)) 0 0);

  transition: clip-path 0.1s linear;
}

@media (max-width : 1024px) {
  /* ===== PANTALLA DE CARGA ===== */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;

  background: #000;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 2.5rem;

  box-sizing: border-box;
  overflow: hidden;

  transition: opacity 0.6s ease;
}

.loading-screen.loaded {
  opacity: 0;
  pointer-events: none;
}

.loading-counter {
  position: absolute;
  top: 24px;
  right: 24px;

  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 8px;

  font-family: "BBH Bartle", sans-serif;
}

.loading-counter span {
  color: #3a1010;
  transition: color 0.3s ease;
}

.loading-counter span.active {
  color: #ff0000;
}

.loading-img {
  width: auto;
  max-width: 90%;
  max-height: 50vh;

  object-fit: contain;
  margin-top: 0;
}

.loading-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  line-height: 1.4;

  font-family: "BBH Bartle", sans-serif;

  background-color: #000000;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

.fill-text {
  position: relative;
  display: inline-block;
  color: #3a1010;
}

.fill-text::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;

  color: #ff0000;

  clip-path: inset(0 calc(100% - var(--progress, 0%)) 0 0);

  transition: clip-path 0.1s linear;
}

  
}

/* ===== PANTALLA DE CARGA COMPLETA ===== */


.loading-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;

  background-color: #000;
  z-index: 999999;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 60px;

  overflow: hidden;
  box-sizing: border-box;
}

/* Ocultar scrollbar mientras carga */
html:has(.loading-screen:not(.loaded)) {
  scrollbar-width: none;
}

html:has(.loading-screen:not(.loaded))::-webkit-scrollbar {
  display: none;
  width: 0;
}

/* Ocultar la paleta lateral mientras carga */
body:has(.loading-screen:not(.loaded)) .paleta-lateral {
  display: none;
}

/* =========================================================
   LIGHTBOX de la galería
   ========================================================= */
html.sin-scroll {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;            /* altura real en móvil */
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;        /* así no queda nada "fantasma" encima del footer */
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s;
  cursor: pointer;
}

.lightbox.abierto {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: scale(0.96);
  transition: transform 0.3s ease;
}

.lightbox.abierto img {
  transform: scale(1);
}

.lightbox-cerrar {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}