/* =========================================================================
   HAIDERISTIC 2027 · MOTION  ("every scroll is a cut")
   The states for motion.js and the data-m API. Three rules hold everywhere:
   1. start states exist only under html.js with motion allowed, so every
      element is visible without JS and under prefers-reduced-motion;
   2. html.js-late (a script failed) forces every final state;
   3. only transform, translate, scale, opacity, clip-path and filter move.
   Continuous effects read --p (0 to 1): CSS scroll-driven animations write it
   where supported (html.m-sda), motion.js writes it everywhere else.
   Round 3: no pins, no shrinking hero, no after-dark band. Heroes move slower than
   the page and dim a little as they leave; nothing changes size.
   ========================================================================= */

@property --p { syntax: "<number>"; inherits: true; initial-value: 1; }
@keyframes m-p { from { --p: 0; } to { --p: 1; } }

/* ---------- continuous: the timelines ---------- */
@supports (animation-timeline: view()) {
  .m-on [data-m~="scrub"] { animation: m-p linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  .m-on [data-m~="draw"] { animation: m-p linear both; animation-timeline: view(); animation-range: cover 20% cover 60%; }
  .m-on [data-m-range="entry"] { animation-range: entry 0% entry 100%; }
  /* inner parallax runs on the compositor */
  .m-on [data-m~="parallax"] > picture, .m-on [data-m~="parallax"] > img { animation: m-par linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  /* the scroll-progress hairline under the nav */
  .m-on .nav-progress { animation: m-scale-x linear both; animation-timeline: scroll(root block); }
}
@keyframes m-par { from { translate: 0 -7%; } to { translate: 0 7%; } }
@keyframes m-scale-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.m-on [data-m~="parallax"] { overflow: hidden; }
.m-on [data-m~="parallax"] > picture, .m-on [data-m~="parallax"] > img { scale: 1.16; translate: 0 calc((var(--p) - .5) * 14%); }

/* =========================================================================
   ONE-SHOT ENTRANCES (motion.js adds .m-in once, when the element arrives)
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  /* rise */
  .js [data-m~="rise"] { transition: opacity 1s var(--ease), translate 1.2s var(--ease); transition-delay: var(--md, 0s); }
  .js [data-m~="rise"]:not(.m-in) { opacity: 0; translate: 0 28px; }

  /* lines: hidden only until the split (fonts first), then each line rises out of its mask */
  .js [data-m~="lines"]:not(.m-split):not(.m-done):not(.m-in) { opacity: 0; }
  .js [data-m~="lines"].m-nosplit { transition: opacity 1s var(--ease), translate 1.2s var(--ease); }
  .js [data-m~="lines"].m-nosplit:not(.m-in) { opacity: 0; translate: 0 28px; }
  .ln { display: block; clip-path: inset(-.6em -.5em -.2em -.5em); }
  .ln-i { display: inline-block; white-space: nowrap; }
  .js [data-m~="lines"] .ln-i { translate: 0 118%; rotate: 3deg; transform-origin: 0 100%; transition: translate 1.15s var(--ease), rotate 1.15s var(--ease); transition-delay: calc(var(--li, 0) * 80ms + var(--md, 0s)); }
  .js [data-m~="lines"].m-in .ln-i { translate: none; rotate: none; }
  /* the italic word: a sunset passes through it, then it settles to bone */
  .js [data-m~="lines"] .ln em {
    background-image: linear-gradient(90deg, var(--bone) 0%, #F6D3B4 33.4%, #FFB23F 42%, #FF6A1A 50%, #FF3D5A 58%, var(--bone) 66.6% 100%);
    background-size: 300% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent;
    transition: background-position 1.7s var(--ease-io); transition-delay: calc(var(--li, 0) * 80ms + .45s);
  }
  .js [data-m~="lines"].m-in .ln em { background-position: 0 0; }
  /* once the lines are restored, the word keeps the same faint warmth it settled on */
  .m-on [data-m~="lines"].m-done em {
    background-image: linear-gradient(90deg, var(--bone) 0%, #F6D3B4 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  }

  /* type: characters land in order, width never changes */
  .js [data-m~="type"]:not(.m-ty) { opacity: 0; }
  .js [data-m~="type"] .tw { opacity: 0; transition: opacity .05s linear calc(var(--c, 0) * 32ms + .25s); }
  .js [data-m~="type"].m-in .tw { opacity: 1; }

  /* wipe: a clip-path reveal, the picture settles inside it */
  .js [data-m~="wipe"] { transition: clip-path .85s var(--ease) var(--md, 0s); }
  .js .dir-frame[data-m~="wipe"] { transition: clip-path 1.4s var(--ease-io) var(--md, 0s); }
  .js [data-m~="wipe"]:not(.m-in) { clip-path: inset(100% 0 0 0); }
  .js [data-m~="wipe"][data-m-dir="left"]:not(.m-in) { clip-path: inset(0 100% 0 0); }
  .js [data-m~="wipe"].m-in { clip-path: inset(0 0 0 0); }
  .js [data-m~="wipe"] > :is(picture, img) { transition: scale 1.4s var(--ease) var(--md, 0s); }
  .js [data-m~="wipe"]:not(.m-in) > :is(picture, img) { scale: 1.18; }

  /* the footer signature only fades in: a rise would add scrollable height at the very bottom of the page */
  .js .foot-sign[data-m~="rise"]:not(.m-in) { translate: none; }

  /* stagger, tilt and roll: children in turn */
  .js :is([data-m~="stagger"], [data-m~="tilt"], [data-m~="roll"]) > * {
    transition: opacity .9s var(--ease), translate 1.2s var(--ease), transform 1.4s var(--ease);
    transition-delay: calc(var(--si, 0) * 85ms + var(--md, 0s));
  }
  .js [data-m~="stagger"]:not(.m-in) > * { opacity: 0; translate: 0 32px; }
  .js [data-m~="tilt"] { perspective: 1400px; }
  .js [data-m~="tilt"] > * { transform-origin: 50% 100%; }
  .js [data-m~="tilt"]:not(.m-in) > * { opacity: 0; transform: translateY(80px) rotateX(26deg) scale(.95); }
  .js [data-m~="tilt"] > * { transition-delay: calc(var(--si, 0) * 70ms); }
  .js [data-m~="roll"] { overflow: hidden; }
  .js [data-m~="roll"] > * { transition-duration: .8s, 1.1s, 1.1s; transition-delay: calc(var(--si, 0) * 110ms + .2s); }
  .js [data-m~="roll"]:not(.m-in) > * { opacity: 0; translate: 0 110%; }

  /* rule: the hairline draws from the left, its labels follow */
  .js [data-m~="rule"] {
    border-top-color: transparent !important;
    background-image: linear-gradient(90deg, rgba(241,236,227,.42), var(--hair) 46%, var(--hair));
    background-repeat: no-repeat; background-position: 0 0; background-size: 0% 1px;
    transition: background-size 1.6s var(--ease-io);
  }
  .js [data-m~="rule"].m-in { background-size: 100% 1px; }
  .js [data-m~="rule"] > * { transition: opacity .8s var(--ease), translate 1s var(--ease); }
  .js [data-m~="rule"] > :nth-child(2) { transition-delay: .12s; }
  .js [data-m~="rule"] > :nth-child(3) { transition-delay: .24s; }
  .js [data-m~="rule"]:not(.m-in) > * { opacity: 0; translate: 0 10px; }

  /* focus: soft to sharp */
  .js [data-m~="focus"] > picture { transition: filter 1.4s var(--ease), opacity 1.1s var(--ease); }
  .js [data-m~="focus"]:not(.m-in) > picture { filter: blur(8px); opacity: .3; }
}

/* a failed script never leaves anything hidden */
.js-late :is([data-m~="rise"], [data-m~="lines"], [data-m~="type"], [data-m~="wipe"]),
.js-late :is([data-m~="stagger"], [data-m~="tilt"], [data-m~="roll"], [data-m~="rule"]) > *,
.js-late [data-m~="focus"] > picture, .js-late .ln-i, .js-late .tw {
  opacity: 1 !important; translate: none !important; rotate: none !important; clip-path: none !important; filter: none !important;
}
.js-late [data-m~="tilt"] > * { transform: none !important; }
.js-late [data-m~="rule"] { border-top-color: var(--hair) !important; }

/* =========================================================================
   SIGNATURE MOMENTS (continuous, html.m-on only)
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  /* 9 · PROCESS: the sunset line draws, each step lights as it is reached */
  .m-on [data-m~="draw"].steps::before, .m-on [data-m~="draw"].process-grid::before { background: var(--hair-2); }
  .m-on [data-m~="draw"].steps::after, .m-on [data-m~="draw"].process-grid::after {
    content: ""; position: absolute; top: -1px; left: 0; right: 0; width: auto; height: 1px; border-radius: 0; opacity: 1;
    background: var(--sun); box-shadow: 0 0 14px rgba(255,106,26,.8); animation: none;
    transform: scaleX(var(--p)); transform-origin: 0 50%;
  }
  .m-on [data-m~="draw"].process-grid { position: relative; border-top-color: var(--hair-2); }
  .m-on [data-m~="draw"] .step { --lit: clamp(0, calc((var(--p) - var(--i, 0) * .25) * 9), 1); }
  .m-on [data-m~="draw"] .step::before {
    background: rgb(calc(10 + var(--lit) * 245) calc(10 + var(--lit) * 96) calc(11 + var(--lit) * 15));
    border-color: rgb(241 calc(236 - var(--lit) * 58) calc(227 - var(--lit) * 164));
    box-shadow: 0 0 0 calc(var(--lit) * 5px) rgba(255,106,26,.15), 0 0 calc(var(--lit) * 22px) rgba(255,106,26,.8);
  }
  .m-on [data-m~="draw"] :is(.step-n, .step-num) { position: relative; background: none; color: #6B675F; }
  .m-on [data-m~="draw"] :is(.step-n, .step-num)::after {
    content: attr(data-n); position: absolute; inset: 0; background: var(--sun-v); -webkit-background-clip: text; background-clip: text; color: transparent;
    opacity: var(--lit);
  }
  .m-on [data-m~="draw"] .step h3 { opacity: calc(.55 + var(--lit) * .45); }
  .m-on .process-grid[data-m~="draw"] .step:last-child .step-num { background: none; color: #6B675F; }
  @media (max-width: 960px) { .m-on [data-m~="draw"]:is(.steps, .process-grid)::after { display: block; } }
  @media (max-width: 720px) {
    .m-on [data-m~="draw"]:is(.steps, .process-grid)::after { top: 0; bottom: 0; left: 0; right: auto; width: 1px; height: auto; transform: scaleY(var(--p)); transform-origin: 50% 0; }
    .m-on [data-m~="draw"]:is(.steps, .process-grid)::before { background: var(--hair-2); }
  }
  @media (min-width: 721px) and (max-width: 960px) {
    .m-on [data-m~="draw"].steps::after { top: 0; bottom: 0; left: 0; right: auto; width: 1px; height: auto; transform: scaleY(var(--p)); transform-origin: 50% 0; }
  }

  /* 6 · QUOTE BAND: the glow rises, the sunset line draws from the centre */
  .m-on .qband[data-m~="scrub"]::before { opacity: clamp(0, calc(var(--p) * 2.4 - .3), 1); translate: 0 calc((1 - min(1, var(--p) * 1.9)) * 22%); }
  .m-on .qband[data-m~="scrub"]::after { transform: scaleX(clamp(0, calc((var(--p) - .3) * 3.2), 1)); }

  /* 10 · MARQUEE: motion.js drives it */
  .m-mq .marquee[data-m~="velocity"] .mq-track { animation: none; will-change: transform; }

}

/* =========================================================================
   GLOBAL
   ========================================================================= */
/* the nav leaves on the way down and comes back on the way up */
.nav { transition: background-color .5s, height .5s var(--ease), border-color .5s, opacity .5s, transform .6s var(--ease); }
.nav.nav-hide:not(:focus-within) { transform: translateY(-100%); }
.nav.nav-hide .nav-sub { visibility: hidden; }
.nav-up .filter-bar { top: 0; }
.filter-bar { transition: top .6s var(--ease); }

/* the Play disc */
.m-cursor {
  position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none;
  width: 0; height: 0; display: grid; place-items: center;
}
.m-cursor span {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; translate: -50% -50%;
  background: var(--bone); color: var(--ink); font-family: var(--f-mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  scale: 0; opacity: 0; transition: scale .45s var(--ease), opacity .3s;
  box-shadow: 0 18px 50px -18px rgba(0,0,0,.7);
}
.m-cursor.on span { scale: 1; opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .m-cur .rf-a, .m-cur .cw-a { cursor: none; }
}

/* cross-document transitions: a quick letterbox wipe onto the next page */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: m-vt-out .5s var(--ease-io) both; }
  ::view-transition-new(root) { animation: m-vt-in .62s var(--ease-io) both; }
}
@keyframes m-vt-out { to { opacity: .35; scale: .985; } }
@keyframes m-vt-in { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0 0 0 0); } }

/* reduced motion: final states, nothing moves */
@media (prefers-reduced-motion: reduce) {
  .nav.nav-hide { transform: none; }
  .m-cursor { display: none; }
}

/* =========================================================================
   INNER PAGES (round 2 integration): the same language on every template.
   Load entrances run from the first paint as CSS animations under html.js
   (finite, so a failed script still ends on the final frame); scroll moments
   read --p like the homepage. Reduced motion: none of it.
   ========================================================================= */
@keyframes m-shutter { from { clip-path: inset(50% 0 50% 0); scale: 1.06; } 62% { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 0); scale: 1; } }
@keyframes m-up { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: none; } }
@keyframes m-card { from { opacity: 0; translate: 0 26px; scale: .965; } to { opacity: 1; translate: none; scale: 1; } }
@media (prefers-reduced-motion: no-preference) {
  /* headlines arrive with the title card */
  .js :is(.proj-v, .pw-hero, .wk-hero) h1, .js :is(.sent, .lost) h1 { animation: rise 1.1s var(--ease) .3s both; }
  .js :is(.proj-v, .pw-hero) :is(.crumb, .timecode) { animation: m-up .8s var(--ease) .15s both; }
  .js :is(.proj-v, .pw-hero) .proj-meta > div { animation: m-up .8s var(--ease) both; }
  .js :is(.proj-v, .pw-hero) .proj-meta > div:nth-child(1) { animation-delay: .55s; }
  .js :is(.proj-v, .pw-hero) .proj-meta > div:nth-child(2) { animation-delay: .62s; }
  .js :is(.proj-v, .pw-hero) .proj-meta > div:nth-child(3) { animation-delay: .69s; }
  .js :is(.proj-v, .pw-hero) .proj-meta > div:nth-child(4) { animation-delay: .76s; }
  .js :is(.proj-v, .pw-hero) .proj-meta > div:nth-child(n+5) { animation-delay: .83s; }
  .js .sent .next > div, .js :is(.sent, .lost) .ctas { animation: m-up .8s var(--ease) both; }
  .js .sent .next > div:nth-child(1) { animation-delay: .5s; } .js .sent .next > div:nth-child(2) { animation-delay: .58s; }
  .js .sent .next > div:nth-child(3) { animation-delay: .66s; } .js .sent .next > div:nth-child(4) { animation-delay: .74s; }
  .js :is(.sent, .lost) .ctas { animation-delay: .82s; }

  /* the vertical player: the shutter opens on load, then its slate and caption */
  .js .pv-screen .hplayer-stage { animation: m-shutter 1.7s var(--ease-io) .25s both; }
  .js .pv-screen :is(.pv-hud, .film-cap) { animation: m-up .9s var(--ease) 1.15s both; }

  /* the wide player and the YouTube screen open as they scroll in */
  .m-on :is(.pw-screen, .film-embed)[data-m~="scrub"] { --e: calc(1 - var(--p)); }
  .m-on :is(.pw-screen, .film-embed)[data-m~="scrub"] .hplayer:not(.is-started) .hplayer-stage,
  .m-on .film-embed[data-m~="scrub"] .film-frame:not(.is-live) > :is(.yt-facade, iframe) {
    clip-path: inset(calc(var(--e) * 17%) calc(var(--e) * 5%) round calc(var(--e) * 22px)); scale: calc(1 - var(--e) * .05);
  }
  .m-on .pw-screen[data-m~="scrub"] :is(.pv-hud, .film-cap) { opacity: clamp(0, calc(1 - var(--e) * 1.6), 1); translate: 0 calc(var(--e) * 16px); }

  /* the sprocket strip runs with the scroll, one way above, the other below */
  .m-on .pv-strip[data-m~="scrub"] { overflow: hidden; }
  .m-on .pv-strip[data-m~="scrub"]::before, .m-on .pv-strip[data-m~="scrub"]::after { left: -104px; right: -104px; }
  .m-on .pv-strip[data-m~="scrub"]::before { translate: calc(var(--p) * -104px) 0; }
  .m-on .pv-strip[data-m~="scrub"]::after { translate: calc(var(--p) * 104px - 104px) 0; }

  /* /work: each card is wiped up into place, a column at a time; a filter is a new cut */
  .m-on .reel-grid .work-card.reveal {
    transition: opacity .8s var(--ease) var(--cd, 0s), transform .95s var(--ease) var(--cd, 0s), background-color .3s;
  }
  .m-on .reel-grid .work-card.reveal:not(.in) { opacity: 0; transform: translateY(40px); }
  .reel-grid.f-cut .work-card { animation: m-card .75s var(--ease) both; animation-delay: calc(min(var(--fi, 0), 14) * 42ms); }
  .reel-grid.f-cut .work-card, .m-on .reel-grid.f-cut .work-card.reveal { transition: none; }
  .filter-count.f-cut { animation: m-up .6s var(--ease) both; }
}
.js-late .reel-grid .work-card.reveal { clip-path: none !important; }

