/* ═══════════════════════════════════════════════════════
   FILM · Sala de cine  (sección #caracteristicas)
   Reposo: pantalla negra flotando sobre el blanco de la landing.
   Play:   se apagan las luces de toda la página y la pantalla
           ilumina el polvo y el piso a su alrededor.
   JS: js/cine-film.js (estados en [data-state] + clases is-*)
═══════════════════════════════════════════════════════ */

.cine {
  /* Ancho que siempre cabe completo en la ventana (alto ≈ 76% del viewport) */
  --cine-w: min(1120px, 86vw, calc(78vh * 1.72));
  --cine-b: clamp(8px, 1.05vw, 15px);     /* grosor del bisel */
  --cine-r: clamp(14px, 1.7vw, 26px);     /* radio exterior */
  --cine-s: 1;                            /* escala en modo cine (JS) */
  --ease-dim: cubic-bezier(0.65, 0, 0.35, 1);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 6vh, 64px);
  min-height: 100svh;
  padding: clamp(96px, 13vh, 150px) 0 clamp(24px, 3vh, 40px);
  overflow-x: clip;
  background: transparent;
  color: var(--ink);
}
@supports (height: 1svh) {
  .cine { --cine-w: min(1120px, 86vw, calc(78svh * 1.72)); }
}
/* Capas: página < luces (890) < sección elevada (895) < navbar (900) < modales (950).
   La navbar se desvanece con las luces y nunca queda tapada por la sección. */
.cine.is-raised { z-index: 895; }

/* Sombra suave bajo el borde del hero: más densa al centro, se desvanece
   hacia abajo y hacia los lados. El borde negro del hero queda intacto. */
.cine::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: clamp(140px, 20vh, 200px);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(var(--cine-shade-w, 115%) 100% at 50% 0%,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.42) 14%,
    rgba(0, 0, 0, 0.30) 28%,
    rgba(0, 0, 0, 0.19) 43%,
    rgba(0, 0, 0, 0.10) 58%,
    rgba(0, 0, 0, 0.04) 74%,
    rgba(0, 0, 0, 0.01) 88%,
    rgba(0, 0, 0, 0) 100%);
}

/* ── Encabezado ─────────────────────────────────────── */
.cine-head {
  position: relative;
  z-index: 2;
  padding: 0 24px;
  text-align: center;
  transition:
    opacity 0.7s var(--ease-out),
    transform 1s var(--ease-out),
    filter 0.7s var(--ease-out);
}
.cine-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Revelado escalonado al entrar en vista */
.cine-head > *,
.cine-foot {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  filter: blur(8px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 1.1s var(--ease-out),
    filter 0.9s var(--ease-out);
}
.cine.is-inview .cine-head > *,
.cine.is-inview .cine-foot {
  opacity: 1;
  transform: none;
  filter: none;
}
.cine.is-inview .cine-foot { transition-delay: 0.35s; }

/* ── Escenario (pantalla + luz que derrama) ─────────── */
.cine-stage {
  position: relative;
  z-index: 1;
  width: var(--cine-w);
  transform: scale(var(--cine-s));
  transition: transform 1.3s var(--ease-out);
}

.cine-screen {
  --tilt: 0;
  position: relative;
  transform-origin: 50% 100%;
  transform:
    perspective(1900px)
    translate3d(0, calc(var(--tilt) * 64px), 0)
    rotateX(calc(var(--tilt) * 24deg))
    scale(calc(1 - var(--tilt) * 0.08));
  will-change: transform;
}
.cine.is-dark .cine-screen { transition: transform 0.9s var(--ease-out); }

/* Bisel: negro profundo con filo de luz arriba, como un monitor de referencia */
.cine-bezel {
  position: relative;
  padding: var(--cine-b);
  border-radius: var(--cine-r);
  background:
    linear-gradient(180deg, #1d1d1f 0%, #0d0d0e 7%, #070708 48%, #030304 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    inset 0 -1px 0 rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(10, 10, 10, 0.92),
    0 1px 2px rgba(0, 0, 0, 0.16),
    0 22px 44px -16px rgba(0, 0, 0, 0.4),
    0 64px 120px -34px rgba(0, 0, 0, 0.55);
}
/* Reflejo especular del filo superior */
.cine-bezel::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  pointer-events: none;
}

.cine-display {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: max(6px, calc(var(--cine-r) - var(--cine-b) + 1px));
  background: #000;
  box-shadow: 0 0 0 1px #000;
  isolation: isolate;
  container-type: inline-size;
  transform: translateZ(0); /* Safari: recorte correcto del video con radio */
}
.cine-display > * { position: absolute; }

.cine-video {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out), filter 0.6s var(--ease-out);
}
.cine.is-rolling .cine-video {
  opacity: 1;
  transition: opacity 0.22s linear, filter 0.6s var(--ease-out);
}
/* En pausa el cuadro se vuelve textura: los subtítulos quemados no compiten con la leyenda */
.cine.is-paused .cine-video { filter: brightness(0.26) grayscale(1) blur(7px); transform: scale(1.04); }

