/* Moxen (moxen.cl/recursos) · licencia: celuloide-LICENCIA.txt */
.ah-media {
  --ce-texto: var(--on-cosmos, #f4f4f4);
  --ce-suave: rgba(240, 232, 215, .62);
  --ce-tenue: rgba(240, 232, 215, .26);
  --ce-luz: #f6eedb;
  --ce-luz-borde: #e0cfa9;
  --ce-pelicula: #161412;
  --ce-borde-tira: rgba(255, 255, 255, .55);
  --ce-ancho: 270px; --ce-alto: 180px; --ce-hueco: 18px; --ce-lupa: 340px; --ce-aumento: 1.55;
  --ce-curva: cubic-bezier(.22, 1, .36, 1);
}
.ce-mesa {
  position: relative; isolation: isolate; width: 100%; height: clamp(24rem, 62vh, 29rem); overflow: hidden; border-radius: 26px;
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  background: radial-gradient(ellipse at 50% 50%, var(--ce-luz) 35%, var(--ce-luz-borde) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 90px -40px rgba(0, 0, 0, .8);
}
.ce-mesa.is-arrastre { cursor: grabbing; }
.ce-mesa:focus-visible { outline: 2px solid var(--ce-texto); outline-offset: 4px; }

.ce-tira { position: absolute; left: 0; top: 50%; height: 270px; margin-top: -135px; display: flex; align-items: center; gap: var(--ce-hueco); padding: 0 var(--ce-hueco); will-change: transform; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .28)); }
.ce-pelicula {
  position: absolute; inset: 0; background: var(--ce-pelicula);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='270'%3E%3Cpath fill-rule='evenodd' d='M0 0H26V270H0ZM8 8h10a2.5 2.5 0 0 1 2.5 2.5v11a2.5 2.5 0 0 1-2.5 2.5H8a2.5 2.5 0 0 1-2.5-2.5v-11A2.5 2.5 0 0 1 8 8ZM8 246h10a2.5 2.5 0 0 1 2.5 2.5v11a2.5 2.5 0 0 1-2.5 2.5H8a2.5 2.5 0 0 1-2.5-2.5v-11a2.5 2.5 0 0 1 2.5-2.5Z'/%3E%3C/svg%3E") repeat-x 0 0 / 26px 270px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='270'%3E%3Cpath fill-rule='evenodd' d='M0 0H26V270H0ZM8 8h10a2.5 2.5 0 0 1 2.5 2.5v11a2.5 2.5 0 0 1-2.5 2.5H8a2.5 2.5 0 0 1-2.5-2.5v-11A2.5 2.5 0 0 1 8 8ZM8 246h10a2.5 2.5 0 0 1 2.5 2.5v11a2.5 2.5 0 0 1-2.5 2.5H8a2.5 2.5 0 0 1-2.5-2.5v-11a2.5 2.5 0 0 1 2.5-2.5Z'/%3E%3C/svg%3E") repeat-x 0 0 / 26px 270px;
}
.ce-cuadro { position: relative; flex: none; width: var(--ce-ancho); height: var(--ce-alto); margin: 0; border-radius: 3px; background: #000; cursor: inherit; }
.ce-foto { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: #000; }
.ce-foto img { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; pointer-events: none; }
.ce-tira:not(.ce-copia) .ce-foto { filter: invert(1) contrast(.9) saturate(.4) sepia(.5); }
.ce-cuadro::before, .ce-cuadro::after { position: absolute; left: 4px; font-size: 9px; font-weight: 600; letter-spacing: .22em; color: var(--ce-borde-tira); white-space: nowrap; }
.ce-cuadro::before { content: "VESTIGIUM  ▸"; bottom: calc(100% + 8px); opacity: .7; }
.ce-cuadro::after { content: attr(data-n) "            " attr(data-n) "A"; top: calc(100% + 8px); white-space: pre; }

.ce-lupa {
  position: absolute; left: 50%; top: 50%; width: var(--ce-lupa); height: var(--ce-lupa); z-index: 2; pointer-events: none;
  margin: calc(var(--ce-lupa) / -2) 0 0 calc(var(--ce-lupa) / -2); border-radius: 50%;
  background: conic-gradient(from 210deg, #0d0d0d, #5c5c5c 12%, #1a1a1a 26%, #2c2c2c 44%, #0b0b0b 58%, #4a4a4a 72%, #141414 86%, #0d0d0d);
  box-shadow: 0 34px 50px -16px rgba(0, 0, 0, .55), 0 10px 18px -6px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ce-lente, .ce-brillo { position: absolute; inset: 11px; border-radius: 50%; }
.ce-lente { overflow: hidden; background: var(--ce-luz); }
.ce-copia { top: 0; left: 0; margin: 0; transform-origin: 0 0; filter: none; }
.ce-brillo {
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 30%), radial-gradient(circle at 70% 82%, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 22%), radial-gradient(circle, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, .38) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 10px 24px rgba(0, 0, 0, .35);
}

.ce-pie { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; width: 100%; margin-top: clamp(14px, 2vw, 22px); padding: 0 .4rem; }
.ce-texto-pie { flex: 1 1 auto; min-width: 0; }
.ce-rotulo { margin: 0; display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.ce-numero { font-size: .85rem; font-weight: 500; letter-spacing: .14em; color: var(--ce-suave); font-variant-numeric: tabular-nums; }
.ce-titulo { display: inline-block; font-family: var(--font-display); font-size: clamp(1.3rem, 1.05rem + 1vw, 1.85rem); font-weight: 450; letter-spacing: -.01em; line-height: 1.1; color: var(--ce-texto); }
.ce-desc { margin: .5em 0 0; max-width: 62ch; font-size: .98rem; line-height: 1.55; color: var(--ce-suave); min-height: 3.1em; }
.ce-contador { flex: none; display: flex; gap: .15rem; }
.ce-marca { position: relative; width: 1.3rem; height: 2.2rem; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ce-texto); }
.ce-marca::before { content: ""; position: absolute; left: 50%; bottom: .5rem; width: 1.5px; height: .7rem; margin-left: -.75px; border-radius: 1px; background: var(--ce-tenue); transform-origin: 50% 100%; transition: transform .5s var(--ce-curva), background-color .3s; }
.ce-marca:hover::before { background: var(--ce-suave); }
.ce-marca[aria-current="true"]::before { background: var(--ce-texto); transform: scaleY(1.9); }
.ce-marca:focus-visible { outline: 2px solid var(--ce-texto); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 700px) {
  .ah-media { --ce-ancho: 200px; --ce-alto: 133px; --ce-hueco: 14px; --ce-lupa: 250px; }
  .ce-mesa { height: 21rem; }
  .ce-pie { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .ce-marca { width: 1.05rem; }
}

.ah-media > .ce-mesa, .ah-media > .ce-pie { grid-column: 1 / -1; }
.ah-media > .ce-mesa { grid-row: 2; }
.ah-media > .ce-pie { grid-row: 3; }

.ce-grande { display: grid; place-items: center; width: 100%; height: clamp(300px, 54vw, 640px); margin: clamp(18px, 2.6vw, 30px) 0 0; overflow: hidden; }
.ce-grande img { grid-area: 1 / 1; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 22px; filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .5)); }
.ah-media > .ce-grande { grid-column: 1 / -1; grid-row: 3; }
.ah-media > .ce-pie { grid-row: 4; }

.ah-media > .ce-grande { display: none; }
.ah-media > .ce-pie { grid-row: 3; }
.ce-vista { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.82); opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .55s var(--ce-curva); }
.ce-vista.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.ce-vista img { display: block; width: auto; height: auto; max-width: min(86vw, 760px); max-height: min(74vh, 520px); border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .12); background: #12232d; }
@media (prefers-reduced-motion: reduce) { .ce-vista { transition: opacity .2s ease; transform: translate(-50%, -50%); } .ce-vista.is-on { transform: translate(-50%, -50%); } }

.ce-vista { display: none !important; }
.ce-ampliar { position: absolute; left: 50%; top: calc(50% + var(--ce-lupa) / 2 - 62px); transform: translateX(-50%); z-index: 4; display: inline-flex; align-items: center; gap: .5em; padding: .55em 1.05em .55em 1.15em;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; background: rgba(12, 22, 29, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f6efdf;
  font: 600 .86rem/1 var(--font-label); letter-spacing: .02em; cursor: pointer; transition: background-color .25s, transform .3s var(--ce-curva); }
.ce-ampliar svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ce-ampliar:hover { background: rgba(12, 22, 29, .95); transform: translateX(-50%) scale(1.06); }
.ce-ampliar:focus-visible, .ce-volver:focus-visible { outline: 2px solid #f6efdf; outline-offset: 3px; }
.ce-bloqueo { overflow: hidden; }
.ce-completa { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: clamp(14px, 3vw, 40px); }
.ce-completa[hidden] { display: none; }
.ce-c-fondo { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(22, 40, 50, .97), rgba(6, 12, 17, .98)); }
.ce-c-fig { position: relative; margin: 0; display: grid; justify-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.ce-c-fig img { display: block; width: auto; height: auto; max-width: min(96vw, 1500px); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); border-radius: 18px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .1); }
.ce-c-fig figcaption { margin: 0; font-family: var(--font-display); font-size: clamp(1.05rem, .95rem + .5vw, 1.4rem); color: #f1e8d3; text-align: center; }
.ce-volver { position: absolute; z-index: 2; right: clamp(14px, 3vw, 36px); bottom: clamp(14px, 2.6vw, 30px); display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.3em; border: 0; border-radius: 999px; background: #E8D5B5; color: #2a1c0e;
  font: 700 .95rem/1 var(--font-label); cursor: pointer; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .8); transition: transform .3s cubic-bezier(.22, 1, .36, 1), background-color .25s; }
.ce-volver:hover { background: #f3e4c4; transform: translateY(-2px); }
.ce-volver svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) { .ce-ampliar { top: calc(50% + var(--ce-lupa) / 2 - 50px); } .ce-c-fig img { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); } }

.ce-pie { display: none !important; }

.ce-c-fig figcaption { display: none; }

.ah-media { --ce-pelicula: #2b2420; }
.ce-mesa { background: transparent; box-shadow: none; }
.ce-cuadro, .ce-foto { background: #1d1815; }
.ce-tira { filter: drop-shadow(0 26px 22px rgba(0, 0, 0, .6)) drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }

.ce-cerrar { position: absolute; z-index: 3; top: clamp(14px, 2.6vw, 30px); right: clamp(14px, 3vw, 36px); display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: #E8D5B5; color: #2a1c0e; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7); transition: transform .25s ease, background-color .25s; }
.ce-cerrar:hover { background: #f3e4c4; transform: scale(1.06); }
.ce-cerrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ce-cerrar:focus-visible { outline: 2px solid #f6efdf; outline-offset: 3px; }
.ce-completa { cursor: zoom-out; }
