/* Imágenes bajo la portada. Cada versión las cuelga a su manera (nada de cinco fichas iguales):
   Métro, estaciones de una línea · La guía, láminas fuera de texto · El teatro, palcos en curva ·
   La noche, ventanas de una fachada · Cine, tira de película con subtítulos. */
.pf { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.6rem, 1.2vw, 1.1rem); padding: clamp(1rem, 2vw, 1.75rem) clamp(1rem, 4vw, 2.5rem); }
.pf__f { margin: 0; min-width: 0; position: relative; }
.pf__f img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pf__f figcaption { line-height: 1.25; }
.pf:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
@media (max-width: 799px) {
  .pf { display: flex; gap: .9rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 1rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .pf::-webkit-scrollbar { display: none; }
  .pf__f { flex: 0 0 auto; scroll-snap-align: start; }
}

/* ---------- Métro: las fotos cuelgan de una línea, cada una es una estación ---------- */
.pf--metro { --linea: #ffcd00; --tinta: #141e55; grid-template-columns: 1.25fr .9fr 1.15fr .85fr 1.2fr; grid-template-rows: auto 18px auto; column-gap: clamp(.75rem, 2vw, 1.75rem); row-gap: 0; padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.pf--metro::before { content: ''; grid-row: 2; grid-column: 1 / -1; align-self: center; height: 10px; border-radius: 5px; background: var(--linea); margin-inline: calc(-1 * clamp(1rem, 4vw, 2.5rem)); }
.pf--metro .pf__f { display: flex; flex-direction: column; gap: .65rem; }
.pf--metro .pf__f:nth-child(odd) { grid-row: 1; justify-content: flex-end; padding-bottom: 1.6rem; }
.pf--metro .pf__f:nth-child(even) { grid-row: 3; flex-direction: column-reverse; justify-content: flex-end; padding-top: 1.6rem; }
.pf--metro .pf__f:nth-child(1) { grid-column: 1; } .pf--metro .pf__f:nth-child(2) { grid-column: 2; } .pf--metro .pf__f:nth-child(3) { grid-column: 3; }
.pf--metro .pf__f:nth-child(4) { grid-column: 4; } .pf--metro .pf__f:nth-child(5) { grid-column: 5; }
.pf--metro .pf__f img { border-radius: 12px; aspect-ratio: 4 / 3; height: auto; box-shadow: 0 1px 2px rgb(20 30 85 / .12), 0 14px 30px -14px rgb(20 30 85 / .45); }
.pf--metro .pf__f:nth-child(2) img, .pf--metro .pf__f:nth-child(4) img { aspect-ratio: 1; }
/* la estación: círculo blanco sobre la línea, con su nombre */
.pf--metro .pf__f::after { content: ''; position: absolute; left: 1.1rem; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--tinta); box-sizing: border-box; }
.pf--metro .pf__f:nth-child(odd)::after { bottom: -18px; }
.pf--metro .pf__f:nth-child(even)::after { top: -18px; }
.pf--metro figcaption { display: flex; align-items: center; gap: .5rem; padding-left: 2.6rem; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; color: var(--tinta); }
.pf--metro .pf__f:nth-child(odd) figcaption { margin-bottom: -.4rem; }
.pf--metro .pf__f:nth-child(even) figcaption { margin-top: -.4rem; }
@media (max-width: 799px) {
  .pf--metro { padding-block: 0 1.5rem; }
  .pf--metro::before { position: absolute; left: 0; right: 0; top: 1.6rem; margin: 0; height: 8px; width: max(100%, 1150px); }
  .pf--metro .pf__f, .pf--metro .pf__f:nth-child(odd), .pf--metro .pf__f:nth-child(even) { flex-direction: column; justify-content: flex-start; padding: 3rem 0 0; width: 62vw; }
  .pf--metro .pf__f:nth-child(odd)::after, .pf--metro .pf__f:nth-child(even)::after { top: calc(1.6rem - 5px); bottom: auto; }
  .pf--metro .pf__f figcaption, .pf--metro .pf__f:nth-child(odd) figcaption, .pf--metro .pf__f:nth-child(even) figcaption { position: absolute; top: .1rem; margin: 0; }
  .pf--metro .pf__f img { aspect-ratio: 4 / 3 !important; }
}

/* ---------- La guía: láminas fuera de texto, una grande y cuatro de acompañamiento ---------- */
.pf--guia { counter-reset: lam 1; max-width: 1240px; margin: 1.25rem auto 0; background: #f7f7f4; color: #1a2042; box-shadow: 0 1px 2px rgb(5 11 38 / .2), 0 18px 40px -20px rgb(5 11 38 / .6);
  grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1.6rem; padding: clamp(1.25rem, 3vw, 2.5rem); height: clamp(460px, 44vw, 620px); }
.pf--guia::after { content: ''; position: absolute; inset: 10px; border: 1px solid rgb(26 32 66 / .18); pointer-events: none; }
.pf--guia .pf__f { counter-increment: lam; display: flex; flex-direction: column; gap: .5rem; min-height: 0; }
.pf--guia .pf__f:first-child { grid-row: 1 / 3; }
.pf--guia .pf__f img { flex: 1; min-height: 0; outline: 1px solid rgb(26 32 66 / .3); outline-offset: 4px; }
.pf--guia figcaption { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: .9rem; color: #3a4166; }
.pf--guia figcaption::before { content: 'Lám. ' counter(lam, upper-roman) '.\2002'; font-style: normal; font-variant-caps: all-small-caps; letter-spacing: .1em; color: #1a2042; }
@media (max-width: 799px) {
  .pf--guia { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: none; height: auto; overflow: visible; gap: 1.1rem .9rem; margin-inline: 1rem; }
  .pf--guia .pf__f:first-child { grid-row: auto; grid-column: 1 / -1; }
  .pf--guia .pf__f img { flex: none; aspect-ratio: 1; height: auto; }
  .pf--guia .pf__f:first-child img { aspect-ratio: 3 / 2; }
}

/* ---------- El teatro: palcos que crecen hacia el centro, como una platea en curva ---------- */
.pf--teatro { background: #120c0d; align-items: end; gap: clamp(.6rem, 1.6vw, 1.5rem); padding-top: 2rem; padding-bottom: 2.25rem; }
.pf--teatro::after { content: ''; position: absolute; left: clamp(1rem, 4vw, 2.5rem); right: clamp(1rem, 4vw, 2.5rem); bottom: 1.15rem; height: 6px; border-block: 1px solid #b8955a; }
.pf--teatro .pf__f img { height: clamp(190px, 18vw, 250px); border-radius: 999px 999px 0 0; border: 1px solid #b8955a; outline: 1px solid rgb(184 149 90 / .45); outline-offset: 5px; box-shadow: 0 22px 40px -18px rgb(0 0 0 / .9); }
.pf--teatro .pf__f:nth-child(2) img, .pf--teatro .pf__f:nth-child(4) img { height: clamp(230px, 22vw, 310px); }
.pf--teatro .pf__f:nth-child(3) img { height: clamp(270px, 26vw, 370px); }
.pf--teatro figcaption { margin-top: .9rem; text-align: center; color: #dcc9a0; letter-spacing: .16em; text-transform: uppercase; font-size: .72rem; }
@media (max-width: 799px) {
  .pf--teatro .pf__f { width: 52vw; }
  .pf--teatro .pf__f img, .pf--teatro .pf__f:nth-child(n) img { height: 64vw; }
  .pf--teatro::after { display: none; }
}

/* ---------- La noche: ventanas de una fachada, a distintas alturas, con su carpintería ---------- */
.pf--noche { background: #070b24; align-items: start; padding-bottom: 3.5rem; }
.pf--noche .pf__f:nth-child(even) { transform: translateY(2.25rem); }
.pf--noche .pf__f:nth-child(3) { transform: translateY(-.75rem); }
.pf--noche .pf__f img { aspect-ratio: 3 / 4; height: auto; border: 7px solid #1c2658; box-shadow: 0 26px 50px -22px rgb(231 163 60 / .55), 0 2px 4px rgb(0 0 0 / .5); }
.pf--noche .pf__f::after { content: ''; position: absolute; left: 7px; right: 7px; top: 7px; aspect-ratio: 3 / 4; height: auto; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(50% - 2px), #1c2658 calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)), linear-gradient(180deg, transparent 38%, #1c2658 38% calc(38% + 4px), transparent calc(38% + 4px)); }
.pf--noche figcaption { margin-top: .75rem; color: #f5e3bf; font-weight: 700; letter-spacing: .02em; }
.pf--noche figcaption::before { content: ''; display: inline-block; width: .55rem; height: .55rem; margin-right: .5rem; border-radius: 50%; background: #e7a33c; vertical-align: .05em; }
@media (max-width: 799px) {
  .pf--noche { padding-bottom: 1.5rem; }
  .pf--noche .pf__f, .pf--noche .pf__f:nth-child(n) { transform: none; width: 46vw; }
}

/* ---------- Cine: tira de película, con el texto como subtítulo ---------- */
.pf--cine { counter-reset: foto; background: #0e0e10; gap: 6px; padding: 30px 6px; background-image: repeating-linear-gradient(90deg, #f3f3f1 0 12px, transparent 12px 30px), repeating-linear-gradient(90deg, #f3f3f1 0 12px, transparent 12px 30px); background-size: 100% 9px, 100% 9px; background-position: 0 10px, 0 calc(100% - 10px); background-repeat: no-repeat; }
.pf--cine .pf__f { counter-increment: foto; }
.pf--cine .pf__f img { aspect-ratio: 4 / 3; height: auto; filter: grayscale(1) contrast(1.12); }
.pf--cine .pf__f::before { content: counter(foto) 'A'; position: absolute; top: -21px; left: 6px; font-size: .62rem; font-weight: 700; letter-spacing: .08em; color: #f2d33d; }
.pf--cine figcaption { position: absolute; left: 8%; right: 8%; bottom: .7rem; text-align: center; color: #f2d33d; font-weight: 700; font-size: .95rem; text-shadow: 0 0 2px #000, 0 1px 3px #000, 0 0 10px rgb(0 0 0 / .8); }
@media (max-width: 799px) {
  .pf--cine { background-size: max(100%, 1300px) 9px, max(100%, 1300px) 9px; }
  .pf--cine .pf__f { width: 70vw; }
}

/* ---------- Portadas algo más bajas, para que las imágenes asomen en la primera pantalla ---------- */
@media (min-width: 801px) {
  body .hero.wrap { min-height: min(calc(82dvh - 72px), 640px); padding-block: clamp(1.5rem, 3vw, 2.5rem); }
  body .hero.wrap .hero__art { max-width: 500px; }
}
section.hero[data-hero] { min-height: 74vh; min-height: 74svh; padding-bottom: 7vh; }
section.hero[data-hour] { min-height: 78vh; min-height: 78dvh; }
section.hero[data-hour] .facade--hero { max-height: 72dvh; overflow: hidden; }
section.hero[data-hour] .hero__copy { padding-bottom: clamp(5rem, 13vh, 9rem); }
#portadilla .title-page { padding-block: clamp(1.5rem, 3vw, 2.5rem); min-height: 0 !important; }
#portadilla { min-height: 0 !important; }
#portadilla .plate-hero { width: min(100%, 320px); }
section.hero[aria-labelledby="hero-title"]:not([data-hero]):not([data-hour]) { min-height: 0; padding-block: clamp(1.5rem, 4vh, 3rem); }
section.hero[aria-labelledby="hero-title"]:not([data-hero]):not([data-hour]) .hero__frame { max-width: 420px; justify-self: end; }
@media (max-width: 800px) {
  section.hero[data-hour] { min-height: 0; }
  section.hero[data-hour] .facade--hero { max-height: 34vh; }
  section.hero[data-hour] .hero__copy { padding-bottom: 1.25rem; }
  section.hero[data-hero] { min-height: 62svh; }
  #portadilla .plate-hero { width: 60%; }
  body .hero.wrap .hero__art { max-width: 300px; }
  section.hero[aria-labelledby="hero-title"]:not([data-hero]):not([data-hour]) .hero__frame { max-width: 280px; justify-self: start; }
}
html:has(.pf--noche), html:has(.pf--noche) body { overflow-x: clip; }
html:has(.pf--noche) .top { max-width: 100vw; }
