/* ============================================================
   NMC ANIMATIONS — Keyframes, Transitions, Motion States
   Naira Music Cartel WordPress Theme
   ============================================================ */

/* ----------------------------------------------------------
   MARQUEE SCROLL
   ---------------------------------------------------------- */
@keyframes nmc-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----------------------------------------------------------
   LIVE DOT PULSE
   ---------------------------------------------------------- */
@keyframes pulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.2; }
  100% { opacity: 1; }
}

/* ----------------------------------------------------------
   FADE IN + RISE
   ---------------------------------------------------------- */
@keyframes nmc-fade-in {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------------------------
   FADE IN (opacity only)
   ---------------------------------------------------------- */
@keyframes nmc-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ----------------------------------------------------------
   SLIDE IN FROM LEFT
   ---------------------------------------------------------- */
@keyframes nmc-slide-left {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ----------------------------------------------------------
   SLIDE IN FROM RIGHT
   ---------------------------------------------------------- */
@keyframes nmc-slide-right {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ----------------------------------------------------------
   SCALE IN
   ---------------------------------------------------------- */
@keyframes nmc-scale-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ----------------------------------------------------------
   SHIMMER (loading skeleton)
   ---------------------------------------------------------- */
@keyframes nmc-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* ----------------------------------------------------------
   PLAYER GLOW PULSE
   ---------------------------------------------------------- */
@keyframes nmc-player-glow {
  0%   { box-shadow: 0 0 10px rgba(201, 168, 76, 0.1); }
  50%  { box-shadow: 0 0 30px rgba(201, 168, 76, 0.3); }
  100% { box-shadow: 0 0 10px rgba(201, 168, 76, 0.1); }
}

/* ----------------------------------------------------------
   SPIN (loading indicator)
   ---------------------------------------------------------- */
@keyframes nmc-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   REVEAL CLASS — used by GSAP / IntersectionObserver
   Elements start invisible; JS adds animation
   ---------------------------------------------------------- */
.reveal {
  opacity: 0;
}

.reveal.is-visible {
  animation: nmc-fade-in 0.8s var(--transition-smooth) forwards;
}

.reveal--left.is-visible {
  animation: nmc-slide-left 0.8s var(--transition-smooth) forwards;
}

.reveal--right.is-visible {
  animation: nmc-slide-right 0.8s var(--transition-smooth) forwards;
}

.reveal--scale.is-visible {
  animation: nmc-scale-in 0.7s var(--transition-smooth) forwards;
}

/* Stagger delay helpers */
.reveal--delay-1 { animation-delay: 0.1s; }
.reveal--delay-2 { animation-delay: 0.2s; }
.reveal--delay-3 { animation-delay: 0.3s; }
.reveal--delay-4 { animation-delay: 0.4s; }
.reveal--delay-5 { animation-delay: 0.5s; }

/* ----------------------------------------------------------
   FILM GRAIN OVERLAY — .nmc-grain
   SVG noise texture at 4% opacity over entire page
   ---------------------------------------------------------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  /* SVG turbulence noise */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9998;
  background-repeat: repeat;
  background-size: 300px 300px;
}

/* ----------------------------------------------------------
   NAV GLOW — when music is playing
   ---------------------------------------------------------- */
body.playing #nmc-nav {
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.15);
}

/* ----------------------------------------------------------
   CUSTOM CURSOR — .cursor
   JS moves this element to follow the pointer
   ---------------------------------------------------------- */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--nmc-gold);
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
  will-change: transform;
}

.cursor--expanded {
  width: 40px;
  height: 40px;
}

/* ----------------------------------------------------------
   PAGE LOAD FADE IN
   Body starts invisible, JS adds .loaded after DOMContentLoaded
   ---------------------------------------------------------- */
body {
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.loaded {
  opacity: 1;
}

/* ----------------------------------------------------------
   LOADING SKELETON
   ---------------------------------------------------------- */
.nmc-skeleton {
  background: linear-gradient(
    90deg,
    var(--nmc-charcoal) 25%,
    var(--nmc-grey)     50%,
    var(--nmc-charcoal) 75%
  );
  background-size: 200% 100%;
  animation: nmc-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------
   SPINNING LOADER
   ---------------------------------------------------------- */
.nmc-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--nmc-grey);
  border-top-color: var(--nmc-gold);
  border-radius: 50%;
  animation: nmc-spin 0.8s linear infinite;
  display: inline-block;
}

/* ----------------------------------------------------------
   PLAYER PLAYING STATE — glow
   ---------------------------------------------------------- */
#nmc-player.is-playing {
  animation: nmc-player-glow 3s ease-in-out infinite;
}

/* ----------------------------------------------------------
   HERO PARALLAX LAYER
   ---------------------------------------------------------- */
.nmc-hero__bg-parallax {
  will-change: transform;
  transform: translateZ(0);
}

/* ----------------------------------------------------------
   REDUCED MOTION — accessibility override
   All animations and transitions disabled
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body {
    opacity: 1;
    transition: none;
  }

  .nmc-marquee__track {
    animation: none;
  }

  .live-dot {
    animation: none;
    opacity: 1;
  }

  .reveal {
    opacity: 1;
  }

  .cursor {
    display: none;
  }

  body::after {
    display: none;
  }
}
