/* ============================================================
   ABSTRICT · Splash Screen
   Draw-in circuit logo animation on site entry
   ============================================================ */

/* === Overlay === */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 600ms ease-out;
}
.splash-overlay.exit {
  opacity: 0;
  pointer-events: none;
}

/* === Logo container === */
.splash-logo {
  width: 180px;
  height: 180px;
  margin-bottom: 24px;
}

/* === Stroke draw-in === */
.splash-overlay .draw-stroke {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: splash-draw 1.4s ease-out forwards;
}
.splash-overlay .draw-stroke.s1 { animation-delay: 0s; }
.splash-overlay .draw-stroke.s2 { animation-delay: 0.25s; }
.splash-overlay .draw-stroke.s3 { animation-delay: 0.7s; }

@keyframes splash-draw {
  to { stroke-dashoffset: 0; }
}

/* === Nodes appear === */
.splash-overlay .node {
  opacity: 0;
  transform-origin: center;
  transform: scale(0);
  animation: splash-node 400ms cubic-bezier(.34,1.56,.64,1) forwards;
}
.splash-overlay .node.n1 { animation-delay: 1.2s; }
.splash-overlay .node.n2 { animation-delay: 1.35s; }
.splash-overlay .node.n3 { animation-delay: 1.5s; }
.splash-overlay .node.n4 { animation-delay: 1.6s; }
.splash-overlay .node.n5 { animation-delay: 1.7s; }
.splash-overlay .node.n6 { animation-delay: 1.8s; }

@keyframes splash-node {
  to { opacity: 1; transform: scale(1); }
}

/* === Trace extensions === */
.splash-overlay .trace-ext {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: splash-draw 500ms ease-out forwards;
}
.splash-overlay .trace-ext.t1 { animation-delay: 1.8s; }
.splash-overlay .trace-ext.t2 { animation-delay: 1.9s; }
.splash-overlay .trace-ext.t3 { animation-delay: 2.0s; }
.splash-overlay .trace-ext.t4 { animation-delay: 2.1s; }
.splash-overlay .trace-ext.t5 { animation-delay: 2.2s; }
.splash-overlay .trace-ext.t6 { animation-delay: 2.3s; }

/* === Brand text === */
.splash-brand {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 8px;
  color: #818cf8;
  opacity: 0;
  transform: translateY(8px);
  animation: splash-text 600ms ease-out 1.6s forwards;
}
.splash-tagline {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(129,140,248,.45);
  margin-top: 8px;
  opacity: 0;
  animation: splash-text 600ms ease-out 2.0s forwards;
}

@keyframes splash-text {
  to { opacity: 1; transform: translateY(0); }
}

/* === Topbar brand-mark pulse (post-splash) === */
@keyframes brand-pulse {
  0%   { filter: drop-shadow(0 0 0 transparent); transform: scale(1); }
  50%  { filter: drop-shadow(0 0 6px rgba(99,102,241,.5)); transform: scale(1.08); }
  100% { filter: drop-shadow(0 0 0 transparent); transform: scale(1); }
}
.brand-mark.pulse {
  animation: brand-pulse 800ms ease-in-out 1;
}

/* === Skip splash if reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .splash-overlay .draw-stroke,
  .splash-overlay .node,
  .splash-overlay .trace-ext,
  .splash-brand,
  .splash-tagline {
    animation: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
  .splash-overlay {
    transition-duration: 200ms;
  }
}
