/* Полноэкранная загрузка — Дорожный Альянс */
html.is-loading,
html.is-loading body {
  overflow: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #0a2818 0%, #0f3d25 42%, #1b5e3a 100%);
  transition: opacity 0.55s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    visibility 0.55s;
}

.site-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(201, 162, 39, 0.18), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.04), transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.05), transparent 35%);
  pointer-events: none;
}

.site-loader--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(92vw, 560px);
  padding: 2rem 1.25rem 3rem;
}

.site-loader__logo {
  width: clamp(140px, 28vw, 220px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.35));
  animation: loader-logo-in 0.9s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.site-loader__title {
  margin: 1.25rem 0 0.35rem;
  font-family: var(--font, "Inter", system-ui, sans-serif);
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-align: center;
  animation: loader-logo-in 0.9s 0.1s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.site-loader__subtitle {
  margin: 0 0 2.5rem;
  font-family: var(--font, "Inter", system-ui, sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  animation: loader-logo-in 0.9s 0.18s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

@keyframes loader-logo-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Дорожка прогресса */
.site-loader__track {
  position: relative;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
  overflow: visible;
}

.site-loader__track-rail {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.site-loader__progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a227 0%, #dbb42e 55%, #f0d060 100%);
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.45);
  transition: width 0.05s linear;
}

.site-loader__finish {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dbb42e, #c9a227);
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.25);
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.35s, scale 0.35s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.site-loader--complete .site-loader__finish {
  opacity: 1;
  scale: 1;
}

.site-loader__percent {
  margin-top: 1rem;
  font-family: var(--font, "Inter", system-ui, sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .site-loader__logo,
  .site-loader__title,
  .site-loader__subtitle {
    animation: none;
  }
}