/* Sin controles nativos, en ningún navegador */
.cine-video::-webkit-media-controls,
.cine-video::-webkit-media-controls-enclosure,
.cine-video::-webkit-media-controls-panel,
.cine-video::-webkit-media-controls-overlay-play-button,
.cine-video::-webkit-media-controls-start-playback-button {
  display: none !important;
  opacity: 0 !important;
  -webkit-appearance: none;
}

/* Esfera de partículas (canvas) */
.cine-orb {
  left: 0;
  top: 0;
  transition: opacity 0.45s var(--ease-out);
}
.cine.is-rolling:not(.is-paused) .cine-orb { opacity: 0; }

/* Destello del clic: continúa en el destello del propio video */
.cine-flash {
  left: 50.08%;
  top: 48.6%;
  width: 44%;
  aspect-ratio: 1;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.25);
  background: radial-gradient(
    circle,
    #fff 0%,
    rgba(255, 255, 255, 0.96) 4%,
    rgba(255, 255, 255, 0.5) 11%,
    rgba(255, 255, 255, 0.16) 24%,
    rgba(255, 255, 255, 0.05) 40%,
    transparent 62%
  );
  pointer-events: none;
}

/* Destello anamórfico horizontal */
.cine-flare {
  left: -25%;
  right: -25%;
  top: 48.6%;
  height: 14%;
  opacity: 0;
  transform: translateY(-50%) scaleX(0.08);
  background:
    linear-gradient(90deg, transparent 6%, rgba(255, 255, 255, 0.9) 50%, transparent 94%) center / 100% 1px no-repeat,
    radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12) 34%, transparent 70%);
  pointer-events: none;
}

/* Carga a mitad de la película */
.cine-buffer {
  left: 50%;
  top: 50%;
  display: flex;
  gap: 7px;
  transform: translate(-50%, -50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0s linear 0.3s;
  pointer-events: none;
}
.cine-buffer i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: cineBuffer 1.1s var(--ease-dim) infinite;
}
.cine-buffer i:nth-child(2) { animation-delay: 0.14s; }
.cine-buffer i:nth-child(3) { animation-delay: 0.28s; }
.cine-buffer i { animation-play-state: paused; }
.cine.is-buffering .cine-buffer { opacity: 0.8; visibility: visible; transition-delay: 0s; }
.cine.is-buffering .cine-buffer i { animation-play-state: running; }
@keyframes cineBuffer {
  0%, 100% { opacity: 0.2; transform: scale(0.7); }
  45% { opacity: 1; transform: scale(1); }
}

/* Cursor pixelado: el mismo del video */
.cine-cursor {
  left: 0;
  top: 0;
  width: 20px;
  height: 38px;
  fill: #fff;
  shape-rendering: crispEdges;
  overflow: visible;
  transform-origin: 0 0;
  transform: translate3d(-200px, -200px, 0);
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.7))
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.24));
  will-change: transform;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}
.cine.is-rolling:not(.is-paused) .cine-cursor { opacity: 0; }
/* escritorio con el mouse lejos de la pantalla: solo existe el cursor del sistema */
.cine.cursor-away .cine-cursor { opacity: 0; transition: none; }
/* táctil: no hay mouse que imitar, el cursor pixelado sólo haría ruido.
   La clase la pone cine-film.js para no duplicar el media query. */
.cine.no-fake-cursor .cine-cursor { display: none; }

