/* MJFIS — scroll & load motion
   RTL/LTR aware, no-JS safe (everything is gated behind .anim, added by animations.js),
   and fully off when the visitor prefers reduced motion. */

:root{--ease:cubic-bezier(.22,1,.36,1);--dx:1;--clip-from:inset(-30px 100% -30px -30px)}
[dir=rtl]{--dx:-1;--clip-from:inset(-30px -30px -30px 100%)}

/* ---------- scroll progress bar ---------- */
.scroll-progress{position:fixed;inset:0 0 auto 0;height:3px;z-index:70;background:var(--red);
  transform:scaleX(var(--p,0));transform-origin:left;pointer-events:none}
[dir=rtl] .scroll-progress{transform-origin:right}

/* ---------- hero: one orchestrated entrance ---------- */
.anim .hero-slide{inset:-12% 0;translate:0 var(--py,0px)}          /* parallax */
.anim .hero-slide.on{animation:kb 10s var(--ease) forwards}        /* slow settle */
@keyframes kb{from{scale:1.12}to{scale:1}}

.anim .w{display:inline-block;overflow:hidden;vertical-align:top;padding-block:.14em;margin-block:-.14em}
.anim .w>span{display:inline-block;transform:translateY(115%);
  animation:word .9s var(--ease) forwards;animation-delay:calc(.15s + var(--wi,0)*70ms)}
@keyframes word{to{transform:none}}

.anim .hero h1::after{transform-origin:left;animation:draw .9s var(--ease) .85s both}
[dir=rtl] .anim .hero h1::after{transform-origin:right}
@keyframes draw{from{scale:0 1}to{scale:1 1}}

.anim .hero-in>p,.anim .hero-in>.hero-cta,.anim .hero-in>.dots{animation:rise .9s var(--ease) both}
.anim .hero-in>p{animation-delay:.6s}
.anim .hero-in>.hero-cta{animation-delay:.75s}
.anim .hero-in>.dots{animation-delay:.9s}
@keyframes rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}

/* inner page heroes */
.anim .page-hero .container>*:not(h1){animation:rise .8s var(--ease) both}
.anim .page-hero .crumbs{animation-delay:.05s}
.anim .page-hero p{animation-delay:.45s}

/* ---------- reveal on scroll ---------- */
.anim [data-reveal]{
  transition:opacity .9s var(--ease) var(--d,0ms),transform .9s var(--ease) var(--d,0ms),clip-path 1.1s var(--ease) var(--d,0ms);
  will-change:opacity,transform}
.anim [data-reveal]:not(.in){opacity:0}
.anim [data-reveal=up]:not(.in){transform:translateY(28px)}
.anim [data-reveal=side]:not(.in){transform:translateX(calc(var(--dx)*-36px))}      /* enters from the start side */
.anim [data-reveal=side-end]:not(.in){transform:translateX(calc(var(--dx)*36px))}   /* enters from the end side */
.anim [data-reveal=wipe]{clip-path:inset(-30px)}
.anim [data-reveal=wipe]:not(.in){clip-path:var(--clip-from);opacity:1;transform:scale(1.07)}

/* section title underline draws itself */
.anim .title::after{transition:transform .9s var(--ease) .25s}
.anim .title[data-reveal]:not(.in)::after{transform:scaleX(0)}

/* small details that settle with their parent */
.anim .card .icon-box{transition:scale .7s var(--ease) calc(var(--d,0ms) + .2s),rotate .7s var(--ease) calc(var(--d,0ms) + .2s)}
.anim .card[data-reveal]:not(.in) .icon-box{scale:.55;rotate:-14deg}

.anim .why-list .ico{transition:scale .6s var(--ease) calc(var(--d,0ms) + .25s)}
.anim .why-list li[data-reveal]:not(.in) .ico{scale:0}

.anim .step .num{transition:scale .6s var(--ease) calc(var(--d,0ms) + .2s)}
.anim .step[data-reveal]:not(.in) .num{scale:0}

/* parallax targets (set by JS) */
[data-speed]{translate:0 var(--ty,0px)}

@media (max-width:700px){
  .anim [data-reveal=up]:not(.in){transform:translateY(18px)}
  .anim [data-reveal=side]:not(.in),.anim [data-reveal=side-end]:not(.in){transform:translateY(18px)}
}