/* ============================================================
   المُنظِّم | AL-MUNAZZIM — Splash Screen
   شاشة تحميل مصممة: بناء الشبكة الهندسية للشعار تدريجياً
   ============================================================ */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--olive-950);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity var(--duration-slow) var(--ease-in-out-smooth),
              visibility var(--duration-slow) var(--ease-in-out-smooth);
}

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

/* خلفية شبكية زخرفية خفيفة تمتد بكل الشاشة */
.splash-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0;
  animation: splashGridFadeIn 1.2s var(--ease-out-expo) 0.2s forwards;
}

@keyframes splashGridFadeIn {
  to { opacity: 1; }
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  z-index: 1;
  padding: var(--space-6);
  text-align: center;
}

.splash-logo-wrap {
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-4);
}
.splash-logo {
  width: 100%;
  height: 100%;
}

.logo-lines .grid-line {
  stroke: var(--olive-400);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
  animation: drawLine 0.5s var(--ease-out-expo) forwards;
}
.logo-lines .grid-line[data-delay="0"] { animation-delay: 0.1s; }
.logo-lines .grid-line[data-delay="1"] { animation-delay: 0.2s; }
.logo-lines .grid-line[data-delay="2"] { animation-delay: 0.3s; }
.logo-lines .grid-line[data-delay="3"] { animation-delay: 0.4s; }
.logo-lines .grid-line[data-delay="4"] { animation-delay: 0.5s; }
.logo-lines .grid-line[data-delay="5"] { animation-delay: 0.6s; }

@keyframes drawLine {
  from { stroke-dashoffset: 100; opacity: 0; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

.logo-nodes .grid-node {
  fill: var(--copper-400);
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  animation: nodePopIn 0.4s var(--ease-out-expo) forwards;
}
.logo-nodes .grid-node[data-delay="0"] { animation-delay: 0.55s; }
.logo-nodes .grid-node[data-delay="1"] { animation-delay: 0.65s; }
.logo-nodes .grid-node[data-delay="2"] { animation-delay: 0.75s; }
.logo-nodes .grid-node[data-delay="3"] { animation-delay: 0.85s; }
.logo-nodes .grid-node[data-delay="4"] { animation-delay: 0.95s; }
.logo-nodes .grid-node[data-delay="5"] { animation-delay: 1.05s; }

@keyframes nodePopIn {
  0% { opacity: 0; transform: scale(0); }
  70% { transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

.logo-center-node {
  fill: var(--olive-300);
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  animation: centerNodeReveal 0.5s var(--ease-out-expo) 1.2s forwards;
}

@keyframes centerNodeReveal {
  0% { opacity: 0; transform: scale(0); }
  60% { transform: scale(1.4); }
  100% { opacity: 1; transform: scale(1); }
}

.splash-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--stone-50);
  opacity: 0;
  animation: splashTextIn 0.6s var(--ease-out-expo) 1.4s forwards;
}

.splash-subtitle {
  color: var(--olive-300);
  font-size: 0.9rem;
  opacity: 0;
  animation: splashTextIn 0.6s var(--ease-out-expo) 1.55s forwards;
  margin-bottom: var(--space-6);
}

@keyframes splashTextIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.splash-progress-track {
  width: 180px;
  height: 3px;
  background: rgb(255 255 255 / 0.12);
  border-radius: var(--radius-full);
  overflow: hidden;
  opacity: 0;
  animation: splashTextIn 0.6s var(--ease-out-expo) 1.7s forwards;
}

.splash-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--copper-500), var(--olive-300));
  border-radius: var(--radius-full);
  transition: width 0.35s var(--ease-standard);
}

.splash-status {
  font-size: 0.75rem;
  color: var(--stone-500);
  opacity: 0;
  animation: splashTextIn 0.6s var(--ease-out-expo) 1.8s forwards;
  min-height: 1.2em;
}

@media (prefers-reduced-motion: reduce) {
  .splash-screen * {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    transform: none !important;
  }
}
