/* Fès film reel (fes.html): four shots that wipe in one after another, playing by themselves (nothing is pinned).
   Without "fx" (reduced motion / no script) the shots are a simple stacked strip. */

.fx-reel{position:relative;background:#000}
.fx-rsticky{position:relative;display:grid;gap:8px;padding:8px}
.fx-shot{position:relative;margin:0;aspect-ratio:16/9;overflow:hidden;background:#050807}
.fx-shot video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
@media (max-aspect-ratio:1/1){.fx-shot video{object-position:var(--pos,50% 50%)}}
.fx-shot figcaption{position:absolute;inset:auto 0 0;padding:clamp(18px,4vw,48px);display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  background:linear-gradient(transparent,rgba(0,0,0,.65))}
.fx-shot figcaption span{font-size:.8rem;letter-spacing:.12em;color:rgba(242,234,217,.7);font-variant-numeric:tabular-nums;direction:ltr}
.fx-shot figcaption b{font-size:clamp(2.6rem,9vw,7.5rem);font-weight:700;line-height:1;color:#fff;text-shadow:0 6px 40px rgba(0,0,0,.45)}
.fx-rgrain,.fx-rbars,.fx-rticks{display:none}
/* a clip that fails to load leaves a quiet patterned frame instead of black (its file name is in data-missing, for debugging) */
.fx-shot.is-missing{background:repeating-linear-gradient(135deg,rgba(217,164,65,.08) 0 14px,transparent 14px 28px),#0b1210}
.fx-shot.is-missing video{display:none}

/* with motion: one screen-high band; each shot wipes in over the last */
.fx .fx-rsticky{position:relative;height:min(100svh,62vw);min-height:420px;display:block;padding:0;overflow:hidden}
.fx .fx-shot{position:absolute;inset:0;aspect-ratio:auto;clip-path:inset(0 0 0 100%);will-change:clip-path}
.fx .fx-shot:first-child{clip-path:none}
.fx .fx-shot video{transform:scale(var(--z,1.12));will-change:transform;filter:contrast(1.06) saturate(1.05)}
.fx .fx-shot figcaption{padding:0 clamp(16px,6vw,96px) calc(11vh + 28px)}
.fx .fx-shot figcaption b{opacity:var(--t,0);transform:translateY(calc((1 - var(--t,0)) * 40px))}
.fx .fx-shot::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse at center,transparent 55%,rgba(0,0,0,.55) 100%)}

/* film grain: a small noise tile that jitters */
.fx .fx-rgrain{display:block;position:absolute;inset:-50%;z-index:3;pointer-events:none;opacity:.12;mix-blend-mode:overlay;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation:fxGrain .5s steps(4) infinite}
@keyframes fxGrain{0%{transform:translate(0,0)}25%{transform:translate(-4%,3%)}50%{transform:translate(3%,-5%)}75%{transform:translate(-2%,-3%)}100%{transform:translate(4%,2%)}}

.fx .fx-rbars{display:block;position:absolute;inset:0;z-index:4;pointer-events:none}
.fx .fx-rbars i{position:absolute;inset-inline:0;height:6vh;background:#000}
.fx .fx-rbars i:first-child{top:0}
.fx .fx-rbars i:last-child{bottom:0}

/* progress: five thin ticks along the bottom */
.fx .fx-rticks{display:flex;position:absolute;z-index:5;inset-inline:clamp(16px,6vw,96px);bottom:calc(6vh + 4px);gap:8px;list-style:none;margin:0;padding:0}
.fx-rticks li{flex:1;height:22px;cursor:pointer;display:flex;align-items:center;background:linear-gradient(rgba(242,234,217,.2),rgba(242,234,217,.2)) center/100% 2px no-repeat}
.fx-rticks li:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.fx-rticks i{display:block;width:100%;height:2px;background:var(--gold);transform-origin:right;transform:scaleX(var(--f,0))}

@media (max-width:760px){.fx .fx-shot figcaption{padding-bottom:calc(9vh + 30px)}}

/* the band is short and sits near the bottom of the page; bars, word and ticks scale with it */
.fx .fx-reel.is-short .fx-rsticky{height:clamp(300px,58vh,640px);min-height:0}
.fx .fx-reel.is-short .fx-rbars i{height:min(4vh,28px)}
.fx .fx-reel.is-short .fx-shot figcaption{padding-bottom:calc(min(4vh,28px) + 44px)}
.fx .fx-reel.is-short .fx-shot figcaption b{font-size:clamp(2.4rem,7vw,5.6rem)}
.fx .fx-reel.is-short .fx-rticks{bottom:calc(min(4vh,28px) + 4px)}
@media (prefers-reduced-motion:reduce){.fx-rgrain{animation:none}}
