/* ============================================================
   GREEN PELLETS — PREMIUM INTERACTION LAYER
   Layered on top of landing.css. Transform/opacity only,
   GPU-friendly, fully reduced-motion safe. No markup changes
   required — enhancement nodes are injected by landing-enhance.js
   ============================================================ */

/* keep anchor scrolling clear of the fixed navbar */
html { scroll-padding-top: 96px; }

/* ---------- 1 · INTERACTIVE 3D TILT + DYNAMIC SHEEN ---------- */
/* JS writes the actual transform inline (so it always wins over
   existing :hover rules); these rules only handle easing + sheen. */
.tilt {
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt.is-tilting {
  box-shadow: 0 34px 70px -28px rgba(10, 15, 0, .45);
  z-index: 3;
}
.tilt-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 42%);
  mix-blend-mode: soft-light;
  transition: opacity .35s ease;
}
.tilt.is-tilting .tilt-sheen { opacity: 1; }

/* ---------- 2 · MAGNETIC BUTTONS + SWEEPING GLOSS ---------- */
.btn { position: relative; }
.btn-magnetic { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.btn-magnetic svg { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }

.btn-gloss {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  z-index: 1;
  background: linear-gradient(115deg,
              transparent 38%, rgba(255, 255, 255, .55) 50%, transparent 62%);
  background-size: 280% 100%;
  background-position: 170% 0;
}
.btn:hover .btn-gloss,
.btn:focus-visible .btn-gloss {
  opacity: 1;
  animation: btnGloss .75s cubic-bezier(.4, 0, .2, 1);
}
@keyframes btnGloss {
  from { background-position: 170% 0; }
  to   { background-position: -70% 0; }
}
/* keep the gloss below the button's own text/icon */
.btn > *:not(.btn-gloss) { position: relative; z-index: 2; }

/* ---------- 3 · LIVING GRADIENT TEXT ---------- */
.hero-title .accent,
.grad-text {
  background-size: 220% auto;
  animation: gradFlow 7s ease-in-out infinite;
}
@keyframes gradFlow {
  0%, 100% { background-position: 0% center; }
  50%      { background-position: 100% center; }
}

/* ---------- 4 · ANIMATED NAV UNDERLINE + SCROLLSPY ---------- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green-500), var(--amber));
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

/* ---------- 5 · MARQUEE — PAUSE ON HOVER ---------- */
.marquee-bar:hover .marquee-track,
.clients-marquee:hover .clients-marquee-track { animation-play-state: paused; }

/* ---------- 6 · STAT COUNTER POP (reused for client stats) ---------- */
.cstat-num.count-pop { animation: statPop .5s cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- 7 · SCROLL-CUE on hero (gentle bob) ---------- */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .55);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 5;
  pointer-events: none;
  animation: cueFade 1s ease 1.4s both;
}
.scroll-cue svg {
  width: 22px;
  height: 22px;
  animation: cueBob 1.8s ease-in-out infinite;
}
@keyframes cueBob {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%      { transform: translateY(6px); opacity: 1; }
}
@keyframes cueFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- REDUCED MOTION: disable all of the above ---------- */
@media (prefers-reduced-motion: reduce) {
  .tilt { transform: none !important; }
  .tilt-sheen,
  .btn-gloss,
  .scroll-cue { display: none !important; }
  .hero-title .accent,
  .grad-text,
  .cstat-num.count-pop,
  .clients-marquee-track { animation: none !important; }
  .btn-magnetic,
  .btn-magnetic svg { transition: none !important; }
}
