/* ============================================================
   YAGO'S — Loader  (Shimmer Edition)
   Same logo SVG. No spinning ring.
   Effect: soft golden glow breathe + sparkle particles + ray shimmer.
   ============================================================ */

body:has(#yagos-loader:not(.hide)) { overflow: hidden; }

/* ── Overlay ── */
#yagos-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #EAE4DE;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 1;
  transition: opacity 0.7s ease;
  pointer-events: all;
}
#yagos-loader.hide { opacity: 0; pointer-events: none; }

/* ── Glow ring wrapper (no ::before spinning arc now) ── */
#loader-glow-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Soft warm radial glow that breathes */
#loader-glow-ring::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,152,42,0.22) 0%, rgba(212,152,42,0.06) 50%, transparent 75%);
  animation: glowBreath 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glowBreath {
  0%, 100% { transform: scale(0.8);  opacity: 0.5; }
  50%       { transform: scale(1.35); opacity: 1; }
}

/* ── SVG icon ── */
#loader-icon-wrap {
  width: 200px; height: 200px;
  position: relative; z-index: 1;
  animation: logoBreath 2.6s ease-in-out infinite;
}
@keyframes logoBreath {
  0%, 100% { transform: scale(0.97); }
  50%       { transform: scale(1.03); }
}
#loader-svg { width: 200px; height: 200px; overflow: visible; }

/* ── O RING — shimmer in ── */
#arc-top, #arc-bottom {
  opacity: 0;
  animation: ringFadeIn 0.4s ease 0.1s forwards;
}
#arc-bump { opacity: 0; animation: ringFadeIn 0.3s ease 0.3s forwards; }
@keyframes ringFadeIn { to { opacity: 1; } }

/* ── RAYS — dashoffset reveal then shimmer ── */
.ray { stroke-dasharray: 40; stroke-dashoffset: 40; }

#ray-1 { animation: rayGrow 0.5s ease-out 0.35s both, rayShimmer 2.2s ease-in-out 1.0s infinite; }
#ray-3 { animation: rayGrow 0.5s ease-out 0.35s both, rayShimmer 2.2s ease-in-out 1.2s infinite; }
#ray-2 { animation: rayGrow 0.4s ease-out 0.65s both, rayShimmer 2.2s ease-in-out 1.4s infinite; }
#ray-0 { animation: rayGrow 0.4s ease-out 0.80s both, rayShimmer 2.2s ease-in-out 1.6s infinite; }
#ray-4 { animation: rayGrow 0.4s ease-out 0.80s both, rayShimmer 2.2s ease-in-out 1.8s infinite; }

@keyframes rayGrow {
  from { stroke-dashoffset: 40; }
  to   { stroke-dashoffset: 0; }
}
@keyframes rayShimmer {
  0%, 100% { opacity: 0.7;  stroke-width: inherit; }
  50%       { opacity: 1;    filter: drop-shadow(0 0 4px rgba(212,152,42,0.8)); }
}

/* ── Sparkle particles ── */
#loader-sparkles {
  position: absolute;
  width: 240px; height: 240px;
  pointer-events: none; z-index: 2;
}
.sparkle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #D4982A;
  opacity: 0;
  animation: sparkleFly 2.4s ease-in-out infinite;
}
.sparkle:nth-child(1)  { left: 50%; top: 10%;  animation-delay: 0s;    width:3px; height:3px; }
.sparkle:nth-child(2)  { left: 80%; top: 30%;  animation-delay: 0.4s;  width:2px; height:2px; }
.sparkle:nth-child(3)  { left: 85%; top: 65%;  animation-delay: 0.8s;  width:3px; height:3px; }
.sparkle:nth-child(4)  { left: 60%; top: 90%;  animation-delay: 1.2s;  width:2px; height:2px; }
.sparkle:nth-child(5)  { left: 20%; top: 85%;  animation-delay: 1.6s;  width:3px; height:3px; }
.sparkle:nth-child(6)  { left: 10%; top: 50%;  animation-delay: 2.0s;  width:2px; height:2px; }
.sparkle:nth-child(7)  { left: 18%; top: 20%;  animation-delay: 0.6s;  width:4px; height:4px; }
.sparkle:nth-child(8)  { left: 45%; top: 5%;   animation-delay: 1.0s;  width:2px; height:2px; }

@keyframes sparkleFly {
  0%   { opacity: 0; transform: translate(0, 0)   scale(0.5); }
  30%  { opacity: 1; transform: translate(0, -6px) scale(1); }
  70%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(0, -14px) scale(0.3); }
}

/* Gold arc ring — soft non-spinning halo */
#loader-halo {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: rgba(212,152,42,0.35);
  border-right-color: rgba(212,152,42,0.15);
  border-bottom-color: rgba(212,152,42,0.05);
  pointer-events: none;
  animation: haloPulse 3s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.96); }
  50%       { opacity: 1;   transform: scale(1.04); }
}

/* ── Progress dots ── */
#loader-progress {
  position: fixed; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 7px;
  animation: fadeInDots 0.3s ease 0.1s both;
}
@keyframes fadeInDots { from { opacity: 0; } to { opacity: 1; } }

.loader-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #C9A96E;
  animation: dotPulse 1.3s ease infinite;
}
.loader-dot:nth-child(2) { animation-delay: 0.22s; }
.loader-dot:nth-child(3) { animation-delay: 0.44s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.75); }
  40%            { opacity: 1;   transform: scale(1.2); }
}
#yagos-loader.hide #loader-progress { opacity: 0; }