/* MUUS epic motion pass, 19 Nov 2026 (branch epic-motion-1119, draft).
   1. Results that move: the big numbers, the film playing inside the type.
   2. Holo cards: the work tiles tilt to the hand, silver foil edge, light follows the cursor.
   3. Rising headlines: section titles wipe up as they arrive.
   Everything here is additive: remove the two tags in index.html and the page is as it was. */

@property --ep-ang { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

/* ---------- 1. Results that move (3 Dec 2026: the MUUS graphics standard) ----------
   The client's own colour full bleed (only the black and white points graded), one number in Archivo Expanded,
   a mono source line under it, production chrome around the frame. Tap the number and a square receipt opens.
   Motion: frame, then number, then line, then credits, 80 ms apart; 600 ms reveals; the number counts once in 900 ms and holds. */
.ep-impact{--deep:#141518;--anth:#2A2C30;--card:#36383C;--oy:#D2C6B4;--sub:#AAA192;--ice:#B2D5E5;--light:#ECE5DA;--line:rgb(210 198 180 / .16);
  --ep-ease:cubic-bezier(.16,1,.3,1);--ep-g:clamp(16px,5vw,72px);position:relative;background:var(--deep);color:var(--light);isolation:isolate}
/* the home wraps sections in .st (old home) and gives every section padding (new home); the pin needs neither */
.st section.ep-impact{overflow:clip;padding:0}
section.ep-impact{padding:0}
.st .ep-impact .ep-media video{opacity:1}
.ep-pin{position:relative;overflow:hidden}
.ep-head{position:absolute;z-index:6;top:calc(72px + 3vh);left:var(--ep-g);right:var(--ep-g);pointer-events:none}
.ep-impact .ep-head .ep-h{margin:0;max-width:none;color:var(--sub)}
/* safe-area corners: production language, quiet */
.ep-safe{position:absolute;z-index:7;inset:calc(64px + 2vh) calc(var(--ep-g) - 16px) calc(72px + 3vh);pointer-events:none;
  --c:rgb(236 229 218 / .5);background:
  linear-gradient(var(--c),var(--c)) 0 0/24px 1px,linear-gradient(var(--c),var(--c)) 0 0/1px 24px,
  linear-gradient(var(--c),var(--c)) 100% 0/24px 1px,linear-gradient(var(--c),var(--c)) 100% 0/1px 24px,
  linear-gradient(var(--c),var(--c)) 0 100%/24px 1px,linear-gradient(var(--c),var(--c)) 0 100%/1px 24px,
  linear-gradient(var(--c),var(--c)) 100% 100%/24px 1px,linear-gradient(var(--c),var(--c)) 100% 100%/1px 24px;background-repeat:no-repeat}
.ep-impact:not(.ep-on) .ep-safe{display:none}
.ep-ch{position:relative;height:100svh;min-height:560px;overflow:hidden;isolation:isolate}
/* the frame: the client's colour, blacks lifted to #141518 and whites held at #ECE5DA, nothing else */
.ep-media{position:absolute;inset:0;z-index:0;transform:scale(calc(1 + var(--t,0) * .03));transform-origin:50% 50%}
.ep-media video,.ep-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.ep-media::before,.ep-media::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none}
.ep-media::before{background:#141518;mix-blend-mode:lighten}
.ep-media::after{background:#ECE5DA;mix-blend-mode:darken}
/* legibility on the left only, so the frame keeps most of the picture */
.ep-shade{position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,rgb(20 21 24 / .62),rgb(20 21 24 / .18) 46%,rgb(20 21 24 / 0) 64%),linear-gradient(0deg,rgb(20 21 24 / .55),rgb(20 21 24 / 0) 26%)}
/* film grain on the frame, refreshed at 12 frames a second */
.ep-shade::after{content:"";position:absolute;inset:-50%;opacity:.07;mix-blend-mode:overlay;
  background: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='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  animation:ep-grain 1s steps(12) infinite}
@keyframes ep-grain{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(-37%,23%,0)}}
.ep-fi{position:absolute;z-index:4;top:calc(72px + 3vh);right:var(--ep-g);margin:0;color:var(--sub)}
.ep-copy{position:absolute;z-index:4;left:var(--ep-g);top:50%;transform:translateY(-56%);max-width:64vw}
.ep-tap{all:unset;cursor:pointer;display:block}
.ep-tap:focus-visible{outline:1px solid var(--ice);outline-offset:8px}
/* the number: Archivo Expanded 800, oyster; one light sweep as it lands */
.ep-num{display:inline-block;font:800 18vw/.9 AX,"Archivo",system-ui,sans-serif;letter-spacing:-.035em;white-space:nowrap;color:var(--oy);
  background:linear-gradient(105deg,var(--oy) 0 42%,#F7F2EA 50%,var(--oy) 58% 100%) 100% 0/260% 100% no-repeat;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.ep-ch.ep-gloss .ep-num{animation:ep-gloss 1.1s var(--ep-ease) both}
@keyframes ep-gloss{from{background-position:100% 0}to{background-position:0 0}}
.ep-impact .ep-cap{margin:24px 0 0;font:400 clamp(17px,1.6vw,23px)/1.3 Switzer,system-ui,sans-serif;color:var(--light)}
.ep-impact .ep-src{margin:16px 0 0;color:var(--sub)}
.ep-impact .ep-hint{margin:24px 0 0;color:var(--light);opacity:.7}
/* the receipt: a square matte panel, no turn, no shadow card */
.ep-rc{position:absolute;z-index:5;right:var(--ep-g);top:50%;width:min(420px,34vw);padding:24px 24px 32px;background:rgb(20 21 24 / .94);color:var(--light);border:1px solid var(--line);border-radius:0;
  opacity:0;visibility:hidden;transform:translate3d(16px,-50%,0);transition:opacity .6s var(--ep-ease),transform .6s var(--ep-ease),visibility 0s .6s}
.ep-ch.ep-open .ep-rc{opacity:1;visibility:visible;transform:translate3d(0,-50%,0);transition:opacity .6s var(--ep-ease),transform .6s var(--ep-ease)}
.ep-rc .k{font-size:11px;color:var(--sub)}
.ep-rc .ep-rt{margin:16px 0 0;font:500 24px/1.2 Switzer,system-ui,sans-serif;letter-spacing:-.01em;color:var(--oy)}
.ep-rc hr{border:0;height:1px;background:var(--line);margin:16px 0}
.ep-rr{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:8px 0}
.ep-rr b{font:500 15px/1.3 Switzer,system-ui,sans-serif;text-align:right;color:var(--light)}
.ep-rc .ep-rl{color:var(--light);text-decoration:none;font-size:12px}
.ep-rc .ep-rl:hover,.ep-rc .ep-rl:focus-visible{text-decoration:underline;text-underline-offset:4px}
/* the rail: frame index and progress, the one ice mark */
.ep-rail{position:absolute;z-index:8;left:var(--ep-g);right:var(--ep-g);bottom:calc(24px + 2vh);display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0;padding:0;list-style:none}
.ep-rail li{position:relative;padding-top:16px;font:500 11px/1.2 "IBM Plex Mono",ui-monospace,monospace;letter-spacing:.14em;text-transform:uppercase;color:var(--sub);transition:color .6s var(--ep-ease)}
.ep-rail li::before,.ep-rail li::after{content:"";position:absolute;left:0;top:0;height:2px;width:100%;background:rgb(236 229 218 / .16)}
.ep-rail li::after{background:var(--ice);width:calc(var(--f,0) * 100%)}
.ep-rail li.on{color:var(--light)}
.ep-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* no script or reduced motion: chapters stack, numbers final, no rail, no grain */
.ep-impact:not(.ep-on) .ep-rail{display:none}
.ep-impact:not(.ep-on) .ep-head{position:relative;top:auto;padding:120px 0 24px;margin:0 var(--ep-g)}

/* scripted: one pinned stage; the scroll picks the frame, each frame plays its entrance once in time */
.ep-impact.ep-on{height:calc(4 * 115svh + 100svh)}
.ep-on .ep-pin{position:sticky;top:0;height:100svh;min-height:560px}
.ep-on .ep-ch{position:absolute;inset:0;height:auto;min-height:0;opacity:0;visibility:hidden;transition:opacity .6s var(--ep-ease),visibility 0s .6s}
.ep-on .ep-ch.ep-cur{opacity:1;visibility:visible;transition:opacity .6s var(--ep-ease)}
.ep-on .ep-media{clip-path:inset(100% 0 0 0);transition:clip-path .6s var(--ep-ease)}
.ep-on .ep-num,.ep-on .ep-cap,.ep-on .ep-src,.ep-on .ep-hint,.ep-on .ep-fi{opacity:0;transform:translate3d(0,16px,0);transition:opacity .6s var(--ep-ease),transform .6s var(--ep-ease)}
.ep-on .ep-ch.ep-in .ep-media{clip-path:inset(0 0 0 0)}
.ep-on .ep-ch.ep-in .ep-num{opacity:1;transform:none;transition-delay:80ms}
.ep-on .ep-ch.ep-in .ep-cap{opacity:1;transform:none;transition-delay:160ms}
.ep-on .ep-ch.ep-in .ep-src,.ep-on .ep-ch.ep-in .ep-fi{opacity:1;transform:none;transition-delay:240ms}
.ep-on .ep-ch.ep-in .ep-hint{opacity:.7;transform:none;transition-delay:240ms}
/* the first frame is already up as the stage pins */
.ep-on .ep-ch.ep-first .ep-media{clip-path:none;transition:none}
/* the receipt replaces the hint */
.ep-impact .ep-ch.ep-open .ep-hint{opacity:0}

/* ---------- 2. Holo cards ---------- */
.ep-holo .tile .media{transform:perspective(1100px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateZ(0);transition:transform .7s var(--w-ease,cubic-bezier(.2,.7,.1,1)),box-shadow .7s;transform-style:preserve-3d}
.ep-holo .tile.ep-live .media{transition:transform .12s linear,box-shadow .4s;box-shadow:0 30px 60px -28px rgb(0 0 0 / .9),0 0 0 1px rgb(242 240 239 / .06)}
.ep-holo .tile .media::before{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;background:radial-gradient(48% 42% at var(--mx,50%) var(--my,30%),rgb(255 255 255 / .28),rgb(255 255 255 / 0) 70%),linear-gradient(115deg,transparent 30%,rgb(214 226 236 / .16) calc(var(--sh,50%) - 6%),rgb(255 255 255 / .22) var(--sh,50%),rgb(178 213 229 / .14) calc(var(--sh,50%) + 6%),transparent 70%);mix-blend-mode:soft-light;opacity:0;transition:opacity .5s}
.ep-holo .tile .media::after{content:"";position:absolute;inset:0;z-index:4;pointer-events:none;border-radius:inherit;padding:1.5px;background:conic-gradient(from var(--ep-ang) at var(--mx,50%) var(--my,50%),#d9dee3,#f7f8f9,#a9bccb,#eef2f5,#c3d1dc,#f7f8f9,#b7c3cc,#d9dee3);-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);opacity:.28;transition:opacity .5s}
.ep-holo .tile.ep-live .media::before{opacity:1}
.ep-holo .tile.ep-live .media::after{opacity:1}
.ep-holo .tile.ep-sweep .media::after{animation:ep-sweep 1.8s var(--w-ease,ease) both}
.ep-holo .tile.ep-sweep .media::before{animation:ep-shine 1.8s var(--w-ease,ease) both}
@keyframes ep-sweep{0%{--ep-ang:0deg;opacity:.28}40%{opacity:1}100%{--ep-ang:360deg;opacity:.4}}
@keyframes ep-shine{0%{--sh:-20%;opacity:0}30%{opacity:1}100%{--sh:120%;opacity:0}}
@property --sh { syntax: "<percentage>"; inherits: true; initial-value: 50%; }

/* ---------- 3. Rising headlines ---------- */
.ep-js .ep-rise{clip-path:inset(0 0 100% 0);transform:translateY(.4em);transition:clip-path 1.1s var(--w-ease,cubic-bezier(.2,.7,.1,1)),transform 1.1s var(--w-ease,cubic-bezier(.2,.7,.1,1))}
.ep-js .ep-rise.ep-in{clip-path:inset(-10% -5% -20% -5%);transform:none}

@media (max-width:699px){
  .ep-num{font-size:24vw}
  .ep-copy{max-width:none;right:var(--ep-g);top:24%;transform:none}
  .ep-fi{display:none}
  .ep-shade{background:linear-gradient(180deg,rgb(20 21 24 / .5),rgb(20 21 24 / .12) 50%,rgb(20 21 24 / .6))}
  .ep-rc{left:var(--ep-g);right:var(--ep-g);width:auto;top:auto;bottom:calc(88px + 3vh);padding:16px 16px 24px;transform:translate3d(0,16px,0)}
  .ep-ch.ep-open .ep-rc{transform:none}
  .ep-rc .ep-rt{font-size:20px}
  .ep-rr{padding:4px 0}
  .ep-rail{gap:8px}
  .ep-rail li{font-size:9px;letter-spacing:.1em}
  .ep-impact.ep-on{height:calc(4 * 100svh + 100svh)}
}
@media (prefers-reduced-motion:reduce){
  .ep-shade::after{animation:none}
  .ep-media{transform:none}
  .ep-rc,.ep-ch.ep-open .ep-rc{transition:none}
  .ep-js .ep-rise{clip-path:none;transform:none;transition:none}
  .ep-holo .tile .media{transform:none!important}
  .ep-holo .tile.ep-sweep .media::after,.ep-holo .tile.ep-sweep .media::before{animation:none}
}
