/*
 * iFynx loader: the iFynx intro (Lottie, lottie/ifynx-intro.json) plays while the page loads,
 * then the screen opens in shutters. If the intro can't load, the static logo sweeps in instead.
 * Shown once per visit (html.ifx-loading is set by the inline head script).
 */
.ifx-loader{display:none}
.ifx-loading,.ifx-loading body{overflow:hidden}
.ifx-loading .ifx-loader{display:block;position:fixed;inset:0;z-index:100000;pointer-events:none;color:#fff;
  font-family:'Archivo',system-ui,sans-serif;
  /* failsafe: never block the page, even if the script never runs */
  animation:ifxFailsafe 0s linear 7s forwards}
/* the hero waits for the loader before it animates in */
.ifx-loading .hi{animation-play-state:paused}

/* shutters: six black columns that form the background, then slide away */
.ifx-shutters{position:absolute;inset:0;display:flex}
.ifx-shutters i{flex:1 1 0;background:#000;margin-right:-1px;transition:transform .9s cubic-bezier(.76,0,.24,1)}
.ifx-shutters i:nth-child(odd){transform-origin:top}
.ifx-done .ifx-shutters i:nth-child(odd){transform:translateY(-101%)}
.ifx-done .ifx-shutters i:nth-child(even){transform:translateY(101%)}
.ifx-done .ifx-shutters i:nth-child(1),.ifx-done .ifx-shutters i:nth-child(6){transition-delay:.24s}
.ifx-done .ifx-shutters i:nth-child(2),.ifx-done .ifx-shutters i:nth-child(5){transition-delay:.12s}

/* faint grid + rotating green glow */
.ifx-grid{position:absolute;inset:0;opacity:.5;
  background-image:linear-gradient(rgba(255,255,255,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px);
  background-size:72px 72px;background-position:center;
  -webkit-mask-image:radial-gradient(closest-side,#000 30%,transparent);mask-image:radial-gradient(closest-side,#000 30%,transparent)}
.ifx-glow{position:absolute;left:50%;top:50%;width:min(560px,90vw);aspect-ratio:1;translate:-50% -50%;border-radius:50%;
  background:conic-gradient(from 0deg,rgba(44,230,140,.0),rgba(44,230,140,.35),rgba(44,230,140,.05),rgba(44,230,140,.28),rgba(44,230,140,0));
  filter:blur(60px);animation:ifxSpin 6s linear infinite,ifxBreathe 2.4s ease-in-out infinite alternate}
.ifx-done .ifx-grid,.ifx-done .ifx-glow{opacity:0;transition:opacity .35s ease}

/* centre stack */
.ifx-center{position:absolute;left:50%;top:50%;translate:-50% -50%;display:flex;flex-direction:column;align-items:center;gap:28px;
  transition:opacity .35s ease,scale .5s cubic-bezier(.76,0,.24,1)}
.ifx-done .ifx-center{opacity:0;scale:1.08}

/* the intro animation: a 16:9 stage, the logo fills about two thirds of its width */
.ifx-intro{width:min(680px,94vw);aspect-ratio:16/9}
.ifx-intro svg{display:block;width:100%;height:100%}
.ifx-intro-failed .ifx-intro{display:none}

/* fallback logo (only if the intro fails): a light sweep reveals it, then a sheen passes over */
.ifx-logo{display:none}
.ifx-intro-failed .ifx-logo{display:block;position:relative;overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,#000 40%,transparent 60%);mask-image:linear-gradient(90deg,#000 40%,transparent 60%);
  -webkit-mask-size:260% 100%;mask-size:260% 100%;-webkit-mask-position:100% 0;mask-position:100% 0;
  animation:ifxReveal 1.1s cubic-bezier(.2,.7,.2,1) .1s forwards;filter:drop-shadow(0 0 18px rgba(44,230,140,.35))}
.ifx-logo:has(> .x){width:136.73px;height:38.56px}
.ifx-logo img{display:block;height:56px;width:auto}
.ifx-logo::after{content:"";position:absolute;inset:-20%;background:linear-gradient(100deg,transparent 35%,rgba(255,255,255,.75) 50%,transparent 65%);
  translate:-120% 0;animation:ifxSheen 1.2s ease-in-out 1s forwards;mix-blend-mode:overlay}
[lang="ar"] .ifx-logo{-webkit-mask-image:linear-gradient(270deg,#000 40%,transparent 60%);mask-image:linear-gradient(270deg,#000 40%,transparent 60%)}

@keyframes ifxReveal{to{-webkit-mask-position:0 0;mask-position:0 0}}
@keyframes ifxSheen{to{translate:120% 0}}
@keyframes ifxSpin{to{rotate:360deg}}
@keyframes ifxBreathe{from{opacity:.55;scale:.9}to{opacity:1;scale:1.05}}
@keyframes ifxFailsafe{to{visibility:hidden}}
