/* Hero light (home page): a waterfall of light falls behind the right edge of the hero video,
   hits its top edge and runs along it, with smoke and glitter. Drawn by beam.js on one canvas
   behind the hero content (z-index -1), so nothing covers the video, the text or the buttons.
   The canvas only shows on the side-by-side layout; phones and tablets keep the button light. */

.hero { position: relative; isolation: isolate; overflow: clip; }
.hero + .section { border-top: 1px solid var(--line); }

.beam { position: absolute; inset: 0; z-index: -1; pointer-events: none; display: none; }
.hero.beam-on .beam { display: block; }
.beam-canvas { display: block; width: 100%; height: 100%; }

/* ---------- Button: edge light + glow (works without JS) ---------- */
.beam-btn { position: relative; isolation: isolate; }
.beam-ring { /* 1.5px frame around the button; only its edge is visible (mask) */
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 1.5px;
  overflow: hidden;
  background: rgba(255, 244, 222, .65);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.beam-ring::before { /* the light running around the edge: a rotating conic square (transform only, composited) */
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 130%; aspect-ratio: 1;
  translate: -50% -50%;
  background: conic-gradient(
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0) 200deg,
    rgba(255, 232, 190, .95) 250deg,
    #fff 270deg,
    rgba(255, 178, 36, .9) 290deg,
    rgba(255, 255, 255, 0) 330deg);
  rotate: 300deg;
}
.beam-btn::after { /* soft glow behind the button */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 0 10px 2px rgba(255, 178, 36, .65), 0 0 34px 6px rgba(255, 150, 60, .3);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .beam-ring::before { animation: beam-orbit 4.8s linear infinite; }
}
@keyframes beam-orbit { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .beam-btn::after { box-shadow: 0 0 10px 1px rgba(255, 178, 36, .55); }
}
