/* ==========================================================================
   BetterWhole Technologies — Curly Liquid Bubbles & Brand Motion
   Tinted with Vermilion (#EF3E23), Solar Gold (#FACC15), and Royal Plum (#7E1D6D)
   ========================================================================== */

.bw-bubbles-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bw-curly-bubble {
  position: absolute;
  border-radius: 44% 56% 64% 36% / 48% 39% 61% 52%;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 32px rgba(255, 255, 255, 0.3), 0 18px 48px rgba(126, 29, 109, 0.1);
  will-change: transform, border-radius;
}

.bw-bubble-1 {
  width: 360px;
  height: 360px;
  top: 6%;
  right: -95px;
  background: radial-gradient(circle at 30% 30%, rgba(250, 204, 21, 0.28), rgba(255, 122, 0, 0.16) 58%, rgba(91, 15, 168, 0.1));
  animation: bwFloatMorphA 16s ease-in-out infinite alternate;
}

.bw-bubble-2 {
  width: 280px;
  height: 280px;
  top: 46%;
  left: -90px;
  background: radial-gradient(circle at 35% 35%, rgba(91, 15, 168, 0.24), rgba(126, 29, 109, 0.14) 62%, rgba(250, 204, 21, 0.08));
  animation: bwFloatMorphB 20s ease-in-out infinite alternate;
}

.bw-bubble-3 {
  width: 210px;
  height: 210px;
  bottom: 8%;
  right: 10%;
  background: radial-gradient(circle at 40% 30%, rgba(239, 62, 35, 0.2), rgba(250, 204, 21, 0.14));
  animation: bwFloatMorphA 14s ease-in-out infinite alternate-reverse;
}

.bw-bubble-4 {
  width: 150px;
  height: 150px;
  top: 24%;
  left: 22%;
  background: radial-gradient(circle at 35% 35%, rgba(91, 15, 168, 0.16), rgba(250, 204, 21, 0.12));
  animation: bwFloatMorphB 18s ease-in-out infinite alternate-reverse;
}

.bw-bubble-5 {
  width: 120px;
  height: 120px;
  bottom: 28%;
  left: 42%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 122, 0, 0.16), rgba(91, 15, 168, 0.12));
  animation: bwFloatMorphA 21s ease-in-out infinite alternate;
}

.bw-organic-blob {
  position: absolute;
  width: 440px;
  height: 440px;
}

.bw-blob-left {
  top: 16%;
  left: -150px;
  animation: bwSlowSpin 48s linear infinite;
}

.bw-blob-right {
  bottom: 12%;
  right: -160px;
  animation: bwSlowSpin 56s linear infinite reverse;
}

.bw-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  pointer-events: none;
  z-index: 0;
}

.bw-hero-orb-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -90px;
  background: rgba(91, 15, 168, 0.45);
  animation: bwDrift 14s ease-in-out infinite alternate;
}

.bw-hero-orb-2 {
  width: 360px;
  height: 360px;
  bottom: -100px;
  right: -70px;
  background: rgba(255, 122, 0, 0.25);
  animation: bwDrift 17s ease-in-out infinite alternate-reverse;
}

.bw-glow-border {
  position: relative;
}

.bw-glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.65), rgba(239, 62, 35, 0.55), rgba(126, 29, 109, 0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.bw-glow-border:hover::before {
  opacity: 1;
}

@keyframes bwFloatMorphA {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    border-radius: 44% 56% 64% 36% / 48% 39% 61% 52%;
  }
  50% {
    transform: translate3d(-26px, 30px, 0) rotate(12deg) scale(1.06);
    border-radius: 61% 39% 46% 54% / 37% 58% 42% 63%;
  }
  100% {
    transform: translate3d(20px, -24px, 0) rotate(-10deg) scale(0.96);
    border-radius: 38% 62% 52% 48% / 55% 43% 57% 45%;
  }
}

@keyframes bwFloatMorphB {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    border-radius: 56% 44% 38% 62% / 52% 60% 40% 48%;
  }
  100% {
    transform: translate3d(38px, -32px, 0) rotate(16deg);
    border-radius: 40% 60% 62% 38% / 44% 38% 62% 56%;
  }
}

@keyframes bwDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(30px, -24px, 0) scale(1.08);
  }
}

@keyframes bwSlowSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bw-curly-bubble,
  .bw-organic-blob,
  .bw-hero-orb {
    animation: none !important;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
