/* Matteria - portada de ficha: base comun de ficha4 y ficha5.
   Lo propio de cada una vive en su fichaN.css, que se carga despues. */

/* Matteria — post2: pieza editorial sobre fondo noche, retícula de 8 columnas */

/* Retícula de 8 columnas fluidas: el contenedor crece con la ventana hasta 1440px */
/* base.css pone --edge: 0px a partir de 1280px porque allí su retícula era fija y
   se centraba sola. Aquí el contenedor es fluido, así que necesita margen propio. */
@media (min-width: 1280px) {
    .grid-overlay {
    width: 100%;
    max-width: var(--grid-width);
    grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  }
}


.page { min-height: 100vh; }

/* Cuerpo de texto: un solo tratamiento para todos los párrafos sin clase
   (descripción, biografía, edición). Los párrafos con clase llevan el suyo. */

/* ---- Logotipo (clonado de la ficha) ---- */

/* El logo entra solo con fundido, sin desplazamiento: anula el fgDrop general. */
@keyframes logoFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .pos-top[data-load][data-shown] { animation-name: logoFade; }
}
.logo-link {
  --logo-h: clamp(24px, 2.9vw, 32px);
  position: relative;
  display: block;
  height: var(--logo-h);
  width: calc(var(--logo-h) * 0.833);
  overflow: hidden;
  color: var(--ink);
  transition: width 0.42s var(--ease), color 0.32s var(--ease);
}
.logo-link:hover,
.logo-link:focus-visible { width: calc(var(--logo-h) * 4.917); }
.logo-face { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
@media (max-width: 960px) { .logo-link { --logo-h: 48px; } }
@media (max-width: 767px) { .logo-link { --logo-h: 40px; } }
.logo-svg {
  pointer-events: none;
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
}

/* ---- Retícula ---- */

/* Contenedor: mismo papel que .wrap en la ficha (ancho máximo, centrado y márgenes) */
.entry {
  width: 100%;
  max-width: min(var(--grid-width), 100%);
  margin-inline: auto;
  padding: 0 var(--edge);
}
/* Retícula de 8 columnas de la ficha */
.grid-8 {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 0;
}
.grid-8.stats,
.grid-8.team { row-gap: var(--space-12); }

/* La tarjeta: texto y portada sobre las 8 columnas, centrada en la ventana */

.entry-header {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
/* Bloque de compra: caja de dos filas con filete, rótulos en mono versal */

/* Sobre el fondo oscuro de la portada, logo y textos van en ocre claro */
/* Zonas de posición vertical: arriba, centro, abajo */
.pos-top { margin-bottom: auto; }

.pos-bottom { margin-top: auto; }

/* ---- Encabezado ---- */


.entry-title {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--text-h2);
  line-height: 1.05;
  letter-spacing: -0.02em;
  transform: scaleX(0.86);
  transform-origin: left center;
}

.entry-rule {
  width: 96px;
  height: 4px;
  margin-top: 48px;
  background: var(--accent);
}


/* ---- Salida del hero ---- */

/* ficha.js escribe --hero-exit (0→1 mientras la tarjeta sale de pantalla):
   la tarjeta remolonea al salir con su contenido dentro, en bloque y en
   sincronía, mientras el contenido se funde. Nada se mueve respecto a la
   tarjeta, así que nada puede asomar fuera de ella.
   Se usa translate (no transform) para no pisar los revelados de carga. */
@media (prefers-reduced-motion: no-preference) {
  .header-hero > .entry-hero {
    translate: 0 calc(var(--hero-exit, 0) * 40px);
  }
  .entry-hero .entry-header,
  .entry-hero .entry-cover {
    opacity: calc(1 - var(--hero-exit, 0) * 1.25);
  }
}

/* ---- Portada ---- */

/* Visor 3D de la portada, clonado de la ficha */
.entry-cover .book3d {
  position: absolute;
  inset: 8px;
  z-index: 1;
  touch-action: none;
  cursor: grab;
}
.entry-cover .book3d:active { cursor: grabbing; }
/* El lienzo desborda el marco por los cuatro lados: al girar, las esquinas
   del libro se proyectan fuera del hueco de la portada y sin este margen se
   cortarían. book3d.js compensa el zoom de la cámara midiendo esta demasía,
   así el libro se ve del mismo tamaño. No captura el puntero: los eventos
   siguen viviendo en el hueco (.book3d). */
.entry-cover .book3d canvas {
  display: block;
  position: absolute;
  left: -40%;
  top: -40%;
  width: 180%;
  height: 180%;
  pointer-events: none;
}
/* La imagen plana es solo respaldo: marca el tamaño de la figura pero no se ve */
.page.no-3d .entry-cover img { visibility: visible; }
@media (max-width: 960px) {
  /* Permite el scroll vertical con el dedo; el giro del libro queda en horizontal */
  .entry-cover .book3d { touch-action: pan-y; }
}

/* La imagen manda: conserva su proporción natural (los libros vienen con distintos formatos)
   y su alto define la fila. La columna de texto se estira a ese alto, así el logo queda al ras
   del borde superior de la portada y la descripción al ras del inferior. */
.entry-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Halo neutro en blanco, se adapta a cualquier color de fondo */
  background: radial-gradient(circle at 50% 50%, rgb(255 255 255 / 0.5) 0%, rgb(255 255 255 / 0) 76%);
  filter: blur(34px);
  opacity: 0.9;
  animation: halo-wave 2s ease-in-out infinite;
  will-change: transform, border-radius;
}
@keyframes halo-wave {
  0% { transform: translate(0, 0); border-radius: 40% 60% 55% 45% / 55% 45% 55% 45%; }
  25% { transform: translate(3%, -2%); border-radius: 58% 42% 40% 60% / 42% 58% 45% 55%; }
  50% { transform: translate(-2%, 3%); border-radius: 44% 56% 60% 40% / 58% 40% 60% 42%; }
  75% { transform: translate(-3%, -1.5%); border-radius: 60% 40% 44% 56% / 44% 56% 40% 58%; }
  100% { transform: translate(0, 0); border-radius: 40% 60% 55% 45% / 55% 45% 55% 45%; }
}
/* Desktop: la altura la marca la portada; el texto se ajusta a ella. */
@media (min-width: 961px) {
  .entry { min-height: 100svh; }
}

