/* BB Spot Intro v1.0.2 */

.bb-spot-intro-root {
  position: relative;
  z-index: 999999;
}

/* Fullscreen dark overlay (no grid) — darker, but lets the site show through */
.bb-spot-intro-overlay {
  position: fixed;
  inset: 0;

  /* Soft neon bloom + dark glass (transparent enough to perceive site beneath) */
  background:
    radial-gradient(900px 520px at 62% 32%, rgba(65, 252, 246, 0.10), rgba(65, 252, 246, 0.00) 62%),
    radial-gradient(820px 480px at 28% 70%, rgba(83, 184, 247, 0.08), rgba(83, 184, 247, 0.00) 64%),
    linear-gradient(180deg, rgba(2, 10, 24, 0.62), rgba(2, 10, 24, 0.78));

  backdrop-filter: blur(8px) saturate(1.05);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);

  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 32px);
  opacity: 0;
  transition: opacity 500ms ease;
}

.bb-spot-intro-overlay.bb-spot-intro-show { opacity: 1; }

/* Card layout */
.bb-spot-intro-card {
  width: min(980px, 96vw);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(14px, 2.6vw, 26px);
  align-items: center;
  padding: clamp(18px, 3.2vw, 30px);
  border-radius: 22px;
  border: 1px solid rgba(83, 184, 247, 0.20);
  background:
    radial-gradient(800px 300px at 70% 15%, rgba(83, 184, 247, 0.10), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(8, 18, 38, 0.70), rgba(6, 14, 32, 0.82));
  box-shadow:
    0 20px 60px rgba(0,0,0,0.55),
    0 0 0 1px rgba(65, 252, 246, 0.08) inset;
  transform: translateY(10px);
  transition: transform 500ms ease;
}

.bb-spot-intro-overlay.bb-spot-intro-show .bb-spot-intro-card { transform: translateY(0); }

/* Spot wrapper (we animate this) */
.bb-spot-intro-spotwrap {
  position: relative;
  height: 220px;
  display: grid;
  place-items: center;
  overflow: visible;
}

/* Spot body */
.bb-spot-intro-spot {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 45%),
    linear-gradient(135deg, #53b8f7, #41fcf6);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.40),
    0 0 35px rgba(83, 184, 247, 0.35),
    0 0 55px rgba(65, 252, 246, 0.18);
  position: relative;
  transform-origin: center;
}

/* subtle glow behind spot */
.bb-spot-intro-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(65, 252, 246, 0.20), rgba(65, 252, 246, 0) 65%);
  filter: blur(2px);
  opacity: 0.9;
  z-index: -1;
}

/* Face */
.bb-spot-intro-face { position: absolute; inset: 0; }
.bb-spot-intro-eye {
  position: absolute;
  top: 40px;
  width: 10px;
  height: 14px;
  border-radius: 999px;
  background: rgba(4, 14, 28, 0.75);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.10);
}
.bb-spot-intro-eye-left { left: 38px; }
.bb-spot-intro-eye-right { right: 38px; }

.bb-spot-intro-smile {
  position: absolute;
  left: 50%;
  top: 62px;
  width: 38px;
  height: 22px;
  transform: translateX(-50%);
  border-bottom: 6px solid rgba(4, 14, 28, 0.70);
  border-radius: 0 0 999px 999px;
  opacity: 0.95;
}

/* Bubble */
.bb-spot-intro-bubble {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(12, 26, 56, 0.78), rgba(10, 22, 48, 0.90));
  border: 1px solid rgba(83, 184, 247, 0.22);
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
}

.bb-spot-intro-bubble-inner {
  padding: clamp(16px, 2.6vw, 24px);
  color: rgba(240, 249, 255, 0.92);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.bb-spot-intro-title {
  font-size: clamp(18px, 2.0vw, 24px);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: rgba(240, 249, 255, 0.96);
  min-height: 1.2em;
}

.bb-spot-intro-text p {
  margin: 0 0 10px 0;
  font-size: clamp(14px, 1.25vw, 16px);
  line-height: 1.55;
  color: rgba(224, 244, 255, 0.86);
  min-height: 1.55em;
}
.bb-spot-intro-text p strong { color: rgba(65, 252, 246, 0.95); }

/* Tail pointing left */
.bb-spot-intro-tail {
  position: absolute;
  left: -10px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%) rotate(45deg);
  background: linear-gradient(180deg, rgba(12, 26, 56, 0.78), rgba(10, 22, 48, 0.90));
  border-left: 1px solid rgba(83, 184, 247, 0.22);
  border-bottom: 1px solid rgba(83, 184, 247, 0.22);
  border-bottom-left-radius: 6px;
}

/* Button */
.bb-spot-intro-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bb-spot-intro-subtle {
  order: 1;
}

.bb-spot-intro-btn {
  order: 2;
}

.bb-spot-intro-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: rgba(4, 14, 28, 0.90);
  background: linear-gradient(135deg, #53b8f7, #41fcf6);
  box-shadow:
    0 14px 30px rgba(0,0,0,0.35),
    0 0 0 1px rgba(255,255,255,0.14) inset;
  transition: transform 180ms ease, filter 180ms ease;
}

