/* Motion layer, LIGHT version (12 Nov 2026; the first version was too heavy:
   blur filters on every reveal, scroll-linked zoom on every photo, a blended
   light on every card). Loaded last on every page with assets/js/motion.js.
   Rule of thumb kept here: animate only opacity and transform (the GPU does
   those cheaply), nothing runs forever off screen, nothing blurs.
   Everything switches off under prefers-reduced-motion. */
:root{--mo-ease:cubic-bezier(.16,1,.3,1)}

/* 1. Page to page: NO cross-document view transition (13 Nov 2026). It held
   the old page as a snapshot (WebGL canvases, glass header) until the next page
   was fully ready and then faded, which felt laggy. Pages now appear as soon as
   they can, each with its own hero entrance; motion.js prerenders the page you
   press on so it is usually ready by the time the click completes. */

/* 2. Scroll reveals: same triggers as before, a longer, softer ease */
.reveal,.reveal-left,.reveal-right,.reveal-scale{transition:opacity .9s var(--mo-ease),transform 1s var(--mo-ease)}

/* 3. Images that are still loading fade in instead of popping */
img.mo-img{opacity:0}
img.mo-img.is-loaded{opacity:1;transition:opacity .6s var(--mo-ease)}

/* 4. Cursor light on the card under the mouse (motion.js creates the layer
   only on the card being hovered) */
.mo-spot{position:absolute;inset:0;z-index:1;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .4s var(--mo-ease);
  background:radial-gradient(360px circle at var(--mx,50%) var(--my,50%),rgba(46,142,209,.13),transparent 62%)}
.mo-lit:hover>.mo-spot{opacity:1}

/* 5. Reading progress: a thin lit line along the top (CSS scroll timeline,
   runs on the compositor; hidden where unsupported) */
.mo-progress{position:fixed;z-index:120;top:0;left:0;right:0;height:2px;pointer-events:none;transform-origin:0 50%;transform:scaleX(0);
  background:linear-gradient(90deg,#096b9f,#2e8ed1 60%,#5fb3e0)}
@supports (animation-timeline:scroll()){
  .mo-progress{animation:moProgress linear both;animation-timeline:scroll(root block)}
  @keyframes moProgress{to{transform:scaleX(1)}}
}
@supports not (animation-timeline:scroll()){.mo-progress{display:none}}

@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
@media (prefers-reduced-motion:reduce){
  img.mo-img{opacity:1}
  .mo-spot,.mo-progress{display:none}
}
