/* ---------- The screening room ---------- */
.cinema { position: relative; height: 100svh; min-height: 660px; overflow: hidden; isolation: isolate; background: #030407; }
.cinema-ambient { position: absolute; inset: -12%; z-index: -2; pointer-events: none; }
.cinema-ambient span { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(90px) saturate(1.5); opacity: 0; transform: scale(1.1); transition: opacity 1.4s var(--ease-out); }
.cinema-ambient span.is-active { opacity: .42; }
.cinema::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(80% 70% at 50% 42%, transparent 30%, rgba(3, 4, 7, .75) 75%, #030407); }
.cinema::after { content: ''; position: absolute; inset: auto 0 0; height: 30%; z-index: -1; pointer-events: none; background: linear-gradient(transparent, rgba(3, 4, 7, .9)); }
.cinema-beam { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }

.cinema-stage { position: absolute; z-index: 2; top: 96px; left: var(--gutter); right: var(--gutter); bottom: 252px; display: grid; place-items: center; container-type: size; }
/* As large as the stage allows at the photograph's own proportions (--ar, which
   photography.js changes with the reel), so it has its size from the first paint. It only
   animates once the script is running, so a slow load doesn't make it grow or jump. */
.screen { position: relative; width: min(100cqw, 100cqh * var(--ar)); height: min(100cqh, 100cqw / var(--ar)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 40px 120px -30px rgba(0, 0, 0, .9); background: #0b0d12; touch-action: pan-y; }
.screen.is-sized { transition: width .9s var(--ease-out), height .9s var(--ease-out); }
.screen-frame { position: absolute; inset: 0; opacity: 0; transition: opacity .55s var(--ease-out); }
.screen-frame.is-active { opacity: 1; }
.screen-frame picture, .screen-frame img { width: 100%; height: 100%; object-fit: cover; }
.screen-frame.is-active img { animation: weave 9s steps(36) infinite; }
@keyframes weave { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(.4px, -.3px); } 50% { transform: translate(-.3px, .4px); } 75% { transform: translate(.3px, .2px); } }
.screen-light {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 95% at 50% 46%, transparent 52%, rgba(0, 0, 0, .42)), linear-gradient(rgba(255, 236, 214, .035), rgba(255, 236, 214, .035));
  animation: flicker 5.2s infinite;
}
@keyframes flicker { 0%, 100% { opacity: 1; } 31% { opacity: .9; } 32% { opacity: 1; } 67% { opacity: .94; } 68% { opacity: 1; } 84% { opacity: .96; } }

/* the countdown between reels */
.leader { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; opacity: 0; pointer-events: none; background: radial-gradient(circle, #3a3d44, #1c1e23 70%); transition: opacity .12s; }
.leader::before, .leader::after { content: ''; position: absolute; background: rgba(0, 0, 0, .45); }
.leader::before { left: 0; right: 0; top: 50%; height: 1px; }
.leader::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.leader.is-on { opacity: 1; }
.leader-ring { position: absolute; width: min(56%, 46vh); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(0, 0, 0, .5), 0 0 0 calc(min(56%, 46vh) * .06) rgba(255, 255, 255, .06); background: conic-gradient(rgba(0, 0, 0, .38) var(--sweep, 0deg), transparent 0); }
.leader-num { position: relative; font: 400 clamp(80px, 13vh, 150px)/1 var(--sans); color: rgba(0, 0, 0, .72); font-variant-numeric: tabular-nums; }

.cinema-bar { position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 112px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.caption { --glass-tint: rgba(10, 13, 20, .5); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 28px; max-width: 720px; padding: 16px 26px 17px 22px; border-radius: 22px; transition: opacity .35s; }
.caption.is-changing { opacity: .25; }
.caption-head { grid-row: span 3; padding-right: 26px; border-right: 1px solid var(--line-2); }
.caption-story { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.caption-title { margin-top: 4px; font-size: clamp(30px, 2.6vw, 42px); font-weight: 360; line-height: 1; letter-spacing: -.015em; white-space: nowrap; }
.caption-line { font-size: 15px; line-height: 1.45; color: var(--ink); }
.caption .details { font-size: 13px; }
.caption .text-link { justify-self: start; margin-top: 2px; font-size: 14px; }

.reels { display: flex; gap: 10px; }
.reel { --glass-tint: rgba(10, 13, 20, .45); display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px 0 9px; border-radius: 999px; color: var(--ink-2); transition: color .3s; }
.reel:hover { color: var(--ink); }
.reel[aria-selected="true"] { color: var(--ink); --glass-tint: rgba(40, 48, 66, .5); }
.reel-spool { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, #0b0d12 0 18%, #2a2f3a 19% 24%, transparent 25%), repeating-conic-gradient(#20242d 0 40deg, #12151b 40deg 72deg); box-shadow: inset 0 0 0 2px #303643, inset 0 0 0 5px #0b0d12; }
.reel-spool i { position: absolute; inset: 9px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .18); }
.reel[aria-selected="true"] .reel-spool { animation: spin 4s linear infinite; box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 5px #0b0d12; }
@keyframes spin { to { transform: rotate(360deg); } }
.reel-title { font: 500 15px/1 var(--sans); white-space: nowrap; }

.filmstrip { position: absolute; z-index: 3; left: 0; right: 0; bottom: 18px; height: 76px; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.filmstrip-track { position: absolute; top: 0; bottom: 0; left: 0; display: flex; will-change: transform; }
.film-frame { position: relative; flex: none; width: 110px; height: 76px; padding: 13px 4px; background: #15120f; }
.film-frame::before, .film-frame::after { content: ''; position: absolute; left: 6px; right: 6px; height: 6px; background: repeating-linear-gradient(90deg, rgba(240, 225, 200, .62) 0 7px, transparent 7px 13px); border-radius: 1px; }
.film-frame::before { top: 3.5px; }
.film-frame::after { bottom: 3.5px; }
.film-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 1.5px; filter: saturate(.9) contrast(1.05) brightness(.9); }
.filmstrip.is-fast .filmstrip-track { filter: blur(1.4px); }

/* phones: the room becomes a column */
@media (max-width: 860px), (max-height: 640px) and (max-width: 1100px) {
  .cinema { height: auto; min-height: 100svh; display: flex; flex-direction: column; padding: 84px 0 18px; }
  .cinema-stage { position: relative; top: 0; left: 0; right: 0; bottom: auto; height: min(46svh, 72vw); padding: 0 12px; }
  .cinema-bar { position: relative; left: 0; right: 0; bottom: 0; flex-direction: column-reverse; align-items: stretch; gap: 14px; padding: 18px 16px 0; }
  .caption { grid-template-columns: 1fr; gap: 6px; padding: 18px 20px; }
  .caption-head { grid-row: auto; padding: 0 0 10px; border-right: 0; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
  .reels { overflow-x: auto; scrollbar-width: none; padding: 2px; }
  .reels::-webkit-scrollbar { display: none; }
  .reel { flex: none; }
  .filmstrip { position: relative; bottom: 0; height: 60px; margin-top: 18px; }
  .film-frame { width: 86px; height: 60px; padding: 11px 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-light, .screen-frame.is-active img { animation: none; }
}

/* Without JavaScript: a plain list of the three photographs. */
.no-js .cinema { height: auto; overflow: visible; padding: 120px var(--gutter) 0; }
.no-js .cinema-stage, .no-js .cinema-bar, .no-js .filmstrip, .no-js .cinema-beam { display: none; }
.still-list { display: grid; gap: 56px; max-width: 1100px; margin: 0 auto; }
.still picture { border-radius: 18px; overflow: hidden; }
.still figcaption { margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.still cite { font-size: 19px; color: var(--ink); }
