/* Motion layer. Everything sits under html.fx, which fx.js sets only when the
   browser can run it and the visitor has not asked for reduced motion.
   To switch the whole layer off, remove the fx.css + fx.js tags from a page. */

@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:fx-vo .2s ease-in both}
  ::view-transition-new(root){animation:fx-vn .5s cubic-bezier(.2,.8,.2,1) both}
}
@keyframes fx-vo{to{opacity:0;transform:translateY(-10px)}}
@keyframes fx-vn{from{opacity:0;transform:translateY(22px)}}

@keyframes fx-up{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes fx-card{from{opacity:0;transform:translateY(38px) scale(.955)}to{opacity:1;transform:none}}
@keyframes fx-row{from{opacity:0;transform:translateX(-22px)}to{opacity:1;transform:none}}
@keyframes fx-side{from{opacity:0;transform:translateX(-56px) scale(.94)}to{opacity:1;transform:none}}
@keyframes fx-photo{from{opacity:0;transform:translateY(44px);clip-path:inset(14% 9% 14% 9% round 22px)}to{opacity:1;transform:none;clip-path:inset(0 0 0 0 round 22px)}}
@keyframes fx-zoom{from{scale:1.22}to{scale:1}}
@keyframes fx-head{from{opacity:0;transform:translateY(.6em)}to{opacity:1;transform:none}}
@keyframes fx-bar{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes fx-word{from{opacity:0;transform:translateY(.55em) rotate(2.5deg);filter:blur(10px)}to{opacity:1;transform:none;filter:blur(0)}}
@keyframes fx-settle{from{scale:1.16;filter:brightness(.72)}to{scale:1;filter:brightness(1)}}

/* ---------- hero: image settles, headline arrives word by word, depth on scroll ---------- */
html.fx .hero.photo .hero-bg{scale:1.16;transform:translate3d(0,calc(var(--fx-y,0)*.3px),0) scale(calc(1 + var(--fx-k,0)*.1));will-change:transform}
html.fx .hero.photo.fx-go .hero-bg{scale:1;animation:fx-settle 1.9s var(--ease) both}
html.fx .hero.photo .hero-in{transform:translate3d(0,calc(var(--fx-y,0)*-.14px),0);opacity:calc(1 - var(--fx-k,0)*1.6)}
html.fx .hero.photo .hero-in>*{animation:fx-up .8s var(--ease) both;animation-delay:.75s}
html.fx .hero.photo .hero-in>.date{animation-delay:.1s}
html.fx .hero.photo .hero-in>.count{animation-delay:.95s}
html.fx .hero.photo .hero-in>h1{animation-delay:1.2s}
html.fx .hero.photo .hero-in>h1.fx-split{animation:none}
html.fx .fx-w{display:inline-block;animation:fx-word .95s var(--ease) both;animation-delay:calc(var(--i,0)*85ms + .22s)}
html.fx .hero h1 em path{animation-delay:1.05s}

/* inner pages: the photo header */
html.fx .ph{animation:fx-photo 1s var(--ease) both}
html.fx .ph .lead{animation:fx-up .8s .6s var(--ease) both}
html.fx .ph h1::before{transform-origin:right;animation:fx-bar .7s .5s var(--ease) both}

/* ---------- reveals on scroll (fx.js marks the elements; unmarked ones stay as they are) ---------- */
html.fx .grid>*{animation:none}
html.fx .fx-r{opacity:0}
html.fx .fx-r.fx-in{animation:fx-up .75s var(--ease) both;animation-delay:var(--fx-d,0ms)}
html.fx .fx-r.fx-card.fx-in{animation-name:fx-card;animation-duration:.85s}
html.fx .fx-r.fx-row.fx-in{animation-name:fx-row;animation-duration:.6s}
html.fx .fx-r.fx-side.fx-in{animation-name:fx-side;animation-duration:.8s}
html.fx .fx-r.fx-photo.fx-in{animation-name:fx-photo;animation-duration:1s}
html.fx .fx-r.fx-photo.fx-in>.bg,html.fx .fx-r.fx-photo.fx-in>video{animation:fx-zoom 1.6s var(--ease) both;animation-delay:var(--fx-d,0ms)}
html.fx .fx-r.fx-head.fx-in{animation-name:fx-head}
html.fx .fx-r.fx-head::before{transform:scaleX(0);transform-origin:right}
html.fx .fx-r.fx-head.fx-in::before{animation:fx-bar .7s var(--ease) both;animation-delay:calc(var(--fx-d,0ms) + .25s)}

/* photos inside the tiles drift a little slower than the page */
html.fx .tile.real>.bg{transform:translate3d(0,calc(var(--fx-p,0)*-5%),0) scale(1.12);will-change:transform}

/* numbers that count up */
html.fx .fx-n{display:inline-block;text-align:start;font-variant-numeric:tabular-nums}

/* ---------- "how it works": a line that fills, steps that light up ---------- */
html.fx .fx-how{position:relative}
html.fx .fx-how::before,html.fx .fx-how::after{content:"";position:absolute;inset-inline-start:19px;top:var(--fx-lt,0px);height:var(--fx-lh,0px);width:2px;border-radius:2px;background:var(--line)}
html.fx .fx-how::after{background:var(--action);transform-origin:top;transform:scaleY(var(--fx-lp,0))}
html.fx .fx-how li::before{position:relative;z-index:1;width:40px;height:40px;box-sizing:border-box;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;line-height:1;background:var(--bg);border:2px solid var(--line);transition:background-color .45s var(--ease),border-color .45s var(--ease),color .45s var(--ease),transform .45s var(--ease)}
html.fx .fx-how li.fx-on::before{background:var(--action);border-color:var(--action);color:var(--on-action);transform:scale(1.1)}
html.fx .fx-how li>div{transition:opacity .45s var(--ease);opacity:.55}
html.fx .fx-how li.fx-on>div{opacity:1}

/* ---------- page progress, a hairline under the top bar ---------- */
html.fx .nav::after{content:"";position:absolute;inset-inline:0;bottom:-2px;height:2px;background:var(--action);transform-origin:right;transform:scaleX(var(--fx-page,0));transition:opacity var(--d-fade,200ms)}
html.fx .nav.over::after,html.fx .immersive .nav::after{opacity:0}

/* ---------- pinned photo gallery: scrolling down carries the photos sideways ---------- */
html.fx .fx-hs{position:relative;margin-inline:calc(50% - 50vw);margin-block:var(--s6);--fx-fw:min(84vw,600px)}
html.fx .fx-hs-stage{position:sticky;top:0;height:100vh;height:100svh;box-sizing:border-box;padding-top:60px;padding-bottom:96px;display:flex;flex-direction:column;justify-content:center;gap:var(--s4);overflow:hidden}
html.fx .fx-hs-top{display:flex;justify-content:space-between;align-items:flex-end;gap:var(--s3);padding-inline:calc((100vw - var(--fx-fw))/2)}
html.fx .fx-hs-top .sec{margin:0}
html.fx .fx-hs-n{font-size:var(--t-meta);font-weight:600;color:var(--label2);white-space:nowrap;line-height:1}
html.fx .fx-hs-n b{font-family:var(--display);font-weight:400;font-size:60px;line-height:.8;color:var(--label);margin-inline-end:8px;font-variant-numeric:tabular-nums}
html.fx .fx-hs-track{align-self:flex-start;display:flex;gap:var(--s4);width:max-content;max-width:none;margin:0;overflow:visible;scroll-snap-type:none;padding-inline:calc((100vw - var(--fx-fw))/2);transform:translate3d(var(--fx-x,0px),0,0);will-change:transform}
html.fx .fx-hs-track figure{flex:0 0 var(--fx-fw);width:var(--fx-fw);scale:var(--fx-s,1);opacity:var(--fx-o,1);transition:none}
html.fx .fx-hs-track img{height:auto;border-radius:var(--r-l);box-shadow:0 26px 50px -30px rgba(46,36,31,.6)}
html.fx .fx-hs-track figcaption{font-family:var(--display);font-size:22px;line-height:1.25;color:var(--label);margin-top:var(--s3)}
html.fx .fx-hs-foot{display:flex;align-items:center;gap:var(--s4);padding-inline:calc((100vw - var(--fx-fw))/2)}
html.fx .fx-hs-bar{flex:1;height:3px;border-radius:3px;background:var(--line);overflow:hidden}
html.fx .fx-hs-bar i{display:block;height:100%;background:var(--action);transform-origin:right;transform:scaleX(var(--fx-g,0))}
html.fx .fx-hs-skip{display:inline-flex;align-items:center;min-height:44px;font-size:var(--t-cap);font-weight:700;color:var(--link);text-decoration:none;white-space:nowrap}

/* ---------- a band of large outlined words that slides as the page moves ---------- */
html.fx .fx-band{margin-inline:calc(50% - 50vw);overflow:hidden;padding-block:var(--s6);direction:rtl;pointer-events:none;-webkit-user-select:none;user-select:none}
html.fx .fx-band-t{width:max-content;white-space:nowrap;font-family:var(--display);font-size:clamp(64px,15vw,150px);line-height:1.05;color:transparent;-webkit-text-stroke:1.4px var(--line-strong);opacity:.8;transform:translate3d(var(--fx-bx,0px),0,0);will-change:transform}
html.fx .fx-band-t b{font-weight:400;color:var(--action);-webkit-text-stroke:0}

/* ---------- desktop pointer: cards lean toward the cursor ---------- */
@media (hover:hover) and (pointer:fine){
  html.fx .fx-tilt{transform:perspective(900px) rotateX(calc(var(--fx-ty,0)*-4deg)) rotateY(calc(var(--fx-tx,0)*5deg)) translateY(-4px);transition:transform .2s ease-out,box-shadow .2s ease-out;box-shadow:0 22px 40px -26px rgba(46,36,31,.55);z-index:1}
}
