/* ============================================================
   Casel Marketing — Motion
   Ambient (always on), arrival (one-shot), reading (idle nudges).
   All animations gated by `prefers-reduced-motion: reduce`.
   ============================================================ */

/* ---------- Keyframes ---------- */

/* (The orb's breathe + ring pulse keyframes live in sections/hero.css and
   sections/footer-cta.css now — they are event-driven, not ambient.) */

@keyframes brand-dot-pulse {
  0%   { box-shadow: 0 0 0 0 var(--color-red-glow); }
  60%  { box-shadow: 0 0 0 6px rgba(233, 69, 96, 0); }
  100% { box-shadow: 0 0 0 6px rgba(233, 69, 96, 0); }
}

@keyframes glow-drift {
  0%, 100% { transform: translate3d(-6%, 0, 0); }
  50%      { transform: translate3d(6%, 0, 0); }
}

@keyframes bounce-cue {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@keyframes cta-idle-pulse {
  0%, 90%, 100% { transform: scale(1); }
  93%           { transform: scale(1.025); }
}

@keyframes sonar-ring {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3); opacity: 0; }
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Reveal primitives (JS adds .is-revealed) ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.is-revealed[data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Brand dot pulse: event-driven on heartbeat tick ---------- */

.brand-dot.is-pulsing,
.dot-pulse.is-pulsing {
  animation: brand-dot-pulse 900ms var(--ease-out);
}

/* ---------- Reading layer: CTA idle ---------- */

.cta-idle {
  animation: cta-idle-pulse 6s var(--ease-in-out) 4s infinite;
}

/* ---------- Reading layer: scroll cue ---------- */

.scroll-cue {
  animation: bounce-cue 2s var(--ease-in-out) infinite;
}

/* ---------- Reduced motion ---------- */

@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;
    animation-timeline: none !important;
  }

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

  /* ambient layers freeze in their resting state */
  .orb,
  .orb__ring,
  .ambient-glow,
  .brand-dot,
  .dot-pulse,
  .cta-idle,
  .scroll-cue,
  .hero__beam-slug {
    animation: none !important;
  }
}
