/* ===============================
   EXTION INFOTECH — SITE LOADER
   Add this to site.css or link separately
================================ */

#extion-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* iOS Safari fix — inset alone doesn't always work */
  width: 100%;
  height: 100%;
  height: 100dvh; /* dynamic viewport on mobile */
  z-index: 99999;
  background: #060a14;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: all;
  -webkit-overflow-scrolling: none;
}

/* ── Grid background ── */
#extion-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(119, 21, 161, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 21, 161, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: loaderGridPulse 3s ease-in-out infinite alternate;
}

@keyframes loaderGridPulse {
  from { opacity: 0.4; }
  to   { opacity: 1;   }
}

/* ── Glow orbs ── */
.loader-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.loader-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(119,21,161,0.45), transparent 70%);
  top: -150px; left: -150px;
}
.loader-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(59,130,246,0.3), transparent 70%);
  bottom: -100px; right: -100px;
}
.loader-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(161,21,119,0.25), transparent 70%);
  top: 40%; left: 60%;
}

/* ── Center stage ── */
.loader-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Logo mark ── */
.loader-logomark {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  position: relative;
}
.loader-logomark svg {
  width: 100%;
  height: 100%;
}

/* ── Brand name ── */
.loader-brand {
  display: flex;
  gap: 0;
  align-items: baseline;
  overflow: hidden;
}
.loader-brand-char {
  display: inline-block;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}
.loader-brand-char.accent {
  color: #7715A1;
}
.loader-brand-space {
  display: inline-block;
  width: 0.35em;
}

/* ── Tagline ── */
.loader-tagline {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(11px, 1.5vw, 14px);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 14px;
  opacity: 0;
  transform: translateY(12px);
}

/* ── EVOLVE-4 pills ── */
.loader-pillars {
  display: flex;
  gap: 10px;
  margin-top: 36px;
}
.loader-pill {
  padding: 5px 18px;
  border: 1px solid rgba(119,21,161,0.5);
  border-radius: 100px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  opacity: 0;
  transform: scale(0.85) translateY(10px);
  background: rgba(119,21,161,0.08);
  backdrop-filter: blur(4px);
}

/* ── Progress bar ── */
.loader-progress-wrap {
  width: clamp(180px, 30vw, 320px);
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 40px;
  overflow: hidden;
}
.loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7715A1, #b44fe0, #4f8ef7);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(119,21,161,0.8);
}

/* ── Percentage ── */
.loader-pct {
  font-family: 'Segoe UI', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
  margin-top: 10px;
  opacity: 0;
}

/* ── Scanline shimmer ── */
#extion-loader::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(119,21,161,0.04) 50%,
    transparent
  );
  animation: scanline 4s linear infinite;
  pointer-events: none;
}
@keyframes scanline {
  from { top: -60%; }
  to   { top: 100%;  }
}

/* ── Exit transition ── */
#extion-loader.loader-exit {
  pointer-events: none;
}
