/* ahmadfareed.com — an old picture house: velvet, tungsten, a scratched print, a spotlight and a program. */
@property --ray { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --ink: #0b0a08;
  --paper: #f6eddc;
  --tungsten: #ffc879;
  --velvet: #8e1324;
  --gold: #e3bd6a;
  --text-2: rgba(246, 237, 220, .64);
  --text-3: rgba(246, 237, 220, .38);
  --line: rgba(246, 237, 220, .16);
  --expo: cubic-bezier(.16, 1, .3, 1);
  --quart: cubic-bezier(.25, 1, .5, 1);
  --inout: cubic-bezier(.87, 0, .13, 1);
  --curtain: cubic-bezier(.62, .02, .22, 1);
  --display: "Archivo", "Arial Black", Impact, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); color-scheme: dark; -webkit-text-size-adjust: 100%; }
html, body { height: 100%; overflow: hidden; }
html:has(body.is-stage), body.is-stage { height: auto; overflow-x: hidden; overflow-y: auto; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--tungsten); color: var(--ink); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--tungsten); outline-offset: 4px; border-radius: 3px; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 110; padding: 10px 16px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ------------------------------------------------------------------ grain, over everything */
.grain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 100; pointer-events: none; opacity: .07; }

/* ------------------------------------------------------------------ HUD */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 95; display: flex; justify-content: space-between; align-items: center;
  padding: clamp(14px, 2.2vw, 28px) clamp(16px, 2.8vw, 40px);
  font: 400 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--text-2); pointer-events: none;
}
.hud > * { pointer-events: auto; }
.wordmark { color: var(--paper); text-decoration: none; font-weight: 500; letter-spacing: .3em; }
.wordmark i { font-style: normal; color: var(--tungsten); margin: 0 .3em; }
.hud__right { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); }
.hud__link { color: var(--text-2); text-decoration: none; transition: color .3s; }
.hud__link:hover { color: var(--paper); }
.is-stage .hud__link { display: none; }
.is-stage .hud { position: absolute; }
.sound {
  appearance: none; background: rgba(11, 10, 8, .35); letter-spacing: inherit; text-transform: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .5s var(--expo), color .5s var(--expo);
}
.sound:hover { border-color: var(--text-3); color: var(--paper); }
.sound__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); transition: background .4s, box-shadow .4s; }
.sound[aria-pressed="true"] { color: var(--paper); }
.sound[aria-pressed="true"] .sound__dot { background: var(--tungsten); box-shadow: 0 0 12px var(--tungsten); animation: pulse 1.6s var(--inout) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 2px var(--tungsten); } }