/* Leyenda con la tipografía y posición de los subtítulos del video */
.cine-caption {
  left: 0;
  right: 0;
  bottom: 9.4%;
  padding: 0 6%;
  font-size: 14px;
  font-size: max(11px, 1.6cqw);
  font-weight: 500;
  letter-spacing: 0.012em;
  line-height: 1.3;
  text-align: center;
  color: rgba(255, 255, 255, 0.94);
  pointer-events: none;
  animation: cineCaption 3.2s var(--ease-dim) infinite;
  transition: opacity 0.35s var(--ease-out);
}
@keyframes cineCaption {
  0%, 100% { opacity: 0.94; }
  50% { opacity: 0.5; }
}
.cine.is-rolling:not(.is-paused) .cine-caption,
.cine[data-state="arming"] .cine-caption {
  opacity: 0;
  animation: none;
}
/* sobre el cuadro pausado sí hace falta la sombra para separarla del video */
.cine.is-paused .cine-caption { text-shadow: 0 0 18px rgba(0, 0, 0, 0.9); }
.cine.is-loading .cine-caption {
  opacity: 0.9;
  animation: cineCaption 1.4s var(--ease-dim) infinite;
}

/* Brillo del cristal */
.cine-glass {
  inset: 0;
  background:
    linear-gradient(117deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.018) 24%, transparent 44%),
    radial-gradient(120% 80% at 50% 128%, rgba(255, 255, 255, 0.04), transparent 62%);
  pointer-events: none;
  transition: opacity 0.8s var(--ease-out);
}
.cine.is-rolling .cine-glass { opacity: 0.3; }

/* Toda la pantalla es el botón */
.cine-hit {
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* sin marco de foco: la pantalla entera es el botón y el contorno se veía al reproducir */
.cine-hit:focus,
.cine-hit:focus-visible { outline: none; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .cine[data-state="idle"] .cine-hit,
  .cine[data-state="paused"] .cine-hit,
  .cine[data-state="arming"] .cine-hit { cursor: none; }
}
.cine.is-rolling:not(.is-paused) .cine-hit { cursor: default; }
.cine.hide-pointer .cine-hit { cursor: none; }

/* ── Luz que derrama la pantalla ────────────────────── */
.cine-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  /* 150% × 190% del escenario, dibujado a ¼ de resolución y ampliado ×4: un degradado
     tan suave se ve idéntico y la GPU rasteriza 16 veces menos píxeles al escalar la pantalla */
  width: 37.5%;
  height: 47.5%;
  transform: translate(-50%, -50%) scale(4);
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.07) 42%,
    rgba(255, 255, 255, 0.02) 70%,
    transparent 100%
  );
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transition: opacity 1.2s var(--ease-out);
}

/* Muestra del video a 64×36, ampliada y desenfocada (tipo "ambient mode").
   El canvas mide 1/4 y se escala ×4: el desenfoque cuesta 16 veces menos. */
.cine-ambient {
  position: absolute;
  inset: -14% -12%;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.4s var(--ease-out), visibility 0s linear 1.4s;
}
.cine-ambient canvas,
.cine-floor canvas {
  display: block;
  width: 25%;
  height: 25%;
  transform: scale(4);
  transform-origin: 0 0;
}
.cine-ambient canvas { filter: blur(15px) brightness(1.5) grayscale(1); }

/* Reflejo en el piso */
.cine-floor {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 100%;
  height: 46%;
  margin-top: 14px;
  opacity: 0;
  transform: perspective(640px) rotateX(62deg);
  transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 42%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 42%, transparent 88%);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.2s var(--ease-out), visibility 0s linear 1.2s;
}
.cine-floor canvas { filter: blur(5px) brightness(1.35) grayscale(1); }

/* Con ctx.filter (JS añade .cine-baked) el desenfoque, el brillo y la máscara ya vienen
   horneados en el canvas: sin filtros ni máscaras CSS que la GPU recalcule en cada cuadro.
   La luz ambiental se agranda 180px por lado para contener el derrame del desenfoque. */
.cine-baked .cine-ambient { inset: calc(-14% - 180px) calc(-12% - 180px); }
.cine-baked .cine-ambient canvas,
.cine-baked .cine-floor canvas {
  width: 100%;
  height: 100%;
  transform: none;
  filter: none;
}
.cine-baked .cine-floor {
  -webkit-mask-image: none;
  mask-image: none;
}

/* Chispas del clic: salen de los bordes de la pantalla y se apagan en ~1.5 s.
   Capa fija al viewport; las anima el compositor (transform + opacity). */
