/* ============================================================
   WayGo — Loading Screen
   Branded preloader · fades out when page is ready
   ============================================================ */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep, #070708);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Brand mark */
.loading-mark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(13, 148, 136, 0.4), 0 0 80px rgba(13, 148, 136, 0.15);
  animation: loading-pulse 1.8s ease-in-out infinite;
}

.loading-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes loading-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(13, 148, 136, 0.3), 0 0 60px rgba(13, 148, 136, 0.1);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 50px rgba(13, 148, 136, 0.5), 0 0 100px rgba(13, 148, 136, 0.2);
  }
}

.loading-mark-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

/* Text */
.loading-text {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary, #A1A1AA);
  letter-spacing: 0.04em;
  animation: loading-fade-text 1.8s ease-in-out infinite;
}

@keyframes loading-fade-text {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Dots */
.loading-dots {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.loading-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-teal-light, #14B8A6);
  animation: loading-dot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dot {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .loading-screen {
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }

  .loading-mark,
  .loading-text,
  .loading-dots span {
    animation: none;
  }
}
