/* ==========================================================================
   ANIMATED PRELOADER  (index.php  ->  <div class="mjl" id="mjLoader">)

   SEO / performance rules this file follows:
   - Pure CSS timeline. The loader hides itself even if JavaScript is slow or
     blocked, so it can never trap a visitor or a crawler behind it.
   - It is a fixed overlay only: no page content is hidden, moved or removed,
     so there is no layout shift (CLS) and the real page is fully in the HTML.
   - Whole run is about 2.2 s; shown once per browser session (see index.php).
   - Switched off for "reduce motion" visitors and when JavaScript is off.
   - aria-hidden in the markup: screen readers and search engines read the
     real page, not the loader.
   ========================================================================== */

/* the old page-wide scroll lock must never depend on JavaScript */
body.is-loading{overflow:visible}

.mjl{
  position:fixed;inset:0;z-index:2147483600;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;color:#562b2b;
  /* self-destruct: stop blocking clicks early, then hide completely */
  animation:mjlNoClick .01s linear 1.6s forwards,mjlGone .01s linear 2.3s forwards;
}
.no-loader .mjl{display:none}

/* ---------- curtain panels (they open like a stage curtain) ---------- */
.mjl-p{
  position:absolute;left:0;right:0;height:50.5%;background:#f2eee8;
  will-change:transform;
}
.mjl-p1{top:0;animation:mjlUp .75s cubic-bezier(.77,0,.18,1) 1.55s forwards}
.mjl-p2{bottom:0;animation:mjlDown .75s cubic-bezier(.77,0,.18,1) 1.55s forwards}

/* soft light behind the logo */
.mjl-glow{
  position:absolute;left:50%;top:46%;width:min(640px,120vw);aspect-ratio:1;
  transform:translate(-50%,-50%);border-radius:50%;
  background:radial-gradient(circle,rgba(212,121,63,.22) 0%,rgba(212,121,63,.06) 40%,transparent 68%);
  animation:mjlGlow 2.4s ease-in-out both,mjlFade .4s ease 1.5s forwards;
}
/* faint moving light streak */
.mjl-streak{
  position:absolute;top:0;bottom:0;left:-40%;width:30%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.06),transparent);
  transform:skewX(-18deg);
  animation:mjlStreak 1.6s ease-in-out .2s 1 both;
}

/* ---------- centre content ---------- */
.mjl-in{
  position:relative;text-align:center;padding:20px;
  animation:mjlLeave .45s cubic-bezier(.4,0,.2,1) 1.45s forwards;
}
.mjl-mark{width:clamp(120px,32vw,160px);height:auto;display:block;margin:0 auto 22px;overflow:visible}

/* rings */
.mjl-ring-bg{fill:none;stroke:rgba(242,165,107,.2);stroke-width:1.5}
.mjl-ring{
  fill:none;stroke:#562b2b;stroke-width:2;stroke-linecap:round;
  stroke-dasharray:428;stroke-dashoffset:428;
  transform:rotate(-90deg);transform-origin:80px 80px;
  animation:mjlDraw 1.1s cubic-bezier(.65,0,.35,1) .1s forwards;
}
.mjl-orbit{
  fill:none;stroke:rgba(242,165,107,.55);stroke-width:1;stroke-dasharray:1.5 7;stroke-linecap:round;
  transform-origin:80px 80px;
  animation:mjlSpin 9s linear infinite,mjlFadeIn .6s ease .1s both;
}

/* skyline: towers grow up from the ground, one after another */
.mjl-b{
  fill:url(#mjlG);
  transform-box:fill-box;transform-origin:50% 100%;
  transform:scaleY(0);
  animation:mjlRise .7s cubic-bezier(.22,1.2,.36,1) forwards;
}
.mjl-b:nth-of-type(1){animation-delay:.35s}
.mjl-b:nth-of-type(2){animation-delay:.45s}
.mjl-b:nth-of-type(3){animation-delay:.55s}
.mjl-b:nth-of-type(4){animation-delay:.65s}
.mjl-b:nth-of-type(5){animation-delay:.75s}
.mjl-ground{
  stroke:#562b2b;stroke-width:1.5;stroke-linecap:round;
  stroke-dasharray:110;stroke-dashoffset:110;
  animation:mjlLine .6s ease .3s forwards;
}
.mjl-spire{
  stroke:#562b2b;stroke-width:1.5;stroke-linecap:round;
  stroke-dasharray:14;stroke-dashoffset:14;
  animation:mjlLine .4s ease 1.05s forwards;
}
.mjl-beacon{fill:#3a2525;opacity:0;animation:mjlBlink 1s ease-in-out 1.3s infinite}
/* windows light up */
.mjl-w{
  fill:#0b2a32;opacity:0;
  animation:mjlWin .35s ease calc(1s + var(--i,0) * .045s) forwards;
}

/* text */
.mjl-name{
  font-family:'Playfair Display',Georgia,serif;font-weight:600;
  font-size:clamp(22px,4.4vw,34px);letter-spacing:.34em;padding-left:.34em;
  animation:mjlName 1s cubic-bezier(.22,.8,.2,1) .6s both;
}
.mjl-sub{
  font-size:11px;letter-spacing:.3em;text-transform:uppercase;color:#562b2b;margin-top:8px;
  animation:mjlUpIn .8s cubic-bezier(.22,.8,.2,1) .9s both;
}
.mjl-sub i{font-style:normal;font-size:8px;margin:0 8px}

/* progress bar */
.mjl-bar{
  position:relative;width:min(240px,60vw);height:2px;margin:26px auto 0;
  background:rgba(255,255,255,.12);overflow:hidden;
  animation:mjlUpIn .6s ease .5s both;
}
.mjl-bar b{
  position:absolute;inset:0;transform-origin:left;transform:scaleX(0);
  background:linear-gradient(90deg,#562b2b,#562b2b,#fff);
  animation:mjlBar 1.15s cubic-bezier(.65,0,.35,1) .35s forwards;
}

/* ---------- keyframes ---------- */
@keyframes mjlDraw{to{stroke-dashoffset:0}}
@keyframes mjlSpin{to{transform:rotate(360deg)}}
@keyframes mjlRise{to{transform:scaleY(1)}}
@keyframes mjlLine{to{stroke-dashoffset:0}}
@keyframes mjlWin{from{opacity:0}to{opacity:.85}}
@keyframes mjlBlink{0%,100%{opacity:0}50%{opacity:1}}
@keyframes mjlName{
  from{opacity:0;letter-spacing:.75em;filter:blur(6px)}
  to{opacity:1;letter-spacing:.34em;filter:blur(0)}
}
@keyframes mjlUpIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes mjlFadeIn{from{opacity:0}to{opacity:1}}
@keyframes mjlFade{to{opacity:0}}
@keyframes mjlBar{to{transform:scaleX(1)}}
@keyframes mjlGlow{0%{opacity:0;transform:translate(-50%,-50%) scale(.7)}60%{opacity:1}100%{opacity:1;transform:translate(-50%,-50%) scale(1.05)}}
@keyframes mjlStreak{from{left:-40%}to{left:120%}}
@keyframes mjlLeave{to{opacity:0;transform:scale(1.08)}}
@keyframes mjlUp{to{transform:translateY(-101%)}}
@keyframes mjlDown{to{transform:translateY(101%)}}
@keyframes mjlNoClick{to{pointer-events:none}}
@keyframes mjlGone{to{visibility:hidden}}

/* ---------- no preloader for reduced-motion visitors ---------- */
@media (prefers-reduced-motion:reduce){
  .mjl{display:none}
}