.cine-sparks {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.cine-sparks i {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 2px;
  opacity: 0;
  transform-origin: 100% 50%; /* la cabeza de la chispa; la estela queda detrás */
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
}
/* ── Pie: duración / CTA al terminar ───────────────── */
.cine-foot {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 48px;
}
.cine-foot > * { grid-area: 1 / 1; }
.cine-after {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.9s var(--ease-out),
    visibility 0s linear 0.7s;
}
.cine.has-watched .cine-after {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.9s, 0.9s, 0s;
}
.cine-cta {
  padding: 13px 24px;
  border-radius: var(--r-pill, 9999px);
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.cine-cta:hover { background: #262626; transform: translateY(-1px); }
.cine-cta:active { transform: scale(0.97); }
.cine-link {
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cine-link span {
  display: inline-block;
  transition: transform 0.25s var(--ease-out);
}
.cine-link:hover span { transform: translateX(3px); }
.cine-cta:focus-visible,
.cine-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ── Luces apagadas ─────────────────────────────────── */
.cine-lights {
  --ease-dim: cubic-bezier(0.65, 0, 0.35, 1);
  position: fixed;
  inset: -2px;
  z-index: 890;
  background: #030304;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1.25s var(--ease-dim), visibility 0s linear 1.25s;
}
.cine-lights.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  /* se apaga como un dimmer: arranca de inmediato y aterriza suave */
  transition: opacity 1.4s cubic-bezier(0.3, 0, 0.2, 1), visibility 0s;
}
/* La navbar se desvanece con las luces. La clase va en la propia navbar: una clase en
   <html> (o color-scheme en la raíz) obligaba a recalcular y repintar toda la página
   en el primer cuadro del apagón. */
body.intro-done .nav.cine-nav-off {
  opacity: 0 !important;
  pointer-events: none !important;
}

.cine.is-dark .cine-head,
.cine.is-dark .cine-foot {
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  filter: blur(6px);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.28s var(--ease-out),
    transform 0.6s var(--ease-out),
    filter 0.28s var(--ease-out),
    visibility 0s linear 0.28s;
}
.cine.is-dark .cine-bezel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 40px 90px -30px rgba(0, 0, 0, 0.9);
}
.cine.is-dark .cine-ambient { opacity: 0.9; visibility: visible; transition-delay: 0.5s, 0s; }
.cine.is-dark .cine-floor { opacity: 1; visibility: visible; transition-delay: 0.7s, 0s; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 760px) {
  .cine {
    --cine-w: min(calc(100vw - 32px), calc(78vh * 1.72));
    --cine-b: 6px;
    --cine-r: 14px;
    min-height: 0;
    gap: 32px;
    padding: 92px 0 32px;
  }
  .cine::before { height: 120px; --cine-shade-w: 140%; }
  @supports (height: 1svh) {
    .cine { --cine-w: min(calc(100vw - 32px), calc(78svh * 1.72)); }
  }
  .cine-kicker { font-size: 12px; }
  .cine-caption { font-size: max(10px, 2.4cqw); }
  .cine-after { flex-direction: column; gap: 2px; }
}

@media (forced-colors: active) {
  .cine-bezel,
  .cine-display { forced-color-adjust: none; }
  .cine-cursor { display: none; }
  .cine .cine-hit { cursor: pointer !important; }
  .cine-hit:focus-visible { outline: 3px solid CanvasText; outline-offset: -3px; }
}

@media (prefers-reduced-motion: reduce) {
  .cine-screen { transform: none !important; }
  .cine-stage { transition-duration: 0.01ms; }
  .cine-head > *,
  .cine-foot { transform: none; filter: none; }
  .cine-sparks { display: none; }
  .cine-caption { animation: none; }
  .cine-lights,
  .cine-lights.is-on { transition-duration: 0.45s; }
}

/* ═══════════════════════════════════════════════════════
   AVISO DE GIRO — sólo móvil en vertical, al empezar el video
   No fuerza nada: el navegador no puede anular el bloqueo de
   rotación del sistema. Invita a girar o a activar la rotación.
═══════════════════════════════════════════════════════ */
.cine-rotate {
  /* Arriba: abajo chocaba con los subtítulos quemados del video y con
     .cine-caption, que están los dos anclados al borde inferior. */
  left: 50%;
  top: 6%;
  z-index: 6;
  display: none;              /* el JS lo enciende sólo donde toca */
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 88%;
  /* píldora propia: el video puede tener cualquier cosa detrás y el aviso
     tiene que leerse igual */
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(12,12,14,0.84), rgba(6,6,8,0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.10),
    0 6px 20px -8px rgba(0,0,0,0.85);
  pointer-events: none;       /* el botón .cine-hit sigue mandando */
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.cine.is-rotate-hint .cine-rotate {
  display: flex;
}
.cine.is-rotate-hint--in .cine-rotate {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cine-rotate-ico {
  flex: 0 0 auto;
  width: max(26px, 4.4cqw);
  color: rgba(255, 255, 255, 0.96);
}
.cine-rotate-ico svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.cine-rotate-txt {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.25;
  min-width: 0;
}
.cine-rotate-txt b {
  font-size: max(12px, 1.75cqw);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.97);
}
.cine-rotate-txt i {
  font-style: normal;
  font-size: max(9.5px, 1.3cqw);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.58);
}

/* ── El giro: el teléfono cae a apaisado y vuelve, con la pantalla
      encendiéndose al llegar. El ciclo respira en los extremos para
      que se lea el gesto, no un vaivén continuo. ── */
.cr-phone {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: crPhone 3.4s cubic-bezier(0.62, 0, 0.2, 1.12) infinite;
}
@keyframes crPhone {
  0%, 12%    { transform: rotate(0deg); }
  34%, 70%   { transform: rotate(-90deg); }
  90%, 100%  { transform: rotate(0deg); }
}

/* La pantalla se enciende justo cuando el teléfono queda apaisado */
.cr-screen {
  fill-opacity: 0.14;
  animation: crScreen 3.4s linear infinite;
}
@keyframes crScreen {
  0%, 22%    { fill-opacity: 0.14; }
  38%, 66%   { fill-opacity: 0.92; }
  84%, 100%  { fill-opacity: 0.14; }
}

/* El arco se dibuja señalando la dirección del giro y se apaga */
.cr-arc {
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
  opacity: 0;
  animation: crArc 3.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes crArc {
  0%, 8%     { stroke-dashoffset: 62; opacity: 0; }
  16%        { opacity: 0.85; }
  34%        { stroke-dashoffset: 0; opacity: 0.85; }
  56%        { opacity: 0; }
  100%       { stroke-dashoffset: 0; opacity: 0; }
}
.cr-tip {
  opacity: 0;
  animation: crTip 3.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes crTip {
  0%, 26%    { opacity: 0; }
  36%        { opacity: 0.85; }
  56%, 100%  { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cine-rotate { transition: opacity 0.2s linear; transform: translateX(-50%); }
  .cine.is-rotate-hint--in .cine-rotate { transform: translateX(-50%); }
  /* Sin bucle: el teléfono se queda apaisado, que es el mensaje */
  .cr-phone { animation: none; transform: rotate(-90deg); }
  .cr-screen { animation: none; fill-opacity: 0.92; }
  .cr-arc { animation: none; stroke-dashoffset: 0; opacity: 0.7; }
  .cr-tip { animation: none; opacity: 0.7; }
}

/* ═══════════════════════════════════════════════════════
   CELULAR: el video en pantalla completa
   Sólo con las luces apagadas y sólo en teléfonos. El marco,
   el halo y la luz ambiental son escenografía de sala: en una
   pantalla de 6 pulgadas sólo roban imagen.
═══════════════════════════════════════════════════════ */
@media (pointer: coarse) and (max-width: 760px),
       (pointer: coarse) and (max-height: 760px) {
  /* Las dos variables que dibujan el bisel se van a cero, y con ellas
     el relleno y los radios que se calculan a partir de ellas. */
  .cine.is-dark {
    --cine-b: 0px;
    --cine-r: 0px;
  }
  .cine.is-dark .cine-bezel {
    background: #000;
    box-shadow: none;
    /* el marco se derrite en lugar de desaparecer de golpe */
    transition:
      padding 0.6s var(--ease-out),
      border-radius 0.6s var(--ease-out),
      box-shadow 0.6s var(--ease-out),
      background 0.6s var(--ease-out);
  }
  .cine.is-dark .cine-display {
    border-radius: 0;
    box-shadow: none;
    transition: border-radius 0.6s var(--ease-out);
  }

  /* Halo, ambiente y suelo: fuera. Estas reglas van después de las que
     los encienden en modo cine, así que ganan por orden de aparición. */
  .cine.is-dark .cine-halo,
  .cine.is-dark .cine-ambient,
  .cine.is-dark .cine-floor {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0s linear 0.4s;
  }

  /* El aviso de giro se aparta del notch cuando el video ocupa todo */
  .cine.is-dark .cine-rotate {
    top: max(6%, calc(env(safe-area-inset-top, 0px) + 10px));
  }
}
