/* ─────────────────────────────────────────────────────────────────────────
   animations.css — Keyframes + scroll-reveal system.
   animations.js adds .visible when elements enter the viewport.
   All timing uses tokens from tokens.css.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Scroll Reveal ──────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity   var(--dur-xslow) var(--ease-out),
    transform var(--dur-xslow) var(--ease-out);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity   var(--dur-xslow) var(--ease-out),
    transform var(--dur-xslow) var(--ease-out);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity   var(--dur-xslow) var(--ease-out),
    transform var(--dur-xslow) var(--ease-out);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity   var(--dur-xslow) var(--ease-out),
    transform var(--dur-xslow) var(--ease-out);
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  transform: none;
}

/* Stagger helpers — apply to siblings in a grid/flex container */
.delay-1 { transition-delay: 0.06s; }
.delay-2 { transition-delay: 0.14s; }
.delay-3 { transition-delay: 0.22s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.42s; }
.delay-6 { transition-delay: 0.54s; }

/* ── Nav Glass Transition ───────────────────────────────────────────── */
#site-nav {
  transition:
    background   var(--dur-slow) var(--ease-out),
    border-color var(--dur-slow) var(--ease-out),
    box-shadow   var(--dur-slow) var(--ease-out),
    padding-top  var(--dur-slow) var(--ease-out),
    padding-bottom var(--dur-slow) var(--ease-out);
}

/* ── Floating CTA Visibility ────────────────────────────────────────── */
#floating-cta {
  transition:
    opacity   var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
#floating-cta.hidden {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

/* ── Hero Load Sequence (CSS-only, fires on first paint) ────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scrollDrop {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(10px); }
}
@keyframes linePulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

.hero-eyebrow  { animation: heroFadeIn 1s   var(--ease-out) 0.20s both; }
.hero-headline { animation: heroFadeUp 1.1s  var(--ease-out) 0.50s both; }
.hero-sub      { animation: heroFadeUp 1.0s  var(--ease-out) 0.72s both; }
.hero-ctas     { animation: heroFadeUp 1.0s  var(--ease-out) 0.94s both; }
.scroll-hint   {
  animation:
    heroFadeIn 0.9s var(--ease-out)   1.5s  both,
    scrollDrop 2.4s ease-in-out       2.5s  infinite;
}
.scroll-hint-line { animation: linePulse 2.4s ease-in-out 2.5s infinite; }

/* ── Service Card Border Draw ───────────────────────────────────────── */
/* Applied via ::after pseudo element in styles.css */
@keyframes borderDraw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Chat bubble entrance ───────────────────────────────────────────── */
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.msg { animation: bubbleIn 0.28s var(--ease-out) both; }

/* ── Pulse ring (AI status indicator) ──────────────────────────────── */
@keyframes pulsePing {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0;   }
}
.ai-pulse-ring {
  animation: pulsePing 2s ease-out infinite;
}
