/* ---------- Tokens ---------- */
:root{
  --cream: #F2E6D8;
  --cream-deep: #E9D6BE;
  --ink: #2B211B;
  --ink-soft: #6B5C4F;
  --accent: #A8461E;
  --accent-soft: #E4C7A6;
  --line: rgba(43,33,27,0.14);

  --font-display: "Fraunces", serif;
  --font-body: "Work Sans", sans-serif;

  --nav-h: 4.5rem;
}

body.no-scroll{ overflow: hidden; }

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  height: calc(100svh - var(--nav-h));
  min-height: 420px;
  width: 100%;
  overflow: hidden;
  background: var(--cream);
}

.hero-reveal{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}

/* La obra es un tríptico muy panorámico (~4:1): se enmarca entera,
   como un cuadro en la pared, en vez de recortarla a pantalla completa */
.hero-reveal__frame{
  position: relative;
  width: min(92vw, calc(80svh * 3.985));
  aspect-ratio: 4304 / 1080;
  box-shadow:
    0 0 0 1px rgba(43,33,27,0.4),
    0 0 36px 6px rgba(168,70,30,0.32),
    0 28px 70px -8px rgba(43,33,27,0.6);
}

.hero-reveal__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-reveal__canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  touch-action: none;
}

.hero-reveal__zoom{
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  z-index: 4;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242,230,216,0.35);
  border-radius: 50%;
  background: rgba(30,23,18,0.65);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-reveal__zoom:hover{
  background: var(--accent);
  transform: scale(1.06);
}

.hero-reveal__zoom:focus-visible{
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.hero-hint{
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  color: var(--cream);
  opacity: 0.75;
  letter-spacing: 0.01em;
  pointer-events: none;
  transition: opacity 0.8s ease;
  text-align: center;
  padding: 0 1.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  z-index: 3;
}

.hero-hint.is-hidden{
  opacity: 0;
}

.hero-footer{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.6rem 1.75rem;
  z-index: 3;
  pointer-events: none;
}

.hero-footer__name{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--ink);
}

.hero-footer__role{
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.hero-scroll{
  position: absolute;
  right: 1.75rem;
  bottom: 1.9rem;
  width: 1px;
  height: 46px;
  background: var(--line);
  z-index: 3;
  overflow: hidden;
}

.hero-scroll span{
  position: absolute;
  left: 0;
  top: -100%;
  width: 100%;
  height: 100%;
  background: var(--ink);
  animation: scrollLine 2.2s ease-in-out infinite;
}

@keyframes scrollLine{
  0%{ top: -100%; }
  60%{ top: 100%; }
  100%{ top: 100%; }
}

/* ---------- About / Tabs ---------- */
.about{
  min-height: calc(100svh - var(--nav-h));
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem clamp(4rem, 9vw, 7rem);
}

.about__inner{
  max-width: 760px;
  margin: 0 auto;
}

.about__title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin: 0 0 2rem;
  color: var(--ink);
}

.tabs{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: rgba(255,255,255,0.4);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem;
  margin-bottom: 2.25rem;
}

.tabs__btn{
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.tabs__btn:hover{
  color: var(--ink);
}

.tabs__btn.is-active{
  background: var(--accent);
  color: #fff;
}

.tabs__btn:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tab-panel{
  animation: fadeIn 0.35s ease;
}

.tab-panel[hidden]{ display: none; }

@keyframes fadeIn{
  from{ opacity: 0; transform: translateY(4px); }
  to{ opacity: 1; transform: translateY(0); }
}

.tab-panel p{
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
  max-width: 68ch;
}

/* Exposiciones */
.plain-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem 2rem;
}

.plain-list--two-col{
  grid-template-columns: 1fr;
}

@media (min-width: 620px){
  .plain-list--two-col{
    grid-template-columns: 1fr 1fr;
  }
}