/* =========================================================================
   1 · RECEDE (round 3): the homepage hero and the inner-page heroes. As the hero leaves, the picture moves down
   slower than the page (so it seems to stay behind) and a dark veil comes up a little. Transform and opacity only,
   on the compositor where the browser has scroll timelines; motion.js writes --p elsewhere. Nothing changes size.
   ========================================================================= */
@keyframes m-recede { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 30%, 0); } }
@keyframes m-recede-s { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 18%, 0); } }
@keyframes m-dim { from { opacity: 0; } to { opacity: .55; } }
@keyframes m-veil { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  /* the still arrives from black once, on load (an overlay, so the picture itself paints at once) */
  .js .hero-pic::after { content: ""; position: absolute; inset: 0; z-index: 2; background: #050506; pointer-events: none; animation: m-veil 1.2s var(--ease) .05s both; }
  @supports (animation-timeline: view()) {
    .m-on [data-m~="recede"] { view-timeline: --recede block; }
    .m-on .hero[data-m~="recede"] .hero-media { animation: m-recede linear both; animation-timeline: --recede; animation-range: exit 0% exit 100%; }
    .m-on .hero[data-m~="recede"] .hero-dim { animation: m-dim linear both; animation-timeline: --recede; animation-range: exit 0% exit 100%; }
    .m-on .sph[data-m~="recede"] .sph-media, .m-on .pw-hero[data-m~="recede"] .hero-media { animation: m-recede-s linear both; animation-timeline: --recede; animation-range: exit 0% exit 100%; }
  }
  .m-on:not(.m-sda) .hero[data-m~="recede"] .hero-media { transform: translate3d(0, calc(var(--p, 0) * 30%), 0); }
  .m-on:not(.m-sda) .hero[data-m~="recede"] .hero-dim { opacity: calc(var(--p, 0) * .55); }
  .m-on:not(.m-sda) :is(.sph, .pw-hero)[data-m~="recede"] :is(.sph-media, .hero-media) { transform: translate3d(0, calc(var(--p, 0) * 18%), 0); }

  /* 4 · NOW SHOWING: the frames wipe in left to right as the row arrives (motion.js adds .is-in once); each picture
     settles inside its frame, then the captions follow */
  .m-on .reel .rf-media { clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease) calc(min(var(--i, 0), 6) * 80ms); }
  /* retainers, how it runs: the four dots light one after the other and the line draws across as the list arrives */
  .m-on .rt-steps:not(.m-in) li::before { background: var(--ink); border-color: var(--bone-3); box-shadow: none; }
  .m-on .rt-steps:not(.m-in)::after { transform: scaleX(0); }
  .m-on .reel .rf-media > picture { transition: scale 1.4s var(--ease) calc(min(var(--i, 0), 6) * 80ms); }
  .m-on .reel :is(.rf-cap, .rf-all) { transition: opacity .8s var(--ease) calc(min(var(--i, 0), 6) * 80ms + .25s), translate 1s var(--ease) calc(min(var(--i, 0), 6) * 80ms + .25s); }
  .m-on .reel:not(.is-in) .rf-media { clip-path: inset(0 100% 0 0); }
  .m-on .reel:not(.is-in) .rf-media > picture { scale: 1.08; }
  .m-on .reel:not(.is-in) :is(.rf-cap, .rf-all) { opacity: 0; translate: 0 12px; }
}
.js-late .reel .rf-media { clip-path: none !important; }
.js-late .reel :is(.rf-cap, .rf-all) { opacity: 1 !important; translate: none !important; }
.js-late .hero-pic::after { display: none; }

