:root {
  color-scheme: dark;
  --ink: #11110f;
  --cream: #f5e9d4;
  --muted: #c6b9a5;
  --brass: #e6bb7d;
  --edge: #67543c;
  --gutter: clamp(.75rem, 4vw, 3.5rem);
  --measure: 67rem;
  background: #10100f;
  color: var(--cream);
  font: 1rem system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
h1,h2,p { margin: 0; }
h1,h2,.wordmark,.card strong { font-family: Georgia, serif; font-weight: 400; }
button,input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #ffd596; outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.masthead {
  position: relative;
  z-index: 2;
  min-height: 3.9rem;
  display: flex;
  align-items: center;
  gap: clamp(.85rem, 2.5vw, 2rem);
  padding: .55rem max(var(--gutter), calc((100vw - 74rem) / 2));
  background: #121210;
  border-bottom: 1px solid #8b6c45;
}
.wordmark { margin-right: auto; font-size: clamp(.95rem, 2.3vw, 1.35rem); letter-spacing: .19em; text-transform: uppercase; text-decoration: none; }
nav { display: flex; gap: clamp(.65rem, 2vw, 1.6rem); font-size: .83rem; }
nav a { text-decoration: none; }
nav a:hover { color: var(--brass); }
.search {
  display: flex;
  align-items: center;
  gap: .35rem;
  width: min(23vw, 13.5rem);
  padding: .3rem .6rem;
  border: 1px solid var(--edge);
  border-radius: .22rem;
  color: var(--brass);
}
.search span[aria-hidden] { font-size: 1.2rem; line-height: 1; }
.search input { width: 100%; min-width: 0; border: 0; color: var(--cream); background: none; font-size: .8rem; padding: .28rem .1rem; }
.search input::placeholder { color: var(--muted); }

