/* ═══════════════════════════════════════════════════════
   LOADER — Premium Construction Loading Screen
   ═══════════════════════════════════════════════════════ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(120, 140, 255, 0.15), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 100, 180, 0.08), transparent 45%),
    #030304;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

#loader::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 120deg, transparent 0deg, rgba(255, 255, 255, 0.04) 60deg, transparent 120deg);
  animation: loader-spin 14s linear infinite;
  pointer-events: none;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 320px;
}

/* Premium Vector Crane SVG Styles */
.loader-vector {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px auto;
  display: block;
}

.loader-brand {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.55) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loader-tagline {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.loader-pct-wrap {
  font-variant-numeric: tabular-nums;
  font-size: clamp(3rem, 14vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 20px;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.12);
}

.loader-pct-num {
  color: #fff;
}

.loader-pct-suffix {
  font-size: 0.45em;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 2px;
}

#loader-bar-wrap {
  width: min(280px, 85vw);
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#loader-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), #fff);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.35);
  transition: width 0.12s ease-out;
}

.loader-caption {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}

.loader-dots {
  display: inline-flex;
  gap: 4px;
  margin-top: 20px;
  justify-content: center;
}

.loader-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: loader-dot 1.2s ease-in-out infinite;
}

.loader-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.loader-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes loader-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }

  40% {
    opacity: 1;
    transform: scale(1.15);
  }
}
