/* ==========================================================================
   Cast — Michael Kremer
   ========================================================================== */
:root {
  --bg: #e8e6e1;
  --ink: #161513;
  --ink2: #3b3934;
  --mute: #7a766e;
  --line: rgba(22, 21, 19, .13);
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --pad: clamp(18px, 2.2vw, 32px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html.locked { overflow: hidden; }
body { overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; }
kbd { font: inherit; padding: 2px 6px 1px; border: 1px solid currentColor; border-radius: 5px; opacity: .9; margin-right: 6px; }
.mono { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; touch-action: pan-y; outline: none; }
@media (pointer: fine) { #gl { cursor: none; } }
body.dragging, body.dragging #gl { cursor: none; user-select: none; }

/* ---------- cursor ---------- */
.cur { position: fixed; left: 0; top: 0; z-index: 8; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity .25s; will-change: transform; }
.cur.on { opacity: 1; }
.cur .dot { position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease); }
.cur .ring { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(22, 21, 19, .55); transition: transform .45s var(--ease), background .3s, border-color .3s; }
.cur.big .ring { transform: scale(2.2); background: rgba(22, 21, 19, .9); border-color: transparent; }
.cur.big .dot { transform: scale(0); }
.cur span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font: 500 9.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--ink); opacity: 0; transition: opacity .2s, color .2s; }
.cur.word span { opacity: 1; }
.cur.word:not(.big) span { transform: translate(-50%, 22px); }
.cur.big span { color: var(--bg); }

