:root {
  color-scheme: dark;
  font-family: "Josefin Sans", system-ui, sans-serif;
  background: #08070a;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body { overflow: hidden; }

.theater {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 100%, #1a1519 0%, #0c0a0c 55%, #060507 100%);
}

.grain {
  position: absolute;
  z-index: 9;
  inset: 0;
  pointer-events: none;
  background: url("/assets/grain.png") repeat;
  background-size: 160px;
  mix-blend-mode: overlay;
  opacity: .5;
}

.valance {
  position: absolute;
  z-index: 7;
  top: 0;
  right: 0;
  left: 0;
  height: 74px;
  border-radius: 0 0 12px 12px;
  background:
    linear-gradient(180deg, rgba(255,220,180,.14), transparent 60%),
    repeating-linear-gradient(90deg, #3d0f14 0 22px, #62181e 26px, #2a090d 46px, #4c1319 62px, #3d0f14 78px);
  box-shadow: 0 14px 34px rgba(0,0,0,.72), inset 0 -10px 22px rgba(0,0,0,.55);
}

.curtain {
  position: absolute;
  z-index: 6;
  top: 0;
  bottom: 0;
  width: clamp(0px, calc((100vw - 700px) * 6), 15vw);
}

.curtain-left {
  left: 0;
  border-radius: 0 4px 0 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.5), transparent 40%, rgba(0,0,0,.55)),
    repeating-linear-gradient(90deg, #2b090d 0 26px, #5c161d 40px, #360c11 58px, #6c1a22 74px, #2b090d 96px);
  box-shadow: inset -50px 0 70px rgba(0,0,0,.72), 24px 0 60px rgba(0,0,0,.6);
}

.curtain-right {
  right: 0;
  border-radius: 4px 0 0 0;
  background:
    linear-gradient(270deg, rgba(0,0,0,.5), transparent 40%, rgba(0,0,0,.55)),
    repeating-linear-gradient(270deg, #2b090d 0 26px, #5c161d 40px, #360c11 58px, #6c1a22 74px, #2b090d 96px);
  box-shadow: inset 50px 0 70px rgba(0,0,0,.72), -24px 0 60px rgba(0,0,0,.6);
}

.beam {
  position: absolute;
  z-index: 5;
  bottom: 126px;
  left: 50%;
  width: min(1140px, 62vw);
  height: calc((100vh - 206px) * .52);
  transform: translateX(-50%);
  clip-path: polygon(47.6% 100%, 52.4% 100%, 100% 0, 0 0);
  background: linear-gradient(to top, rgba(255,241,208,.5), rgba(255,238,200,.14) 62%, rgba(255,238,200,0));
  mix-blend-mode: screen;
  opacity: .85;
  pointer-events: none;
}

.screen {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  width: min(1080px, 94vw, max(62vw, calc(94vw - max(0px, 100vw - 700px) * .8)), calc(100vw - 2 * clamp(0px, calc((100vw - 700px) * 6), 15vw) - 30px));
  height: calc(100vh - min(200px, calc(132px + 10vw)));
  min-height: 240px;
  margin-top: 88px;
  overflow: hidden;
  border-radius: 3px;
  background: radial-gradient(120% 100% at 50% 40%, #fbf4e4 0%, #f2e8d4 52%, #d8cbb4 88%, #bfb29b 100%);
  box-shadow: 0 0 120px 30px rgba(255,235,190,.14), 0 0 0 1px rgba(20,14,8,.5), 0 40px 90px rgba(0,0,0,.6), inset 0 0 90px rgba(120,96,60,.18);
  color: #1b1611;
  animation: weave 7s ease-in-out infinite, flicker 3.1s steps(2, end) infinite;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(110% 90% at 50% 45%, transparent 55%, rgba(60,44,24,.22) 88%, rgba(40,28,14,.4) 100%);
}

.screen-content {
  position: absolute;
  inset: 0 0 84px;
  display: flex;
  flex-direction: column;
  padding: 18px clamp(24px, 4.5vw, 68px) 8px;
}

.marquee {
  flex: 0 0 auto;
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(27,22,17,.14);
  text-align: center;
}

.marquee span {
  position: relative;
  display: inline-block;
  padding: 0 0 6px;
  font-family: "Bodoni Moda", serif;
  font-size: clamp(10px, 1.05vw, 12.5px);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.marquee span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #8a3b28;
}

.intro {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: min(1vh, 10px);
  padding-bottom: 2px;
  text-align: center;
  animation: appear .55s cubic-bezier(.2,.7,.2,1) both;
}

.intro img {
  width: min(140px, 18vw, 10.5vh);
  height: auto;
  mix-blend-mode: multiply;
  filter: contrast(1.1);
}

.intro h1 {
  margin: 0;
  font-family: "Bodoni Moda", serif;
  font-size: min(32px, calc(2.7vw + 6px), 4vh);
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.rule {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(320px, 50%);
}

.rule::before, .rule::after { content: ""; flex: 1; height: 2px; background: #1b1611; }
.rule i { width: 6px; height: 6px; border-radius: 50%; background: #1b1611; }

.intro p {
  max-width: 640px;
  margin: 0;
  color: #33291d;
  font-family: "Bodoni Moda", serif;
  font-size: min(20px, calc(1.7vw + 6px), 2.7vh);
  font-style: italic;
  line-height: 1.32;
  text-wrap: pretty;
}

.descriptor {
  color: #6b5b45;
  font-family: "Courier Prime", monospace;
  font-size: min(11px, 1.7vh);
  letter-spacing: .2em;
  text-transform: uppercase;
}

.descriptor b { font-weight: 400; }

.projector-wrap {
  position: relative;
  z-index: 8;
  flex: 0 0 auto;
  width: 100%;
  margin-top: -46px;
  margin-bottom: -30px;
  display: flex;
  justify-content: center;
}

.projector {
  position: relative;
  width: 300px;
  height: 118px;
  filter: drop-shadow(0 -6px 26px rgba(255,226,170,.16));
  transform: scale(.92);
  transform-origin: top center;
}

.reel {
  position: absolute;
  border: 3px solid #6a625a;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #4b453e, #26221e 70%);
  animation: spin 2.6s linear infinite;
}

.reel::before { content: ""; position: absolute; inset: 9px; border: 2px solid #7d746a; border-radius: 50%; }
.reel i { position: absolute; top: 3px; bottom: 3px; left: 50%; width: 3px; margin-left: -1.5px; background: #6a625a; }
.reel b { position: absolute; top: 50%; right: 3px; left: 3px; height: 3px; margin-top: -1.5px; background: #6a625a; }
.reel-large { bottom: 66px; left: 24px; width: 52px; height: 52px; }
.reel-small { right: 26px; bottom: 70px; width: 40px; height: 40px; animation-direction: reverse; }
.reel-small::before { inset: 7px; }

.projector-body {
  position: absolute;
  right: 30px;
  bottom: 26px;
  left: 30px;
  height: 46px;
  border-radius: 7px;
  background: linear-gradient(180deg, #4a443c 0%, #332e29 45%, #1d1a17 100%);
  box-shadow: inset 0 1px 0 rgba(255,235,200,.18), 0 6px 14px rgba(0,0,0,.6);
}

.projector-body span { position: absolute; top: 16px; right: 16px; color: #8f8578; font: 8px "Courier Prime", monospace; letter-spacing: .14em; }
.vents { position: absolute; top: 13px; left: 14px; display: flex; gap: 5px; }
.vents i { width: 4px; height: 18px; border-radius: 1px; background: #262220; }
.neck { position: absolute; top: 26px; left: 50%; width: 38px; height: 30px; margin-left: -19px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #554e45, #2a2622); box-shadow: inset 0 1px 0 rgba(255,235,200,.2); }
.lamp { position: absolute; top: 6px; left: 50%; width: 26px; height: 22px; margin-left: -13px; border-radius: 13px 13px 3px 3px; background: linear-gradient(180deg, #d9c9a4, #6d6255); box-shadow: 0 0 22px rgba(255,226,170,.55); animation: glow 2.4s ease-in-out infinite; }
.base { position: absolute; right: 46px; bottom: 12px; left: 46px; height: 16px; border-radius: 3px; background: linear-gradient(180deg, #2e2a25, #17150f); box-shadow: 0 8px 22px rgba(0,0,0,.7); }
.foot { position: absolute; bottom: 0; width: 10px; height: 14px; border-radius: 0 0 3px 3px; background: #17150f; }
.foot-left { left: 58px; }
.foot-right { right: 58px; }

@keyframes weave { 0%,100% { transform: translate3d(0,0,0); } 25% { transform: translate3d(.6px,-.4px,0); } 50% { transform: translate3d(-.4px,.5px,0); } 75% { transform: translate3d(.3px,.3px,0); } }
@keyframes flicker { 0%,100% { filter: brightness(1); } 42% { filter: brightness(1.025); } 61% { filter: brightness(.985); } 78% { filter: brightness(1.012); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%,100% { opacity: .85; } 50% { opacity: 1; } }

@media (max-width: 699px) {
  .beam { width: 82vw; }
  .screen { width: 94vw; }
  .projector { transform: scale(.7); }
}

@media (max-width: 479px) {
  .projector { transform: scale(.56); }
}

@media (max-height: 520px) {
  .screen-content { bottom: 54px; }
  .intro { gap: 4px; }
  .marquee { margin-bottom: 4px; padding-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
