/* ───────────────────────────────────────────────────────────
   NOXORI · Animation System
   AOS (Animate On Scroll) handles entry animations via CDN.
   This file: AOS distance overrides + micro-animation loops.
   ─────────────────────────────────────────────────────────── */

/* ── 1. AOS distance overrides ─────────────────────────────
   AOS defaults to 100 px — too aggressive for NOXORI.
   This file loads after aos.css, so the cascade wins.         */

[data-aos=fade-up]    { transform: translate3d(0, 30px, 0); }
[data-aos=fade-down]  { transform: translate3d(0, -30px, 0); }
[data-aos=fade-right] { transform: translate3d(-40px, 0, 0); }
[data-aos=fade-left]  { transform: translate3d(40px, 0, 0); }
[data-aos=zoom-in]    { transform: scale(0.92); }

/* ── 2. View transition ────────────────────────────────────
   Applied by design.js when switching between screens.       */

@keyframes nxViewIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

.nx-view-enter {
  animation: nxViewIn .3s ease backwards;
}

/* ── 3. Micro-decorative keyframes (infinite loops) ───────
   Applied as utility classes on elements that should
   always pulse / float / glow.                               */

/* Pulse — gentle opacity oscillation */
@keyframes nxPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* Float — levitate up and down */
@keyframes nxFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Glow — shimmer sweep across an element */
@keyframes nxGlow {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* Gentle rotation */
@keyframes nxSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Soft breathing scale */
@keyframes nxBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* ── Utility classes ───────────────────────────────────────
   Add these to any element for infinite micro-animation.     */

.nx-pulse {
  animation: nxPulse 2.4s ease-in-out infinite;
}

.nx-float {
  animation: nxFloat 3s ease-in-out infinite;
}

.nx-glow {
  position: relative;
  overflow: hidden;
}

.nx-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(21, 223, 210, 0.08) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: nxGlow 3.5s ease-in-out infinite;
  pointer-events: none;
}

.nx-spin {
  animation: nxSpin 12s linear infinite;
}

.nx-breathe {
  animation: nxBreathe 3s ease-in-out infinite;
}

/* ── 4. Accessibility ──────────────────────────────────────
   Respect prefers-reduced-motion: disable everything.        */

@media (prefers-reduced-motion: reduce) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .nx-view-enter,
  .nx-pulse,
  .nx-float,
  .nx-glow::after,
  .nx-spin,
  .nx-breathe {
    animation: none !important;
  }
}
