/* ================================================================
   Quantum Next Digital — Immersive FX System
   Mouse-follow glow · Scroll depth · Premium micro-animations
================================================================ */

/* ── MOUSE-FOLLOW GLOW ── */
#qn-glow-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 1;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,102,255,0.07) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
  will-change: left, top;
  top: 0; left: 0;
}

/* ── SECTION GLOW OVERLAYS ── */
.qn-section-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 0;
}

/* ── PARALLAX DEPTH LAYERS ── */
[data-depth] { will-change: transform; }

/* ── PREMIUM REVEAL CLASSES (augmented) ── */
.reveal-slide-left  { --rv-x: -60px; --rv-y: 0; }
.reveal-slide-right { --rv-x:  60px; --rv-y: 0; }
.reveal-scale { --rv-x: 0; --rv-y: 0; --rv-scale: 0.88; }

.reveal-slide-left.pre-reveal,
.reveal-slide-right.pre-reveal {
  opacity: 0;
  transform: translate(var(--rv-x), var(--rv-y));
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.23,1,0.32,1);
}
.reveal-slide-left.visible,
.reveal-slide-right.visible {
  opacity: 1;
  transform: translate(0,0);
}
.reveal-scale.pre-reveal {
  opacity: 0;
  transform: scale(var(--rv-scale,0.88));
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.23,1,0.32,1);
}
.reveal-scale.visible { opacity:1; transform:scale(1); }

/* ── FLOATING ELEMENTS DEPTH ── */
@keyframes qn-float-depth-a {
  0%,100% { transform: translateY(0)   rotate(0deg); }
  33%      { transform: translateY(-12px) rotate(1.5deg); }
  66%      { transform: translateY(6px)  rotate(-1deg); }
}
@keyframes qn-float-depth-b {
  0%,100% { transform: translateY(0)   rotate(0deg); }
  40%      { transform: translateY(10px)  rotate(-1.5deg); }
  70%      { transform: translateY(-6px)  rotate(1deg); }
}
.qn-float-a { animation: qn-float-depth-a 7s ease-in-out infinite; }
.qn-float-b { animation: qn-float-depth-b 9s ease-in-out infinite; }

/* ── GLASSMORPHISM CARD ENHANCEMENT ── */
.qn-glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  box-shadow:
    0 8px 40px rgba(0,0,0,0.3),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s;
  position: relative;
  overflow: hidden;
}
.qn-glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.qn-glass-card:hover {
  border-color: rgba(0,102,255,0.2);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 0 0 1px rgba(0,102,255,0.1) inset,
    0 0 40px -10px rgba(0,102,255,0.12);
  transform: translateY(-4px);
}

/* ── INTERACTIVE GRADIENT TEXT SHIMMER ── */
.qn-shimmer-text {
  background: linear-gradient(
    90deg,
    #0066ff 0%,
    #7c3aed 30%,
    #06b6d4 60%,
    #0066ff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: qn-shimmer 3s linear infinite;
}
@keyframes qn-shimmer {
  to { background-position: 200% center; }
}

/* ── SCROLL PROGRESS BAR ── */
#qn-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  z-index: 10000;
  background: linear-gradient(90deg, #0066ff, #7c3aed, #06b6d4);
  width: 0%;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(0,102,255,0.6);
}

/* ── FUTURISTIC HOVER LINES ── */
.qn-hover-line {
  position: relative;
  overflow: hidden;
}
.qn-hover-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #0066ff, #7c3aed, transparent);
  transition: left 0.5s cubic-bezier(0.23,1,0.32,1);
}
.qn-hover-line:hover::after { left: 100%; }

/* ── AMBIENT LIGHT ── */
.qn-ambient {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.qn-ambient-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,102,255,0.06) 0%, transparent 70%);
}
.qn-ambient-purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.05) 0%, transparent 70%);
}
.qn-ambient-cyan {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6,182,212,0.05) 0%, transparent 70%);
}

/* ── PARTICLE TRAIL (canvas overlay) ── */
#qn-particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

/* ── SECTION TRANSITION DIVIDERS ── */
.qn-wave-divider {
  position: relative;
  height: 60px;
  overflow: hidden;
  pointer-events: none;
}
.qn-wave-divider svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
}

/* ── MAGNETIC ORB BLOBS ── */
.qn-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  mix-blend-mode: screen;
  animation: qn-blob-move 12s ease-in-out infinite alternate;
}
.qn-blob-1 {
  width: 300px; height: 300px;
  background: rgba(0,102,255,0.08);
  animation-delay: 0s;
}
.qn-blob-2 {
  width: 250px; height: 250px;
  background: rgba(124,58,237,0.07);
  animation-delay: -4s;
}
.qn-blob-3 {
  width: 200px; height: 200px;
  background: rgba(6,182,212,0.06);
  animation-delay: -8s;
}
@keyframes qn-blob-move {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(40px,-30px) scale(1.1); }
  66%  { transform: translate(-30px,40px) scale(0.9); }
  100% { transform: translate(20px,-20px) scale(1.05); }
}

/* ── CARD TILT OVERLAY ── */
.qn-tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}
.qn-tilt-card .qn-tilt-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
}
.qn-tilt-card:hover .qn-tilt-shine { opacity: 1; }

/* ── FUTURISTIC SEPARATOR LINE ── */
.qn-sep {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #0066ff, #7c3aed);
  border-radius: 1px;
  margin: 12px 0;
}
.qn-sep-center { margin-left: auto; margin-right: auto; }

/* ── GRID LINES OVERLAY ── */
.qn-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,102,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,102,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

/* ── HOVER GLOW ON CARDS ── */
.service-card,
.result-card,
.step-card,
.testimonial-card {
  transition:
    transform 0.35s cubic-bezier(0.23,1,0.32,1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.service-card:hover,
.result-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.35),
    0 0 40px -10px rgba(0,102,255,0.15);
}

/* ── STAGGER REVEAL ENHANCEMENT ── */
.reveal { transition-timing-function: cubic-bezier(0.23,1,0.32,1); }

/* ── NOISE TEXTURE OVERLAY ── */
.qn-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

/* ── PERFORMANCE: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  .qn-blob, .qn-float-a, .qn-float-b,
  .qn-shimmer-text, #qn-glow-cursor { animation: none !important; }
  .qn-tilt-card { transform: none !important; }
}
