/* RJ Industrial Solution - brand preloader.
   Active only while <html> has .rj-preloading (set by the inline snippet in includes/header.php
   on every page load). Everything animates with transform / opacity (plus one SVG stroke). */
.rj-preloader{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;background:#fff;
 opacity:1;overscroll-behavior:none;touch-action:none;transition:opacity .65s ease}
html.rj-preloading #rj-preloader,#rj-preloader.rj-hide{display:flex}
#rj-preloader.rj-hide{opacity:0;visibility:hidden;pointer-events:none}
.rj-lockup{display:flex;align-items:center;justify-content:center;gap:clamp(10px,2vw,30px);max-width:94vw;
 transition:transform .65s cubic-bezier(.4,0,.2,1)}
.rj-hide .rj-lockup{transform:scale(1.06)}
.rj-stage{--h:clamp(120px,28vh,240px);position:relative;flex:none;height:var(--h);width:calc(var(--h)*.6998)}
/* company wordmark: wipes in from left to right beside the logo */
.rj-word{display:block;flex:0 1 auto;width:clamp(190px,50vw,620px);height:auto;min-width:0;opacity:0;clip-path:inset(0 100% 0 0);
 animation:rj-wipe 1.2s cubic-bezier(.65,0,.35,1) 1.3s forwards}
@keyframes rj-wipe{from{opacity:0;transform:translateX(-16px);clip-path:inset(0 100% 0 0)}15%{opacity:1}to{opacity:1;transform:none;clip-path:inset(0 0 0 0)}}
@media (max-width:520px){.rj-stage{--h:clamp(100px,22vh,200px)}.rj-word{width:56vw}.rj-lockup{gap:10px}}
.rj-logo,.rj-glow{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.rj-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.rj-b{fill:#039FEE}.rj-r{fill:#EA1320}

/* 1. outer circles: drawn along the arc (the mask stroke reveals the exact logo shapes) */
.rj-draw{fill:none;stroke:#fff;stroke-width:110;stroke-dasharray:1 2;stroke-dashoffset:1}
.rj-draw-l,.rj-draw-r{animation:rj-draw .95s cubic-bezier(.65,0,.35,1) .12s forwards}
.rj-draw-c{stroke-width:60;animation:rj-draw .8s cubic-bezier(.45,0,.2,1) .45s forwards}
@keyframes rj-draw{to{stroke-dashoffset:0}}

/* 2. centre circle: rotate + scale-up reveal */
.rj-ring{transform-box:fill-box;transform-origin:50% 50%;opacity:0;animation:rj-ring .85s cubic-bezier(.22,1,.36,1) .45s forwards}
@keyframes rj-ring{from{opacity:0;transform:rotate(-200deg) scale(.2)}35%{opacity:1}to{opacity:1;transform:none}}

/* 3. human-inspired shapes: subtle upward reveal */
.rj-body{opacity:0;animation:rj-rise .7s cubic-bezier(.22,1,.36,1) forwards}
.rj-body-l{animation-delay:.95s}.rj-body-r{animation-delay:1.05s}
@keyframes rj-rise{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}

/* 4. RJ lettering: fade + upward */
.rj-letter{opacity:0;animation:rj-up .6s cubic-bezier(.22,1,.36,1) forwards}
.rj-letter-r{animation-delay:1.45s}.rj-letter-j{animation-delay:1.58s}
@keyframes rj-up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* 5. completed logo: very subtle glow + pulse */
.rj-glow{opacity:0;filter:blur(16px);will-change:opacity,transform;animation:rj-glow 2.6s ease-in-out 1.9s infinite}
@keyframes rj-glow{0%,100%{opacity:0;transform:scale(1)}50%{opacity:.2;transform:scale(1.03)}}
.rj-logo{transform-origin:50% 50%;animation:rj-pulse 2.6s ease-in-out 2.2s infinite}
@keyframes rj-pulse{50%{transform:scale(1.015)}}

/* hold the website's own entrance animations until the preloader lifts */
html.rj-preloading body>*:not(.rj-preloader),
html.rj-preloading body>*:not(.rj-preloader) *,
html.rj-preloading body>*:not(.rj-preloader) *::before,
html.rj-preloading body>*:not(.rj-preloader) *::after{animation-play-state:paused!important}

/* reduced motion: show the finished logo with a plain fade */
@media (prefers-reduced-motion:reduce){
 .rj-draw{animation:none;stroke-dashoffset:0}
 .rj-ring,.rj-body,.rj-letter{animation:none;opacity:1;transform:none}
 .rj-word{animation:none;opacity:1;clip-path:none;transform:none}
 .rj-logo,.rj-glow{animation:none}.rj-glow{display:none}
 .rj-lockup{animation:rj-fade .4s ease both}
 .rj-preloader{transition-duration:.3s}.rj-hide .rj-lockup{transform:none}
}
@keyframes rj-fade{from{opacity:0}}
