html.itm-loader-boot,
html.itm-loader-active,
html.itm-loader-active body {
  overflow: hidden;
}

.itm-page-shell {
  opacity: 1;
  transform: none;
}

html.itm-loader-boot .itm-page-shell {
  opacity: 0;
  transform: translateY(24px);
}

.itm-loader {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  --itm-loader-aperture: 0px;
  --itm-loader-ring-scale: 1;
  -webkit-mask-image: radial-gradient(circle at center, transparent var(--itm-loader-aperture), #000 calc(var(--itm-loader-aperture) + 2px));
  mask-image: radial-gradient(circle at center, transparent var(--itm-loader-aperture), #000 calc(var(--itm-loader-aperture) + 2px));
}

html.itm-loader-boot .itm-loader,
html.itm-loader-active .itm-loader {
  opacity: 1;
  visibility: visible;
}

.itm-loader::before,
.itm-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.itm-loader::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity: 0.12;
}

.itm-loader::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: screen;
}

.itm-loader__timecode {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 4;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.itm-loader__ambient {
  position: absolute;
  width: min(58vw, 620px);
  height: min(58vw, 620px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 16, 16, 0.22) 0%, rgba(255, 16, 16, 0.1) 26%, rgba(255, 16, 16, 0.03) 48%, transparent 72%);
  opacity: 0.8;
  filter: blur(18px);
  pointer-events: none;
}

.itm-loader__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.itm-loader__particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 16, 16, 0.55);
  box-shadow: 0 0 8px rgba(255, 16, 16, 0.2);
  animation: itmLoaderDust 8s linear infinite;
  opacity: 0.35;
}

.itm-loader__particle:nth-child(odd) {
  animation-duration: 11s;
}

.itm-loader__particle:nth-child(1) { top: 16%; left: 18%; animation-delay: -1.2s; }
.itm-loader__particle:nth-child(2) { top: 28%; left: 82%; animation-delay: -3.1s; }
.itm-loader__particle:nth-child(3) { top: 70%; left: 14%; animation-delay: -5.3s; }
.itm-loader__particle:nth-child(4) { top: 22%; left: 64%; animation-delay: -2.2s; }
.itm-loader__particle:nth-child(5) { top: 78%; left: 74%; animation-delay: -6.4s; }
.itm-loader__particle:nth-child(6) { top: 62%; left: 46%; animation-delay: -4.4s; }
.itm-loader__particle:nth-child(7) { top: 36%; left: 10%; animation-delay: -7.1s; }
.itm-loader__particle:nth-child(8) { top: 42%; left: 88%; animation-delay: -1.8s; }
.itm-loader__particle:nth-child(9) { top: 54%; left: 22%; animation-delay: -2.9s; }
.itm-loader__particle:nth-child(10) { top: 84%; left: 56%; animation-delay: -5.6s; }
.itm-loader__particle:nth-child(11) { top: 14%; left: 52%; animation-delay: -4.7s; }
.itm-loader__particle:nth-child(12) { top: 88%; left: 34%; animation-delay: -8.1s; }
.itm-loader__particle:nth-child(13) { top: 32%; left: 38%; animation-delay: -1.4s; }
.itm-loader__particle:nth-child(14) { top: 58%; left: 78%; animation-delay: -6.9s; }
.itm-loader__particle:nth-child(15) { top: 46%; left: 58%; animation-delay: -3.7s; }
.itm-loader__particle:nth-child(16) { top: 68%; left: 90%; animation-delay: -7.8s; }

