/* ---- the screening room (trailers and short subjects) ----------------------
   Shared by movie night and game night; each page sets the tokens it reads
   (--f-body, --f-display, --dim, --bulb, --step-1, --step-2, --pleats). A trailer plays on the house screen: the lights go down, the room comes up
   out of the dark, the screen's own curtain parts as the projector starts, and
   the screen glows faintly once it's rolling. Seat backs line the bottom. */
.screen-overlay {
  position: fixed; inset: 0; z-index: 44; display: grid; place-items: center; padding: 16px 16px 76px;
  background: #050203; overflow-y: auto; overscroll-behavior: contain;
  animation: screen-lights-down 0.6s ease-in both;
}
.screen-room {
  position: relative; z-index: 1; /* over the seats */
  width: min(60rem, 100%, calc((100dvh - 210px) * 16 / 9)); display: grid; gap: 14px; justify-items: center;
  animation: screen-comes-up 0.5s ease-out 0.3s both;
}
.screen-marquee { margin: 0; display: grid; justify-items: center; gap: 4px; text-align: center; }
.screen-now { font: 700 11px/1 var(--f-body); font-stretch: 75%; letter-spacing: 0.32em; text-transform: uppercase; color: var(--dim); }
.screen-title { font: 400 var(--step-2)/1.1 var(--f-display); color: var(--bulb); text-wrap: balance; overflow-wrap: break-word; text-shadow: 0 0 18px rgba(255, 199, 110, 0.35); }
.screen-year { font-size: 0.6em; color: var(--dim); text-shadow: none; }
/* the screen: 16:9 in a gilt frame, lit from the booth once it rolls */
.screen-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border: 6px solid #c99a3e; border-radius: 4px; background: #000;
  box-shadow: inset 0 0 0 2px #050203, 0 0 0 1px rgba(255, 199, 110, 0.35), 0 20px 50px rgba(0, 0, 0, 0.7);
  transition: box-shadow 1.2s ease-out;
}
.screen-overlay.rolling .screen-frame {
  box-shadow: inset 0 0 0 2px #050203, 0 0 0 1px rgba(255, 199, 110, 0.35), 0 0 80px rgba(200, 215, 255, 0.16), 0 20px 50px rgba(0, 0, 0, 0.7);
}
.screen-picture, .screen-picture iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.screen-curtain { position: absolute; inset: 0; display: flex; pointer-events: none; }
.screen-curtain span { flex: 1 1 50%; background: var(--pleats); animation: screen-curtain-part 1.1s cubic-bezier(.7, 0, .2, 1) 0.6s both; }
.screen-curtain span:first-child { transform-origin: left center; }
.screen-curtain span:last-child { transform-origin: right center; }
.screen-actions { justify-content: center; align-items: center; gap: 10px 18px; }
/* the house: two rows of seat backs along the bottom of the dark */
.screen-seats {
  position: fixed; inset: auto 0 0; height: 60px; pointer-events: none;
  background:
    radial-gradient(ellipse 44% 100% at 50% 100%, #1c0b12 0 97%, transparent 100%) 0 100% / 56px 34px repeat-x,
    radial-gradient(ellipse 44% 100% at 50% 100%, #10060a 0 97%, transparent 100%) 28px 100% / 56px 56px repeat-x;
}
/* a landscape phone: a smaller room so the Close button stays on screen */
@media (max-height: 520px) {
  .screen-overlay { padding: 8px 8px 34px; }
  .screen-room { width: min(100%, calc((100dvh - 120px) * 16 / 9)); gap: 6px; }
  .screen-title { font-size: var(--step-1); }
  .screen-seats { height: 30px; }
}

@keyframes screen-lights-down { from { background-color: rgba(10, 4, 7, 0); } to { background-color: #0a0407; } }
@keyframes screen-comes-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes screen-curtain-part { 70% { opacity: 1; } to { transform: scaleX(0.06); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .screen-curtain { display: none; }
  .screen-overlay, .screen-room { animation: none; }
}