.plain-list li{
  font-size: 0.98rem;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.plain-list li span{
  display: block;
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: 0.1rem;
}

/* Premios */
.award-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.award-list li{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.award-list li:first-child{
  padding-top: 0;
}

.award-list__title{
  font-size: 0.98rem;
  line-height: 1.5;
}

.award-list__year{
  flex: none;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent);
  font-size: 0.95rem;
}

/* Experiencia */
.exp-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.exp-list__year{
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.exp-list p{
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 65ch;
}

/* ---------- Site header / nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.site-header__inner{
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__brand{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__list{
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
}

.site-nav__list > li{
  position: relative;
}

.site-nav__list > li > a,
.dropdown-toggle{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.dropdown-toggle::after{
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.has-dropdown.is-open .dropdown-toggle::after{
  transform: rotate(-135deg) translateY(1px);
}

.site-nav__list > li > a:hover,
.dropdown-toggle:hover,
.site-nav__list > li > a.is-active,
.dropdown-toggle.is-active{
  color: var(--ink);
  background: rgba(43,33,27,0.06);
}

.dropdown{
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(43,33,27,0.28);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.has-dropdown.is-open .dropdown{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown li a{
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
}

.dropdown li a:hover,
.dropdown li a.is-active{
  background: var(--accent-soft);
}

.nav-toggle{
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after{
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span{ top: 19px; }
.nav-toggle span::before{ top: -7px; }
.nav-toggle span::after{ top: 7px; }

.nav-toggle.is-open span{ background: transparent; }
.nav-toggle.is-open span::before{ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span::after{ transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px){
  .nav-toggle{ display: block; }

  .site-nav{
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cream);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 1rem;
  }

  .site-nav.is-open{ transform: translateX(0); }

  .site-nav__list{
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .site-nav__list > li > a,
  .dropdown-toggle{
    width: 100%;
    justify-content: space-between;
    font-size: 1.05rem;
    padding: 0.9rem 0.75rem;
  }

  .dropdown{
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(43,33,27,0.04);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: none;
    margin: 0.15rem 0 0.4rem;
  }

  .has-dropdown.is-open .dropdown{ display: block; }
}

/* ---------- Page sections (Dibujo / Pintura / Restauración / Sobre mí) ---------- */
[id]{
  scroll-margin-top: var(--nav-h);
}

.section-block{
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem clamp(2rem, 5vw, 3rem);
  background: var(--cream-deep);
}

.section-block--alt{
  background: var(--cream);
}

.section-block__inner{
  max-width: 1200px;
  margin: 0 auto;
}

.section-block__eyebrow{
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  margin: 0 0 2.5rem;
  color: var(--accent);
}

.subsection{
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
}

.subsection:first-of-type{
  border-top: none;
  padding-top: 0;
}

.subsection__title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0;
  color: var(--ink);
}

/* ---------- Desplegables de cada serie ---------- */
.subsection__toggle{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
}

.subsection__toggle:hover .subsection__title{
  color: var(--accent);
}

.subsection__toggle:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.subsection__chevron{
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.subsection__toggle[aria-expanded="true"] .subsection__chevron{
  transform: rotate(-135deg);
}

.subsection__content{
  margin-top: 1.75rem;
  animation: fadeIn 0.35s ease;
}

.subsection__content[hidden]{ display: none; }

/* ---------- Gallery: cada obra respeta su propia proporción (sin recortes) ---------- */
.gallery{
  columns: 3 260px;
  column-gap: 1.25rem;
}

.gallery__item{
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
  background: var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  break-inside: avoid;
}

.gallery__item img{
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

.gallery__item:hover img{
  transform: scale(1.03);
}

.gallery__item:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gallery__item-label{
  display: block;
  padding: 0.55rem 0.7rem;
  background: linear-gradient(to top, rgba(20,15,11,0.72), transparent 85%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  text-align: left;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

/* Homenaje a El Bosco: 3 columnas fijas — col.1 = fragmentos 1-2,
   col.2 = fragmentos 3-4, col.3 = fragmentos 5-6 */
.gallery--grouped{
  columns: initial;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: 1.25rem;
}

.gallery--grouped .gallery__item{
  margin-bottom: 0;
}

@media (max-width: 700px){
  .gallery--grouped{
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}

/* ---------- Lightbox ---------- */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(20,15,11,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}

.lightbox.is-open{
  opacity: 1;
  pointer-events: auto;
}

/* Zoom compartido (obra principal y galerías): la imagen se mueve con transform */
.zoom-stage{
  position: relative;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: zoom-in;
}

.zoom-stage.is-zoomed{ cursor: grab; }
.zoom-stage.is-dragging{ cursor: grabbing; }

.zoom-stage__img{
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  will-change: transform;
  -webkit-user-drag: none;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
}

.zoom-stage__img.is-animating{ transition: transform 0.28s ease; }

.lightbox__stage{
  position: absolute;
  inset: 0;
  padding: 4.5rem 4.5rem 5.5rem;
}

@media (max-width: 700px){
  .lightbox__stage{ padding: 4rem 0.75rem 5.5rem; }
  .lightbox__nav{ width: 42px; height: 42px; background: rgba(15,10,7,0.55); }
  .lightbox__nav--prev{ left: 0.4rem; }
  .lightbox__nav--next{ right: 0.4rem; }
}

.lightbox__bar{
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  z-index: 1;
  transform: translateX(-50%);
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.45rem 1.1rem;
  border-radius: 14px;
  background: rgba(15,10,7,0.65);
  text-align: center;
  pointer-events: none;
}

.lightbox__caption{
  margin: 0;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  font-family: var(--font-display);
}

.lightbox__hint{
  margin: 0;
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
}

.lightbox__close{
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.lightbox__nav--prev{ left: 1rem; }
.lightbox__nav--next{ right: 1rem; }

.lightbox__close:hover,
.lightbox__nav:hover{
  background: rgba(255,255,255,0.22);
}

/* Sub-secciones dentro de una sección (ej. Obra + Proceso) */
.gallery-section{
  margin-top: 3rem;
}

.gallery-section__title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 1.25rem;
  color: var(--ink);
}

.gallery-section__intro{
  margin: -0.75rem 0 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 60ch;
}

/* ---------- Comparador antes / después ---------- */
.compare{
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: var(--compare-ratio, 4 / 3);
  box-shadow: 0 20px 45px -20px rgba(43,33,27,0.35);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
}

.compare__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.compare__after-wrap{
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos, 50) * 1%) 0 0);
}

.compare__after-wrap img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare__handle{
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--pos, 50) * 1%);
  width: 0;
  pointer-events: none;
}

.compare__handle::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

.compare__handle::after{
  content: "\276E \276F";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 2px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.compare__tag{
  position: absolute;
  top: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(20,15,11,0.55);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  pointer-events: none;
}

/* El lado izquierdo del slider revela la imagen "después"; el lado derecho
   deja ver la "antes" (que es la capa de base sin recortar) — por eso las
   etiquetas van cruzadas respecto a qué lado ocupa cada imagen. */
.compare__tag--before{ right: 0.75rem; }
.compare__tag--after{ left: 0.75rem; }

/* ---------- Visor grande de comparaciones con navegación ---------- */
.compare-viewer{
  max-width: 720px;
  margin: 0 auto;
}

.compare-viewer .compare{
  margin: 0 auto;
}

.compare-viewer__controls{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.compare-viewer__nav{
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.compare-viewer__nav:hover{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.compare-viewer__caption{
  min-width: 11rem;
  margin: 0;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 0.95rem;
}


/* ---------- Hero en escritorio: sin el hueco vacío arriba de la obra ---------- */
@media (min-width: 861px){
  .hero{
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .hero-reveal{
    position: relative;
    inset: auto;
    padding: 2.25rem 1rem 0;
  }

  .hero-footer{
    position: relative;
    padding: 2.75rem 1.75rem 1.6rem;
  }
}

/* ---------- Popup de inauguración ---------- */
.event-popup{
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  padding: 1.25rem;
  overflow-y: auto;
  background: rgba(15,10,7,0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: popupFade 0.4s ease;
}

.event-popup[hidden]{ display: none; }

@keyframes popupFade{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

.event-popup__card{
  --gold: #C99A4B;
  --pop-cream: #E8E4D8;
  container-type: inline-size;
  position: relative;
  display: flex;
  align-items: stretch;
  margin: auto;
  width: min(94vw, calc(88svh * 1.5), 980px);
  aspect-ratio: 3 / 2;
  background: rgba(30,23,18,0.9);
  color: var(--pop-cream);
  border-radius: 6px;
  box-shadow: 0 40px 90px -20px rgba(0,0,0,0.6);
  animation: popupRise 0.5s ease;
}

@keyframes popupRise{
  from{ opacity: 0; transform: translateY(14px) scale(0.98); }
  to{ opacity: 1; transform: none; }
}

.event-popup__close{
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(232,228,216,0.35);
  border-radius: 50%;
  background: rgba(30,23,18,0.95);
  color: var(--pop-cream);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.event-popup__close:hover{ background: #3a2c22; }
.event-popup__close:focus-visible{ outline: 2px solid var(--gold); outline-offset: 2px; }

/* Columna de texto: cada tamaño se mide en cqw de esta columna */
.event-popup__content{
  container-type: inline-size;
  flex: 0 0 53.333%;
}

.event-popup__inner{
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 9cqw 10cqw 7cqw;
}

.event-popup__eyebrow{
  margin: 0 0 1.5cqw;
  font-size: 3cqw;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event-popup__eyebrow span{ color: var(--gold); }

.event-popup__title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15.5cqw;
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--pop-cream);
}

.event-popup__title span{ color: var(--gold); }

.event-popup__author{
  margin: 1.5cqw 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 7.6cqw;
}

.event-popup__info{
  display: flex;
  align-items: flex-start;
  gap: 4.5cqw;
}

.event-popup__info--date{ margin-top: 5cqw; }
.event-popup__info--place{ margin-top: 4.5cqw; }

.event-popup__icon{
  flex: none;
  width: 8.6cqw;
  height: 8.6cqw;
  color: var(--pop-cream);
}

.event-popup__strong{
  margin: 0;
  font-size: 3.5cqw;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.16em;
}

.event-popup__small{
  margin: 1cqw 0 0;
  font-size: 2.6cqw;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.event-popup__small--place{
  margin-top: 0.5cqw;
  letter-spacing: 0.08em;
  font-size: 2.7cqw;
}

.event-popup__countdown{
  align-self: stretch;
  margin: auto 0;
  min-height: 11.7cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2cqw;
  border-top: 1px solid rgba(232,228,216,0.45);
  border-bottom: 1px solid rgba(232,228,216,0.45);
}

.event-popup__group{ white-space: nowrap; }

.event-popup__num{
  display: inline-block;
  min-width: 1.1em;
  text-align: right;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 4.8cqw;
  color: var(--gold);
}

.event-popup__num--tick{ animation: popupTick 0.45s ease; }

@keyframes popupTick{
  0%{ opacity: 0.2; transform: translateY(-40%); }
  100%{ opacity: 1; transform: none; }
}

.event-popup__unit{
  font-size: 2.2cqw;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.event-popup__logos{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4cqw;
}

.event-popup__logo{ display: block; height: auto; }
.event-popup__logo--gallery{ width: 32cqw; }
.event-popup__logo--dona{ width: 21cqw; }

/* Cuadro con la obra (a la derecha; en celular va debajo del texto) */
.event-popup__art{
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.4cqw 3.4cqw 3.4cqw 0;
}

.event-popup__frame{
  margin: 0;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  padding: 1.1cqw;
  background: linear-gradient(135deg, #d8ae62 0%, #8a6128 38%, #c99a4b 62%, #7a5424 100%);
  border-radius: 2px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,235,190,0.35);
}

.event-popup__mat{
  height: 100%;
  padding: 1.5cqw;
  background: #efe8d8;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25), inset 0 3px 8px rgba(0,0,0,0.35);
}

.event-popup__art-img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
}

@media (max-width: 719px){
  .event-popup__card{
    flex-direction: column;
    width: min(92vw, 420px);
    aspect-ratio: auto;
  }

  .event-popup__close{
    top: 8px;
    right: 8px;
  }

  .event-popup__content{ flex: none; }

  .event-popup__inner{
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .event-popup__art{
    padding: 0 20cqw 9cqw;
  }

  .event-popup__frame{
    height: auto;
    width: 100%;
  }
}

/* ---------- Visor de la obra principal (zoom) ---------- */
.art-viewer{
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  background: rgba(15,10,7,0.94);
  animation: popupFade 0.25s ease;
}

.art-viewer[hidden]{ display: none; }

.art-viewer__stage{
  flex: 1;
  min-height: 0;
  padding: 4.5rem 1.25rem 3.5rem;
}

.art-viewer__close{
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.art-viewer__close:hover{ background: rgba(255,255,255,0.22); }

.art-viewer__hint{
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(15,10,7,0.7);
  white-space: nowrap;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-display);
  font-size: 0.95rem;
  pointer-events: none;
}

@media (max-width: 860px){
  .hero-hint{
    padding: 0 3.2rem 0 1rem;
    font-size: 1rem;
  }

  /* Recorte vertical de la obra: se adapta mejor a una pantalla angosta */
  .hero-reveal__frame{
    width: min(84vw, calc(64svh * 0.6665));
    aspect-ratio: 1333 / 2000;
  }
}

/* ---------- Anuncio de exhibición (dentro de una serie) ---------- */
.expo-banner{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  margin: 0 0 2.5rem;
  background: #2E2117;
  color: var(--cream);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 45px -20px rgba(43,33,27,0.5);
}

.expo-banner__text{
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.expo-banner__eyebrow{
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C99A4B;
}

.expo-banner__title{
  margin: 0.15rem 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.3;
  color: var(--cream);
}

.expo-banner__date,
.expo-banner__address{
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(232,228,216,0.85);
}

.expo-banner__link{
  align-self: flex-start;
  margin-top: 0.9rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: #C99A4B;
  color: #2E2117;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.expo-banner__link:hover{ background: #E4C7A6; }

.expo-banner__map{
  position: relative;
  min-height: 220px;
}

.expo-banner__map iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.15) contrast(1.05);
}

@media (max-width: 720px){
  .expo-banner{ grid-template-columns: 1fr; }
  .expo-banner__map{ min-height: 260px; order: -1; }
}
