{% import "../_variables.css" as var %}

.aud-bubbles {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 30px;
  color: ;
  --bubble-text-size: 24px;
}

/* Section accent backgrounds — sit beneath the bg image as a fallback */
.aud-bubbles--accent-paper { background-color: #FDFDFB; }
.aud-bubbles--accent-mist  { background-color: #F4F6FA; }
.aud-bubbles--accent-navy  { background-color: #0A2240; }
.aud-bubbles--accent-blue  { background-color: #1E6FEB; }
.aud-bubbles--accent-teal  { background-color: #2BB3A3; }
.aud-bubbles--accent-mint  { background-color: #8FD6C9; }

.aud-bubbles__bg {
  position: absolute; inset: 0; z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.aud-bubbles__overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.aud-bubbles__overlay--navy  { background: #0A2240; }
.aud-bubbles__overlay--blue  { background: #1E6FEB; }
.aud-bubbles__overlay--teal  { background: #2BB3A3; }
.aud-bubbles__overlay--mint  { background: #8FD6C9; }
.aud-bubbles__overlay--dark  { background: #000; }
.aud-bubbles__overlay--white { background: #fff; }

.aud-bubbles__container { position: relative; z-index: 2; width: 100%; }

/* ===== Head ===== */
.aud-bubbles__head {
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}
@media (min-width: 1024px) { .aud-bubbles__head { margin-bottom: 64px; } }

.aud-bubbles__eyebrow {
  margin: 0 0 16px;
  font-family: ;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1E6FEB;
}

.aud-bubbles__heading {
  margin: 0;
  font-family: ;
  font-weight: ;
  font-style: ;
  font-size: rem;
  line-height: ;
  letter-spacing: -0.02em;
  color: #0A2240;
}

.aud-bubbles__intro {
  margin: 20px auto 0;
  max-width: 720px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: ;
}
.aud-bubbles__intro > *:first-child { margin-top: 0; }
.aud-bubbles__intro > *:last-child  { margin-bottom: 0; }

/* Dark colour scheme */
.aud-bubbles--dark .aud-bubbles__eyebrow  { color: #8FD6C9; }
.aud-bubbles--dark .aud-bubbles__heading  { color: #fff; }
.aud-bubbles--dark .aud-bubbles__intro    { color: rgba(255,255,255,0.85); }
.aud-bubbles--dark .panel__heading        { color: #fff; }
.aud-bubbles--dark .panel__intro          { color: rgba(255,255,255,0.82); }
.aud-bubbles--dark .panel__bullets li     { color: #fff; }
.aud-bubbles--dark .check                 { background: rgba(255,255,255,0.18); }
.aud-bubbles--dark .check::after          { border-color: #fff; }

/* ===== Two-column grid ===== */
.aud-bubbles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1024px) {
  .aud-bubbles__grid { grid-template-columns: 1fr 1fr; gap: 80px; }
}

/* ===== Bubble stage / wheel ===== */
.bubble-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 600px;
  margin: 0 auto;
}

.wheel {
  position: absolute;
  inset: 0;
  --rotation: 0deg;
  transform: rotate(var(--rotation));
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.wheel[data-active="0"] { --rotation: 0deg; }
.wheel[data-active="1"] { --rotation: -120deg; }
.wheel[data-active="2"] { --rotation: -240deg; }

/* Decorative dots — don't rotate with wheel */
.deco {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.85;
  animation: aud-bubbles-floatY 6s ease-in-out infinite;
  z-index: 1;
}
.deco--1 { width: 32px; height: 32px; top: 6%;  right: 8%;  background: #8FD6C9; animation-delay: -1.2s; }
.deco--2 { width: 20px; height: 20px; bottom: 10%; left: 2%; background: #2BB3A3; animation-delay: -3.5s; }
.deco--3 { width: 14px; height: 14px; top: 50%; right: -1%;  background: #1E6FEB; animation-delay: -2.4s; opacity: 0.65; }

/* Bubble = position on wheel via angle + counter-rotation */
.bubble {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 35%;
  height: 35%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: transparent;
  transform:
    translate(-50%, -50%)
    rotate(var(--angle, 0deg))
    translateX(75%)
    rotate(calc(-1 * (var(--angle, 0deg) + var(--rotation, 0deg))));
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.bubble__float {
  display: block;
  width: 100%; height: 100%;
  border-radius: 999px;
  animation: aud-bubbles-floatY 5.5s ease-in-out infinite;
}
.bubble:nth-child(2) .bubble__float { animation-delay: -2.1s; animation-duration: 6.2s; }
.bubble:nth-child(3) .bubble__float { animation-delay: -4.0s; animation-duration: 5.8s; }

/* Visible disc — solid colour, image, or both */
.bubble__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  border-radius: inherit;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: var(--bubble-text-size, 24px);
  text-align: center;
  padding: 12px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 22px 44px -22px rgba(10, 34, 64, 0.50);
  transform: scale(0.7);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}
.bubble--navy .bubble__inner { background-color: #0A2240; }
.bubble--blue .bubble__inner { background-color: #1E6FEB; }
.bubble--teal .bubble__inner { background-color: #2BB3A3; }

/* Per-bubble overlay (sits over image, under text) */
.bubble__inner-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.bubble__inner-overlay--navy  { background: #0A2240; }
.bubble__inner-overlay--blue  { background: #1E6FEB; }
.bubble__inner-overlay--teal  { background: #2BB3A3; }
.bubble__inner-overlay--mint  { background: #8FD6C9; }
.bubble__inner-overlay--dark  { background: #000; }
.bubble__inner-overlay--white { background: #fff; }

/* Text stays above the overlay */
.bubble__text {
  position: relative;
  z-index: 1;
}

/* Three-tier size hierarchy */
.bubble.is-active .bubble__inner { transform: scale(1.6); }
.bubble.is-mid    .bubble__inner { transform: scale(0.9); }
.bubble.is-small  .bubble__inner { transform: scale(0.7); }

.bubble.is-active .bubble__inner { box-shadow: 0 30px 60px -22px rgba(10, 34, 64, 0.65); }
.bubble:hover .bubble__inner       { box-shadow: 0 32px 56px -22px rgba(10, 34, 64, 0.65); }
.bubble:focus-visible .bubble__inner { outline: 3px solid #fff; outline-offset: 4px; }

/* Active pulse ring — outside the inner, so the inner has no overflow:hidden */
.bubble.is-active .bubble__inner::after {
  content: '';
  position: absolute; inset: -10px;
  border-radius: 999px;
  border: 2px solid currentColor;
  opacity: 0.22;
  animation: aud-bubbles-pulse 2.8s ease-in-out infinite;
}

@keyframes aud-bubbles-floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes aud-bubbles-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.22; }
  50%      { transform: scale(1.08); opacity: 0;    }
}

/* ===== Panel ===== */
.panel { min-height: 320px; }
.panel__inner { animation: aud-bubbles-fadeIn 0.4s ease-out; }
.panel__inner[hidden] { display: none; }

.panel__heading {
  margin: 0;
  font-family: ;
  font-weight: ;
  font-style: ;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0A2240;
}

.panel__intro {
  margin: 18px 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: ;
}
.panel__intro > *:first-child { margin-top: 0; }
.panel__intro > *:last-child  { margin-bottom: 0; }

.panel__bullets {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel__bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  line-height: 1.5;
  color: #0A2240;
}
.check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 2px;
  background: rgba(30,111,235,0.12);
  border-radius: 999px;
  position: relative;
}
.check::after {
  content: '';
  position: absolute; left: 5px; top: 5px;
  width: 8px; height: 5px;
  border-left: 2px solid #1E6FEB;
  border-bottom: 2px solid #1E6FEB;
  transform: rotate(-45deg);
}

.aud-bubbles__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  margin-top: 28px;
  background: #1E6FEB;
  color: #fff;
  text-decoration: none;
  border-radius: ;
  font-weight: 700;
  font-size: 15px;
  transition: background-color 0.18s ease;
}
.aud-bubbles__cta:hover { background: #1A63D4; }
.aud-bubbles--dark .aud-bubbles__cta       { background: #8FD6C9; color: #0A2240; }
.aud-bubbles--dark .aud-bubbles__cta:hover { background: #B9E5DA; }

@keyframes aud-bubbles-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Fade-up scroll animation ===== */
.aud-bubbles.aud-bubbles--fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.aud-bubbles.aud-bubbles--fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .aud-bubbles, .aud-bubbles--fade-up,
  .bubble, .bubble__float, .bubble__inner, .wheel, .deco, .panel__inner {
    animation: none !important;
    transition-duration: 0.001s !important;
  }
  .aud-bubbles.aud-bubbles--fade-up { opacity: 1; transform: none; }
  .bubble.is-active .bubble__inner::after { animation: none; opacity: 0; }
}