.projector {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: radial-gradient(ellipse at 50% 12%, #343024 0, #181915 36%, #111311 72%);
}
.projector-face {
  position: relative;
  width: min(calc(100% - clamp(2.6rem, 23vw, 23rem)), var(--measure));
  margin-inline: auto;
  padding: 1.2rem clamp(.6rem, 2.2vw, 1.65rem) 3rem;
  border-inline: 1px solid #89714b55;
  background:
    repeating-linear-gradient(114deg, #e0c48905 0 1px, transparent 1px 5px),
    linear-gradient(108deg, #191914, #1d201b 52%, #151612);
  box-shadow: 0 0 3rem #000a;
}
h1 {
  margin: .05rem 0 1.25rem;
  text-align: center;
  color: #f8e8cc;
  font-size: clamp(1.5rem, 4vw, 3.3rem);
  letter-spacing: .15em;
  line-height: 1.1;
}
h1 em { display: block; margin-bottom: .28rem; font-size: .47em; letter-spacing: .1em; color: var(--brass); }
h1 span { text-transform: uppercase; }

.mechanism {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  width: max(12vw, calc((100% - var(--measure)) / 2));
  pointer-events: none;
  overflow: hidden;
  background:
    linear-gradient(90deg, #050605b0, transparent 36%, #6a533e40 65%, #020302cf),
    repeating-linear-gradient(0deg, #11130f 0 9px, #1b1a16 9px 10px);
}
.mechanism-left { left: 0; border-right: 1px solid #806344; }
.mechanism-right { right: 0; border-left: 1px solid #806344; }
.film-feed {
  position: absolute;
  top: 7rem;
  bottom: 7%;
  width: clamp(1.5rem, 3.6vw, 3rem);
  border-inline: 2px solid #9b7853;
  background: linear-gradient(90deg, #66503b 0 7%, #171714 8% 88%, #564431 89%);
  box-shadow: .4rem 0 1.2rem #000b, inset 0 0 .7rem #000;
  transform: rotate(4deg);
}
.mechanism-left .film-feed { right: 13%; }
.mechanism-right .film-feed { left: 13%; transform: rotate(-4deg); }
.film-feed::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .75;
  background:
    repeating-linear-gradient(0deg, #c39967 0 3px, transparent 3px 9px) left / .25rem 100% no-repeat,
    repeating-linear-gradient(0deg, #c39967 0 3px, transparent 3px 9px) right / .25rem 100% no-repeat,
    repeating-linear-gradient(0deg, #030403 0 3px, #3a3022 3px 30px);
  animation: film-feed .85s linear infinite paused;
}
@keyframes film-feed { to { background-position: left 0 bottom 36px, right 0 bottom 36px, 0 36px; } }
.reel {
  position: absolute;
  width: clamp(7rem, 21vw, 20rem);
  aspect-ratio: 1;
  background: url("reel.png") center / contain no-repeat;
  filter: drop-shadow(0 .35rem .85rem #000c);
  animation: reel-spin 10s linear infinite paused;
}
.reel-top { top: -.45rem; }
.reel-bottom { top: clamp(22rem, 45vw, 37rem); width: clamp(7rem, 17vw, 16rem); opacity: .82; }
.mechanism-left .reel { right: 12%; }
.mechanism-right .reel { left: 12%; animation-direction: reverse; }
@keyframes reel-spin { to { transform: rotate(360deg); } }
.projector:is([data-transport="loading"],[data-transport="playing"]) .reel,
.projector:is([data-transport="loading"],[data-transport="playing"]) .film-feed::before { animation-play-state: running; }
.mechanism::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 46%;
  right: 4%;
  width: 48%;
  height: 1.4rem;
  border: 1px solid #9f7a50;
  border-radius: .2rem;
  background: linear-gradient(#34291f, #d1a16a 38%, #805c38 52%, #392a22);
  box-shadow: 0 .35rem .55rem #000b;
}
.mechanism-right::after { right: auto; left: 4%; }
.projector[data-transport="loading"] .reel { filter: drop-shadow(0 0 .65rem #e7a24e80); }

.console {
  position: relative;
  padding: clamp(.35rem, 1vw, .7rem);
  border: 1px solid #9c7851;
  border-radius: .45rem;
  background: linear-gradient(135deg, #50402f, #171713 23% 75%, #3b3025);
  box-shadow: 0 .7rem 1.8rem #000b, inset 0 0 0 3px #12100e;
}
.screen {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid #725b3c;
  border-radius: .2rem;
  background: #070907;
}
video { display: block; width: 100%; height: 100%; object-fit: contain; }
.gate {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: scaleY(0);
  background: linear-gradient(0deg, #10100f, #5b4225 49%, #f9c984 50%, #5b4225 51%, #10100f);
}
.projector[data-transport="loading"] .gate { animation: gate-load .62s ease-out both; }
@keyframes gate-load { 0% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.overlay {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(2.9rem, 5.2vw, 4.2rem);
  aspect-ratio: 1;
  border: 1px solid #f6d499;
  border-radius: 50%;
  background: #141410d6;
  color: #ffdfaa;
  box-shadow: 0 0 1.4rem #100b07a6, inset 0 0 0 3px #76543466;
}
.overlay:hover { background: #47331e; }
.overlay[hidden] { display: none; }
.controls { display: flex; align-items: center; gap: clamp(.2rem, 1.2vw, .8rem); padding: .22rem .15rem 0; }
.controls button { flex: none; min-width: 2.25rem; min-height: 2.25rem; padding: 0; border: 0; border-radius: .2rem; background: transparent; color: #ffe0ad; }
.controls button:hover { background: #57442d; }
input[type="range"] { min-width: 0; accent-color: var(--brass); cursor: pointer; }
.seek { flex: 1; width: 0; }
.volume { width: clamp(2.1rem, 5vw, 4.5rem); }
#time { font: .7rem ui-monospace, monospace; white-space: nowrap; color: var(--muted); }
#player-status { padding: .45rem; font-size: .85rem; color: #ffd49f; }
.console:fullscreen { display: flex; flex-direction: column; justify-content: center; border: 0; border-radius: 0; background: #070907; }
.console:fullscreen .screen { aspect-ratio: auto; flex: 1; min-height: 0; }
.console:fullscreen #theater-mode { display: none; }

.video-details { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .85rem 0 1.2rem; }
.video-details h2 { font-size: clamp(1.2rem, 2.7vw, 2rem); }
#subject { margin-top: .22rem; font-size: .79rem; color: var(--muted); }
.transport-readout { flex: none; display: flex; align-items: center; gap: .42rem; font-size: .68rem; color: var(--muted); }
.transport-readout i { width: .37rem; aspect-ratio: 1; border-radius: 50%; border: 1px solid #a57d54; background: #674a2f; }
.projector:is([data-transport="loading"],[data-transport="playing"]) .transport-readout i { background: #f8c77b; box-shadow: 0 0 .75rem #ffc373; }
.timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: .2rem;
  margin-block: .3rem 1.25rem;
  padding: .1rem 0 .25rem;
  overflow-x: auto;
}
.timeline::before { content: ""; position: absolute; inset: .65rem 0 auto; height: 1px; background: #8c704d; pointer-events: none; }
.timeline button { position: relative; flex: 1 0 2.55rem; display: grid; place-items: center; gap: .42rem; padding: .25rem .2rem; border: 0; background: none; color: #d4c6ad; font-size: clamp(.7rem, 1.6vw, .85rem); }
.timeline button::before { content: ""; width: .62rem; aspect-ratio: 1; border: 1px solid #ae916f; border-radius: 50%; background: #29251b; }
.timeline button:hover,.timeline button[aria-pressed="true"] { color: #ffe1a9; }
.timeline button[aria-pressed="true"]::before { background: #f7c879; box-shadow: 0 0 .75rem #ffb753; }
.timeline button:focus-visible { outline-offset: -2px; }
.archive-heading { display: flex; align-items: baseline; gap: .75rem; margin-bottom: .65rem; }
.archive-heading h2 { font-size: 1.35rem; }
#count { color: var(--muted); font-size: .72rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { display: grid; align-content: start; width: 100%; padding: .34rem; border: 1px solid #7f684b; border-radius: .18rem; background: #10130f; text-align: left; }
.card:hover,.card[aria-pressed="true"] { border-color: #f2c98d; box-shadow: 0 0 .8rem #e6ad6344; }
.thumb { display: block; aspect-ratio: 16/9; background: #070907; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-copy { display: block; padding: .55rem .2rem .3rem; }
.card strong,.card small { display: block; }
.card strong { font-size: clamp(.95rem, 1.8vw, 1.12rem); }
.card small { margin-top: .2rem; font-size: .73rem; color: var(--muted); }
footer { padding: 1.4rem var(--gutter) 2rem; border-top: 1px solid #67543c; color: var(--muted); }
footer h2 { margin-bottom: .45rem; font-size: 1.3rem; color: var(--cream); }
footer p { font-size: .88rem; }

@media (max-width: 750px) {
  .projector-face { width: calc(100% - 2.5rem); }
  .mechanism { width: 1.6rem; }
  .film-feed { width: .8rem; }
  .reel { width: 4.6rem; }
  .mechanism-left .reel { right: -10%; }
  .mechanism-right .reel { left: -10%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
}
@media (max-width: 470px) {
  .masthead { flex-wrap: wrap; gap: .35rem .75rem; }
  .search { width: 100%; }
  .projector-face { width: calc(100% - 2.2rem); padding-inline: .4rem; }
  .mechanism { width: 1.25rem; }
  .transport-readout { font-size: .59rem; }
  .video-details { gap: .5rem; }
  #time { font-size: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .gate { display: none; }
}

/* Screening room and lobby. */
.projector-face { --measure: 76rem; }
.projector {
  background:
    repeating-linear-gradient(90deg, #14080b 0, #3b151d 1.4rem, #230b11 2.4rem, #16090e 3.5rem);
}
.mechanism {
  background:
    linear-gradient(90deg, #070705bd, transparent 34%, #926c4922 67%, #0c0708d6),
    repeating-linear-gradient(90deg, #220d12 0, #471a24 1.4rem, #281019 2.65rem, #220d12 3.2rem);
}
.projector-face {
  background:
    repeating-linear-gradient(113deg, #e0c48904 0 1px, transparent 1px 5px),
    linear-gradient(115deg, #201b17, #1a1b16 52%, #171511);
}
h1 { margin-bottom: 1.15rem; }
.screening {
  display: grid;
  grid-template-columns: minmax(0, 2.85fr) minmax(14rem, 1fr);
  align-items: start;
  gap: clamp(.85rem, 2vw, 1.45rem);
  scroll-margin-top: 1rem;
}
.projection { min-width: 0; }
.projection-status { display: flex; justify-content: flex-end; margin: .45rem .2rem 0; }
.program {
  position: relative;
  min-width: 0;
  min-height: 100%;
  padding: clamp(1rem, 2vw, 1.7rem);
  border: 1px solid #d4aa77;
  border-radius: .13rem;
  background:
    repeating-linear-gradient(120deg, #57321c0b 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 37% 15%, #f9edd6, #e0c39c);
  box-shadow: inset 0 0 0 4px #e5c9a7, inset 0 0 0 5px #977354, 0 .6rem 1.5rem #0008;
  color: #302117;
  color-scheme: light;
}
.program-kicker {
  padding-bottom: .5rem;
  border-bottom: 1px solid #9e7956;
  color: #5e372c;
  font-family: Georgia, serif;
  font-size: .8rem;
  font-style: italic;
}
.program h2 { margin-top: .7rem; font-size: clamp(1.55rem, 2.8vw, 2.4rem); line-height: 1.04; overflow-wrap: break-word; }
.program #subject { margin-top: .45rem; color: #5e3d2e; }
.program-tracklist { display: grid; gap: .7rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px solid #9e7956; }
.track { margin: 0; }
.track dt { color: #5c392c; text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 750; }
.track dd { margin: .18rem 0 .5rem; font-family: Georgia, serif; font-size: 1rem; }
.track dd:last-of-type { margin-bottom: 0; }
.track a { color: #65272e; text-underline-offset: .18em; }
.track a:hover { color: #391217; }
.program-empty { color: #654a3a; font-size: .79rem; }

#archive { margin-top: clamp(1.1rem, 3vw, 2rem); scroll-margin-top: .85rem; }
.archive-heading { margin-bottom: 1rem; }
.archive-heading h2 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); }
.grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.65rem, 2vw, 1.4rem);
}
.card.poster {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  align-content: stretch;
  min-width: 0;
  aspect-ratio: 2/3;
  padding: .36rem;
  overflow: hidden;
  border: 1px solid #b38555;
  border-radius: .15rem;
  background: linear-gradient(145deg, #33221b, #120d0d);
  box-shadow: inset 0 0 0 2px #070604, 0 .4rem .8rem #0008;
}
.card.poster::after {
  content: "";
  position: absolute;
  inset: .36rem;
  border: 1px solid #d8a36f50;
  pointer-events: none;
}
.card.poster:hover,.card.poster[aria-pressed="true"] { border-color: #f8d89e; box-shadow: 0 0 1rem #e6ad6344; }
.poster .thumb {
  position: relative;
  min-height: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  background: #14100d;
}
.poster .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #180e1200 35%, #110d11 100%);
}
.poster .thumb img { object-position: 50% 42%; }
.poster .card-copy {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: .36rem;
  min-width: 0;
  padding: .4rem .55rem .65rem;
  text-align: center;
  background: linear-gradient(#110d11, #211316);
}
.poster strong {
  font-size: clamp(.86rem, 1.45vw, 1.22rem);
  line-height: 1.16;
  letter-spacing: .045em;
  overflow-wrap: anywhere;
}
.poster small { color: #e5b983; font-size: .68rem; letter-spacing: .12em; }

@media (max-width: 1050px) {
  .screening { grid-template-columns: minmax(0, 2.3fr) minmax(12rem, 1fr); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
  .screening { grid-template-columns: minmax(0,1fr); }
  .program { min-height: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 470px) {
  .masthead nav { font-size: .72rem; }
}

#theater-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  padding-inline: .35rem;
  font-size: .72rem;
}
#theater-mode[aria-pressed="true"] { background: #57442d; color: #ffebc4; }
.theater-icon {
  width: 1.1rem;
  height: .7rem;
  border: 1px solid currentColor;
  border-radius: .09rem;
  box-shadow: inset 0 -.12rem currentColor;
}
.projector[data-theater] {
  --reel-margin: clamp(1.2rem, 6.5vw, 6.5rem);
}
.projector[data-theater] .projector-face {
  width: min(calc(100% - 2 * var(--reel-margin)), 87rem);
  box-shadow: 0 0 3rem #000a, inset 0 0 0 100vmax #0008;
}
.projector[data-theater] .mechanism { box-shadow: inset 0 0 0 100vmax #0008; }
.projector[data-theater] .screening { grid-template-columns: minmax(0, 1fr); }
.projector[data-theater] .console:not(:fullscreen) .screen { max-height: calc(100svh - 4.75rem); }
.projector[data-theater] .program { width: min(100%, 40rem); min-height: auto; }

:where(.masthead, .projector-face > h1, .program, #archive, footer) {
  filter: brightness(var(--house-lights, 1));
  transition: filter .35s ease;
}
body:has(.projector[data-theater]) { --house-lights: .6; }
:where(.masthead, .program, #archive, footer):focus-within { --house-lights: 1; }

@media (max-width: 600px) {
  .projector[data-theater] { --reel-margin: .65rem; }
  .theater-label { display: none; }
}
@media (max-width: 430px) {
  .controls {
    display: grid;
    grid-template-columns: auto auto minmax(2rem, 1fr) auto auto;
    grid-template-areas: "seek seek seek seek time" "play mute volume theater fullscreen";
    column-gap: .4rem;
  }
  .seek { grid-area: seek; width: 100%; margin: 0; }
  #time { grid-area: time; }
  #play { grid-area: play; }
  #mute { grid-area: mute; }
  .volume { grid-area: volume; width: min(100%, 4rem); }
  #theater-mode { grid-area: theater; }
  #fullscreen { grid-area: fullscreen; }
}