/* ---------- grain ---------- */
.grain { position: fixed; inset: -50%; z-index: 9; pointer-events: none; opacity: .055; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* ---------- loader ---------- */
#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg); transition: opacity .9s var(--ease), visibility .9s; }
#loader.done { opacity: 0; visibility: hidden; }
.ld-in { display: grid; justify-items: center; gap: 14px; width: min(360px, 80vw); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.ld-n { font-size: 13px; color: var(--ink); }
.ld-n b { font-weight: 500; }
.ld-bar { display: block; width: 100%; height: 1px; background: var(--line); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: 0 0; transform: scaleX(0); transition: transform .4s var(--ease); }
.ld-s { text-align: center; line-height: 1.5; text-transform: none; letter-spacing: .02em; font-size: 12px; }
/* once everything is cast: one deliberate click in. It is also what lets the browser play sound. */
.ld-go { display: grid; justify-items: center; gap: 14px; margin-top: 26px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .8s var(--ease), transform 1s var(--ease), visibility .8s; }
#loader.ready .ld-go { opacity: 1; visibility: visible; transform: none; }
.ld-enter { display: inline-flex; align-items: center; gap: 12px; padding: 16px 24px 15px 26px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; transition: transform .5s var(--ease), background .3s, box-shadow .5s var(--ease); box-shadow: 0 0 0 0 rgba(22, 21, 19, .16); }
.ld-enter:hover, .ld-enter:focus-visible { background: #000; transform: scale(1.04); box-shadow: 0 0 0 8px rgba(22, 21, 19, .07); }
.ld-enter:active { transform: scale(.97); }
.ld-enter:focus, .ld-alt:focus { outline: none; }
.ld-alt:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.ld-enter .eq i { animation: eq 1s ease-in-out infinite; }
.ld-enter .eq i:nth-child(2) { animation-delay: -.35s; }
.ld-enter .eq i:nth-child(3) { animation-delay: -.7s; }
.ld-enter.quiet .eq i { animation: none; height: 3px; }
.ld-alt { padding: 6px 4px; font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); transition: color .25s; }
.ld-alt:hover, .ld-alt:focus-visible { color: var(--ink); }
#loader.ready .ld-bar i { transition-duration: .2s; }
#loader.entered .ld-enter { transform: scale(.94); background: #000; }

/* ---------- HUD ---------- */
.hud { position: fixed; z-index: 6; pointer-events: none; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink); }
.hud a, .hud button { pointer-events: auto; }
.hud.top { top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: var(--pad); transition: opacity .5s; }
.who { display: grid; gap: 3px; }
.who b { font: 600 15px/1 var(--sans); letter-spacing: -.01em; text-transform: none; }
.who span { color: var(--mute); }
.hud nav { display: flex; gap: 6px; align-items: center; }
.hud nav > * { padding: 8px 12px; border-radius: 999px; text-transform: none; transition: background .25s; }
.hud nav > *:hover { background: rgba(22, 21, 19, .07); }
#sound { display: flex; align-items: center; gap: 8px; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.eq i { width: 2px; height: 3px; background: currentColor; transition: height .2s; }
#sound[aria-pressed="true"] .eq i { animation: eq 1s ease-in-out infinite; }
#sound[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.35s; }
#sound[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 10px; } }

.intro { left: var(--pad); top: calc(var(--pad) + 52px); max-width: 330px; text-transform: none; letter-spacing: 0; transition: opacity .6s, transform .6s var(--ease); }
.intro .lede { font: 400 15px/1.45 var(--sans); color: var(--ink2); }
.hint { right: var(--pad); bottom: var(--pad); display: grid; gap: 8px; justify-items: end; color: var(--ink2); transition: opacity .6s, transform .6s var(--ease); }
/* the toys: drop again, tilt, zero gravity */
.pre .intro, .pre .hint, .pre .ctl { opacity: 0; transform: translateY(8px); }
/* Scroll is the way into the work: it gets a filled key, a nudging arrow and a slow pulse, and it's a button */
.hint .hint-go { pointer-events: auto; display: inline-flex; align-items: center; padding: 0; color: var(--ink); font: inherit; letter-spacing: inherit; text-transform: inherit; }
.hint .hint-go kbd { background: var(--ink); color: var(--bg); border-color: var(--ink); opacity: 1; transition: background .25s, transform .3s var(--ease); animation: hint-pulse 2.8s var(--ease) infinite 1.6s; }
.hint .hint-go:hover kbd, .hint .hint-go:focus-visible kbd { background: #000; transform: translateY(-1px); }
.hint .hint-go:focus-visible { outline: none; }
.hint .hint-go i { display: inline-block; margin-left: 7px; font-style: normal; animation: cx-nudge 2s var(--ease) infinite; }
@keyframes hint-pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 21, 19, .28); } 55%, 100% { box-shadow: 0 0 0 8px rgba(22, 21, 19, 0); } }
.ctl { left: var(--pad); bottom: var(--pad); display: flex; gap: 8px; align-items: center; transition: opacity .6s, transform .6s var(--ease); }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 9px 11px 9px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 10.5px; line-height: 1; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.pill:hover, .pill:focus-visible { background: #fff; border-color: rgba(22, 21, 19, .25); outline: none; }
.pill:active { transform: scale(.96); }
.pill kbd { margin: 0 0 0 2px; padding: 2px 5px 1px; font-size: 9.5px; opacity: .5; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.zg .zg-s { display: none; }
/* drop again: a block that drops onto its floor */
.ic-drop { position: relative; display: block; width: 13px; height: 12px; }
.ic-drop::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.2px; border-radius: 1px; background: currentColor; opacity: .45; }
.ic-drop i { position: absolute; left: 2px; bottom: 2.4px; width: 9px; height: 6.5px; border: 1.2px solid currentColor; border-radius: 2px; transform: rotate(8deg); }
.pill:hover .ic-drop i { animation: ic-hop .7s var(--ease); }
.pill.go .ic-drop i { animation: ic-drop .7s cubic-bezier(.35, 0, .3, 1); }
@keyframes ic-hop { 40% { transform: translateY(-4px) rotate(-12deg); } }
@keyframes ic-drop { 0% { transform: translateY(-10px) rotate(-40deg); opacity: 0; } 55% { transform: translateY(0) rotate(8deg); opacity: 1; } 72% { transform: translateY(-2px) rotate(3deg); } }
/* tilt: a floor that tips, with a block sliding down it */
.ic-tilt { position: relative; display: block; width: 14px; height: 12px; }
.ic-tilt i { position: absolute; left: 0; right: 0; bottom: 3px; height: 1.2px; border-radius: 1px; background: currentColor; transform: rotate(-14deg); }
.ic-tilt i::after { content: ''; position: absolute; left: 1px; bottom: 1.4px; width: 5.5px; height: 4.5px; border: 1.2px solid currentColor; border-radius: 1.5px; }
.pill[aria-pressed="true"] .ic-tilt i { animation: ic-rock 2.6s ease-in-out infinite; }
.pill[aria-pressed="true"] .ic-tilt i::after { animation: ic-slide 2.6s ease-in-out infinite; }
@keyframes ic-rock { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
@keyframes ic-slide { 0%, 100% { left: 1px; } 50% { left: 6.5px; } }
/* zero gravity: a block that lifts off its shadow */
.zg-ico { position: relative; display: block; width: 13px; height: 10px; margin: -2px 0 2px; border: 1.2px solid currentColor; border-radius: 2.5px; transform: rotate(-10deg); }
.zg-ico i { position: absolute; left: 50%; bottom: -6px; width: 11px; height: 1.2px; margin-left: -5.5px; border-radius: 1px; background: currentColor; opacity: .45; transform: rotate(10deg); transition: bottom .9s var(--ease), opacity .9s, width .9s var(--ease); }
.zg[aria-pressed="true"] .zg-ico { animation: zg-float 3.2s ease-in-out infinite; }
.zg[aria-pressed="true"] .zg-ico i { bottom: -9px; opacity: .2; animation: zg-shadow 3.2s ease-in-out infinite; }
@keyframes zg-float { 50% { transform: translateY(-2.5px) rotate(14deg); } }
@keyframes zg-shadow { 50% { transform: translateY(2.5px) rotate(-4deg); opacity: .12; } }

.now { left: var(--pad); bottom: var(--pad); display: flex; gap: 18px; align-items: flex-end; opacity: 0; transition: opacity .4s; text-transform: none; letter-spacing: 0; max-width: min(720px, 70vw); }
.now .num { font: 300 clamp(56px, 7vw, 108px)/.8 var(--sans); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.now .txt { display: grid; gap: 6px; padding-bottom: 4px; }
.now b { font: 600 clamp(20px, 2vw, 30px)/1.05 var(--sans); letter-spacing: -.025em; }
.now span { font: 500 11px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.now .txt > * { transition: opacity .35s, transform .45s var(--ease); }
.now.swap .txt > *, .now.swap .num { opacity: 0; transform: translateY(6px); }
.now .num { transition: opacity .3s, transform .45s var(--ease); }
.open-hint { right: var(--pad); bottom: var(--pad); opacity: 0; transition: opacity .4s; color: var(--ink2); }
.open-hint .sep { margin: 0 6px; color: var(--mute); }
.open-hint kbd + kbd { margin-left: -2px; }

.rail { position: fixed; z-index: 6; right: calc(var(--pad) - 6px); top: 50%; transform: translateY(-50%); list-style: none; display: grid; gap: 0; opacity: 0; transition: opacity .4s; pointer-events: none; }
.rail.on { pointer-events: auto; }
.rail li { position: relative; display: flex; justify-content: flex-end; align-items: center; height: 13px; width: 40px; cursor: pointer; }
.rail li i { display: block; width: 10px; height: 1px; background: var(--ink); opacity: .3; transition: width .3s var(--ease), opacity .3s; }
.rail li:hover i { width: 18px; opacity: .8; }
.rail li.on i { width: 26px; opacity: 1; }
.rail li span { position: absolute; right: 34px; white-space: nowrap; font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); opacity: 0; transform: translateX(4px); transition: opacity .2s, transform .25s var(--ease); pointer-events: none; }
.rail li:hover span { opacity: 1; transform: none; }

.tag { position: fixed; z-index: 8; left: 0; top: 0; pointer-events: none; padding: 7px 10px 6px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity .18s; will-change: transform; }
.tag.on { opacity: 1; }
.tag b { font-weight: 500; opacity: .55; margin-right: 8px; }

/* ---------- flow ---------- */
#flow { position: relative; z-index: 2; pointer-events: none; }
#spacer { height: 100vh; }

/* ---------- spec sheet ---------- */
.sheet { position: relative; pointer-events: auto; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -40px 80px -20px rgba(232, 230, 225, .9); }
.sheet-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px clamp(32px, 6vw, 120px); padding: clamp(80px, 12vh, 160px) var(--pad) 120px; max-width: 1680px; margin: 0 auto; }
.sh-head h2 { margin-top: 18px; font: 600 clamp(48px, 7vw, 120px)/.9 var(--sans); letter-spacing: -.05em; }
.sh-sub { margin-top: 26px; max-width: 460px; font-size: 19px; line-height: 1.45; color: var(--ink2); }
.spec { border-top: 1px solid var(--ink); align-self: start; }
.spec .dia { display: inline-block; width: 1.32em; height: .6em; margin: 0 .2em 0 .4em; vertical-align: .05em; fill: var(--ink); }
.spec > div { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr; gap: 16px; padding: 14px 0 13px; border-bottom: 1px solid var(--line); }
.spec dt { font: 500 11px/1.6 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.spec dd { font-size: 17px; line-height: 1.4; }
.spec dd small { color: var(--mute); font-size: 13px; margin-left: 6px; }
.bio { grid-column: 2; display: grid; gap: 18px; font-size: 20px; line-height: 1.5; color: var(--ink2); max-width: 760px; }
.bio p:first-child { color: var(--ink); }
.career { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 120px); padding-top: 40px; border-top: 1px solid var(--line); }
.career ol { list-style: none; }
.career li { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.career li .yr { font: 500 12px/1.6 var(--mono); color: var(--mute); }
.career li b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.career li .role { display: block; margin-top: 2px; font-size: 15px; color: var(--ink2); }
.career li ul { margin-top: 10px; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; line-height: 1.45; color: var(--mute); }
.career li .city { font: 500 11px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.contact { padding: 80px var(--pad) var(--pad); max-width: 1680px; margin: 0 auto; border-top: 1px solid var(--line); }
.contact .mail { display: block; margin-top: 18px; font: 600 clamp(36px, 7.4vw, 132px)/.95 var(--sans); letter-spacing: -.05em; transition: opacity .3s; overflow-wrap: anywhere; }
.contact .mail:hover { opacity: .6; }
.foot { margin-top: 80px; display: flex; gap: 24px; justify-content: space-between; font: 500 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.foot a:hover, .foot button:hover { color: var(--ink); }

/* ---------- case ---------- */
#case { position: fixed; inset: 0; z-index: 20; visibility: hidden; }
#case.on { visibility: visible; }
#case .veil { position: absolute; inset: 0; background: var(--bg); opacity: 0; transition: opacity .55s var(--ease); }
#case.solid .veil { opacity: 1; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 14px 20px 14px 16px; border-radius: 999px; background: rgba(22, 21, 19, .82); color: #fff; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .3s var(--ease), background .3s; opacity: 0; }
#case.solid .play { opacity: 1; }
.play:hover { transform: translate(-50%, -50%) scale(1.05); background: var(--ink); }
.play svg { width: 16px; height: 16px; }
.c-close { position: fixed; z-index: 3; top: var(--pad); right: var(--pad); display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
#case.solid .c-close { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- fallback ---------- */
.nogl { position: relative; z-index: 3; padding: 120px var(--pad) 60px; }
.nogl ol { list-style: none; columns: 2 320px; margin-top: 24px; }
.nogl li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.nogl li .mono { color: var(--mute); }
.nogl > p.mono:last-child { margin-top: 32px; }
.nogl a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .hud nav > a, .hud nav button[data-go] { display: none; }
  .intro { max-width: 260px; }
  .intro .lede { font-size: 14px; }
  .hint { font-size: 10px; }
  .hint span:first-child { display: none; }
  .ctl { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pill { padding: 8px 10px 8px 11px; }
  .pill kbd, .zg .zg-l { display: none; }
  .zg .zg-s { display: inline; }
  .rail { display: none; }
  .open-hint { display: none; }
  .now { max-width: calc(100vw - 2 * var(--pad)); }
  .sheet-in, .career { grid-template-columns: 1fr; }
  .bio { grid-column: 1; font-size: 18px; }
  .career li { grid-template-columns: 1fr; gap: 4px; }
  .spec > div { grid-template-columns: 1fr; gap: 4px; }
  .foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01s !important; animation: none !important; } }

/* ==========================================================================
   Round 2 additions
   ========================================================================== */
/* buttons */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 18px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .5); font: 500 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink); cursor: pointer; transition: background .25s, transform .35s var(--ease), border-color .25s; }
.btn:hover { background: #fff; border-color: rgba(22, 21, 19, .25); transform: translateY(-1px); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.dark:hover { background: #000; }
.btn svg { width: 14px; height: 14px; }

/* résumé */
.resume { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.rs-title { font: 600 clamp(30px, 3.4vw, 48px)/1 var(--sans); letter-spacing: -.045em; }
.rs-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* contact */
.mail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
#copyMail.done { background: #1f7a4d; border-color: #1f7a4d; }

/* film player: full window, in the site */
#player { position: fixed; inset: 0; z-index: 40; display: block; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background: #0b0b0a; opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s; }
#player::-webkit-scrollbar { display: none; }
#player::after { content: ''; display: block; height: calc(100% + 40vh); }   /* room to scroll on past the film */
#player.on { opacity: 1; visibility: visible; }
.pl-stage { position: absolute; left: 50%; top: 50%; translate: -50% -50%; background: #000; transform: scale(.97); transition: transform .6s var(--ease), opacity .4s; box-shadow: 0 40px 120px rgba(0, 0, 0, .6); }
#player.leaving .pl-stage { transform: translateY(-7vh) scale(.98); opacity: 0; }
#player.on .pl-stage { transform: none; }
.pl-stage iframe, .pl-stage img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.pl-stage .pl-note { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; background: rgba(11, 11, 10, .72); color: #f2f0eb; font-size: 17px; line-height: 1.45; }
.pl-stage .pl-note .btn { background: #f2f0eb; color: #111; border-color: transparent; }
.pl-cap { position: fixed; left: 14px; bottom: 13px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: rgba(242, 240, 235, .65); }
.pl-close { position: fixed; top: 8px; right: 10px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 999px; background: rgba(242, 240, 235, .1); color: #f2f0eb; font: 500 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; transition: background .25s; }
.pl-close:hover { background: rgba(242, 240, 235, .2); }
.pl-more { position: fixed; right: 14px; bottom: 13px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: rgba(242, 240, 235, .45); pointer-events: none; }
.pl-more i { display: inline-block; margin-left: 6px; font-style: normal; animation: cx-nudge 2s var(--ease) infinite; }
@media (max-width: 560px) { .pl-more { display: none; } }

/* the site's own film player */
.pl-stage.own { overflow: hidden; outline: none; }
.pl-stage .pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.pl-stage.own:not(.pv-show):not(.pv-paused):not(.pv-drag) { cursor: none; }
.pl-stage.own:fullscreen { width: 100% !important; height: 100% !important; translate: none !important; transform: none !important; box-shadow: none; }
.pl-stage.own:-webkit-full-screen { width: 100% !important; height: 100% !important; translate: none !important; transform: none !important; box-shadow: none; }
.pl-stage.own:fullscreen .pv { object-fit: contain; }
.pl-stage.own:-webkit-full-screen .pv { object-fit: contain; }
.pv-ui { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 4px; padding: 34px 10px 8px; background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, .18) 55%, rgba(0, 0, 0, 0)); color: #f2f0eb; opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .5s var(--ease); pointer-events: none; }
.pv-show .pv-ui, .pv-paused .pv-ui, .pv-drag .pv-ui, .pl-stage.own:has(:focus-visible) .pv-ui { opacity: 1; transform: none; pointer-events: auto; }
.pv-btn { flex: none; display: flex; align-items: center; justify-content: center; height: 34px; min-width: 34px; padding: 0; border-radius: 999px; color: inherit; transition: background .2s, padding .3s var(--ease); }
.pv-btn:hover { background: rgba(242, 240, 235, .14); }
.pv-btn:focus-visible { outline: 1.5px solid rgba(242, 240, 235, .7); outline-offset: 1px; }
.pv-btn svg { width: 15px; height: 15px; flex: none; }
.pv-lbl { display: none; margin-left: 8px; font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.pv-hush .pv-snd { padding: 0 13px 0 11px; background: rgba(242, 240, 235, .18); }
.pv-hush .pv-lbl { display: inline; }
.pv-t { flex: none; min-width: 3.6em; text-align: center; font: 500 11px/1 var(--mono); letter-spacing: .05em; font-variant-numeric: tabular-nums; color: rgba(242, 240, 235, .82); }
.pv-bar { position: relative; flex: 1; align-self: stretch; min-width: 40px; margin: 0 6px; cursor: pointer; touch-action: none; outline: none; }
.pv-bar::before, .pv-buf, .pv-fill { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; transform-origin: 0 50%; transition: height .25s var(--ease), margin .25s var(--ease); }
.pv-bar::before { background: rgba(242, 240, 235, .2); }
.pv-buf { background: rgba(242, 240, 235, .28); transform: scaleX(0); }
.pv-fill { background: #f2f0eb; transform: scaleX(0); }
.pv-bar:hover::before, .pv-bar:hover .pv-buf, .pv-bar:hover .pv-fill, .pv-drag .pv-bar::before, .pv-drag .pv-buf, .pv-drag .pv-fill, .pv-bar:focus-visible::before, .pv-bar:focus-visible .pv-fill { height: 4px; margin-top: -2px; }
.pv-knob { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #f2f0eb; box-shadow: 0 1px 6px rgba(0, 0, 0, .3); transform: scale(0); transition: transform .25s var(--ease); }
.pv-bar:hover .pv-knob, .pv-drag .pv-knob, .pv-bar:focus-visible .pv-knob { transform: scale(1); }
.pv-tip { position: absolute; bottom: calc(50% + 12px); left: 0; translate: -50% 0; padding: 5px 7px; border-radius: 5px; background: rgba(11, 11, 10, .78); font: 500 10px/1 var(--mono); letter-spacing: .05em; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none; }
.pv-bar.tip:hover .pv-tip, .pv-drag .pv-tip { opacity: 1; }
@media (hover: none) { .pv-bar.tip:hover .pv-tip { opacity: 0; } .pv-drag .pv-tip { opacity: 1; } }
.pv-big { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%; background: rgba(11, 11, 10, .4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #f2f0eb; opacity: 0; transform: scale(.82); transition: opacity .3s var(--ease), transform .5s var(--ease), background .2s; pointer-events: none; }
.pv-big:hover { background: rgba(11, 11, 10, .55); }
.pv-big svg { width: 24px; height: 24px; margin-left: 3px; }
.pv-ended .pv-big svg { margin-left: 0; }
.pv-paused .pv-big { opacity: 1; transform: none; pointer-events: auto; }
.pl-stage.own::after { content: ''; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 1.5px solid rgba(242, 240, 235, .22); border-top-color: #f2f0eb; border-radius: 50%; opacity: 0; transition: opacity .2s; animation: pv-spin .9s linear infinite; pointer-events: none; }
.pl-stage.own.pv-wait:not(.pv-paused)::after { opacity: 1; transition-delay: .35s; }
@keyframes pv-spin { to { rotate: 360deg; } }
@media (max-width: 560px) {
  .pv-ui { padding: 30px 4px 4px; gap: 0; }
  .pv-t { min-width: 3.2em; font-size: 10px; }
  .pv-big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}

@media (max-width: 860px) {
  .resume { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Case view: one vertical room. Title over the piece, scroll to push in,
   then the story, the rest of the work and the credits.
   ========================================================================== */
body.casing .hud.top { opacity: 0; pointer-events: none; }
.cx { position: absolute; inset: 0; z-index: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; outline: none; scrollbar-width: thin; scrollbar-color: rgba(22, 21, 19, .22) transparent; }
#case:not(.solid) .cx { overflow-y: hidden; }
.cx-stage { position: relative; }
.cx-pin { position: sticky; top: 0; overflow: hidden; }
.cx { touch-action: pan-y pinch-zoom; }
/* touch screens: told once, the first time a piece opens */
.cx-swipe { position: fixed; left: 50%; bottom: calc(var(--pad) + env(safe-area-inset-bottom, 0px)); z-index: 4; display: flex; gap: 12px; align-items: center; padding: 11px 16px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .5s var(--ease), transform .7s var(--ease); }
.cx-swipe.on { opacity: 1; transform: translate(-50%, 0); }
.cx-swipe span { opacity: .55; }
.cx-swipe.on span:first-child { animation: nudge-l 1.5s ease-in-out infinite; }
.cx-swipe.on span:last-child { animation: nudge-r 1.5s ease-in-out infinite; }
@keyframes nudge-l { 50% { transform: translateX(-4px); } }
@keyframes nudge-r { 50% { transform: translateX(4px); } }

.cx-head { position: absolute; left: 0; right: 0; top: calc(var(--pad) + 2px); padding: 0 var(--pad); text-align: center; will-change: transform, opacity; }
.cx-head h1 { padding: 0 140px; font: 600 clamp(29px, min(5.1vw, 8.16vh), 100px)/.9 var(--sans); letter-spacing: -.05em; text-wrap: balance; }

.cx-lead { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; background: #dcd9d2; opacity: 0; transition: opacity .35s ease; will-change: transform; }
#case.show .cx-lead { opacity: 1; }
.cx-lead img, .cx-lead canvas { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cx-lead.film { cursor: pointer; }
.cx-cap { position: absolute; display: flex; justify-content: space-between; gap: 24px; font: 500 10.5px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); pointer-events: none; }
.cx-cap span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-cap span:last-child { flex: none; color: var(--ink2); }
.cx-cap b { font-weight: 500; margin: 0 6px; color: var(--mute); }
.cx-cap strong { font-weight: 500; color: var(--ink); }
.cx-cap i { display: inline-block; font-style: normal; animation: cx-nudge 2s var(--ease) infinite; }
/* a private piece: the password sits right under it, on the caption line */
.cx-lock { pointer-events: auto; flex: none; display: flex; align-items: center; gap: 12px; margin-top: -9px; }
.cx-lock label { color: var(--ink); }
.cx-lock input { width: 170px; height: 32px; padding: 0 2px; border: 0; border-bottom: 1px solid rgba(22, 21, 19, .28); border-radius: 0; background: transparent; color: var(--ink); font: 500 13px/1 var(--mono); letter-spacing: .14em; outline: none; transition: border-color .25s; -webkit-appearance: none; appearance: none; }
.cx-lock input::placeholder { color: var(--mute); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.cx-lock input:focus { border-color: var(--ink); }
.cx-lock button { height: 32px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; letter-spacing: .07em; text-transform: uppercase; transition: transform .35s var(--ease), background .25s, opacity .25s; }
.cx-lock button:hover, .cx-lock button:focus-visible { background: #000; transform: translateY(-1px); outline: none; }
.cx-lock.busy button { opacity: .45; }
.cx-lock.no { animation: cx-shake .45s var(--ease); }
.cx-lock.no input { border-color: #a8432f; }
.cx-lock.yes { opacity: 0 !important; transform: translateY(-4px) !important; transition: opacity .35s, transform .35s var(--ease); }
@keyframes cx-shake { 18% { transform: translateX(-8px); } 36% { transform: translateX(7px); } 54% { transform: translateX(-4px); } 72% { transform: translateX(2px); } }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes cx-nudge { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }

.cx-rest { position: relative; padding: 0 var(--pad) calc(var(--pad) + 30px); transition: opacity .3s ease; }
#case.leaving .cx-rest { opacity: 0; }
.sr { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform 1.2s var(--ease); }
.sr.in { opacity: 1; transform: none; }

.cx-story { max-width: 1120px; margin: 0 auto; padding: clamp(64px, 12vh, 150px) 0 clamp(56px, 10vh, 130px); display: grid; justify-items: center; gap: clamp(34px, 6vh, 64px); text-align: center; }
.cx-story .blurb { max-width: 27em; font: 400 clamp(22px, 2.3vw, 36px)/1.3 var(--sans); letter-spacing: -.022em; color: var(--ink); text-wrap: pretty; }
.cx-story .blurb-more { max-width: 36em; margin-top: calc(-1 * clamp(10px, 2.5vh, 28px)); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--ink2); text-wrap: pretty; }
.cx-story .facts { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px clamp(32px, 5vw, 80px); padding-top: 26px; border-top: 1px solid var(--line); }
.cx-story .facts > div { display: grid; gap: 7px; max-width: 340px; }
.cx-story .facts dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--mute); }
.cx-story .facts dd { font-size: 16px; line-height: 1.35; }

.cx-gal { position: relative; }
.cx-gal .g { position: absolute; margin: 0; }
.cx-gal .box { position: relative; width: 100%; height: 100%; overflow: hidden; background: #dcd9d2; }
.cx-gal img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease, transform 1.2s var(--ease); user-select: none; -webkit-user-drag: none; }
.cx-gal img.ok { opacity: 1; }
.cx-gal .film .box { cursor: pointer; }
.cx-gal .film .box:hover img { transform: scale(1.02); }
.cx-gal figcaption { position: absolute; left: 0; right: 0; top: calc(100% + 10px); font: 500 10.5px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cx-made { max-width: 1120px; margin: clamp(90px, 16vh, 180px) auto 0; text-align: center; }
.cx-made ul { list-style: none; margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px 28px; }
.cx-made li { font-size: 16px; line-height: 1.3; }
.cx-made li span { display: block; margin-top: 3px; font-size: 13px; color: var(--mute); }

.cx-next { max-width: 1120px; margin: clamp(90px, 16vh, 180px) auto 0; padding-top: 34px; border-top: 1px solid var(--ink); display: grid; gap: 54px; text-align: center; }
.cx-next .nx { display: grid; justify-items: center; gap: 16px; }
.cx-next .nx b { font: 600 clamp(40px, 6vw, 96px)/.92 var(--sans); letter-spacing: -.05em; text-wrap: balance; transition: opacity .3s; }
.cx-next .nx:hover b { opacity: .55; }
.cx-next .row { display: flex; justify-content: space-between; gap: 20px; font: 500 11px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }
.cx-next .row button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.cx-next .row a:hover, .cx-next .row button:hover { color: var(--ink); }

/* choreography */
#case .rv { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .9s var(--ease); }
#case.titles .rv { opacity: 1; transform: none; transition-delay: calc(var(--d, 0) * 70ms); }

@media (max-width: 860px) {
  .cx-head { top: calc(var(--pad) + 50px); }
  .cx-head h1 { padding: 0; font-size: clamp(27px, 8vw, 39px); }
  .cx-cap { flex-wrap: wrap; row-gap: 6px; }
  .cx-cap span { white-space: normal; }
  .cx-cap.has-lock { flex-wrap: wrap; row-gap: 18px; }
  .cx-gal figcaption { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .cx-lock { width: 100%; margin-top: 0; }
  .cx-lock input { flex: 1; width: auto; font-size: 16px; }
  .cx-story { text-align: left; justify-items: stretch; }
  .cx-story .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
  .cx-made { text-align: left; }
  .cx-made ul { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .cx-made li { font-size: 14.5px; }
  .cx-next .row { flex-direction: column; align-items: center; gap: 16px; }
}

/* header gets a soft paper backdrop once the spec sheet slides over the work */
.hud.top { transition: opacity .5s, background .5s; }
body.paper .hud.top { background: linear-gradient(rgba(232, 230, 225, .96) 55%, rgba(232, 230, 225, 0)); padding-bottom: calc(var(--pad) + 14px); }

/* compact nav: a sheet of big links on narrow screens */
.menu-btn { display: none; }
.hud nav > .menu-btn { background: var(--ink); color: var(--bg); }
.hud nav > .menu-btn:hover { background: var(--ink); opacity: .85; }
.mnav { position: fixed; inset: 0; z-index: 60; display: grid; align-content: center; padding: var(--pad); background: var(--bg); color: var(--ink); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.mnav.on { opacity: 1; visibility: visible; }
.mnav ol { list-style: none; display: grid; gap: 6px; }
.mnav li { overflow: hidden; padding-bottom: 4px; }
.mnav li button { display: flex; align-items: flex-start; gap: 14px; font: 600 clamp(44px, 13vw, 76px)/1 var(--sans); letter-spacing: -.05em; color: var(--ink); text-align: left; transform: translateY(110%); transition: transform .7s var(--ease), color .2s; }
.mnav.on li button { transform: none; transition-delay: calc(var(--k) * 60ms + 60ms); }
.mnav li .n { padding-top: .5em; font: 500 11px/1 var(--mono); letter-spacing: .07em; color: var(--mute); }
.mnav li button[aria-current] { color: var(--mute); }
.mnav-x { position: absolute; top: var(--pad); right: var(--pad); display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 11px/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
html.mnav-open { overflow: hidden; }
@media (max-width: 860px) { .hud nav > .menu-btn { display: inline-flex; } }
