/* ==========================================================================
   Standby — Animations: keyframes + scroll-reveal system
   All motion is compositor-friendly (transform / opacity) and respects
   prefers-reduced-motion.
   ========================================================================== */

@keyframes ping {
  0% { transform: scale(0.6); opacity: 0.9; }
  80%, 100% { transform: scale(1.8); opacity: 0; }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50% { box-shadow: 0 0 0 5px transparent; opacity: 0.65; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes drift {
  from { transform: translateX(-52%) translateY(0); opacity: 0.85; }
  to { transform: translateX(-48%) translateY(24px); opacity: 1; }
}

@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

@keyframes bubble-in {
  to { opacity: 1; transform: none; }
}

@keyframes xp-pop {
  0% { opacity: 0; transform: translateY(6px); }
  18% { opacity: 1; transform: translateY(0); }
  70% { opacity: 1; transform: translateY(-10px); }
  100% { opacity: 0; transform: translateY(-22px); }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(115%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

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

/* ---- Hero entrance (staggered) ---- */
.hero__title .line span {
  display: inline-block;
  animation: hero-rise 0.9s var(--ease-out-expo) both;
}
.hero__title .line:nth-child(1) span { animation-delay: 0.05s; }
.hero__title .line:nth-child(2) span { animation-delay: 0.16s; }
.hero__title .line:nth-child(3) span { animation-delay: 0.27s; }

.hero [data-rise] {
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out-expo) both;
}
.hero__sub { animation-delay: 0.4s; }
.hero__cta { animation-delay: 0.5s; }
.hero__proof { animation-delay: 0.6s; }
.copilot { animation: fade-up 1s var(--ease-out-expo) 0.3s both; }

/* typing caret used in copilot transcript */
.caret::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--signal);
  animation: blink 1s steps(1) infinite;
}

/* ==========================================================================
   Scroll reveal (driven by IntersectionObserver -> .is-visible)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal="scale"] { transform: translateY(28px) scale(0.97); }
[data-reveal="scale"].is-visible { transform: none; }

[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="left"].is-visible { transform: none; }

[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="right"].is-visible { transform: none; }

/* ==========================================================================
   Reduced motion: cut everything decorative
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__title .line span,
  .hero [data-rise],
  .copilot { opacity: 1 !important; transform: none !important; }
  .hero__beam { display: none; }
  .copilot { transform: none !important; }
}