/* =========================================================================
   PHONES (round 8): calmer entrances. Each block rises 20 px over .9 s on the house ease (an expo-out), children
   70 ms apart, once, and on phones only transform and opacity move: the hairline draws by scaleX, pictures arrive by
   opacity and a short slide instead of clip-path wipes and blur, the nav's glass fades in on a layer. Desktop keeps
   its own values above. The reel's active frame and the timeline in "How it runs" are driven by motion.js and
   style.css. Most selectors start with html: inner pages load this file before style.css.
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) and (max-width: 768px) {
  /* headlines: each line still rises out of its mask, upright and a little quicker; the italic word is already settled */
  html.js [data-m~="lines"] .ln-i { rotate: none; transition: translate .9s var(--ease); transition-delay: calc(var(--li, 0) * 70ms + var(--md, 0s)); }
  html.js [data-m~="lines"] .ln em { transition: none; background-position: 0 0; }
  /* the section hairline draws by scaleX on a layer of its own */
  html.js [data-m~="rule"] { position: relative; background-image: none; transition: none; }
  html.js [data-m~="rule"]::before {
    content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; pointer-events: none;
    background: linear-gradient(90deg, rgba(241,236,227,.42), var(--hair) 46%, var(--hair));
    transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.2s var(--ease-io);
  }
  html.js [data-m~="rule"].m-in::before { transform: none; }
  /* wipes become a fade and a 20 px rise; the picture still settles from a slight zoom */
  html.js :is([data-m~="wipe"], .dir-frame[data-m~="wipe"]) { transition: opacity .9s var(--ease) var(--md, 0s), translate .9s var(--ease) var(--md, 0s); }
  html.js :is([data-m~="wipe"], [data-m~="wipe"][data-m-dir="left"]):not(.m-in) { clip-path: none; opacity: 0; translate: 0 20px; }
  html.js [data-m~="wipe"].m-in { clip-path: none; }
  html.js [data-m~="wipe"] > :is(picture, img) { transition: scale .9s var(--ease) var(--md, 0s); }
  html.js [data-m~="wipe"]:not(.m-in) > :is(picture, img) { scale: 1.06; }
  /* soft to sharp becomes faint to full */
  html.js [data-m~="focus"] > picture { transition: opacity .9s var(--ease); }
  html.js [data-m~="focus"]:not(.m-in) > picture { filter: none; opacity: .3; }
  html :is(.sc-media img, .rf-media img, .work-card img, .photo-masonry img, .side-stills img, .stills-grid img) { transition: none; }
  html :is(.cw-media img, .yc-media img) { transition: transform 1.4s var(--ease); }
  /* the creators wall and the credits: the same 20 px rise, 70 ms apart (no tilt, no roll) */
  html.js [data-m~="tilt"] { perspective: none; }
  html.js :is([data-m~="tilt"], [data-m~="roll"]) > * { transition: opacity .9s var(--ease), translate .9s var(--ease); transition-delay: calc(var(--si, 0) * 70ms); }
  html.js [data-m~="tilt"]:not(.m-in) > * { transform: none; opacity: 0; translate: 0 20px; }
  html.js [data-m~="roll"]:not(.m-in) > * { translate: 0 20px; }
  /* the reel's frames fade and slide in from the right instead of wiping */
  html.m-on .reel .rf-media { clip-path: none; transition: opacity .9s var(--ease) calc(min(var(--i, 0), 6) * 70ms), translate .9s var(--ease) calc(min(var(--i, 0), 6) * 70ms); }
  html.m-on .reel:not(.is-in) .rf-media { clip-path: none; opacity: 0; translate: 20px 0; }
  html.m-on .reel .rf-media > picture { transition: scale .9s var(--ease) calc(min(var(--i, 0), 6) * 70ms); }
  /* film pages: the players open by a fade and a rise instead of a clip-path shutter */
  html.js .pv-screen .hplayer-stage { animation: m-up .9s var(--ease) .25s both; }
  html.m-on :is(.pw-screen, .film-embed)[data-m~="scrub"] .hplayer:not(.is-started) .hplayer-stage,
  html.m-on .film-embed[data-m~="scrub"] .film-frame:not(.is-live) > :is(.yt-facade, iframe) { clip-path: none; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
  /* the phone nav (64 px, the logo already the same size scrolled or not): a constant height, and its glass on a layer
     that fades in, so nothing but opacity and transform moves */
  html .nav { transition: opacity .5s, transform .6s var(--ease); }
  html .nav-brand img { transition: none; }
  html .nav.is-scrolled, html .nav.scrolled { height: var(--nav-h); background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html .nav::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .5s;
    background: rgba(10, 10, 11, .78); border-bottom: 1px solid var(--hair);
    -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  }
  html .nav.is-scrolled::before, html .nav.scrolled::before { opacity: 1; }
  html .nav-open .nav { background: var(--ink); border-bottom-color: var(--hair); }
  html .nav.is-scrolled:not(.nav-hide) + .nav-progress, html .nav.scrolled:not(.nav-hide) + .nav-progress { translate: 0 calc(var(--nav-h) - 2px); }
  .js [data-m~="rise"] { transition: opacity .9s var(--ease), translate .9s var(--ease); transition-delay: var(--md, 0s); }
  .js [data-m~="rise"]:not(.m-in) { translate: 0 20px; }
  .js [data-m~="lines"].m-nosplit { transition: opacity .9s var(--ease), translate .9s var(--ease); }
  .js [data-m~="lines"].m-nosplit:not(.m-in) { translate: 0 20px; }
  .js [data-m~="stagger"] > * {
    transition: opacity .9s var(--ease), translate .9s var(--ease), transform .9s var(--ease);
    transition-delay: calc(var(--si, 0) * 70ms + var(--md, 0s));
  }
  .js [data-m~="stagger"]:not(.m-in) > * { translate: 0 20px; }
  /* inner pages load this file before style.css, so these carry a little more weight than style.css's .js .reveal */
  html.js .reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
  html.js:not(.js-late) .reveal:not(.in) { transform: translateY(20px); }
  .m-on .reel-grid .work-card.reveal:not(.in) { transform: translateY(20px); }
}
/* the reel's focus (motion.js sets --ft from 0 on the active frame to 1 one frame away, phones only): the frame scales
   to .94, its picture dims under a dark layer to the look of .6 opacity, and its caption stays at .8 or more so the
   meta line keeps 4.5:1. It follows the swipe directly, with no transition. */
.m-focus .reel .rf-a { transform-origin: 50% 50%; will-change: transform; }
.m-focus .reel .rf-media::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--ink); opacity: calc(var(--ft, 0) * .4); }
.m-focus .reel :is(.rf-cap, .rf-all) > * { opacity: calc(1 - var(--ft, 0) * .2); }
