/* =========================================================
   NBS ONE — Animations (Apple-grade micro-motion)
   Restrained · Springy · Purposeful
   ========================================================= */

/* ---------- Reduced motion ---------- */
@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;
  }

  .float,
  .hero__product.float .hero__img,
  .wave,
  .glow-pulse,
  .compat-orb__ring,
  .hero__cta .btn--primary,
  .whatsapp-float {
    animation: none !important;
  }
}

/* ---------- Scroll reveal — softer Apple fade ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(4px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }
.reveal:nth-child(5) { transition-delay: 0.28s; }

.products__grid .reveal:nth-child(1) { transition-delay: 0s; }
.products__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.products__grid .reveal:nth-child(3) { transition-delay: 0.2s; }

.feature-strip__item.reveal:nth-child(1) { transition-delay: 0s; }
.feature-strip__item.reveal:nth-child(2) { transition-delay: 0.05s; }
.feature-strip__item.reveal:nth-child(3) { transition-delay: 0.1s; }
.feature-strip__item.reveal:nth-child(4) { transition-delay: 0.15s; }
.feature-strip__item.reveal:nth-child(5) { transition-delay: 0.2s; }

.features__grid .reveal:nth-child(1) { transition-delay: 0s; }
.features__grid .reveal:nth-child(2) { transition-delay: 0.07s; }
.features__grid .reveal:nth-child(3) { transition-delay: 0.14s; }
.features__grid .reveal:nth-child(4) { transition-delay: 0.21s; }

.why__grid .reveal:nth-child(1) { transition-delay: 0s; }
.why__grid .reveal:nth-child(2) { transition-delay: 0.09s; }
.why__grid .reveal:nth-child(3) { transition-delay: 0.18s; }

/* ---------- Floating hero product — quieter breath ---------- */
/* Applied to the image so 3D tilt on .hero__product can coexist */
@keyframes floatY {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -14px, 0);
  }
}

.hero__product.float .hero__img {
  animation: floatY 6.5s ease-in-out infinite;
}

.hero__product:hover .hero__img {
  animation-play-state: paused;
}

/* ---------- Wireless waves — softer rings ---------- */
@keyframes wavePulse {
  0% {
    transform: scale(0.52);
    opacity: 0.45;
  }
  60% {
    opacity: 0.1;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

.wave--1 {
  animation: wavePulse 4.8s ease-out infinite;
}

.wave--2 {
  animation: wavePulse 4.8s ease-out infinite 1.6s;
}

.wave--3 {
  animation: wavePulse 4.8s ease-out infinite 3.2s;
}

/* ---------- Glow pulse — warm light pool ---------- */
@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 0.88;
    transform: translateX(-50%) scale(1.06);
  }
}

.hero__glow {
  animation: glowPulse 5s ease-in-out infinite;
}

/* ---------- Compatibility rings ---------- */
@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbitPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

.compat-orb__ring:nth-child(1) {
  animation: orbitSpin 36s linear infinite, orbitPulse 5s ease-in-out infinite;
  border-style: dashed;
  border-spacing: 8px;
}

.compat-orb__ring:nth-child(2) {
  animation: orbitSpin 22s linear infinite reverse, orbitPulse 4s ease-in-out infinite 0.6s;
}

/* ---------- CTA button glow — subtle, not flashy ---------- */
@keyframes btnGlow {
  0%,
  100% {
    box-shadow: 0 8px 28px rgba(255, 191, 0, 0.3);
  }
  50% {
    box-shadow: 0 10px 36px rgba(255, 191, 0, 0.45);
  }
}

.hero__cta .btn--primary {
  animation: btnGlow 4s ease-in-out infinite;
}

.hero__cta .btn--primary:hover {
  animation-play-state: paused;
}

/* ---------- Page enter ---------- */
@keyframes pageIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: pageIn 0.7s var(--ease);
}

/* ---------- Nav mobile ---------- */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav.is-open .nav__list {
  animation: slideDown 0.4s var(--ease-out);
}

/* ---------- Magnetic button helper class (set via JS) ---------- */
.btn.is-magnetic {
  transition:
    transform 0.2s var(--ease-out),
    box-shadow var(--duration) var(--ease),
    background var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    filter var(--duration-fast) var(--ease);
}

/* ---------- Card tilt smoothness ---------- */
.product-card.is-tilting {
  transition:
    transform 0.12s linear,
    border-color 0.55s var(--ease),
    box-shadow 0.55s var(--ease);
}

.product-card.is-tilting:hover {
  /* transform driven by JS — keep lift via translate in JS */
}
