/* VYNEX — 3D value enrichments (glassmorph + mesh gradient + tilt + scroll fade) */

/* Glass morphism card */
.vnx-glass {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(96, 165, 250, 0.2);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s,
              box-shadow 0.3s;
}
.vnx-glass:hover {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow:
    0 20px 50px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 3D tilt on hover (pure CSS, no JS dependency) */
.vnx-tilt {
  perspective: 1200px;
  transform-style: preserve-3d;
}
.vnx-tilt-inner {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}
.vnx-tilt:hover .vnx-tilt-inner {
  transform: rotateX(-3deg) rotateY(4deg) translateZ(8px);
}

/* Mesh gradient hero background — animated blobs */
.vnx-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.vnx-mesh::before,
.vnx-mesh::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: vnx-drift 18s ease-in-out infinite;
}
.vnx-mesh::before {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: -100px; left: -80px;
}
.vnx-mesh::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: -120px; right: -100px;
  animation-delay: -9s;
  animation-duration: 22s;
}
@keyframes vnx-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(60px, -40px) scale(1.1); }
  66%      { transform: translate(-40px, 40px) scale(0.95); }
}

/* Glow button primary */
.vnx-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, box-shadow 0.3s;
  text-decoration: none;
  display: inline-block;
}
.vnx-btn-primary::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #60a5fa, #ec4899);
  border-radius: 14px;
  z-index: -1;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.3s;
}
.vnx-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}
.vnx-btn-primary:hover::before { opacity: 0.7; }

/* Scroll fade-in (JS-hooked via IntersectionObserver) */
.vnx-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.vnx-fade-in.vnx-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 3D gradient text */
.vnx-grad-text {
  background: linear-gradient(135deg, #60a5fa 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Shimmer loading placeholder */
.vnx-shimmer {
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.6) 25%,
    rgba(59, 130, 246, 0.15) 50%,
    rgba(15, 23, 42, 0.6) 75%
  );
  background-size: 200% 100%;
  animation: vnx-shim 1.4s linear infinite;
}
@keyframes vnx-shim {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Orbital icon frame — subtle 3D feel per feature cards */
.vnx-orb {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 26px;
}

/* Mobile: ridurre blur che uccide FPS */
@media (max-width: 768px) {
  .vnx-glass { backdrop-filter: blur(8px); }
  .vnx-mesh::before, .vnx-mesh::after { filter: blur(50px); }
}

/* Accessibility — respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .vnx-mesh::before, .vnx-mesh::after { animation: none; }
  .vnx-fade-in { opacity: 1; transform: none; transition: none; }
  .vnx-tilt:hover .vnx-tilt-inner { transform: none; }
}
