/* Shared motion for every page except /systems/crm (which carries its own).
   Iris page transition, scroll progress, scroll reveals, hero entrance, hover lift.
   Everything is switched off for visitors who ask for reduced motion. */
:root{--t0:0s}
html.enter{--t0:.6s}
html::after{content:"";position:fixed;inset:0;z-index:2147483000;pointer-events:none;background:linear-gradient(135deg,#ffa24a,#ff7a3a 55%,#9c4f63);clip-path:circle(0 at 50% 50%);visibility:hidden}
#mo-prog{position:fixed;left:0;top:0;height:3px;width:100%;z-index:2147482000;background:linear-gradient(90deg,#e7b86d,#ffa24a);transform-origin:0 50%;transform:scaleX(var(--sp,0));pointer-events:none}
@media (prefers-reduced-motion:no-preference){
  :root{--ease:cubic-bezier(.2,.7,.2,1)}
  html.enter::after{visibility:visible;animation:moIrisIn .9s cubic-bezier(.7,0,.2,1) .05s both}
  html.pt-go::after{visibility:visible;animation:moIrisOut .7s cubic-bezier(.7,0,.2,1) both}
  @keyframes moIrisIn{from{clip-path:circle(150vmax at 50% 50%)}to{clip-path:circle(0 at 50% 50%)}}
  @keyframes moIrisOut{from{clip-path:circle(0 at var(--px,50%) var(--py,50%))}to{clip-path:circle(150vmax at var(--px,50%) var(--py,50%))}}
  @keyframes moRise{from{opacity:0;translate:0 38px;filter:blur(10px)}}
  @keyframes moSheen{0%{left:-60%}24%,100%{left:130%}}

  /* hero entrance on the content pages (CSS only, so there is no flash) */
  :is(.pf-intro,.tl-hero,.blog-hero,.blog-top,.blog-head,.blog-crumbs)>*{animation:moRise 1.1s var(--ease) calc(var(--t0) + .15s) backwards}
  :is(.pf-intro,.tl-hero,.blog-hero,.blog-head)>*:nth-child(2){animation-delay:calc(var(--t0) + .28s)}
  :is(.pf-intro,.tl-hero,.blog-hero,.blog-head)>*:nth-child(3){animation-delay:calc(var(--t0) + .4s)}
  :is(.pf-intro,.tl-hero,.blog-hero,.blog-head)>*:nth-child(4){animation-delay:calc(var(--t0) + .52s)}
  :is(.pf-intro,.tl-hero,.blog-hero,.blog-head)>*:nth-child(n+5){animation-delay:calc(var(--t0) + .64s)}

  /* scroll reveals: the script sets data-mo, then data-mo="in", then removes it */
  [data-mo]{opacity:0;translate:0 40px;filter:blur(8px);transition:opacity .9s var(--ease) var(--d,0s),translate .9s var(--ease) var(--d,0s),filter .9s var(--ease) var(--d,0s)}
  [data-mo="in"]{opacity:1;translate:0 0;filter:none}

  /* buttons and cards */
  html .button{position:relative;overflow:hidden;transition:background .2s,color .2s,translate .3s var(--ease),box-shadow .3s}
  html .button:hover{translate:0 -2px}
  html .button.primary{box-shadow:0 0 0 rgba(231,184,109,0)}
  html .button.primary:hover{box-shadow:0 10px 28px rgba(231,184,109,.28)}
  .button.primary:after{content:"";position:absolute;top:0;bottom:0;left:-60%;width:40%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.5),transparent);transform:skewX(-20deg);animation:moSheen 6s ease-in-out 3s infinite;pointer-events:none}
  html :is(.project,.system-card,.blog-card,.pf-card,.tl-card){transition:border-color .2s,translate .35s var(--ease),box-shadow .35s}
  html :is(.project,.system-card,.blog-card,.pf-card,.tl-card):hover{translate:0 -4px;box-shadow:0 18px 40px rgba(0,0,0,.35)}
}