/* ---- Descripción del libro (empieza por debajo del viewport) ---- */

/* Separación entre la portada y el texto */
/* En móvil la descripción respira lo mismo que la portada */
.entry-copy {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.entry-copy .intro { color: var(--ink); }
.entry-copy em { font-style: italic; }
@media (max-width: 960px) {
  
  .entry-copy { grid-column: 1 / -1; }
}

/* Enlaces recomendados, clonados de la ficha */
.entry-headline {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.entry-headline--sm {
  margin-top: 72px;
  margin-bottom: 0;
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
}
.entry-links li a {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 12px 0;
  line-height: var(--leading-md);
  color: var(--link);
  text-decoration: none;
  transition: color 0.28s var(--ease);
}
.entry-links li svg {
  order: -1;
  flex: none;
}
.entry-links li span,
.entry-links li svg {
  transition: translate 0.32s var(--ease), color 0.3s var(--ease);
}
.entry-links li:hover span { translate: 3px 0; }
@media (max-width: 960px) {
  .entry-headline--sm { margin-top: 56px; }
}

/* ---- Sidebar de compra (columnas 6-8) ---- */

.entry-side {
  grid-column: 6 / span 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.entry-buy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Botón de pago: misma caja que los enlaces de la fila (clonado de la ficha) */

/* Pliegue de detalles técnicos, clonado de la ficha */
.entry-folds {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}
.entry-fold summary::-webkit-details-marker { display: none; }
.entry-fold[open] summary span { transform: rotate(45deg); }
/* Acordeón: solo crece y decrece la altura, sin fundido ni desplazamiento */
.entry-fold::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    content-visibility 0.4s allow-discrete;
}
.entry-fold[open]::details-content { block-size: auto; }
.entry-fold summary span {
  flex: none;
  font-size: var(--text-xl);
  line-height: 1;
  transition: transform 0.24s var(--ease);
}
.fold-specs {
  margin: 0;
  padding: 0 16px 8px;
}
.fold-specs dt,
.fold-specs dd { transition: translate 0.32s var(--ease), color 0.3s var(--ease); }
@keyframes foldRow {
  from { opacity: 0; translate: 0 -4px; }
  to { opacity: 1; translate: 0 0; }
}
.entry-fold[open] .fold-specs > div { animation: foldRow 0.28s var(--ease) both; }
.entry-fold[open] .fold-specs > div:nth-child(1) { animation-delay: 0.06s; }
.entry-fold[open] .fold-specs > div:nth-child(2) { animation-delay: 0.12s; }
.entry-fold[open] .fold-specs > div:nth-child(3) { animation-delay: 0.18s; }
.entry-fold[open] .fold-specs > div:nth-child(4) { animation-delay: 0.24s; }
.entry-fold[open] .fold-specs > div:nth-child(5) { animation-delay: 0.3s; }
.entry-fold[open] .fold-specs > div:nth-child(6) { animation-delay: 0.36s; }
@media (prefers-reduced-motion: reduce) {
  .entry-fold::details-content { transition: none; }
  .entry-fold[open] .fold-specs > div { animation: none; }
}
@media (max-width: 960px) {
  .entry-side { grid-column: 1 / -1; margin-top: 40px; }
}

/* ---- Herramientas de retícula ---- */

.grid-tools {
  position: fixed;
  left: 12px;
  right: auto;
  bottom: 12px;
  
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.grid-overlay[hidden],
.rhythm-overlay[hidden] { display: none; }
.grid-col {
  height: 100%;
  background: rgb(from var(--accent) r g b / 0.08);
  border-left: 1px solid rgb(from var(--accent) r g b / 0.26);
  border-right: 1px solid rgb(from var(--accent) r g b / 0.26);
}
.rhythm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9300;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(from var(--accent) r g b / 0.16) 0 1px, transparent 1px 8px);
}
.rhythm-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgb(from var(--accent) r g b / 0.32) 0 1px, transparent 1px 64px);
}

