/* ═══════════════════════════════════════════════════════════════
   DARK ANGEL — Motion System
   Purpose-specific animations, no generic fade-ups
   ═══════════════════════════════════════════════════════════════ */

/* ── Core Keyframes ── */
@keyframes logoSpin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.85); } }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(8px); opacity: 0.15; } }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

@keyframes astraGlow {
  0%, 100% { box-shadow: 0 0 24px rgba(37,99,235,0.4), 0 0 60px rgba(37,99,235,0.15); transform: scale(1); }
  50% { box-shadow: 0 0 36px rgba(37,99,235,0.5), 0 0 80px rgba(37,99,235,0.2); transform: scale(1.05); }
}

/* ── Section-wipe: content block entrance ── */
.anim-section-wipe {
  opacity: 0; transform: scale(0.97) translateY(28px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-section-wipe.visible { opacity: 1; transform: scale(1) translateY(0); }

/* ── Text-reveal: clip from below (Apple-style headlines) ── */
.anim-text-reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-text-reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Stagger-grid: items enter with Y + slight scale ── */
.anim-stagger-grid {
  opacity: 0; transform: translateY(18px) scale(0.98);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-stagger-grid.visible { opacity: 1; transform: translateY(0) scale(1); }

/* ── Counter-reveal: scale up from smaller ── */
.anim-counter-reveal {
  opacity: 0; transform: scale(0.9);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-counter-reveal.visible { opacity: 1; transform: scale(1); }

/* ── Fade-up: retained as backwards compat ── */
.anim-fade-up {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Noise texture overlay ── */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.008;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 256px 256px;
}

/* ── Subtle grid on modules section ── */
.section--modules::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.01) 1px, transparent 1px);
  background-size: 100px 100px; pointer-events: none; z-index: 0;
}
.section--modules > .container { position: relative; z-index: 1; }

/* ── Module visual hover glow ── */
.module-showcase .module-visual::before {
  content: ''; position: absolute; inset: -1px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(37,99,235,0.06), transparent);
  z-index: -1; opacity: 0; transition: opacity 0.8s ease;
}
.module-showcase:hover .module-visual::before { opacity: 1; }

/* ── Section divider gradient line ── */
.section--outcomes::after,
.section--trust::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 160px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,99,235,0.10), transparent);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-fade-up, .anim-section-wipe, .anim-text-reveal,
  .anim-stagger-grid, .anim-counter-reveal {
    opacity: 1; transform: none;
  }
}
