/* Faramix motion system v1 (Animations web developer, 2026-11-11). Signature idea: light passing over the page.
   transform + opacity only · plays once · content visible without JS (hiding starts only when html.mo is set by motion.js)
   · everything off with prefers-reduced-motion. */
:root{--mo-ease:cubic-bezier(.2,.75,.2,1);--mo-dur:.7s}

/* 1. Hero entrance: the headline lines rise in, then the lead and buttons */
html.mo .sky .copy h1,html.mo .sky .copy .lead,html.mo .sky .copy .cta,html.mo .facts li{opacity:0;transform:translateY(22px)}
html.mo.mo-ready .sky .copy h1{animation:mo-rise .9s var(--mo-ease) .05s forwards}
html.mo.mo-ready .sky .copy .lead{animation:mo-rise .8s var(--mo-ease) .25s forwards}
html.mo.mo-ready .sky .copy .cta{animation:mo-rise .8s var(--mo-ease) .4s forwards}
html.mo.mo-ready .facts li{animation:mo-rise .7s var(--mo-ease) forwards}
html.mo.mo-ready .facts li:nth-child(1){animation-delay:.55s}html.mo.mo-ready .facts li:nth-child(2){animation-delay:.65s}html.mo.mo-ready .facts li:nth-child(3){animation-delay:.75s}
@keyframes mo-rise{to{opacity:1;transform:none}}

/* 2. Scroll reveal (AOS-style, our own): items fade up once, staggered by --i */
html.mo [data-mo]{opacity:0;transform:translateY(28px);transition:opacity var(--mo-dur) var(--mo-ease),transform var(--mo-dur) var(--mo-ease);transition-delay:calc(var(--i,0) * 80ms)}
html.mo [data-mo].in{opacity:1;transform:none}
html.mo [data-mo="left"]{transform:translateX(-28px)}html.mo [data-mo="left"].in{transform:none}
html.mo [data-mo="scale"]{transform:scale(.96)}html.mo [data-mo="scale"].in{transform:none}

/* 3. The light sweep: a soft beam glides once across glass cards as they appear */
.glass.sweep{position:relative;overflow:hidden}
.glass.sweep::before{content:"";position:absolute;inset:-20% auto -20% -60%;width:45%;pointer-events:none;z-index:3;
  background:linear-gradient(100deg,transparent,rgba(195,155,254,.16) 45%,rgba(242,244,248,.22) 50%,rgba(195,155,254,.16) 55%,transparent);
  transform:translateX(0) skewX(-12deg);opacity:0}
html.mo .glass.sweep.in::before{animation:mo-sweep 1.4s var(--mo-ease) calc(var(--i,0) * 80ms + .25s) 1}
@keyframes mo-sweep{0%{opacity:0;transform:translateX(0) skewX(-12deg)}15%{opacity:1}100%{opacity:0;transform:translateX(420%) skewX(-12deg)}}
html[dir=rtl] .glass.sweep::before{left:auto;right:-60%}
html[dir=rtl].mo .glass.sweep.in::before{animation-name:mo-sweep-rtl}
@keyframes mo-sweep-rtl{0%{opacity:0;transform:translateX(0) skewX(12deg)}15%{opacity:1}100%{opacity:0;transform:translateX(-420%) skewX(12deg)}}

/* 4. Pointer spotlight on cards (desktop with a mouse only) */
@media(hover:hover) and (pointer:fine){
  .spot{position:relative}
  .spot::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .3s;
    background:radial-gradient(320px circle at var(--mx,50%) var(--my,50%),rgba(142,77,255,.16),transparent 60%)}
  .spot:hover::after{opacity:1}
}

/* 5. Reading progress: a thin beam under the menu bar */
.mo-progress{position:absolute;left:24px;right:24px;bottom:-1px;height:2px;border-radius:2px;pointer-events:none;overflow:hidden}
.mo-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--violet),var(--glow));transform-origin:0 50%;transform:scaleX(0)}
html[dir=rtl] .mo-progress i{transform-origin:100% 50%}
header .bar{position:relative}

/* 6. The five steps light up one after another */
html.mo .steps li{transition:border-color .5s,box-shadow .5s}
html.mo .steps.in li{border-color:rgba(195,155,254,.45);box-shadow:0 0 0 1px rgba(142,77,255,.25),0 18px 50px rgba(90,43,190,.22);transition-delay:calc(var(--i,0) * 160ms + .3s)}

/* 7. Small feedback: buttons press in; arrows nudge */
.btn{transition:transform .2s var(--mo-ease),box-shadow .2s,border-color .2s}
.btn:active{transform:scale(.97)}
.btn-p .arr,.go{transition:transform .25s var(--mo-ease)}

/* 8. Form success: a check mark draws itself */
.form-msg.ok-anim::before{content:"";display:inline-block;width:18px;height:10px;margin-inline-end:10px;border-left:2.5px solid var(--glow);border-bottom:2.5px solid var(--glow);transform:rotate(-45deg) scale(0);vertical-align:3px;animation:mo-check .5s var(--mo-ease) forwards}
@keyframes mo-check{to{transform:rotate(-45deg) scale(1)}}

/* Reduce motion: nothing moves, nothing is hidden */
@media(prefers-reduced-motion:reduce){
  html.mo [data-mo],html.mo .sky .copy h1,html.mo .sky .copy .lead,html.mo .sky .copy .cta,html.mo .facts li{opacity:1!important;transform:none!important;animation:none!important;transition:none!important}
  .glass.sweep::before,.mo-progress{display:none}
}

/* Fix (Animations web developer): Chrome drew a grey rectangle around the rotating beam because of filter:blur + mix-blend-mode on a rotating layer.
   The softness now comes from the gradient itself (no filter), and the layer is promoted on its own. */
.beam i{filter:none!important;will-change:transform;
  background:radial-gradient(120% 60% at 100% 50%,rgba(242,244,248,.5),rgba(195,155,254,.3) 10%,rgba(142,77,255,.12) 40%,transparent 75%)!important;
  clip-path:polygon(100% 49.2%,0 16%,0 76%,100% 50.8%)!important;mix-blend-mode:normal}
html[dir=rtl] .beam i{background:radial-gradient(120% 60% at 0% 50%,rgba(242,244,248,.5),rgba(195,155,254,.3) 10%,rgba(142,77,255,.12) 40%,transparent 75%)!important;clip-path:polygon(0 49.2%,100% 16%,100% 76%,0 50.8%)!important}

/* Performance pass (Performance auditor + Animations web developer, 2026-11-11). Measured: the moving beam under blurred glass
   cut desktop scrolling to ~31 fps. Same look, far less work for the graphics card. */
.sky{contain:paint}
.beam::after{mix-blend-mode:normal}
html.beam-off .beam i,html.is-scrolling .beam i{animation-play-state:paused}
.horizon{-webkit-backdrop-filter:none;backdrop-filter:none;background:linear-gradient(180deg,rgba(17,22,58,.92),rgba(9,12,32,.86))}
.glass:not(.bar){-webkit-backdrop-filter:none;backdrop-filter:none;background:linear-gradient(160deg,rgba(30,36,82,.5),rgba(13,17,44,.42));box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 14px 36px rgba(0,0,0,.26)}
.wchip{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(7,9,24,.8)}
.stack .img::after{animation:none;opacity:.75;mix-blend-mode:normal}