/* ---- Responsive ---- */

/* Un solo escalón: hasta 960px el layout es de dos columnas (header 1-5, portada 6-8);
   por debajo se apila, como en la ficha. */
@media (max-width: 960px) {
    /* Orden apilado: logo centrado, portada y después el texto (como en la ficha) */
  .entry-header { display: contents; }
  .entry-header .pos-top {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    margin: 0;
  }
      .entry-header .pos-bottom {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
  }
  }

/* ---- Secciones clonadas de ficha1: cifras, galería, autor, equipo y materiales ---- */

.page :is([class*="mono"], .grid-toggle, .spec-summary, .meta, .stat-label) {
  font-feature-settings: normal;
}
:where(.page) h1:where(:not(.gallery-title, .stat-label, .meta)) {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  letter-spacing: -0.02em;
}
:where(.page) h2:where(:not(.gallery-title, .stat-label, .meta)) {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  letter-spacing: -0.01em;
}
:where(.page) h3:where(:not(.gallery-title, .stat-label, .meta)) {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  letter-spacing: -0.01em;
}

.meta,
.release-row {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  font-size: calc(clamp(0.68rem, 0.64rem + 0.2vw, 0.74rem) + 1px);
  text-transform: uppercase;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--soft);
}
.meta dt,
.meta dd,
.release-row dt,
.release-row dd {
  margin: 0;
}
@media (max-width: 960px) {
  .entry-title,
    :where(.page) h1:where(:not(.gallery-title, .stat-label, .meta)) { font-size: var(--text-h2); line-height: var(--leading-h2); }
}
.entry-head .meta dt,
.release-row dt {
  font-weight: 600;
}
.stats > h2 {
  grid-column: 1 / -1;
}
.stats > .stat:nth-of-type(1) {
  grid-column: 1 / span 2;
}
.stats > .stat:nth-of-type(2) {
  grid-column: 4 / span 2;
}
.stats > .stat:nth-of-type(3) {
  grid-column: 7 / span 2;
}
.stat-figure {
  margin: 0;
  font-family: 'Reckless Neue', 'GT Super', Georgia, serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: var(--leading-h2);
  letter-spacing: -0.03em;
}
/* Bandas a sangre: el fondo llega a los bordes de la ventana y el contenido
   vuelve a la retícula. Único sitio donde se declara el sangrado. */