.bb-spot-intro-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.bb-spot-intro-btn:active { transform: translateY(0px) scale(0.99); }

.bb-spot-intro-subtle {
  font-size: 12px;
  color: rgba(224, 244, 255, 0.55);
}

/* Typewriter caret */
.bb-spot-intro-caret::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 6px;
  border-radius: 2px;
  background: rgba(65, 252, 246, 0.85);
  vertical-align: -0.15em;
  animation: bbCaretBlink 900ms step-end infinite;
}

@keyframes bbCaretBlink {
  0%, 40% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 820px) {
  .bb-spot-intro-card { grid-template-columns: 1fr; }
  .bb-spot-intro-tail { display: none; }
  .bb-spot-intro-spotwrap { height: 180px; }
}

/* --------- Spot spiral-in animation --------- */
.bb-spot-intro-spotwrap.bb-spot-intro-animate {
  animation: bbSpotSpiralIn 1600ms cubic-bezier(.18, .92, .18, 1) 90ms forwards;
  transform-origin: center;
}

/* Approx spiral using keyframe points (tightening into place while scaling up) */
@keyframes bbSpotSpiralIn {
  0%   { transform: translate(38vw, -14vh) scale(0.14); opacity: 0.0; filter: blur(1px); }
  10%  { opacity: 1; }
  12.5%{ transform: translate(26vw, -10vh) scale(0.22); }
  25%  { transform: translate(18vw, -2vh)  scale(0.34); }
  37.5%{ transform: translate(10vw,  6vh)  scale(0.48); }
  50%  { transform: translate(2vw,   10vh) scale(0.66); filter: blur(0px); }
  62.5%{ transform: translate(-6vw,  7vh)  scale(0.82); }
  75%  { transform: translate(-8vw,  0vh)  scale(0.98); }
  87.5%{ transform: translate(-3vw, -4vh)  scale(1.08); }
  100% { transform: translate(0, 0) scale(1.0); }
}

/* Reduce motion: no spiral, no caret blink */
@media (prefers-reduced-motion: reduce) {
  .bb-spot-intro-spotwrap.bb-spot-intro-animate { animation: none !important; transform: none !important; }
  .bb-spot-intro-caret::after { animation: none !important; }
}


/* --------- Waving hand (cartoon glove) --------- */
.bb-spot-intro-hand {
  position: absolute;
  left: -36px;          /* sits to the left of Spot */
  top: 92px;            /* vertically aligned with face */
  width: 64px;
  height: 64px;
  transform-origin: 85% 70%;
  opacity: 0;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.35));
  pointer-events: none;
}

/* Match Spot's neon gradient */
.bb-spot-intro-hand > span {
  position: absolute;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 55%),
    linear-gradient(135deg, #53b8f7, #41fcf6);
  box-shadow:
    0 0 18px rgba(83, 184, 247, 0.28),
    0 0 26px rgba(65, 252, 246, 0.14);
}

/* Palm */
.bb-spot-intro-hand-palm {
  width: 34px;
  height: 34px;
  border-radius: 14px 16px 16px 16px;
  left: 18px;
  top: 22px;
}

/* Thumb */
.bb-spot-intro-hand-thumb {
  width: 18px;
  height: 14px;
  border-radius: 10px;
  left: 48px;      /* moved to right side */
  top: 36px;
  transform: rotate(26deg);
}


/* Fingers */
.bb-spot-intro-hand-f1,
.bb-spot-intro-hand-f2,
.bb-spot-intro-hand-f3 {
  width: 12px;
  height: 26px;
  border-radius: 10px;
  top: 4px;
}

.bb-spot-intro-hand-f1 { left: 15px; transform: rotate(-6deg); }
.bb-spot-intro-hand-f2 { left: 28px; transform: rotate(0deg); }
.bb-spot-intro-hand-f3 { left: 41px; transform: rotate(7deg); }

/* Reveal + wave after Spot arrives */
.bb-spot-intro-spotwrap.bb-spot-intro-animate .bb-spot-intro-hand {
  animation: bbHandPop 320ms ease-out 1650ms forwards;
}

@keyframes bbHandPop {
  from { opacity: 0; transform: translateX(10px) scale(0.85) rotate(6deg); }
  to   { opacity: 1; transform: translateX(0) scale(1.0) rotate(0deg); }
}

/* Friendly wave */
@keyframes bbHandWave {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(18deg); }
  35%  { transform: rotate(-14deg); }
  55%  { transform: rotate(16deg); }
  75%  { transform: rotate(-10deg); }
  100% { transform: rotate(0deg); }
}

/* Keep accessible for reduce-motion */
@media (prefers-reduced-motion: reduce) {
  .bb-spot-intro-spotwrap.bb-spot-intro-animate .bb-spot-intro-hand {
  animation: bbHandPop 320ms ease-out 1650ms forwards;
}
}


/* Wave only AFTER typing finishes (JS adds class) */
.bb-spot-hand-wave .bb-spot-intro-hand {
  animation: bbHandWave 1100ms ease-in-out 120ms 2;
}



/* Tighten spacing for short answer block */
.bb-spot-intro-shortanswer{
  margin-top: 10px;
}
