/* css/motion.css — Premium Motion System v2
   Companion styles for js/motion.js.
   Uses will-change sparingly; GPU-accelerated transform+opacity. */

/* ── Reduced Motion Fallback ─────────────────────────────── */
@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;
  }
  .reveal-blur,
  .clip-reveal,
  .char-reveal,
  .word-reveal {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
  }
}

/* ── Scroll Reveal Classes ───────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal-blur {
    opacity: 0;
    filter: blur(12px);
    will-change: opacity, filter;
  }
  .clip-reveal {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    will-change: clip-path;
  }
}

/* ── Scroll-linked Progress ──────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  z-index: 9999;
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
  box-shadow: 0 0 8px var(--accent-1);
}

/* ── Spotlight ───────────────────────────────────────────── */
#spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(47, 238, 204, 0.05) 0%,
    transparent 50%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  mix-blend-mode: screen;
}

/* ── Page Transition Overlay ─────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  background: #031F1A;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
}

/* ── Glass/Refraction ────────────────────────────────────── */
.glass-motion {
  backdrop-filter: blur(5px);
  background: rgba(6, 53, 45, 0.4);
  transition:
    backdrop-filter 0.4s ease,
    background 0.4s ease;
}
.glass-motion:hover {
  backdrop-filter: blur(16px);
  background: rgba(6, 53, 45, 0.65);
}

/* ── Moving Gradients (CSS-only, no JS needed) ───────────── */
.moving-gradient-bg {
  background: linear-gradient(
    135deg,
    #031F1A,
    #06352d,
    #06141d,
    rgba(47, 238, 204, 0.06)
  );
  background-size: 400% 400%;
  animation: gradientFlow 20s ease infinite;
}
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ── Hover Elevation (.hover-lift) ───────────────────────── */
.hover-lift {
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Spring Click ────────────────────────────────────────── */
.spring-click {
  cursor: pointer;
  will-change: transform;
}

/* ── Counter Animation (Space Mono) ──────────────────────── */
.counter-anim {
  font-family: "Space Mono", monospace;
}
