/* Arte de cine propio (PLAN_TIENDA_WEB_F1, T7): planos del R-01 a sangre, polvo de luz en la portada, emblema tras los precios
   y el panorámico del cierre. Movimiento lo justo: el plano se acerca despacio al cruzar la pantalla y una franja de luz
   lo barre una sola vez. */

/* ---------- polvo de luz sobre la portada (lo dibuja js/polvo.js) ---------- */
#portada canvas.polvo { z-index: 1; pointer-events: none; mix-blend-mode: screen; }

/* ---------- planos a sangre ---------- */
.plano-cine { position: relative; margin: 0; height: clamp(24rem, 52vw, 46rem); overflow: hidden; isolation: isolate; background: var(--suelo); }
.plano-cine picture { display: contents; }
.plano-cine img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--foco, 50% 50%); }
.plano-cine.cine-vivo img { transform: scale(calc(1.15 - var(--v, .5) * .15)); transform-origin: var(--foco, 50% 50%); will-change: transform; }
/* el plano sale de la noche y vuelve a ella */
.plano-cine::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, var(--suelo) 0%, transparent 24%, transparent 68%, var(--suelo) 100%), radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(5, 6, 7, .7) 100%); }
/* barrido de luz: una franja fría cruza el plano una vez, como un foco que pasa */
.plano-cine::after { content: ""; position: absolute; inset: -10% -60%; z-index: 1; pointer-events: none; opacity: 0; transform: translateX(-70%); mix-blend-mode: screen; background: linear-gradient(100deg, transparent 40%, rgba(var(--cian-rgb), .08) 46%, rgba(228, 248, 255, .2) 50%, rgba(var(--cian-rgb), .08) 54%, transparent 60%); }
.plano-cine.barrido::after { animation: barrido 2.8s var(--suave) .15s 1 both; }
@keyframes barrido {
  0% { opacity: 0; transform: translateX(-70%); }
  18%, 82% { opacity: 1; }
  100% { opacity: 0; transform: translateX(70%); }
}
.plano-cine figcaption { position: absolute; z-index: 2; left: max(1.25rem, calc((100vw - var(--ancho)) / 2)); bottom: clamp(1.5rem, 4vw, 3rem); font-family: var(--f-fina); font-weight: 300; font-size: var(--t-2); line-height: 1.15; max-width: 20ch; text-shadow: 0 2px 22px rgba(0, 0, 0, .95); }
.plano-cine figcaption::before { content: ""; display: block; width: 2.5rem; height: 1px; margin-bottom: 1rem; background: var(--cian); }

/* ---------- el emblema, detrás de los precios ---------- */
#precios { isolation: isolate; }
.fondo-emblema { position: absolute; inset: 0 0 auto; z-index: -1; height: clamp(26rem, 62vw, 54rem); overflow: hidden; pointer-events: none; }
.fondo-emblema picture { display: contents; }
.fondo-emblema img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: .42; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 45%, transparent 96%); mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 45%, transparent 96%); }

/* ---------- cierre: el panorámico con la última llamada (coche a la derecha, texto sobre el humo de la izquierda) ---------- */
#final { padding: 0; height: auto; aspect-ratio: 2.39; min-height: 30rem; max-height: 52rem; display: grid; align-items: center; justify-items: start; }
#final .final-texto { position: relative; z-index: 2; display: grid; justify-items: start; width: 42%; padding-left: max(1.25rem, calc((100vw - var(--ancho)) / 2)); }
#final h2 { text-wrap: balance; text-shadow: 0 2px 26px rgba(0, 0, 0, .95); }
@media (max-width: 700px) {
  #final { aspect-ratio: auto; height: 40rem; align-items: end; justify-items: center; }
  #final .final-texto { justify-items: center; text-align: center; width: auto; padding: 0 1.25rem 3rem; }
  #final .acciones { justify-content: center; }
}

/* T8 · tableta: en Precios el arte del fondo empieza por debajo del titular (a 768 px el alerón caía sobre el texto) */
@media (min-width: 701px) and (max-width: 1100px) {
  .fondo-emblema img { opacity: .3; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 34%, #000 58%, transparent 94%); mask-image: linear-gradient(to bottom, transparent 0%, transparent 34%, #000 58%, transparent 94%); }
}

/* ---------- móvil: el texto nunca encima de la pieza ---------- */
@media (max-width: 700px) {
  .plano-cine { height: 26rem; }
  .plano-cine::before { background: linear-gradient(to bottom, var(--suelo) 0%, transparent 18%, transparent 52%, var(--suelo) 92%); }
  .plano-cine figcaption { bottom: 1rem; font-size: var(--t-1); }
  .fondo-emblema img { opacity: .24; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, #000 55%, transparent 92%); mask-image: linear-gradient(to bottom, transparent 0%, transparent 30%, #000 55%, transparent 92%); }
  /* cierre: el coche arriba y la llamada debajo, sobre el suelo */
  #final img { height: 58%; }
  #final::before { background: linear-gradient(to bottom, var(--suelo) 0%, transparent 14%, transparent 38%, var(--suelo) 58%); }
}
