/* ════════════════════════════════════════════════════════════════
   NOVEX EXTRAS — Unique Features
   1. Cursor trail (glowing particles)
   2. Floating "Book Me" CTA with slot counter
   3. Animated stat counters
   4. Film grain / noise texture overlay
   5. Scroll progress bar
════════════════════════════════════════════════════════════════ */

/* ── 1. CURSOR TRAIL PARTICLES ─────────────────────────────── */
.cursor-trail-dot {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  z-index: 99999;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  animation: trailFade 0.6s ease forwards;
}
@keyframes trailFade {
  0%   { opacity: 0.9; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0;   transform: translate(-50%,-50%) scale(0.1); }
}

/* Custom cursor ring */
.cursor-ring {
  position: fixed;
  pointer-events: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--primary-rgb), 0.5);
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.2s;
  mix-blend-mode: difference;
}
.cursor-ring.hovering {
  width: 44px; height: 44px;
  border-color: rgba(var(--primary-rgb), 0.9);
}
/* Hide on touch */
@media (hover: none) {
  .cursor-ring, .cursor-trail-dot { display: none !important; }
}

/* ── 2. FLOATING BOOK ME BUTTON ────────────────────────────── */
.float-cta {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.float-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.float-cta-pill {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  border-radius: 99px;
  padding: 5px 14px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1d1d1f;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  animation: pillPulse 2s ease-in-out infinite;
}
@keyframes pillPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

.float-cta-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--primary);
  color: var(--background);
  border: none;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.4), 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.float-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
}
.float-cta-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 40px rgba(var(--primary-rgb), 0.5), 0 4px 12px rgba(0,0,0,0.18);
}
.float-cta-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--background);
  opacity: 0.8;
  animation: ctaDotPulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ctaDotPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50%       { transform: scale(1.5); opacity: 1; }
}

@media (max-width: 600px) {
  .float-cta { bottom: 20px; right: 16px; }
  .float-cta-btn { padding: 12px 18px; font-size: 0.82rem; }
}

/* ── 3. ANIMATED STAT COUNTERS ─────────────────────────────── */
.stat-num {
  transition: color 0.3s ease;
  color: #04111a;
}
body.dark-mode .stat-num {
  color: #ffffff;
}
.stat-num.counting { color: var(--primary); }

/* ── 4. FILM GRAIN OVERLAY ─────────────────────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99997;
  opacity: 0.028;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: grainShift 0.15s steps(1) infinite;
  mix-blend-mode: overlay;
}
@keyframes grainShift {
  0%   { background-position: 0% 0%;    }
  10%  { background-position: -5% -10%; }
  20%  { background-position: -15% 5%;  }
  30%  { background-position: 7% -25%;  }
  40%  { background-position: -5% 25%;  }
  50%  { background-position: -15% 10%; }
  60%  { background-position: 15% 0%;   }
  70%  { background-position: 0% 15%;   }
  80%  { background-position: 3% 35%;   }
  90%  { background-position: -10% 10%; }
  100% { background-position: 0% 0%;    }
}
body.dark-mode .grain-overlay { opacity: 0.04; mix-blend-mode: screen; }

/* ── 5. SCROLL PROGRESS BAR ────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  background: var(--primary);
  z-index: 99999;
  width: 0%;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.7);
  border-radius: 0 2px 2px 0;
}

/* ── 6. MAGNETIC BUTTONS (on .btn elements) ────────────────── */
.btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              background 0.25s ease, border-color 0.25s ease,
              color 0.25s ease !important;
}
