* { box-sizing: border-box; }
:root { --ink: #000; --ink-2: #555; --paper: #fff; --hair: #ccc; --ui: 'JetBrains Mono', ui-monospace, Menlo, monospace; }
html, body { margin: 0; height: 100%; background: #fff; color: #000; }
.hero { position: fixed; inset: 0; height: 100dvh; overflow: hidden; background: #fff center / cover no-repeat; touch-action: pan-y; }

/* the film: editorial.js sets its place, full screen for the reel, in a frame for the others */
.film { position: absolute; margin: 0; overflow: hidden; will-change: transform; background: #000; }
.film.ready { transition: left .6s cubic-bezier(.76, 0, .24, 1), top .6s cubic-bezier(.76, 0, .24, 1), width .6s cubic-bezier(.76, 0, .24, 1), height .6s cubic-bezier(.76, 0, .24, 1); }
.no-move .film.ready { transition: none; }
.film video { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(var(--zoom, 1)); transition: opacity .3s; }
.film video.swap { opacity: 0; }
video:fullscreen { transform: none; object-fit: contain; background: #000; }

/* black on the white page, white on the film: editorial.js changes it exactly at the film's edge */
.ink { position: absolute; inset: 0; color: #000; pointer-events: none; }

/* the sprayed word: baked twice, black and white, one lies on the other. The box leaves room for the haze */
.word { position: absolute; left: 0; right: 0; margin: 0; padding: .45em 0; overflow: hidden; font: 400 80px/.92 'Titan One', 'Arial Black', sans-serif; text-align: center; }
.word > span { position: relative; display: inline-block; vertical-align: top; will-change: transform; }
.word b { display: block; font-weight: 400; }
.word i { display: block; position: relative; font-style: normal; }
.word .spray-img { position: absolute; left: 0; top: 0; }
#wordW { position: absolute; left: 0; top: 0; }
.spray-img { display: block; max-width: none; pointer-events: none; user-select: none; }
.baking { opacity: 0; }

.arrow { position: absolute; top: 50%; width: 72px; height: 56px; margin: -28px 0 0; padding: 0 16px; border: 0; background: none; color: inherit; cursor: pointer; pointer-events: auto; will-change: transform; }
.arrow svg { display: block; width: 40px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1; transition: transform .25s; }
#prev { left: 0; }
#next { right: 0; }
#prev:hover svg { transform: translateX(-4px); }
#next:hover svg { transform: translateX(4px); }
.arrow:focus-visible { outline: 1px solid currentColor; outline-offset: -8px; }

.foot { position: absolute; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font: 500 11px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; }
.foot a, .foot button { padding: 0; min-height: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: none; cursor: pointer; pointer-events: auto; }
.foot a:hover, .foot button:hover { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* full screen: shows when the pointer is on the film */
.fs { position: absolute; z-index: 5; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; pointer-events: none; cursor: pointer; transition: opacity .2s; }
.fs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.2; }
/* only on the framed films, the reel has none */
.framed .film.ready:hover ~ .fs, .framed .film.ready ~ .fs:hover, .framed .film.ready ~ .fs:focus-visible { opacity: 1; pointer-events: auto; }
@media (hover: none) { .framed .film.ready ~ .fs { opacity: 1; pointer-events: auto; } }

/* title and credits under a framed film */
.meta { color: var(--page-ink, #000); position: absolute; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 32px; opacity: 0; visibility: hidden; transition: opacity .3s; }
.framed .meta { opacity: 1; visibility: visible; transition: opacity .4s .35s; }
.meta h2 { margin: 0; font: 400 var(--title, 44px)/.92 'Titan One', 'Arial Black', sans-serif; }
.meta p { margin: 8px 0 0; font: 500 11px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.meta dl { display: grid; grid-template-columns: auto auto; gap: 3px 14px; margin: 0; font: 500 11px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; }
.meta dt { color: var(--ink-2); }
.meta dd { margin: 0; }

/* Edit (owner only): films, background, margin */
.edit { position: fixed; right: 16px; top: 16px; bottom: 44px; z-index: 30; width: min(360px, calc(100vw - 32px)); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; padding: 14px; background: #fff; color: #000; border: 1px solid #000; font: 500 11px/1.3 var(--ui); letter-spacing: .04em; text-transform: uppercase; }
.edit[hidden] { display: none; }
.edit h3 { margin: 0; font: inherit; color: #555; }
.edit section { display: grid; gap: 8px; }
.edit label { display: grid; gap: 4px; }
.edit input[type=text], .edit input:not([type]) { width: 100%; height: 32px; padding: 0 8px; border: 1px solid #000; border-radius: 0; background: #fff; color: #000; font: 500 13px var(--ui); }
.edit input[type=range] { width: 100%; margin: 0; accent-color: #000; }
.edit .row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.edit .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.edit button { padding: 7px 8px; border: 1px solid #000; background: #fff; color: #000; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.edit button:hover, .edit button.on { background: #000; color: #fff; }
.edit .swatch { width: 28px; height: 28px; padding: 0; }
.edit .swatch:hover, .edit .swatch.on { background: var(--c); outline: 2px solid #000; outline-offset: 1px; }
.edit .swatch { background: var(--c); }
.edit .film-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid #ddd; }
.edit .film-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit .film-row div { display: flex; gap: 4px; }
.edit .film-row button { padding: 4px 6px; }
.edit .picks { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.edit .picks button { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; padding: 4px; text-align: left; text-transform: none; }
.edit .picks img, .edit .picks i { display: block; width: 64px; height: 36px; object-fit: cover; background: #ddd; }
.edit .status { min-height: 1.3em; margin: 0; color: #555; text-transform: none; }
.edit .bottom { position: sticky; bottom: -14px; margin: auto -14px -14px; padding: 10px 14px; display: flex; justify-content: space-between; gap: 8px; background: #fff; border-top: 1px solid #000; }
@media (max-width: 699px) { .edit-open, .edit { display: none !important; } }

/* the typewriter from the VHS shelf: the word is typed in the middle of the white page, then the film comes */
.typing .film, .typing .fs, .typing .ink { visibility: hidden; }
.boot { position: absolute; inset: 0; display: grid; place-items: center; z-index: 6; pointer-events: none; }
.boot[hidden] { display: none; }
.boot__word { display: inline-block; color: var(--page-ink, #000); font: 400 44px/.92 'Titan One', 'Arial Black', sans-serif; letter-spacing: -.015em; white-space: nowrap; }
