:root {
  --bgm-cursor-core: rgb(241 249 255);
  --bgm-cursor-arc: rgb(126 214 255);
  --bgm-cursor-arc-soft: rgb(87 160 255 / 0.34);
  --bgm-cursor-heat: rgb(255 180 86 / 0.32);
  --bgm-cursor-heat-soft: rgb(255 126 40 / 0.16);
  --bgm-cursor-steel: rgb(171 208 235 / 0.16);
}

html.bgm-welder-cursor-active,
html.bgm-welder-cursor-active body,
html.bgm-welder-cursor-active body *,
html.bgm-welder-cursor-active a,
html.bgm-welder-cursor-active button,
html.bgm-welder-cursor-active input,
html.bgm-welder-cursor-active textarea,
html.bgm-welder-cursor-active select,
html.bgm-welder-cursor-active summary,
html.bgm-welder-cursor-active label {
  cursor: none !important;
}

.bgm-welder-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10020;
}

.bgm-welder-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.bgm-welder-cursor {
  --bgm-cursor-energy: 0;
  --bgm-cursor-engagement: 0;
  --bgm-cursor-flash: 0;
  --bgm-cursor-idle: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-120px, -120px, 0);
  will-change: transform, opacity, filter;
}

.bgm-welder-cursor::before,
.bgm-welder-cursor::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.bgm-welder-cursor::before {
  inset: 5px;
  background:
    radial-gradient(circle at 34% 34%, rgb(255 255 255 / 0.99) 0, rgb(238 248 255 / 0.98) 18%, rgb(187 231 255 / 0.98) 36%, rgb(109 191 255 / 0.94) 54%, rgb(46 126 242 / 0.78) 68%, transparent 82%),
    radial-gradient(circle at 72% 68%, rgb(58 106 226 / 0.44) 0, transparent 62%);
  box-shadow:
    0 0 calc(18px + (var(--bgm-cursor-idle) * 8px)) rgb(176 230 255 / 0.9),
    0 0 calc(34px + (var(--bgm-cursor-engagement) * 10px)) rgb(94 173 255 / 0.46),
    0 0 calc(46px + (var(--bgm-cursor-flash) * 10px)) rgb(255 151 53 / 0.14);
  animation: bgm-welder-flicker 1.7s steps(2, end) infinite;
}

.bgm-welder-cursor::after {
  background:
    radial-gradient(circle, rgb(112 205 255 / calc(0.26 + (var(--bgm-cursor-idle) * 0.12))) 0, rgb(112 205 255 / 0.16) 42%, transparent 75%);
  opacity: calc(0.58 + (var(--bgm-cursor-engagement) * 0.16) + (var(--bgm-cursor-flash) * 0.18) + (var(--bgm-cursor-idle) * 0.1));
  filter: blur(1.5px);
  animation: bgm-welder-breathe 2.2s ease-in-out infinite;
}

.bgm-welder-cursor__core,
.bgm-welder-cursor__flare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.bgm-welder-cursor__core {
  inset: 9px;
  background:
    radial-gradient(circle at 38% 38%, rgb(255 255 255 / 1) 0, rgb(240 250 255 / 0.98) 32%, rgb(173 231 255 / 0.72) 58%, transparent 82%);
  box-shadow:
    0 0 calc(13px + (var(--bgm-cursor-engagement) * 10px) + (var(--bgm-cursor-idle) * 4px)) rgb(209 239 255 / 0.92),
    0 0 calc(30px + (var(--bgm-cursor-flash) * 14px)) rgb(92 190 255 / 0.38);
}

.bgm-welder-cursor__flare {
  inset: 2px;
  border: 1px solid rgb(172 228 255 / calc(0.18 + (var(--bgm-cursor-engagement) * 0.18)));
  box-shadow:
    0 0 0 1px rgb(255 191 108 / 0.08),
    0 0 calc(18px + (var(--bgm-cursor-idle) * 10px)) rgb(255 136 44 / calc(0.1 + (var(--bgm-cursor-flash) * 0.2)));
  opacity: calc(0.4 + (var(--bgm-cursor-flash) * 0.24) + (var(--bgm-cursor-idle) * 0.08));
}

html.bgm-welder-cursor-reduced-motion .bgm-welder-cursor::before {
  animation: none;
}

html.bgm-welder-cursor-active :where(
  .btn,
  button,
  [type="button"],
  [type="submit"],
  [type="reset"],
  input:not([type="hidden"]),
  select,
  textarea,
  summary,
  .card,
  .product,
  .cat,
  .storefront-card,
  .storefront-button,
  .storefront-categoryCard,
  .storefront-categoryPill,
  .storefront-related__card,
  .bgm-topbar__brand,
  .bgm-topbar__nav a,
  .bgm-topbar__search,
  .bgm-topbar__search-launch,
  .bgm-search-overlay__close,
  .contact-fab,
  .contact-btn,
  .filters-toggle,
  .filters-toolbar__clear,
  .store-pagination__btn
).is-cursor-hot {
  border-color: rgb(255 182 90 / 0.34) !important;
  box-shadow:
    0 0 0 1px rgb(255 203 128 / 0.09),
    inset 0 0 0 1px var(--bgm-cursor-steel),
    0 0 26px var(--bgm-cursor-heat-soft),
    0 16px 36px rgb(0 0 0 / 0.22);
  filter: saturate(1.03) brightness(1.02);
}

html.bgm-welder-cursor-active :where(
  a[href],
  .bgm-topbar__brand,
  .bgm-topbar__nav a,
  .site-footer__links a,
  .site-footer__social-link
).is-cursor-hot:not(.btn):not(.card):not(.product):not(.cat):not(.storefront-card) {
  color: rgb(255 255 255 / 0.98);
  text-shadow:
    0 0 12px rgb(122 204 255 / 0.22),
    0 0 18px rgb(255 153 63 / 0.16);
}

html.bgm-welder-cursor-active :where(input, select, textarea).is-cursor-hot {
  background-color: rgb(255 255 255 / 0.08);
}

html.bgm-welder-cursor-active :where(.storefront-card, .card, .product, .cat).is-cursor-hot {
  transform: translateY(-2px);
}

@keyframes bgm-welder-flicker {
  0% {
    opacity: 0.94;
    filter: brightness(1);
  }
  32% {
    opacity: 0.86;
    filter: brightness(0.96);
  }
  39% {
    opacity: 1;
    filter: brightness(1.08);
  }
  64% {
    opacity: 0.9;
    filter: brightness(0.98);
  }
  100% {
    opacity: 0.96;
    filter: brightness(1.02);
  }
}

@keyframes bgm-welder-breathe {
  0% {
    transform: scale(0.94);
    opacity: 0.64;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.88;
  }
  100% {
    transform: scale(0.96);
    opacity: 0.68;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.bgm-welder-cursor-active :where(
    .btn,
    button,
    input:not([type="hidden"]),
    select,
    textarea,
    .card,
    .product,
    .cat,
    .storefront-card,
    .storefront-button,
    .bgm-topbar__brand,
    .bgm-topbar__nav a,
    .contact-fab,
    .contact-btn
  ).is-cursor-hot {
    box-shadow: inset 0 0 0 1px var(--bgm-cursor-steel);
    filter: none;
    transform: none;
  }
}
