/* Motion layer shared by the map and the method page.
   Letter-glitch field, spotlight, click sparks, and the scroll progress bar. */

.glyphs,
.grain,
.sparks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.glyphs { z-index: 2; }
.grain {
  z-index: 3;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sparks { z-index: 1200; }

.page-fx .glyphs,
.page-fx .grain,
.page-fx .sparks { position: fixed; }
.page-fx .glyphs { opacity: .55; }
.page-fx .wrap { position: relative; z-index: 1; }

.spot { --mx: -120px; --my: -120px; --on: 0; }
.bar.spot,
.ca.spot,
.stats.spot,
.ticker.spot,
.chip.spot,
.filters button.spot,
section.spot,
.brand.spot { position: relative; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120px circle at var(--mx) var(--my), rgba(94, 255, 214, .22), transparent 68%);
  opacity: var(--on);
}

.ticker-window {
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.stat .n { font-variant-numeric: tabular-nums; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 40;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #5effd6, #ffb020);
}
.char { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .glyphs, .grain, .sparks, .progress { display: none; }
}
