/* =========================================================
   MOTION LAYER CSS (companion to motion.js, defer-loaded)
   Transform/opacity only — no layout shift.
   ========================================================= */

/* --- Fallback reveals: when GSAP is absent, motion.js owns
       .reveal/.reveal-fade/.reveal-line too (previously these
       stayed hidden on pages that load no GSAP) --- */
html:not(.has-gsap) .js-motion .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
html:not(.has-gsap) .js-motion .reveal.is-in {
  opacity: 1;
  transform: none;
}
html:not(.has-gsap) .js-motion .reveal-fade {
  opacity: 0;
  transition: opacity 0.9s ease;
}
html:not(.has-gsap) .js-motion .reveal-fade.is-in {
  opacity: 1;
}
html:not(.has-gsap) .js-motion .reveal-line {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
html:not(.has-gsap) .js-motion .reveal-line.is-in {
  opacity: 1;
  transform: none;
}

/* --- Scroll reveals (.rv added by motion.js) --- */
.rv {
  opacity: 1;
}
.js-motion .rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.js-motion .rv.is-in {
  opacity: 1;
  transform: none;
}

/* --- Slim sticky conversion nav --- */
.qe-slimnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: var(--space-4, 16px);
  padding: 10px clamp(16px, 4vw, 32px);
  background: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.qe-slimnav.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.qe-slimnav__logo {
  font-family: var(--font-display, system-ui);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--white, #fff);
  text-decoration: none;
}
.qe-slimnav__cta {
  margin-left: auto;
  font-family: var(--font-display, system-ui);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--black, #0A0A0A);
  background: var(--lime, #BEFF00);
  padding: 8px 18px;
  border-radius: 999px;
}
.qe-slimnav__cta:hover { background: #d4ff4d; }
.qe-slimnav__close {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.qe-slimnav__close:hover { color: #fff; }

/* --- Confetti burst --- */
.qe-confetti {
  position: absolute;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  animation: qeConfetti var(--dur, 1300ms) cubic-bezier(0.12, 0.8, 0.4, 1) forwards;
}
@keyframes qeConfetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 0), calc(var(--dy, 200px) + 240px)) rotate(var(--rot, 180deg));
  }
}

/* --- Marquee pause on hover --- */
.marquee__track:hover,
.marquee:hover .marquee__track,
.strip__track:hover,
.strip:hover .strip__track {
  animation-play-state: paused;
}

/* --- Hero vertical rhythm tightening --- */
.hero__earth {
  margin-bottom: var(--space-6, 24px);
}
.hero__content .btn--lime {
  margin-bottom: var(--space-3, 12px);
}

/* --- Reduced motion: everything instant, no animation --- */
@media (prefers-reduced-motion: reduce) {
  .js-motion .rv,
  .rv,
  .js-motion .reveal,
  .js-motion .reveal-fade,
  .js-motion .reveal-line {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .qe-slimnav {
    transform: none;
    transition: none;
    display: none; /* conversion bar is motion-driven; skip for RM users */
  }
  .qe-confetti {
    display: none;
    animation: none;
  }
  .marquee__track,
  .strip__track {
    animation-play-state: running !important;
  }
}
