/* NEXT PROJECT (2026-10-10, his call: "Reveal a view next project in the end of the case. use a smooth scrolling swipe
   animation for it"). The case's last screen. It scrolls in as dark ink with the next project's name; then it holds
   while the next project's backdrop swipes up over it, its cover rises into place and the title lines come up, all on
   the scroll (Lenis-smoothed), so the end of one case becomes the next project's Work screen. Clicking it opens that
   case. next-project.js drives the progress (--p, 0..1); serve_adapted adds both to every case page. */
.av-next{position:relative;height:200vh;background:#0d0d0c;color:#efeee8;width:var(--fw,100vw);max-width:none;margin-inline:calc(50% - var(--fw,100vw) / 2);padding:0;box-sizing:border-box}   /* full bleed out of the case's padded column; --fw is the page's width without the scrollbar (next-project.js) */
.av-next-pin{position:sticky;top:0;height:100vh;overflow:hidden}
.av-next-link{position:absolute;inset:0;display:block;color:inherit;text-decoration:none;cursor:pointer}
.av-next-link:focus-visible{outline:1px solid #efeee8;outline-offset:-8px}
.av-next-bg{position:absolute;inset:0;clip-path:inset(calc((1 - var(--q,0)) * 100%) 0 0 0)}
.av-next-bg img{width:100%;height:100%;object-fit:cover;transform:scale(calc(1.12 - .12 * var(--q,0)));transform-origin:50% 100%}
.av-next-card{position:absolute;left:50%;top:50%;width:min(46vw,640px);aspect-ratio:603/366;overflow:hidden;box-shadow:0 40px 90px #0007;
 translate:-50% -50%;transform:translateY(calc((1 - var(--c,0)) * 70vh)) scale(calc(.86 + .14 * var(--c,0)))}
.av-next-card img{display:block;width:100%;height:100%;object-fit:cover}
.av-next-head{position:absolute;left:32px;right:32px;top:104px;display:flex;justify-content:space-between;font:500 11px InterTight,Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:#cfcec8}
.av-next-title{position:absolute;left:32px;bottom:26px;margin:0;font:400 clamp(72px,11vw,170px)/1.02 Americaine,serif;letter-spacing:0;overflow:hidden;padding-bottom:.06em}
.av-next-title>span{display:block;transform:translateY(calc((1 - var(--t,0)) * 105%))}
.av-next-go{position:absolute;right:32px;bottom:40px;display:flex;gap:14px;align-items:center;font:500 11px InterTight,Arial,sans-serif;letter-spacing:.1em;text-transform:uppercase;
 opacity:var(--g,0);transform:translateY(calc((1 - var(--g,0)) * 10px));border-bottom:1px solid #ffffff55;padding-bottom:8px}
.av-next-link:hover .av-next-go{border-color:#efeee8}
/* leaving: the page eases out before the next case loads */
html.av-next-leaving body{opacity:0;transition:opacity .45s cubic-bezier(.2,.7,.2,1)}
/* the case's own small "Next" link gives way to this */
main footer a[href^="/work/"],footer a.next{display:none!important}
@media(max-width:700px){
 .av-next-head{left:20px;right:20px;top:84px}.av-next-title{left:20px;bottom:76px;font-size:clamp(56px,16vw,96px)}
 .av-next-go{left:20px;right:auto;bottom:30px}.av-next-card{width:78vw}
}
@media(prefers-reduced-motion:reduce){.av-next{height:100vh}.av-next-bg{clip-path:none}.av-next-card,.av-next-title>span,.av-next-bg img{transform:none}.av-next-go{opacity:1;transform:none}}
/* a page that hides horizontal overflow on <body> turns it into a scroll box, and the pin can't stick (seen on phones):
   clip does the same clipping without that */
body{overflow-x:clip!important}
