/**
 * baasi-anim.css
 * Transparent background animation — bus route from houses to university
 * Used sitewide via header.php
 */

/* ─── Scene wrapper (fixed, behind everything) ─── */
#baasi-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* ─── SVG canvas ─── */
#baasi-scene svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ─── Route path (dashed line connecting stops) ─── */
.route-path {
  fill: none;
  stroke: var(--primary, #033769);
  stroke-width: 1.5;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  opacity: 0.07;
  animation: dash-march 18s linear infinite;
}

@keyframes dash-march {
  to { stroke-dashoffset: -200; }
}

/* ─── Bus icon that travels the path ─── */
.bus-traveller {
  animation: bus-opacity 0.6s ease-in-out;
}

/* ─── Stop dot pulses ─── */
.stop-dot {
  fill: var(--secondary, #FF8B00);
  opacity: 0;
  animation: stop-pulse 4s ease-in-out infinite;
}

@keyframes stop-pulse {
  0%   { opacity: 0;    transform: scale(0.6); }
  30%  { opacity: 0.18; transform: scale(1); }
  70%  { opacity: 0.18; transform: scale(1); }
  100% { opacity: 0;    transform: scale(0.6); }
}

/* ─── Floating particles (dots that drift upward) ─── */
.scene-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--secondary, #FF8B00);
  opacity: 0;
  animation: particle-rise linear infinite;
}

@keyframes particle-rise {
  0%   { opacity: 0;    transform: translateY(0) scale(0); }
  15%  { opacity: 0.25; transform: translateY(-20px) scale(1); }
  85%  { opacity: 0.12; transform: translateY(-120px) scale(0.7); }
  100% { opacity: 0;    transform: translateY(-160px) scale(0); }
}

/* ─── Small buildings silhouette (bottom corners) ─── */
.scene-building {
  position: absolute;
  bottom: 0;
  opacity: 0.035;
  fill: var(--primary, #033769);
}

/* ─── Road line at bottom ─── */
.scene-road {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(3,55,105,0.06) 20%,
    rgba(255,139,0,0.08) 50%,
    rgba(3,55,105,0.06) 80%,
    transparent 100%
  );
  pointer-events: none;
}

/* ─── Reduce motion ─── */
@media (prefers-reduced-motion: reduce) {
  #baasi-scene { display: none; }
}