.itm-loader__inner {
  position: relative;
  z-index: 2;
  width: min(92vw, 980px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  padding: 56px 20px 120px;
}

.itm-loader__beam-wrap {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(78vw, 780px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.itm-loader__beam {
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 16, 16, 0.95), transparent);
  box-shadow: 0 0 20px rgba(255, 16, 16, 0.35);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
}

.itm-loader__beam-pulse {
  width: 100%;
  height: 26px;
  margin-top: -14px;
  background: radial-gradient(circle at center, rgba(255, 16, 16, 0.22), transparent 68%);
  opacity: 0;
  transform: scaleX(0.25);
  filter: blur(10px);
}

.itm-loader__stage {
  position: relative;
  width: min(72vw, 460px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(var(--itm-loader-ring-scale));
}

.itm-loader__rings {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.itm-loader__ring {
  fill: none;
  stroke: #ff1010;
  stroke-width: 1.35;
  opacity: 0.92;
  transform-origin: 210px 210px;
}

.itm-loader__ring-highlight {
  fill: none;
  stroke: rgba(255, 16, 16, 0.95);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-dasharray: 44 1180;
  opacity: 0.8;
}

.itm-loader__logo-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.itm-loader__logo-core,
.itm-loader__logo-full {
  position: absolute;
  width: clamp(180px, 24vw, 320px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  max-width: 100%;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(255, 16, 16, 0.18));
}

.itm-loader__logo-core {
  clip-path: inset(0 38% 0 38%);
  opacity: 0;
  transform: scaleY(0.15);
  transform-origin: center;
}

.itm-loader__logo-full {
  opacity: 0;
  clip-path: inset(0 50% 0 50%);
}

.itm-loader__scan {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(180px, 24vw, 320px);
  height: 72%;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), rgba(255, 16, 16, 0.18), transparent);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.itm-loader__services {
  position: relative;
  width: min(86vw, 460px);
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.itm-loader__service-line {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 1px;
  background: rgba(255, 16, 16, 0.9);
  transform: translate(-50%, -50%);
  opacity: 0.75;
}

.itm-loader__service-item {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 16px));
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
}

.itm-loader__progress {
  position: absolute;
  left: 50%;
  bottom: 38px;
  z-index: 3;
  width: min(88vw, 620px);
  transform: translateX(-50%);
}

.itm-loader__progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.itm-loader__progress-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.itm-loader__progress-value {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.itm-loader__progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}

.itm-loader__progress-fill {
  width: 100%;
  height: 100%;
  background: #ff1010;
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: 0 0 14px rgba(255, 16, 16, 0.35);
}

.itm-loader__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes itmLoaderDust {
  0% {
    transform: translate3d(0, 0, 0) scale(0.8);
  }
  50% {
    transform: translate3d(10px, -18px, 0) scale(1.2);
  }
  100% {
    transform: translate3d(-6px, -34px, 0) scale(0.85);
  }
}

@media (max-width: 991px) {
  .itm-loader__stage {
    width: min(78vw, 390px);
  }

  .itm-loader__timecode {
    top: 18px;
    left: 18px;
  }
}

@media (max-width: 767px) {
  .itm-loader__inner {
    gap: 22px;
    padding: 48px 16px 110px;
  }

  .itm-loader__stage {
    width: min(82vw, 320px);
  }

  .itm-loader__logo-core,
  .itm-loader__logo-full,
  .itm-loader__scan {
    width: clamp(180px, 52vw, 230px);
  }

  .itm-loader__service-item {
    font-size: 9px;
    letter-spacing: 0.22em;
  }

  .itm-loader__progress {
    bottom: 26px;
  }

  .itm-loader__progress-value {
    font-size: 14px;
  }

  .itm-loader__particle:nth-child(n + 13) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .itm-loader__particle,
  .itm-loader__ring,
  .itm-loader__ring-highlight {
    animation: none !important;
  }
}

/* Simple Spinner Style (Used for page changes) */
.itm-loader__spinner-wrap {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.itm-loader__spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top-color: #ff1010;
  border-radius: 50%;
  animation: itmSpin 1s linear infinite;
}

@keyframes itmSpin {
  to { transform: rotate(360deg); }
}

/* Simple transition overrides to prevent hologram flashing */
html.itm-loader-simple .itm-loader__timecode,
html.itm-loader-simple .itm-loader__beam-wrap,
html.itm-loader-simple .itm-loader__inner,
html.itm-loader-simple .itm-loader__progress,
html.itm-loader-simple .itm-loader__particles {
  display: none !important;
}

html.itm-loader-simple .itm-loader__spinner-wrap {
  display: flex !important;
}
