/* ==========================================================================
   NANDNEE SITE LOADER (Lottie)
   Full-screen brand loader shown while the page boots.
   Markup: .nd-loader with #ndLoaderArt + #ndLoaderFill
   ========================================================================== */

.nd-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(46% 42% at 74% 20%, rgba(2, 132, 199, 0.28) 0%, transparent 70%),
    radial-gradient(44% 40% at 20% 82%, rgba(16, 185, 129, 0.22) 0%, transparent 72%),
    linear-gradient(160deg, #081b20 0%, #0e2c33 100%);
  opacity: 1;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.nd-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(560px) rotateX(64deg) scale(1.9);
  transform-origin: 50% 100%;
  mask-image: radial-gradient(60% 55% at 50% 100%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(60% 55% at 50% 100%, #000 0%, transparent 78%);
  animation: ndLoaderGridRun 5.5s linear infinite;
  pointer-events: none;
}

@keyframes ndLoaderGridRun {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 64px, 64px 0; }
}

.nd-loader-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  padding: 2rem;
  text-align: center;
}

.nd-loader-art {
  width: clamp(140px, 22vw, 200px);
  height: clamp(140px, 22vw, 200px);
  filter: drop-shadow(0 18px 34px rgba(16, 185, 129, 0.28));
}

.nd-loader-art svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Fallback mark shown only if lottie-web cannot load */
.nd-loader-mark {
  display: none;
  width: 92px;
  height: 92px;
  border-radius: 26px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display, Georgia, serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: #06241d;
  background: linear-gradient(135deg, #34d399, #0284c7);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.32);
}

.nd-loader.no-lottie .nd-loader-art {
  display: none;
}

.nd-loader.no-lottie .nd-loader-mark {
  display: flex;
  animation: ndLoaderPulse 1.6s ease-in-out infinite;
}

@keyframes ndLoaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.nd-loader-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.nd-loader-name {
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: #ffffff;
}

.nd-loader-tag {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #34d399;
}

.nd-loader-bar {
  width: min(260px, 62vw);
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.nd-loader-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #0284c7);
  transition: width 0.35s ease;
}

.nd-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nd-loader.is-done .nd-loader-inner {
  transform: scale(0.94);
  transition: transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .nd-loader::before,
  .nd-loader.no-lottie .nd-loader-mark {
    animation: none !important;
  }
}