/* =========================================================
   BEN OLA SARL — motion
   Everything here is progressive: without JavaScript, or with
   "reduce motion" enabled, content is shown in its final state.
========================================================= */

/* French visitors: hide the page for a few ms while fr.json is applied (no flash of English) */
.i18n-wait body{visibility:hidden}

/* text swap when the language changes */
@keyframes lang-swap{from{opacity:.25}to{opacity:1}}
.lang-switching main,.lang-switching .footer,.lang-switching .nav{animation:lang-swap .28s ease-out}

/* ---------- hero: one orchestrated entrance on page load ---------- */
@keyframes rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes chevron-in{from{opacity:0;transform:translateX(90px)}to{opacity:1;transform:none}}
@keyframes chevron-back{from{opacity:0;transform:translateX(120px)}to{opacity:1;transform:translateX(-34px)}}
.js .hero__text>*{opacity:0;animation:rise .7s var(--ease) forwards}
.js .hero__text>:nth-child(1){animation-delay:.05s}
.js .hero__text>:nth-child(2){animation-delay:.14s}
.js .hero__text>:nth-child(3){animation-delay:.23s}
.js .hero__text>:nth-child(4){animation-delay:.32s}
.js .hero__text>:nth-child(5){animation-delay:.41s}
.js .hero__media img{opacity:0;animation:chevron-in .9s var(--ease) .15s forwards}
.js .hero__media::before{opacity:0;animation:chevron-back 1s var(--ease) .3s forwards}

/* ---------- scroll reveal ---------- */
.js [data-reveal],.js [data-reveal-group]>*{opacity:0;transform:translateY(26px);transition:opacity .7s var(--ease),transform .7s var(--ease);transition-delay:calc(var(--i,0) * 70ms)}
.js [data-reveal].is-in,.js [data-reveal-group].is-in>*{opacity:1;transform:none}
.js .split__media[data-reveal]{transform:translateX(-30px)}
.js .split--rev .split__media[data-reveal]{transform:translateX(30px)}
.js .split__media[data-reveal].is-in{transform:none}

/* ---------- pipeline: the line draws itself, nodes light up in order ---------- */
.pipe__step:nth-child(1){--i:0}.pipe__step:nth-child(2){--i:1}.pipe__step:nth-child(3){--i:2}.pipe__step:nth-child(4){--i:3}
.pipe__step:nth-child(5){--i:4}.pipe__step:nth-child(6){--i:5}.pipe__step:nth-child(7){--i:6}.pipe__step:nth-child(8){--i:7}
.js [data-pipe] .pipe__step::before{transform:scaleX(0);transition:transform .32s linear;transition-delay:calc(var(--i) * .22s + .12s)}
.js [data-pipe] .pipe__node{transform:scale(0);transition:transform .35s cubic-bezier(.3,1.6,.5,1);transition-delay:calc(var(--i) * .22s)}
.js [data-pipe] .pipe__n,.js [data-pipe] .pipe__name,.js [data-pipe] .pipe__desc{opacity:0;transform:translateY(8px);transition:opacity .4s,transform .4s;transition-delay:calc(var(--i) * .22s + .06s)}
.js [data-pipe].is-live .pipe__step::before{transform:scaleX(1)}
.js [data-pipe].is-live .pipe__node{transform:scale(1)}
.js [data-pipe].is-live .pipe__n,.js [data-pipe].is-live .pipe__name,.js [data-pipe].is-live .pipe__desc{opacity:1;transform:none}
@keyframes node-pulse{0%{box-shadow:0 0 0 4px var(--paper),0 0 0 4px rgba(245,179,27,.6)}100%{box-shadow:0 0 0 4px var(--paper),0 0 0 16px rgba(245,179,27,0)}}
.js [data-pipe].is-live .pipe__step:last-child .pipe__node{animation:node-pulse 1.8s ease-out 2.2s 3}

/* ---------- small interactions ---------- */
.fab--top{animation:rise .3s var(--ease)}
@keyframes status-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.form__status:not(:empty){animation:status-in .3s var(--ease)}
@keyframes menu-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}
  .js [data-reveal],.js [data-reveal-group]>*,.js .split__media[data-reveal],.js [data-pipe] .pipe__n,.js [data-pipe] .pipe__name,.js [data-pipe] .pipe__desc,.js .hero__text>*,.js .hero__media img{opacity:1;transform:none}
  .js [data-pipe] .pipe__step::before{transform:scaleX(1)}
  .js [data-pipe] .pipe__node{transform:scale(1)}
  .js .hero__media::before{opacity:1;transform:translateX(-34px)}
}
