/* Calm motion layer (display only). Works with js/motion.js. Adds no colours of its own:
   the star border and the rays take the centre's lime / blue from the page's variables. */

/* ---- Lenis (the rules its stylesheet asks for) ---- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---- Blur Text ---- */
.bt-word { display: inline-block; }

/* ---- Light Rays: sits behind the panel's content, never receives the pointer ---- */
.lg-rays {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.lg-rays.is-ready { opacity: 1; }

/* ---- Star Border (React Bits, CSS only): two soft stars drift along the top and bottom edge ---- */
.star-border {
  --sb-radius: 12px;
  --sb-ring: var(--lg-blue, var(--color-accent, #1677b8));
  --sb-star: var(--lg-lime, var(--aj-lime, #9ccb57));
  position: relative;
  display: inline-flex;
  padding: 2px;
  border-radius: var(--sb-radius);
  background: var(--sb-ring);
  overflow: hidden;
  isolation: isolate;
}
.star-border--fill { display: flex; width: 100%; }
.star-border > :not(.star-border__star) {
  position: relative;
  z-index: 1;
  border-radius: calc(var(--sb-radius) - 2px);
}
.star-border--fill > :not(.star-border__star) { width: 100%; }
.star-border__star {
  position: absolute;
  z-index: 0;
  width: 300%;
  height: 50%;
  opacity: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--sb-star), transparent 14%);
  animation: sb-bottom 8s linear infinite alternate;
}
.star-border__star--bottom { bottom: -12px; right: -250%; }
.star-border__star--top { top: -12px; left: -250%; animation-name: sb-top; }
@keyframes sb-bottom { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(-100%, 0); opacity: 0.45; } }
@keyframes sb-top { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(100%, 0); opacity: 0.45; } }

/* the wrapper clips overflow, so the keyboard ring is drawn on it instead of the button */
.star-border > :focus-visible { outline: none; }
.star-border:has(:focus-visible) { outline: 2px solid var(--sb-ring); outline-offset: 2px; }

/* numbers that count up keep a fixed width, so the cards don't jitter */
[data-count-up] { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .star-border__star { display: none; }
  .lg-rays { transition: none; }
}
