/* chest-pathways-web.css · goes with chest-pathways-web.js (see README.md). Desktop, 901px and up. */

@media (min-width: 901px) {
  /* The searchlights and fireflies replace the site's own desktop pathway while the script runs. */
  .connections.has-web-pathways > .journey-trail { visibility: hidden; }
}

.connections > svg.chest-pathways-web {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1; /* under the chests and the ghost */
}
@media (max-width: 900px) {
  .connections > svg.chest-pathways-web { display: none; }
}

/* ---------- City View: searchlights ---------- */

.chest-pathways-web .cw-beam-light { filter: blur(7px); }
.chest-pathways-web .cw-beam-core { opacity: .42; }
.chest-pathways-web .cw-beam-tint { opacity: 0; filter: blur(7px); transition: opacity .8s ease; }
.chest-pathways-web .cw-beam.is-aiming .cw-beam-tint { opacity: 1; }
.chest-pathways-web .cw-lamp { fill: #fffbe8; filter: drop-shadow(0 0 9px #fff3c0); }
.chest-pathways-web .cw-spot { opacity: 0; transition: opacity .7s ease .3s; }
.chest-pathways-web .cw-spot.is-on { opacity: 1; }

/* ---------- Treetops: jewel fireflies ---------- */

.chest-pathways-web .cw-flies { transition: opacity .6s ease; }
.chest-pathways-web.is-gathering .cw-flies { opacity: .5; }
.chest-pathways-web .cw-jewel { filter: drop-shadow(0 0 4px var(--c)) drop-shadow(0 0 10px var(--c)); }
.chest-pathways-web .cw-fly {
  opacity: .7;
  animation: cw-wander var(--t, 10s) ease-in-out var(--d, 0s) infinite, cw-twinkle var(--tw, 3s) ease-in-out var(--d2, 0s) infinite;
}
.chest-pathways-web .cw-stream { filter: drop-shadow(0 0 4px var(--c)) drop-shadow(0 0 12px var(--c)); }
.chest-pathways-web .cw-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: cw-arrive .5s calc(var(--i, 0) * 28ms) ease-out both;
}
.chest-pathways-web .cw-flow { animation: cw-flow 1.8s linear infinite; animation-delay: calc(var(--ph, 0) * -1.8s); }
.chest-pathways-web .cw-glow { animation: cw-fade .6s ease-out both; }
.chest-pathways-web .cw-ring { animation: cw-fade .6s .45s ease-out both; }

@keyframes cw-wander {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(var(--dx1, 10px), var(--dy1, -8px)); }
  66% { transform: translate(var(--dx2, -10px), var(--dy2, 6px)); }
}
@keyframes cw-twinkle { 0%, 100% { opacity: .3; } 50% { opacity: .95; } }
@keyframes cw-arrive { from { opacity: 0; transform: scale(.2); } }
@keyframes cw-flow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes cw-fade { from { opacity: 0; } }

/* ---------- no motion: a still picture ---------- */

body.motion-paused .chest-pathways-web *,
.connections.still .chest-pathways-web .cw-fly { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .chest-pathways-web * { animation: none !important; transition: none !important; }
}
