/* ============================================================
   DLST.ca — Animations
   All animations wrapped in prefers-reduced-motion: no-preference
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {

  /* -------------------------------------------------------
     1. Neon Flicker — simulates neon tube flicker
     ------------------------------------------------------- */
  @keyframes flicker {
    0%   { opacity: 1; }
    4%   { opacity: 0.85; }
    8%   { opacity: 1; }
    12%  { opacity: 0.9; }
    16%  { opacity: 1; }
    20%  { opacity: 0.8; }
    24%  { opacity: 1; }
    30%  { opacity: 0.92; }
    34%  { opacity: 1; }
    50%  { opacity: 1; }
    54%  { opacity: 0.87; }
    58%  { opacity: 1; }
    70%  { opacity: 1; }
    74%  { opacity: 0.84; }
    78%  { opacity: 1; }
    82%  { opacity: 0.9; }
    86%  { opacity: 1; }
    100% { opacity: 1; }
  }

  .flicker {
    animation: flicker 4s infinite;
  }

  /* -------------------------------------------------------
     2. Pulse Glow — box-shadow breathing for glowing elements
     ------------------------------------------------------- */
  @keyframes pulseGlow {
    0%   { box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.4); }
    50%  { box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.7), 0 0 80px rgba(var(--accent-rgb), 0.3); }
    100% { box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.4); }
  }

  .pulse-glow {
    animation: pulseGlow 3s ease-in-out infinite;
  }

  /* -------------------------------------------------------
     3. Neon Slide — gradient line sliding left to right
     ------------------------------------------------------- */
  @keyframes neonSlide {
    0%   { background-position: -200% center; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { background-position: 200% center; opacity: 0; }
  }

  .hero-accent-line {
    display: block;
    height: 3px;
    width: 100%;
    max-width: 320px;
    border-radius: 2px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--accent) 40%,
      var(--accent-2) 60%,
      transparent 100%
    );
    background-size: 200% auto;
    animation: neonSlide 3s ease-in-out infinite;
    margin: var(--space-6) 0;
  }

  /* -------------------------------------------------------
     4. Fade In Up — opacity + translateY entrance
     ------------------------------------------------------- */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .animate-fade-in-up {
    animation: fadeInUp 0.65s ease both;
  }

  /* -------------------------------------------------------
     5. Fade In — simple opacity entrance
     ------------------------------------------------------- */
  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .animate-fade-in {
    animation: fadeIn 0.5s ease both;
  }

  /* -------------------------------------------------------
     6. Scale In — scale + opacity entrance
     ------------------------------------------------------- */
  @keyframes scaleIn {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  .animate-scale-in {
    animation: scaleIn 0.4s ease both;
  }

  /* -------------------------------------------------------
     7. Grid Pulse — glow spot breathing on grid background
     ------------------------------------------------------- */
  @keyframes gridPulse {
    0%   { opacity: 0.5; }
    50%  { opacity: 1; }
    100% { opacity: 0.5; }
  }

  .grid-bg::after {
    animation: gridPulse 8s ease-in-out infinite;
  }

  /* -------------------------------------------------------
     8. Rotate Slow — 360deg rotation, decorative
     ------------------------------------------------------- */
  @keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
  }

  .rotate-slow {
    animation: rotateSlow 30s linear infinite;
  }

  /* -------------------------------------------------------
     9. Shimmer — loading skeleton effect
     ------------------------------------------------------- */
  @keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
  }

  .skeleton {
    background: linear-gradient(
      90deg,
      var(--surface-2) 25%,
      var(--border) 50%,
      var(--surface-2) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.6s infinite linear;
    border-radius: var(--radius);
  }

  /* -------------------------------------------------------
     Animation delay utilities
     ------------------------------------------------------- */
  .anim-delay-100 { animation-delay: 0.1s; }
  .anim-delay-200 { animation-delay: 0.2s; }
  .anim-delay-300 { animation-delay: 0.3s; }
  .anim-delay-400 { animation-delay: 0.4s; }
  .anim-delay-500 { animation-delay: 0.5s; }
  .anim-delay-600 { animation-delay: 0.6s; }
  .anim-delay-800 { animation-delay: 0.8s; }

  /* -------------------------------------------------------
     Staggered reveal for grid children
     ------------------------------------------------------- */
  .stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
  .stagger-children > *:nth-child(2) { animation-delay: 0.15s; }
  .stagger-children > *:nth-child(3) { animation-delay: 0.25s; }
  .stagger-children > *:nth-child(4) { animation-delay: 0.35s; }
  .stagger-children > *:nth-child(5) { animation-delay: 0.45s; }
  .stagger-children > *:nth-child(6) { animation-delay: 0.55s; }

} /* end @media (prefers-reduced-motion: no-preference) */
