/* ==========================================================================
   Centella Sculptural Sprite Stage — Drop-in styles for #showcase-art
   Matches centella.com.au (#F1F0EE surface, 520x320 stage, Geist typography)
   with Birdeye-inspired subtle diagonal blur wipe & staggered callout pills.
   ========================================================================== */

.centella-sprite-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 520 / 320;
  height: auto;
  min-height: 260px;
  margin: 0 auto;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}

/* Sprite sheet viewport — exact 13:8 aspect ratio matching 650x400 frames */
.centella-sprite-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  /* 5 cols x 8 rows sprite sheet scaled responsively to container */
  background-size: 500% 800%;
  background-position: 0% 0%;
  will-change: background-position, transform, opacity;
  z-index: 1;
}

/* Subtle Birdeye-inspired entrance glide when switching industry tabs */
.centella-sprite-stage.is-switching .centella-sprite-canvas {
  animation: centellaStageEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes centellaStageEnter {
  0% {
    opacity: 0.25;
    transform: translate3d(18px, 6px, 0) scale(0.975);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Optional subtle diagonal frosted-blur sheen across stage on tab change */
.centella-sprite-stage::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 32px;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(100deg, transparent 20%, #000 50%, transparent 80%);
  -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 50%, transparent 80%);
  mask-size: 240% 100%;
  -webkit-mask-size: 240% 100%;
}

.centella-sprite-stage.is-switching::after {
  animation: centellaDiagonalWipe 0.42s cubic-bezier(0.4, 0, 0.2, 1) 40ms both;
}

@keyframes centellaDiagonalWipe {
  0% {
    opacity: 0.75;
    mask-position: 120% 0;
    -webkit-mask-position: 120% 0;
  }
  100% {
    opacity: 0;
    mask-position: -30% 0;
    -webkit-mask-position: -30% 0;
  }
}

/* --------------------------------------------------------------------------
   Floating HTML/CSS Callout Pills (replaces static SVG callouts)
   -------------------------------------------------------------------------- */
.centella-callout {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(100, 100, 100, 0.12);
  box-shadow:
    0 10px 28px -6px rgba(39, 32, 29, 0.11),
    0 2px 6px rgba(39, 32, 29, 0.05);
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.centella-callout--left {
  top: 16%;
  left: 0%;
  max-width: 196px;
}

.centella-callout--right {
  top: 40%;
  right: 0%;
  max-width: 196px;
}

.centella-stage-enter .centella-callout--left,
.centella-sprite-stage.is-switching .centella-callout--left {
  animation: centellaCalloutPop 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.centella-stage-enter .centella-callout--right,
.centella-sprite-stage.is-switching .centella-callout--right {
  animation: centellaCalloutPop 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

@keyframes centellaCalloutPop {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.centella-callout-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.centella-sprite-stage[data-theme="health"] .centella-callout-icon {
  background: linear-gradient(135deg, #32552a 0%, #1e3618 100%);
}
.centella-sprite-stage[data-theme="realestate"] .centella-callout-icon {
  background: linear-gradient(135deg, #28549c 0%, #153266 100%);
}
.centella-sprite-stage[data-theme="trades"] .centella-callout-icon {
  background: linear-gradient(135deg, #a8191e 0%, #7d1014 100%);
}

.centella-callout-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.centella-callout-title {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #212121;
  white-space: nowrap;
}

.centella-sprite-stage[data-theme="health"] .centella-callout-title {
  color: #26421f;
}
.centella-sprite-stage[data-theme="realestate"] .centella-callout-title {
  color: #1c3f7a;
}
.centella-sprite-stage[data-theme="trades"] .centella-callout-title {
  color: #8c1418;
}

.centella-callout-sub {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.3;
  color: #646464;
  white-space: nowrap;
}

.centella-sprite-stage.hide-callouts .centella-callout {
  opacity: 0;
  visibility: hidden;
}

/* Mobile scaling for callout pills */
@media (max-width: 560px) {
  .centella-sprite-stage {
    min-height: 0;
  }
  .centella-callout {
    padding: 8px 11px;
    border-radius: 12px;
    gap: 7px;
  }
  .centella-callout-icon {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
  .centella-callout-title {
    font-size: 11.5px;
  }
  .centella-callout-sub {
    font-size: 10px;
  }
}

/* Reduced motion: show crisp resting frame with no animation */
@media (prefers-reduced-motion: reduce) {
  .centella-sprite-stage.is-switching .centella-sprite-canvas,
  .centella-sprite-stage.is-switching::after,
  .centella-sprite-stage.is-switching .centella-callout {
    animation: none !important;
  }
}
