/* 1.8.546 — Footer copyright-divider laser: red #8f1c2c, centered path.
   The 1.8.543 restore used the 1.8.537 100vw track and footer-laser-sweep
   keyframes from main.css. That path is not centered: the tip (right edge of
   the mover, flipped around transform-origin:right) runs off the right edge of
   the viewport on the L→R pass, and turns around under the copyright text on
   the R→L pass (about one mover-width in from the left).
   This sheet pins the rail to the copyright divider (already inside the
   80/32/20px footer padding) and animates the tip so it turns at the same
   8px inset from both ends, at every breakpoint. A bright white-hot core and
   red glow keep it readable as a laser on the navy footer.
   Keyframes are named footer-laser-sweep-546 so they do not fight main.css. */

/* ---------------------------------------------------------------- Track = the divider, not the viewport */
body.r538 .r8-foot__bot .footer-laser-line{
  --footer-laser-inset:8px;
  --footer-laser-mover:min(220px, 28vw);
  top:-8px;
  left:0;
  right:0;
  width:auto;
  margin-left:0;
  height:20px;
  overflow:hidden;
}

body.r538 .r8-foot__bot .footer-laser__rail{
  top:8px;
  background:linear-gradient(
    90deg,
    transparent 0%,
    rgba(143, 28, 44, 0.22) 18%,
    rgba(143, 28, 44, 0.45) 50%,
    rgba(143, 28, 44, 0.22) 82%,
    transparent 100%
  );
}

body.r538 .r8-foot__bot .footer-laser__mover{
  top:8px;
  left:0;
  width:var(--footer-laser-mover);
  transform-origin:right center;
  animation:footer-laser-sweep-546 8.4s ease-in-out infinite;
  will-change:left, transform;
}

/* Tip leads L→R (scaleX 1, spark on the right). Flip around the tip, then
   tip leads R→L. left is relative to the divider; 8px inset keeps the 12px
   spark inside both ends. The tail is clipped by overflow on the line. */
@keyframes footer-laser-sweep-546{
  0%{
    left:calc(var(--footer-laser-inset) - var(--footer-laser-mover));
    transform:scaleX(1);
  }
  45%{
    left:calc(100% - var(--footer-laser-inset) - var(--footer-laser-mover));
    transform:scaleX(1);
  }
  50%{
    left:calc(100% - var(--footer-laser-inset) - var(--footer-laser-mover));
    transform:scaleX(-1);
  }
  95%{
    left:calc(var(--footer-laser-inset) - var(--footer-laser-mover));
    transform:scaleX(-1);
  }
  100%{
    left:calc(var(--footer-laser-inset) - var(--footer-laser-mover));
    transform:scaleX(1);
  }
}

body.r538 .r8-foot__bot .footer-laser__beam{
  background:linear-gradient(
    90deg,
    transparent 0%,
    rgba(143, 28, 44, 0.25) 12%,
    rgba(143, 28, 44, 0.7) 42%,
    #8f1c2c 62%,
    #e44558 82%,
    #fff 100%
  );
  box-shadow:
    0 0 10px rgba(228, 69, 88, 0.9),
    0 0 22px rgba(143, 28, 44, 0.7),
    0 0 40px rgba(143, 28, 44, 0.4);
}

body.r538 .r8-foot__bot .footer-laser__spark{
  background:radial-gradient(circle, #fff 0%, #ffc4cb 35%, #8f1c2c 70%, transparent 75%);
  box-shadow:
    0 0 6px #fff,
    0 0 14px #e44558,
    0 0 26px rgba(143, 28, 44, 0.9);
}

@media (prefers-reduced-motion:reduce){
  body.r538 .r8-foot__bot .footer-laser__mover,
  body.r538 .r8-foot__bot .footer-laser__spark{
    animation:none !important;
  }
  body.r538 .r8-foot__bot .footer-laser__mover{
    left:50%;
    transform:translateX(-50%) scaleX(1);
    opacity:0.85;
  }
  body.r538 .r8-foot__bot .footer-laser__spark{ filter:none; }
}
