/* Movimento independente da composição: o CSS principal define as posições. */
.product-motion {
  animation: soluna-window-float 9s ease-in-out infinite;
  will-change: transform;
}

.product-tilt {
  transform: rotateX(calc(var(--tilt-x, 2deg) + var(--pointer-y, 0deg)))
    rotateY(calc(var(--tilt-y, -13deg) + var(--pointer-x, 0deg)))
    rotateZ(var(--tilt-z, -0.8deg));
  transform-style: preserve-3d;
  will-change: transform;
}

.ambient-glow {
  animation: soluna-glow-breathe 12s ease-in-out infinite;
}

.star {
  animation: soluna-star-breathe 7s ease-in-out infinite;
  animation-delay: var(--star-delay, 0s);
}

.approval-toast {
  animation: soluna-toast-float 10s ease-in-out infinite;
  will-change: translate;
}

.motion-entering [data-message],
.motion-entering [data-preview-appointment],
.motion-entering [data-preview-step],
.motion-entering [data-insight] {
  animation: soluna-piece-enter 680ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.motion-entering [data-message="1"] { animation-delay: 100ms; }
.motion-entering [data-message="2"] { animation-delay: 280ms; }
.motion-entering [data-message="3"] { animation-delay: 460ms; }
.motion-entering [data-preview-appointment] { animation-delay: 620ms; }
.motion-entering [data-preview-step] { animation-delay: 720ms; }
.motion-entering [data-insight="1"] { animation-delay: 220ms; }
.motion-entering [data-insight="2"] { animation-delay: 410ms; }

.is-motion-paused .product-motion,
.is-motion-paused .ambient-glow,
.is-motion-paused .star,
.is-motion-paused .approval-toast {
  animation-play-state: paused;
}

@keyframes soluna-window-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

@keyframes soluna-glow-breathe {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 0.88; }
}

@keyframes soluna-star-breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

@keyframes soluna-toast-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}

@keyframes soluna-piece-enter {
  from { opacity: 0.55; transform: translate3d(0, 5px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .product-motion,
  [data-message],
  [data-preview-appointment],
  [data-preview-step],
  [data-insight] {
    transform: none !important;
    opacity: 1 !important;
    will-change: auto;
  }

  .approval-toast {
    translate: none;
    will-change: auto;
  }

  .product-tilt {
    transform: rotateX(var(--tilt-x, 2deg))
      rotateY(var(--tilt-y, -13deg))
      rotateZ(var(--tilt-z, -0.8deg));
    will-change: auto;
  }
}