.stats,
.gallery,
.author,
.team,
.posters {
  padding-block: 120px;
}
.stats {
  row-gap: 32px;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--gutter);
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.entry-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 36px;
  box-sizing: content-box;
  padding-bottom: 48px;
  overflow: visible;
  margin: 0;
  border: 0;
}
.author-bio .entry-portrait {
  grid-column: auto;
  grid-row: auto;
  justify-self: start;
  align-self: auto;
  width: 100%;
  max-width: none;
  margin-bottom: 24px;
  mix-blend-mode: multiply;
}
.author-bio {
  align-self: start;
}
.author-title em {
  font-style: normal;
}
.author-role {
  margin: 8px 0 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--text-md);
}
.author-works {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--borders);
}
.author-works li span,
.author-works li svg {
  transition: translate 0.32s var(--ease), color 0.3s var(--ease);
}
.author-works li:hover span:first-child {
  translate: 3px 0;
}
.author-works li:hover span:last-child,
.author-works li:hover svg {
  translate: -3px 0;
}
.author-work-link {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  line-height: var(--leading-md);
  gap: 1rem;
  text-decoration: none;
  transition: color 0.28s var(--ease);
}
.author > * {
  position: relative;
}
.author {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  grid-template-rows: auto auto minmax(240px, 1fr);
  column-gap: var(--gutter);
}
.author-statement {
  grid-column: 1 / span 5;
  grid-row: 1;
  position: relative;
}
.author-quote {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: 400;
  font-size: 2.75rem;
  line-height: var(--leading-h3);
  letter-spacing: -0.015em;
  text-wrap: pretty;
}
.author-aside {
  grid-column: 4 / span 4;
  grid-row: 3;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
}
@media (max-width: 960px) {
  .author-statement { grid-column: 1 / -1; }
  .author-quote { font-size: 2rem; line-height: 2.25rem; }
  .author-aside { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .author {
      min-height: 0;
      grid-template-rows: none;
    }
  .author-quote { font-size: 1.75rem; line-height: var(--leading-xl); }
  .author-aside {
      grid-column: 1 / -1;
      grid-row: auto;
      margin-top: 40px;
      margin-left: 15%;
    }
}
@media (max-width: 480px) {
  .author-quote { font-size: var(--text-xl); line-height: var(--leading-lg); }
}
@media (max-width: 960px) {
  .author {
      min-height: 0;
      grid-template-rows: auto;
    }
  .author-aside { align-self: start; margin-top: 40px; }
}
.case-text p { padding-block: 32px; }
.release-details-table {
  margin: 0;
  border-block: 1px solid var(--borders);
  border-inline: 0;
}
.release-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 48px;
  gap: 8px;
  padding: 12px 0;
  font-feature-settings: normal;
  text-transform: uppercase;
  border-bottom: 1px solid var(--borders);
}
.release-row:last-child {
  border-bottom: 0;
}
.release-row dt,
.release-row dd {
  transition: translate 0.32s var(--ease), color 0.3s var(--ease);
}
.release-row:hover dd {
  translate: -3px 0;
}
.release-details-table dt,
.release-details-table dd { margin: 0; }
.team-avatars {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.team-avatar {
  position: relative;
  display: inline-flex;
}
.release-details-table dd:has(.team-avatars) {
  overflow: visible;
}
.team-avatar + .team-avatar {
  margin-left: -10px;
}
.team-avatar:hover {
  z-index: 2;
}
.team-avatar::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translate(-50%, 4px);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--dark);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.team-avatar:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}
.release-details-title {
  margin: 0 0 16px;
  font-family: 'Reckless Neue', 'GT Super', Georgia, serif;
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.release-row:hover dt {
  color: var(--light);
  translate: 3px 0;
}
.team { align-items: start; }
.team .case-text {
  grid-column: 5 / span 4;
  max-width: none;
}
.team image-slot {
  grid-column: 1 / span 4;
  grid-row: 1;
  aspect-ratio: 4 / 5;
}
@media (max-width: 960px) {
  .team { row-gap: 40px; }
  .team .case-text { grid-column: 1 / -1; }
  .team image-slot { grid-column: 1 / -1; grid-row: auto; }
}
.posters {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
  display: block;
}
.posters .section-head {
  position: relative;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-areas: 'stack';
  place-items: center;
  align-content: center;
  text-align: center;
}
.posters .section-title {
  grid-area: stack;
  position: relative;
  z-index: 1;
  margin: 0;
  align-self: center;
  font-family: 'Reckless Neue', 'GT Super', Georgia, serif;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.scatter {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 100vh;
  height: 100vh;
  margin: 0;
  padding-inline: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
  touch-action: pan-y;
}
.scatter-wrap {
  position: relative;
  width: 100%;
  max-width: var(--content);
  height: 100%;
  margin-inline: auto;
  pointer-events: none;
}
.scatter img:hover {
  --hov: -3deg;
  --hsc: 1.06;
  box-shadow: 0 1.75rem 3.25rem rgb(from var(--dark) r g b / 0.45);
}
.scatter img:nth-child(3) {
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 42%;
}
@keyframes scatter-float {
  0%   { translate: 0 -5.5%; }
  25%  { translate: 4% 0; }
  50%  { translate: 0 5.5%; }
  75%  { translate: -4% 0; }
  100% { translate: 0 -5.5%; }
}
.scatter img:nth-child(1) { animation-duration: 9s; animation-delay: -1s; }
.scatter img:nth-child(2) { animation-duration: 11s; animation-delay: -5s; }
.scatter img:nth-child(3) { animation-duration: 10s; animation-delay: -3s; }
.scatter img:nth-child(4) { animation-duration: 12s; animation-delay: -8s; }
.scatter img.is-dragging {
  animation: none;
  translate: none;
  transition: box-shadow 0.3s ease;
}
@media (max-width: 960px) {
  .posters .section-head { padding-top: 0; }
  .scatter { min-height: 0; height: 560px; }
}
.gallery {
  position: relative;
  /* Unidad de columna tomada de la retícula viva, sea de 8, 4, 2 o 1 columnas */
  --track: min(var(--content), 100vw - 2 * var(--edge));
  --grid-col: calc((var(--track) - (var(--grid-columns) - 1) * var(--grid-gutter)) / var(--grid-columns));
  /* Escritorio: 5 columnas de 8 */
  --slide-span: 5;
  --slide-w: calc(var(--slide-span) * var(--grid-col) + (var(--slide-span) - 1) * var(--grid-gutter));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-block: 0;
}
.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.gallery-nav { display: flex; gap: 12px; }
.gallery-arrow {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--borders);
  background: none;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.24s var(--ease), color 0.24s var(--ease), opacity 0.24s var(--ease), border-color 0.24s var(--ease);
}
.gallery-arrow[disabled] { opacity: 0.28; pointer-events: none; }
.slider {
  display: flex;
  gap: var(--grid-gutter);
  margin-right: calc(-1 * var(--bleed-pad));
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
.slider::-webkit-scrollbar { display: none; }
@media (max-width: 960px) {
  /* 3 de 4 columnas: el reparto no es exacto, así el siguiente slide asoma por la derecha */
  .gallery { --slide-span: 3; }
}
@media (max-width: 760px) {
    .gallery-nav { display: none; }
  .slider {
      gap: 0.75rem;
      margin-inline: calc(-1 * var(--edge)) calc(-1 * var(--edge));
      padding-inline: var(--edge) 0;
      scroll-padding-left: var(--edge);
      cursor: grab;
    }
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(24,17,14,0.96);
  display: grid;
  place-items: center;
}
.lightbox[hidden] { display: none; }
.lightbox-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
}
.lightbox-close-slot {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 3;
  display: flex;
}
.lightbox-close {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(24,17,14,0.45);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: background 0.3s ease, color 0.3s ease;
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(24,17,14,0.72);
  color: #fff;
}
@media (max-width: 960px) {
  .gallery { min-height: 0; margin-bottom: 0; }
  .gallery { margin-block: 0; }
}
@media (max-width: 760px) {
  .lightbox-close-slot {
      top: calc(0.75rem + env(safe-area-inset-top));
      left: 0;
      right: 0;
      bottom: auto;
      justify-content: center;
    }
}
@media (max-width: 960px) {
  .stats {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      column-gap: 32px;
    }
  .stats > .stat:nth-of-type(1),
    .stats > .stat:nth-of-type(2),
    .stats > .stat:nth-of-type(3) { grid-column: auto; }
  }
@media (max-width: 767px) {
    .stats { column-gap: 24px; }
  .stat-figure { font-size: 3.5rem; line-height: var(--leading-h3); }
  }
@media (max-width: 479px) {
  .stats { column-gap: 16px; }
  .stat-figure { font-size: 2.5rem; line-height: var(--leading-h4); }
  }
@media (max-width: 960px) {
  .stats { order: 6; }
  .gallery { order: 7; }
  .author { order: 8; }
  .entry-divider:nth-of-type(1) { order: 9; }
  .team { order: 10; }
  .posters { order: 12; }
  .entry-divider { padding-top: 48px; }
    .posters .section-title { font-size: var(--text-h2); line-height: var(--leading-h2); }
  .lightbox-close-slot {
      top: auto;
      right: auto;
      left: 50%;
      bottom: calc(1.5rem + env(safe-area-inset-bottom));
      translate: -50% 0;
      justify-content: center;
    }
}

/* ---- Slides del carrusel y hueco de imagen ---- */

image-slot {
  width: 100%;
}
.slide {
  flex: 0 0 var(--slide-w);
  width: var(--slide-w);
  aspect-ratio: 16 / 9;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 760px) {
  .gallery {
      --slide-span: 2;
      gap: var(--grid-gutter);
    }
}
@media (max-width: 767px) {
  .entry-title,
    :where(.page) h1:where(:not(.gallery-title, .stat-label, .meta)) { font-size: var(--text-h2); line-height: var(--leading-h2); }
}
/* ---- CTA anclado abajo (movil) ---- */
.buy-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: none;
  padding: 12px max(16px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom));
  background: rgb(from var(--dark) r g b / 0.55);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--borders);
  box-shadow: 0 -12px 32px -24px rgb(0 0 0 / 0.7);
  translate: 0 110%;
  opacity: 0;
  transition: translate 0.42s var(--ease), opacity 0.32s var(--ease);
}
.buy-dock.is-on { translate: 0 0; opacity: 1; }
.buy-dock .buy-row { display: flex; }
.buy-cta--dock { width: 100%; }

@media (max-width: 960px) {
  .buy-dock {
    display: block;
    background: var(--veil-white-10, rgb(255 255 255 / 0.1));
  }
  .entry-side .entry-buy .buy-row,
  .entry-side .entry-pays { display: none; }
}