/* ------------------------------------------------------------------ THE HOUSE */
.house { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(ellipse 90% 80% at 50% 45%, #15100c, #070605 75%); isolation: isolate; }

/* the projected frame: the image weaves inside a fixed aperture, projected "black" is a touch lighter than the house */
.screen {
  position: absolute; left: 11vw; top: 15vh; width: 78vw; height: 69vh; z-index: 5; overflow: hidden;
  border-radius: clamp(8px, .9vw, 16px);
  background: radial-gradient(ellipse 85% 80% at 50% 46%, #1c1813, #110f0c 62%, #0a0907);
  box-shadow: 0 0 0 1px rgba(255, 230, 190, .04), inset 0 0 120px rgba(0, 0, 0, .55);
  opacity: var(--screen, 0);
}
.screen::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: #fff8ea; }
.screen.cut-flash::before { opacity: .5; }
.runout .screen::before { opacity: 1; background: radial-gradient(ellipse 80% 80% at 50% 45%, #fffaf0, #f3e7d0 68%, #d9c7a7); animation: runout .09s steps(2) infinite; }
@keyframes runout { 50% { opacity: .78; } }
.flicker { position: absolute; inset: 0; z-index: 3; background: #000; opacity: var(--fl, 0); pointer-events: none; }
.damage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.cue {
  position: absolute; right: 5.5%; top: 7%; z-index: 6; width: clamp(18px, 2.3vw, 36px); aspect-ratio: 1; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #15120e 0 38%, #fbf2df 42% 62%, rgba(251, 242, 223, 0) 68%);
}
.cue.on { opacity: .95; }

/* the leader */
.leader {
  position: absolute; inset: 0; display: grid; place-items: center; visibility: hidden; color: #141210;
  background:
    linear-gradient(rgba(246, 240, 228, .75), rgba(246, 240, 228, .75)) 50% 50% / 100% 1.5px no-repeat,
    linear-gradient(rgba(246, 240, 228, .75), rgba(246, 240, 228, .75)) 50% 50% / 1.5px 100% no-repeat,
    radial-gradient(ellipse at 50% 50%, #a49c8f 0%, #776f63 55%, #403a32 100%);
}
.is-leader .leader { visibility: visible; }
.leader > * { grid-area: 1 / 1; }
.leader__rings { width: min(60vh, 44vw); height: auto; fill: none; stroke: #f6f0e4; stroke-width: 1.6; }
.leader__rings .dark { stroke: #1a1814; stroke-width: 2.4; }
.leader__sweep { width: min(48vh, 35vw); aspect-ratio: 1; border-radius: 50%; background: conic-gradient(rgba(20, 18, 14, .42) 0deg var(--sweep), transparent var(--sweep) 360deg); }
.leader.sweep .leader__sweep { animation: sweep 1s linear forwards; }
@keyframes sweep { from { --sweep: 0deg; } to { --sweep: 360deg; } }
.leader__num { font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: min(34vh, 24vw); line-height: 1; }
.leader__start { font: 500 clamp(14px, 1.7vw, 26px)/1 var(--mono); letter-spacing: .42em; text-transform: uppercase; opacity: 0; }
.leader.is-start .leader__num, .leader.is-start .leader__sweep { opacity: 0; }
.leader.is-start .leader__start { opacity: 1; }
.leader.is-black { background: #000; }
.leader.is-black > * { opacity: 0; }

/* the reel */
.reel { position: absolute; inset: 0; z-index: 1; }
.is-foyer .reel, .is-opening .reel, .is-leader .reel, .runout .reel { visibility: hidden; }
.scene { position: absolute; inset: 0; display: none; }
.scene.is-active { display: flex; }

/* scene 1 — the opening titles (focus pull + anamorphic un-squeeze) */
.scene--title { flex-direction: column; justify-content: center; padding: 0 5.5vw; }
.title { display: inline-flex; flex-direction: column; align-items: flex-start; align-self: flex-start; font-weight: 400; }
.plate {
  display: block; opacity: 0; transform: scaleX(.5); filter: blur(18px); transform-origin: 34% 50%;
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(48px, 11.2vw, 210px); line-height: .84; letter-spacing: -.012em; text-transform: uppercase;
  color: var(--paper); text-shadow: 0 0 26px rgba(255, 214, 160, .16), 0 0 90px rgba(255, 186, 104, .12);
}
.plate .line { display: block; }
.t-title .plate { animation: appear .4s var(--quart) forwards, unsqueeze 1.3s var(--expo) forwards, focus 1.7s linear forwards; }
@keyframes appear { to { opacity: 1; } }
@keyframes unsqueeze { from { transform: scaleX(.5); } to { transform: scaleX(1); } }
@keyframes focus {
  0%   { filter: blur(18px); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  50%  { filter: blur(.4px); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  67%  { filter: blur(4.5px); animation-timing-function: cubic-bezier(.3, .6, .3, 1); }
  100% { filter: blur(0); }
}
.surname { display: block; align-self: flex-end; overflow: hidden; padding: 0 .12em .14em .2em; }
.surname__in {
  display: inline-block; transform: translateY(110%);
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3.9vw, 74px); line-height: 1.05; letter-spacing: -.01em;
  color: var(--tungsten); text-shadow: 0 0 30px rgba(255, 186, 104, .25);
}
.t-surname .surname__in { transform: none; transition: transform 1.1s var(--expo); }
.credits { margin-top: clamp(20px, 3.6vh, 40px); min-height: 1.4em; font: 500 clamp(10px, .82vw, 12.5px)/1.4 var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--text-2); }
.caret { display: inline-block; width: .62em; height: 1.05em; margin-left: .35em; vertical-align: -.18em; background: var(--tungsten); opacity: 0; }
.t-typing .caret { opacity: 1; animation: blink 1s steps(1) infinite; }
.t-ready .caret { opacity: 0; animation: caret-out .9s linear 3 forwards; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes caret-out { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.tagline { margin-top: 10px; font-style: italic; font-size: clamp(17px, 1.35vw, 21px); color: var(--text-3); opacity: 0; transform: translateY(6px); transition: opacity 1.2s var(--expo) .2s, transform 1.2s var(--expo) .2s; }
.t-ready .tagline { opacity: 1; transform: none; }

/* the acts — silent-film title cards */
.scene--act { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 3.6vw; align-items: start; align-items: safe center; padding: min(6.5%, 4.6vh) 6% min(6.5%, 4.6vh) 6.5%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(246, 237, 220, .22) transparent; }
.scene--act::-webkit-scrollbar { width: 6px; }
.scene--act::-webkit-scrollbar-thumb { background: rgba(246, 237, 220, .22); border-radius: 3px; }
.scene--act.is-active { display: grid; }
.scene--act::before, .scene--act::after { content: ""; position: absolute; pointer-events: none; }
.scene--act::before { inset: 16px; border: 1px solid rgba(246, 237, 220, .3); border-radius: 6px; }
.screen::after { content: ""; position: absolute; inset: 16px; z-index: 7; border: 1px solid rgba(246, 237, 220, .3); border-radius: 6px; pointer-events: none; opacity: 0; }
.scene--act::after { inset: 22px; border: 1px solid rgba(246, 237, 220, .12); border-radius: 4px; }
.scene__lead { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.scene__act { display: flex; gap: 14px; align-items: center; font: 500 clamp(10px, .8vw, 12px)/1.2 var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--tungsten); }
.scene__act span { color: var(--text-3); }
.scene__head { margin: .36em 0 .55em; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, min(3.9vw, 6.4vh), 66px); line-height: 1; letter-spacing: -.02em; color: var(--paper); text-wrap: balance; }
.scene__art { width: min(100%, 290px); height: auto; max-height: 24vh; fill: none; stroke: rgba(246, 237, 220, .62); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.scene__art .ray { stroke: var(--tungsten); }
.scene__art .b { stroke-width: 2.6; }
.scene__art .old { stroke-dasharray: 4 5; opacity: .55; }
.scene__art .cta, .scene__art .led, .scene__art .cursor { fill: var(--tungsten); stroke: none; }
.scene__art .cursor { animation: blink 1s steps(1) infinite; }
.scene__art--net .links line { stroke: rgba(246, 237, 220, .45); stroke-dasharray: 3 4; animation: flow 3.5s linear infinite; }
.scene__art--net .nodes circle { fill: rgba(246, 237, 220, .88); stroke: none; }
.scene__art--net .nodes .hub { fill: var(--tungsten); filter: drop-shadow(0 0 6px rgba(255, 200, 121, .7)); }
@keyframes flow { to { stroke-dashoffset: -28; } }
.scene__art--phone { width: min(56%, 168px); }
.scene__facts { list-style: none; padding: 0; counter-reset: fact; min-width: 0; }
.scene__facts li { position: relative; padding-left: 2.5em; margin-bottom: min(1em, 1.6vh); font-size: clamp(14px, min(1.36vw, 2.3vh), 22px); line-height: 1.42; color: rgba(246, 237, 220, .9); counter-increment: fact; }
.scene__facts li:last-child { margin-bottom: 0; }
.scene__facts li::before { content: counter(fact, decimal-leading-zero); position: absolute; left: 0; top: .42em; font: 500 .6em/1 var(--mono); letter-spacing: .12em; color: var(--tungsten); }
.scene__facts b { font-weight: 400; color: #ffdcab; }
.scene.is-active .scene__act, .scene.is-active .scene__head, .scene.is-active .scene__art, .scene.is-active .scene__facts li,
.scene.is-active .end__small, .scene.is-active .end__line, .scene.is-active .end__acts { animation: rise .9s var(--expo) both; }
.scene.is-active .scene__head, .scene.is-active .end__line { animation-delay: .06s; }
.scene.is-active .scene__art, .scene.is-active .end__acts { animation-delay: .16s; }
.scene.is-active .scene__facts li:nth-child(1) { animation-delay: .2s; }
.scene.is-active .scene__facts li:nth-child(2) { animation-delay: .28s; }
.scene.is-active .scene__facts li:nth-child(3) { animation-delay: .36s; }
.scene.is-active .scene__facts li:nth-child(4) { animation-delay: .44s; }
.scene.is-active .scene__facts li:nth-child(5) { animation-delay: .52s; }
.scene.is-active .scene__facts li:nth-child(6) { animation-delay: .6s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* the rebuild: each weak point above the change it became */
.scene__facts .was { display: block; margin-bottom: .18em; font-style: italic; color: rgba(246, 237, 220, .52); }
.scene--lessons .scene__facts li { margin-bottom: min(.9em, 1.3vh); }

/* the last card */
.scene--end { flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 6%; }
.end__small { font: 500 12px/1 var(--mono); letter-spacing: .4em; text-transform: uppercase; color: var(--tungsten); }
.end__line { margin: .4em 0 .5em; max-width: 14ch; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5.4vw, 92px); line-height: 1; letter-spacing: -.02em; color: var(--paper); text-wrap: balance; }
.end__line em { color: var(--tungsten); }
.end__acts { font: 400 11px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--text-3); }

/* the beam from the booth */
.beam { position: absolute; inset: 0; z-index: 30; pointer-events: none; mix-blend-mode: screen; opacity: var(--lamp, 0); }
.beam__haze { position: absolute; inset: 0; filter: blur(18px); }
.beam__core, .beam__rays { position: absolute; inset: 0; clip-path: var(--hull, polygon(0 0, 0 0, 0 0)); }
.beam__core {
  background: radial-gradient(circle at var(--px, 93%) var(--py, 6%),
    rgba(255, 230, 186, .66) 0, rgba(255, 214, 156, .32) 4%, rgba(255, 204, 140, .15) 12%, rgba(255, 198, 132, .066) 26%, rgba(255, 196, 130, .026) 44%, rgba(255, 196, 130, .008) 62%, transparent 78%);
}
.beam__rays {
  filter: blur(1.4px);
  background:
    repeating-conic-gradient(from var(--ray) at var(--px, 93%) var(--py, 6%), rgba(255, 234, 194, .16) 0deg .45deg, transparent .45deg 2.2deg),
    repeating-conic-gradient(from calc(.8deg - var(--ray) * 1.7) at var(--px, 93%) var(--py, 6%), rgba(255, 234, 194, .09) 0deg 1deg, transparent 1deg 3.9deg);
  -webkit-mask-image: radial-gradient(circle at var(--px, 93%) var(--py, 6%), #000 0, rgba(0, 0, 0, .7) 12%, rgba(0, 0, 0, .25) 30%, transparent 56%);
          mask-image: radial-gradient(circle at var(--px, 93%) var(--py, 6%), #000 0, rgba(0, 0, 0, .7) 12%, rgba(0, 0, 0, .25) 30%, transparent 56%);
  animation: rays 11s var(--inout) infinite alternate;
}
@keyframes rays { to { --ray: 1.3deg; } }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 34; pointer-events: none; mix-blend-mode: screen; }
.port {
  position: absolute; left: var(--px, 93%); top: var(--py, 6%); z-index: 36; width: 24px; height: 13px; translate: -50% -50%; border-radius: 2px;
  background: #fff6e4; opacity: var(--lamp, 0);
  box-shadow: 0 0 6px 2px rgba(255, 240, 210, .95), 0 0 34px 12px rgba(255, 204, 128, .45), 0 0 140px 50px rgba(255, 180, 92, .16);
}

/* ------------------------------------------------------------------ THE CURTAINS */
.curtain { position: absolute; top: 0; bottom: 0; width: 51%; z-index: 20; transition: transform 2.7s var(--curtain); will-change: transform; }
.curtain--l { left: 0; transform-origin: 0 50%; }
.curtain--r { right: 0; transform-origin: 100% 50%; }
.curtains-open .curtain { transform: scaleX(.12); }
.curtains-fast .curtain { transition-duration: 1.4s; }
.cloth {
  position: absolute; inset: 0; transform-origin: 50% 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 68%, rgba(0, 0, 0, .58)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 3.1vw, rgba(0, 0, 0, .24) 4.4vw, rgba(0, 0, 0, 0) 5.6vw 8.3vw),
    repeating-linear-gradient(90deg, #2a0307 0, #5c0911 1.2vw, #981426 2.5vw, #c32136 3.1vw, #9c1528 3.8vw, #5a0911 5.1vw, #2a0307 6.2vw);
}
.curtain--l .cloth { box-shadow: inset -40px 0 70px rgba(0, 0, 0, .55); }
.curtain--r .cloth { box-shadow: inset 40px 0 70px rgba(0, 0, 0, .55); }
.is-opening .cloth { animation: sway 2.7s var(--inout); }
@keyframes sway { 35% { transform: skewX(1.4deg); } 70% { transform: skewX(-.8deg); } }
.valance { position: absolute; left: 0; top: 0; width: 100%; height: 14vh; z-index: 25; overflow: visible; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .65)); }
.valance .folds { fill: none; stroke: rgba(0, 0, 0, .34); stroke-width: 3; vector-effect: non-scaling-stroke; }
.valance .trim { fill: none; stroke: url(#gold); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.valance .fringe { fill: none; stroke: #c99a3e; stroke-width: 9; stroke-dasharray: 1.4 2.4; vector-effect: non-scaling-stroke; opacity: .92; }
.valance .rope { fill: none; stroke: #c99a3e; stroke-width: 4; vector-effect: non-scaling-stroke; }
.house-light {
  position: absolute; inset: 0; z-index: 38; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 1.8s var(--expo);
  background: radial-gradient(ellipse 42% 58% at 50% 40%, rgba(255, 196, 140, .26), transparent 70%), linear-gradient(to top, rgba(255, 160, 80, .32), rgba(255, 160, 80, 0) 27%);
}
.is-foyer .house-light { opacity: 1; }
.seats {
  position: absolute; left: -3vw; right: -3vw; bottom: -2px; height: 13vh; z-index: 50; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 100% at 50% 100%, #050403 97%, transparent 100%) 0 100% / 7.2vw 8.6vh repeat-x,
    radial-gradient(ellipse 50% 100% at 50% 100%, #0d0b08 97%, transparent 100%) 3.6vw 100% / 7.2vw 12.6vh repeat-x;
  transition: transform 1.4s var(--expo);
}
.is-stage .seats { transform: translateY(38%); }

/* the billing, gold on velvet */
.billing { position: absolute; left: 50%; top: 52%; z-index: 55; width: min(92vw, 940px); translate: -50% -50%; text-align: center; transition: opacity .9s var(--expo), transform .9s var(--expo); }
body:not(.is-foyer) .billing { opacity: 0; transform: translateY(-14px); pointer-events: none; }
.billing__now { font: 500 12px/1 var(--mono); letter-spacing: .52em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.billing__name, .billing__sur {
  background: linear-gradient(100deg, #7d5a1c 0%, #e8c66f 18%, #fff0bf 28%, #c4922c 42%, #7d5a1c 55%, #e9c46a 72%, #fff3c8 80%, #a87a26 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .6)); animation: foil 7s var(--inout) infinite alternate;
}
@keyframes foil { to { background-position: 100% 0; } }
.billing__name { margin-top: .5em; font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: clamp(42px, 8.2vw, 148px); line-height: .9; letter-spacing: -.01em; text-transform: uppercase; }
.billing__sur { margin-top: .02em; font-style: italic; font-size: clamp(26px, 3.6vw, 62px); line-height: 1.1; }
.billing__in { margin-top: .8em; font-style: italic; font-size: clamp(17px, 1.5vw, 22px); color: rgba(255, 230, 196, .82); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.billing__in span { margin: 0 .55em; font-style: normal; font-family: var(--mono); font-size: .62em; letter-spacing: .24em; text-transform: uppercase; color: #f4d58a; }
.begin {
  margin-top: clamp(26px, 4.4vh, 46px); display: inline-flex; align-items: center; gap: 14px; padding: 17px 30px; cursor: pointer;
  border: 1px solid rgba(241, 209, 132, .75); border-radius: 999px; background: rgba(28, 4, 8, .4); color: #f8dea0;
  font: 500 12px/1 var(--mono); letter-spacing: .32em; text-transform: uppercase;
  box-shadow: 0 0 0 0 rgba(241, 209, 132, .35); transition: background .4s var(--expo), box-shadow .6s var(--expo), transform .4s var(--expo);
  animation: invite 2.6s var(--inout) infinite;
}
.begin:hover { background: rgba(241, 209, 132, .14); transform: translateY(-2px); }
@keyframes invite { 50% { box-shadow: 0 0 0 10px rgba(241, 209, 132, 0), 0 0 36px rgba(241, 209, 132, .28); } }
.begin__tri { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.billing__alt { margin-top: 18px; font: 400 11px/1.6 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 226, 190, .62); }
.billing__alt button, .billing__alt a { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; letter-spacing: inherit; text-transform: inherit; font: inherit; text-decoration: none; border-bottom: 1px solid rgba(255, 226, 190, .25); transition: color .3s, border-color .3s; }
.billing__alt button:hover, .billing__alt a:hover { color: #f8dea0; border-color: #f8dea0; }

/* ------------------------------------------------------------------ THE STAGE — spotlight */
.spot { position: absolute; inset: 0; z-index: 32; pointer-events: none; mix-blend-mode: screen; opacity: var(--spot, 0); }
/* house lights down on the stage: everything outside the spotlight falls away */
.house::after { content: ""; position: absolute; inset: 0; z-index: 31; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--expo); background: radial-gradient(ellipse 46% 62% at 50% 52%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .78) 100%); }
.is-stage .house::after { opacity: 1; }
.spot__cone { position: absolute; inset: 0; filter: blur(26px); }
.spot__cone::before {
  content: ""; position: absolute; inset: 0; clip-path: polygon(47% -8%, 53% -8%, 80% 96%, 20% 96%);
  background: linear-gradient(to bottom, rgba(255, 244, 222, .5), rgba(255, 236, 206, .18) 40%, rgba(255, 232, 200, .1) 96%);
}
.spot__pool { position: absolute; left: 50%; top: 54%; width: 92vw; height: 104vh; translate: -50% -50%; background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 234, 204, .46), rgba(255, 226, 190, .18) 46%, transparent 72%); }

/* ------------------------------------------------------------------ the projector panel */
.panel {
  position: fixed; left: 50%; bottom: clamp(14px, 2.4vh, 26px); z-index: 90; translate: -50% 0; display: flex; align-items: center; gap: 6px; padding: 6px;
  border-radius: 999px; background: rgba(10, 9, 7, .74); border: 1px solid rgba(246, 237, 220, .14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity .8s var(--expo), transform .8s var(--expo);
}
.panel-on.is-film .panel { opacity: 1; pointer-events: auto; transform: none; }
.panel__btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(246, 237, 220, .08); cursor: pointer; font-size: 12px; transition: background .3s; }
.panel__btn:hover { background: rgba(246, 237, 220, .18); }
.panel__btn--next.hint { animation: hint 1.6s var(--inout) infinite; }
@keyframes hint { 50% { background: rgba(255, 200, 121, .24); box-shadow: 0 0 24px rgba(255, 200, 121, .5); } }
.panel__count { display: flex; align-items: center; gap: 4px; margin: 0 12px; white-space: nowrap; font: 400 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); }
.panel__count b { color: var(--paper); font-weight: 500; }
.panel__name { margin-left: 10px; padding-left: 12px; border-left: 1px solid rgba(246, 237, 220, .2); color: var(--paper); }
.timecode { position: fixed; right: clamp(16px, 2.8vw, 40px); bottom: clamp(26px, 3.4vh, 38px); z-index: 90; font: 400 11px/1 var(--mono); letter-spacing: .16em; color: var(--text-2); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .6s; }
.is-leader .timecode, .is-film .timecode, .is-ending .timecode { opacity: 1; }

/* ------------------------------------------------------------------ THE PROGRAM */
.program { display: none; position: relative; z-index: 70; padding: 15vh 4vw 18vh; }
.is-stage .program { display: block; }
/* the paper sits above the grain: the noise stays on the velvet around it, the page itself is clean to read */
.is-stage .program { z-index: 101; }
.bill {
  position: relative; max-width: 1060px; margin: 0 auto; color: #1a1510; border-radius: 4px;
  padding: clamp(30px, 4.8vw, 66px) clamp(22px, 5vw, 74px) clamp(30px, 4vw, 56px);
  background: radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, .55), transparent 60%), linear-gradient(#f4ebd8, #ebdfc6);
  box-shadow: 0 50px 140px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .25);
  opacity: 0; transform: translateY(70px) scale(.985); transition: opacity 1.2s var(--expo), transform 1.5s var(--expo);
}
.program-in .bill { opacity: 1; transform: none; }
.bill::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(26, 21, 16, .34); outline: 1px solid rgba(26, 21, 16, .16); outline-offset: 4px; border-radius: 2px; pointer-events: none; }
.bill ::selection { background: var(--velvet); color: #f4ebd8; }
.bill__mast { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid #1a1510; font: 500 11px/1.3 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--velvet); }
.bill__name { margin: .32em 0 .22em; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.6vw, 98px); line-height: .95; letter-spacing: -.02em; }
.bill__name em { color: var(--velvet); }
.bill__billing { max-width: 48ch; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.4; }
.bill__meta { margin-top: 12px; font: 400 11.5px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(26, 21, 16, .6); }
.bill__sec { margin-top: clamp(32px, 4.6vw, 54px); }
.bill__h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(26, 21, 16, .3); font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.bill__h span { font-family: var(--mono); font-weight: 400; font-stretch: 100%; letter-spacing: .12em; color: rgba(26, 21, 16, .55); }
.bill__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 3.6vw, 50px); }
.role__when { font: 500 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--velvet); }
.role__title { margin: 10px 0 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 31px); line-height: 1.08; }
.role__where { margin-bottom: 14px; font-style: italic; font-size: 17px; line-height: 1.35; color: rgba(26, 21, 16, .72); }
.role ul { list-style: none; padding: 0; }
.role li { position: relative; margin-bottom: 9px; padding-left: 18px; font-size: 17px; line-height: 1.42; }
.role li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; background: var(--velvet); transform: rotate(45deg); }
.bill__earlier p { margin-bottom: 8px; font-size: 17px; line-height: 1.45; }
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 34px; }
.cast dt { margin-bottom: 6px; font: 500 10.5px/1.25 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--velvet); }
.cast dd { font-size: 16px; line-height: 1.45; }
.lessons { display: grid; gap: 0; }
.lessons > div { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 28px; padding: 14px 0; border-bottom: 1px solid rgba(26, 21, 16, .14); }
.lessons > div:last-child { border-bottom: 0; }
.lessons dt { font-style: italic; font-size: 17px; line-height: 1.4; color: rgba(26, 21, 16, .66); }
.lessons dt::before { content: "\2014\00a0"; color: var(--velvet); font-style: normal; }
.lessons dd { font-size: 17px; line-height: 1.45; }
.bill__lede { max-width: 78ch; margin-bottom: 18px; font-size: 18px; line-height: 1.5; }
.scene__art--loop .hub { fill: var(--tungsten); stroke: none; filter: drop-shadow(0 0 8px rgba(255, 200, 121, .6)); }
.tools > div { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
.tools dt { font-style: normal; font-weight: 400; color: #1a1510; }
.tools dt::before { content: "\25C6\00a0\00a0"; font-size: .6em; vertical-align: .2em; color: var(--velvet); }
.scene--lessons .scene__facts li { font-size: clamp(13px, min(1.12vw, 2.05vh), 19px); margin-bottom: min(.75em, 1.1vh); }
.scene--lessons .scene__head { font-size: clamp(24px, min(3.3vw, 5.6vh), 56px); }
@media (max-height: 820px) and (min-width: 761px) {
  .screen { top: 12vh; height: 74vh; }
  .scene--act { gap: 2.6vw; }
  .scene__art { max-height: 20vh; }
  .scene__head { margin: .3em 0 .4em; }
}
.bill__bts p { max-width: 72ch; font-size: 18px; line-height: 1.5; }
.bill__credits { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 34px; }
.bill__credits li { display: flex; flex-direction: column; gap: 2px; font-size: 17px; line-height: 1.35; }
.bill__credits span { font: 400 10.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(26, 21, 16, .55); }
.box { display: flex; flex-wrap: wrap; gap: 14px; }
.box__btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 26px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: #1a1510; color: #f4ebd8; border: 1px solid #1a1510;
  font-family: var(--display); font-weight: 800; font-stretch: 125%; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase;
  transition: background .4s var(--expo), border-color .4s var(--expo), color .4s var(--expo), transform .4s var(--expo);
}
.box__btn:hover { background: var(--velvet); border-color: var(--velvet); color: #f4ebd8; transform: translateY(-2px); }
.box__btn--ghost { background: transparent; color: #1a1510; }
.bill__fine { margin-top: 26px; font: 400 10.5px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(26, 21, 16, .5); }

/* ------------------------------------------------------------------ cuts: private lines are physically removed from the public build
   (build-cuts.mjs); ?cut=public previews the public cut, ?mark tags every private line */
[data-public] { display: none !important; }
.cut-public [data-private] { display: none !important; }
.cut-public [data-public] { display: revert !important; }
.mark-private [data-private] { position: relative; outline: 1px dashed rgba(255, 90, 54, .6); outline-offset: 4px; }
.mark-private [data-private]::after { content: 'private'; position: absolute; right: 0; top: -1.2em; font: 500 9px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: #ff5a36; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 760px) {
  .hud__link { font-size: 10px; letter-spacing: .14em; }
  .screen { left: 5vw; width: 90vw; top: 11vh; height: 74vh; }
  .curtains-open .curtain { transform: scaleX(.08); }
  .valance { height: 9vh; }
  .seats { height: 9vh; background-size: 14vw 6vh, 14vw 8.8vh; background-position: 0 100%, 7vw 100%; }
  .plate { font-size: 15.2vw; }
  .surname__in { font-size: 7.2vw; }
  .scene--title { padding: 0 6vw; }
  .scene--act { grid-template-columns: 1fr; align-content: start; gap: 0; padding: 12% 8% 9%; overflow-y: auto; }
  .scene--act::before { inset: 10px; } .scene--act::after { inset: 15px; }
  .scene__art { display: none; }
  .scene__head { font-size: 8.4vw; }
  .scene__facts li { padding-left: 2.3em; margin-bottom: .85em; font-size: 14.5px; }
  .scene--lessons .scene__facts li { font-size: 13px; line-height: 1.36; margin-bottom: .5em; padding-left: 2.1em; }
  .scene--lessons .scene__facts .was { margin-bottom: .1em; }
  .scene--act { padding: 10% 7% 8%; }
  .scene--lessons .scene__head { font-size: 7.2vw; }
  .billing__now { letter-spacing: .4em; }
  .panel__name { display: none; }
  .timecode { display: none; }
  .spot__cone::before { clip-path: polygon(46% -8%, 54% -8%, 94% 96%, 6% 96%); }
  .program { padding: 13vh 3.5vw 14vh; }
  .bill__mast { flex-direction: column; letter-spacing: .22em; }
  .bill__grid, .cast, .bill__credits { grid-template-columns: 1fr; }
  .lessons > div { grid-template-columns: 1fr; gap: 4px; }
}

/* a card taller than the screen scrolls; the fade says so until the end is reached */
.scene--act.is-scrollable:not(.at-end) { -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent); mask-image: linear-gradient(#000 calc(100% - 56px), transparent); }
@media (max-width: 400px) {
  .scene__facts li { font-size: 13.5px; }
  .scene--lessons .scene__facts li { font-size: 12.5px; }
  .scene__head { font-size: 7.8vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .curtain { transition: opacity .7s ease !important; }
  .curtains-open .curtain { transform: none; opacity: 0; }
  .plate { opacity: 1; transform: none; filter: none; }
  .surname__in { transform: none; }
}
