/* ==========================================================================
   4. POWERPOINT SLOW-MOTION TRANSITIONS & 3D AKAR STAGE (animations.css)
   ========================================================================== */

.slide .inner {
  will-change: opacity;
  transition: opacity 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
  opacity: 1;
}

.slide.is-before .inner,
.slide.is-after .inner {
  opacity: 0.25;
}

.slide.is-active .inner {
  opacity: 1;
}

/* Smooth PowerPoint Slow-Motion Staggered Content Entrance */
.slide.is-active .inner > *,
.slide.is-active .section-head > *,
.slide.is-active .service-card,
.slide.is-active .work,
.slide.is-active .design,
.slide.is-active .workflow,
.slide.is-active .update {
  animation: pptSlowMotionIn 0.88s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--stagger, 0) * 65ms + 140ms);
}

@keyframes pptSlowMotionIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* 3D Akar Companion Stage */
.akar-field {
  position: fixed;
  z-index: 65;
  inset: 0;
  pointer-events: none;
}

.robot-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 82px;
  min-height: 92px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  cursor: pointer;
  transform: translate3d(var(--bot-x, calc(100vw - 128px)), var(--bot-y, 16px), 0);
  transform-origin: center;
  transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 18px 22px rgba(2, 8, 18, 0.48));
  will-change: transform;
}

.akar-field.featured .robot-stage {
  width: min(28vw, 330px);
  pointer-events: auto;
}

.bot-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.bot-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.bot-loading {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  color: var(--faint);
  font: 500 9px var(--font-mono);
  text-align: center;
}

.bot-canvas-wrap.is-ready .bot-loading {
  opacity: 0;
}

.akar-field.transitioning .bot-canvas-wrap {
  animation: akarLead 0.95s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.robot-stage.is-peeking .bot-canvas-wrap {
  animation: akarPeek 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes akarLead {
  0%   { transform: translate3d(0, 0, 0) rotate(0) scale(1); }
  26%  { transform: translate3d(0, -34px, 0) rotate(-10deg) scale(1.05); }
  64%  { transform: translate3d(0, -12px, 0) rotate(350deg) scale(1.02); }
  84%  { transform: translate3d(0, 4px, 0) rotate(360deg) scale(0.98, 1.02); }
  100% { transform: translate3d(0, 0, 0) rotate(360deg) scale(1); }
}

@keyframes akarPeek {
  0%   { transform: translate3d(20px, -10px, 0) rotate(6deg); }
  70%  { transform: translate3d(-4px, 0, 0) rotate(-2deg); }
  100% { transform: translate3d(0, 0, 0) rotate(0); }
}

.bot-trail-dot {
  position: absolute;
  z-index: -1;
  width: var(--trail-size, 6px);
  height: var(--trail-size, 6px);
  margin: calc(var(--trail-size, 6px) / -2);
  border-radius: 50%;
  pointer-events: none;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(232, 168, 56, 0.85);
  animation: trailWhoosh 0.65s ease-out forwards;
}

@keyframes trailWhoosh {
  0%   { opacity: 0.82; transform: scale(1); }
  100% { opacity: 0; transform: translate3d(-16px, 10px, 0) scale(0.18); }
}

.bot-sleep {
  position: absolute;
  right: 2%;
  top: 2%;
  z-index: 4;
  color: var(--gold2);
  font: 700 15px/1 var(--font-mono);
  letter-spacing: -0.06em;
  opacity: 0;
  pointer-events: none;
}

.robot-stage.is-sleeping .bot-sleep {
  animation: sleepZ 1.8s ease-out infinite;
}

@keyframes sleepZ {
  0%   { opacity: 0; transform: translate3d(0, 8px, 0) scale(0.7); }
  25%  { opacity: 0.9; }
  100% { opacity: 0; transform: translate3d(10px, -24px, 0) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .progress span,
  .dot::before,
  .robot-stage,
  .slide .inner {
    transition: none;
  }
  .slide.is-active .inner > *,
  .slide.is-active .section-head > *,
  .slide.is-active .service-card,
  .slide.is-active .work,
  .slide.is-active .design,
  .slide.is-active .workflow,
  .slide.is-active .update {
    animation: none;
  }
}

