/* ============================================================
   JESUS SPY — Animations & Scroll Reveals
   animations.css
   ============================================================ */

/* ── Keyframes ── */

@keyframes heroPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes scrollLine {
  0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
  40%  { opacity: 1; transform: scaleY(1);  transform-origin: top; }
  60%  { opacity: 1; transform: scaleY(1);  transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0);  transform-origin: bottom; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes goldGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(201,168,76,0.2), 0 0 40px rgba(201,168,76,0.08); }
  50%       { box-shadow: 0 0 40px rgba(201,168,76,0.4), 0 0 80px rgba(201,168,76,0.15); }
}

@keyframes borderPulse {
  0%, 100% { border-color: rgba(201,168,76,0.18); }
  50%       { border-color: rgba(201,168,76,0.5); }
}

@keyframes terminalBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes particleDrift {
  0%   { transform: translateY(0) translateX(0) scale(1);   opacity: 0.6; }
  33%  { transform: translateY(-30px) translateX(15px) scale(1.1); opacity: 1; }
  66%  { transform: translateY(-15px) translateX(-10px) scale(0.9); opacity: 0.7; }
  100% { transform: translateY(-60px) translateX(5px) scale(0.7);  opacity: 0; }
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease, cubic-bezier(0.16,1,0.3,1)),
              transform 0.7s var(--ease, cubic-bezier(0.16,1,0.3,1));
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* staggered children inside grids */
.features-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.features-grid .reveal:nth-child(2) { transition-delay: 0.10s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.15s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.20s; }
.features-grid .reveal:nth-child(5) { transition-delay: 0.25s; }
.features-grid .reveal:nth-child(6) { transition-delay: 0.30s; }
.features-grid .reveal:nth-child(7) { transition-delay: 0.35s; }
.features-grid .reveal:nth-child(8) { transition-delay: 0.40s; }

.pricing-grid .reveal:nth-child(1)  { transition-delay: 0.08s; }
.pricing-grid .reveal:nth-child(2)  { transition-delay: 0.18s; }

.referral-grid .reveal:nth-child(1) { transition-delay: 0.06s; }
.referral-grid .reveal:nth-child(2) { transition-delay: 0.14s; }
.referral-grid .reveal:nth-child(3) { transition-delay: 0.22s; }

.legal-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.legal-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.legal-grid .reveal:nth-child(3) { transition-delay: 0.19s; }
.legal-grid .reveal:nth-child(4) { transition-delay: 0.26s; }

/* ── Hero entrance ── */
.hero-content.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16,1,0.3,1), transform 1s cubic-bezier(0.16,1,0.3,1);
}
.hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Active pricing card glow cycle ── */
.pricing-card.active {
  animation: goldGlow 4s ease-in-out infinite;
}

/* ── Active pricing card border pulse ── */
.pricing-card.active {
  animation: goldGlow 4s ease-in-out infinite, borderPulse 4s ease-in-out infinite;
}

/* ── Hero title gold shimmer ── */
.title-spy {
  background-size: 200% auto;
  background-image: linear-gradient(
    135deg,
    #c9a84c 0%,
    #f0d080 30%,
    #c9a84c 50%,
    #8a6a18 70%,
    #c9a84c 100%
  );
  animation: shimmer 5s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero badge float ── */
.hero-badge { animation: floatBadge 4s ease-in-out infinite; }

/* ── Section label fade in ── */
.section-label { animation: fadeInDown 0.6s var(--ease, cubic-bezier(0.16,1,0.3,1)) both; }

/* ── Feature card icon hover spin ── */
.feature-card:hover .feature-icon svg {
  animation: spinSlow 8s linear infinite;
}

/* ── Terminal cursor ── */
.terminal-body::after {
  content: '▋';
  color: var(--gold-500, #c9a84c);
  animation: terminalBlink 1s step-end infinite;
  font-size: 0.8rem;
  margin-top: 4px;
  display: block;
}

/* ── Security badge hover glow ── */
.sec-badge:hover svg {
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.6));
}

/* ── No-access list item entrance ── */
.no-access-list li {
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease, cubic-bezier(0.16,1,0.3,1));
}
.no-access-list li:hover { transform: translateX(4px); }

/* ── Navbar entrance ── */
.navbar { animation: fadeInDown 0.6s var(--ease, cubic-bezier(0.16,1,0.3,1)) both; }

/* ── Scroll hint arrow pulse ── */
@keyframes arrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}
.hero-scroll-hint { animation: arrowBounce 2.4s ease-in-out infinite; }

/* ── Particle dot ── */
.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.7) 0%, transparent 70%);
  pointer-events: none;
  animation: particleDrift linear infinite;
}

/* ── Reduce motion override ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
