/* ── Reset ── */
#igifu-loader * { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Screen ── */
#igifu-loader {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1a1410 0%, #221c14 50%, #1c1710 100%);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

/* ── Grid overlay ── */
#igifu-loader .il-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ── Ambient orbs ── */
#igifu-loader .il-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0;
  animation: ilOrbIn 5s ease-in-out forwards;
}
#igifu-loader .il-orb-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(196,155,90,0.22) 0%, transparent 70%);
  top: -140px; left: -140px; animation-delay: 0.2s;
}
#igifu-loader .il-orb-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(160,130,90,0.18) 0%, transparent 70%);
  bottom: -110px; right: -110px; animation-delay: 0.7s;
}
#igifu-loader .il-orb-3 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(210,175,110,0.14) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 1.1s;
}
@keyframes ilOrbIn {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ── Particles ── */
#igifu-loader .il-particle {
  position: absolute; border-radius: 50%;
  background: rgba(220,195,145,0.4);
  animation: ilParticle linear infinite;
}
@keyframes ilParticle {
  0%   { transform: translateY(105vh) scale(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 0.5; }
  100% { transform: translateY(-8vh) scale(1.4); opacity: 0; }
}

/* ── Content wrapper ── */
#igifu-loader .il-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 28px;
  padding: 0 24px;
}

/* ── Brand name ── */
#igifu-loader .il-brand {
  font-size: 2.6rem; font-weight: 900; letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f5ead8 0%, #d4a96a 50%, #c49b5a 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ilBrandIn 0.9s cubic-bezier(0.16,1,0.3,1) 0.5s both;
  margin-top: -8px;
}
@keyframes ilBrandIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Tagline ── */
#igifu-loader .il-tagline {
  text-align: center; font-size: 0.82rem; font-weight: 500;
  line-height: 1.65; max-width: 280px;
  color: rgba(210,185,145,0.82);
  letter-spacing: 0.015em;
  animation: ilTagIn 1s cubic-bezier(0.16,1,0.3,1) 0.9s both;
}
#igifu-loader .il-tagline em {
  font-style: normal;
  color: rgba(224,195,130,0.95);
}
@keyframes ilTagIn {
  from { opacity: 0; transform: translateY(18px); letter-spacing: 0.25em; }
  to   { opacity: 1; transform: translateY(0);    letter-spacing: 0.015em; }
}

/* ── Progress track ── */
#igifu-loader .il-track {
  width: 260px; height: 5px; border-radius: 9999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden; position: relative;
  animation: ilTrackIn 0.5s ease 1.0s both;
}
@keyframes ilTrackIn {
  from { opacity: 0; transform: scaleX(0.4); }
  to   { opacity: 1; transform: scaleX(1); }
}

/* ── Progress fill ── */
#igifu-loader .il-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  border-radius: 9999px; width: 0%;
  background: linear-gradient(90deg, #a07840, #d4a96a, #e8c98a, #d4a96a, #a07840);
  background-size: 300% 100%;
  animation:
    ilFill 3.2s cubic-bezier(0.4,0,0.2,1) 1.2s forwards,
    ilGradShift 1.8s linear 1.2s infinite;
}
@keyframes ilFill       { from { width:0%; } to { width:100%; } }
@keyframes ilGradShift  { 0% { background-position:0% 0; } 100% { background-position:300% 0; } }

/* ── Fill leading glow ── */
#igifu-loader .il-fill::after {
  content: ''; position: absolute;
  right: 0; top: -3px; bottom: -3px; width: 36px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85));
  border-radius: 9999px;
}

/* ── Dots ── */
#igifu-loader .il-dots {
  display: flex; gap: 8px; align-items: center;
}
#igifu-loader .il-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(196,155,90,0.35);
  animation: ilDot 1.3s ease-in-out 1.2s infinite;
}
#igifu-loader .il-dot:nth-child(2) { animation-delay: 1.35s; }
#igifu-loader .il-dot:nth-child(3) { animation-delay: 1.5s; }
@keyframes ilDot {
  0%,75%,100% { transform: scale(1);   background: rgba(196,155,90,0.35); }
  38%          { transform: scale(1.7); background: #d4a96a; }
}

/* ── Screen exit ── */
#igifu-loader.il-exit {
  animation: ilExit 0.75s cubic-bezier(0.4,0,1,1) forwards;
}
@keyframes ilExit {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.05); pointer-events: none; }
}
