/* ============================================================
   NextDNS Shield — Custom styles (Tailwind CDN handles utilities)
   Animations · Scrollbar · Special effects
   ============================================================ */

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #f8f9fc; }
::-webkit-scrollbar-thumb { background: rgba(94, 14, 215, 0.25); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(94, 14, 215, 0.45); }

html { scroll-behavior: smooth; }

/* ── Hero video ── */
.hero-video {
  opacity: 0;
  transition: opacity 1.5s ease;
}
.hero-video.loaded {
  opacity: 1;
}

/* ══════════════════════════════════════════════
   HERO ENTRY ANIMATIONS
   Replicating Framer Motion with CSS
   ══════════════════════════════════════════════ */

/* fadeDown — nav elements */
.anim-fadeDown {
  opacity: 0;
  transform: translateY(-20px);
}
.anim-fadeDown.in {
  animation: fadeDown 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeDown {
  to { opacity: 1; transform: translateY(0); }
}

/* fadeUp — stats + bottom content */
.anim-fadeUp {
  opacity: 0;
  transform: translateY(32px);
}
.anim-fadeUp.in {
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Heading word clip-reveal */
.hero-word {
  transform: translateY(110%);
}
.hero-word.in {
  animation: wordSlide 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes wordSlide {
  to { transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   SCROLL REVEAL (sections below hero)
   ══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.07s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.21s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.35s; }

/* ══════════════════════════════════════════════
   MOBILE MENU
   ══════════════════════════════════════════════ */
#mobileMenu {
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
}
#mobileMenu.open {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.menu-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s;
}
#mobileMenu.open .menu-link:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
#mobileMenu.open .menu-link:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
#mobileMenu.open .menu-link:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
#mobileMenu.open .menu-link:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }

.menu-link:hover {
  color: #5E0ED7 !important;
}

/* ══════════════════════════════════════════════
   UPDATE ITEMS (dynamic)
   ══════════════════════════════════════════════ */
.upd {
  position: relative;
  padding-left: 44px;
  padding-bottom: 2rem;
  animation: fadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.upd:last-child { padding-bottom: 0; }

.upd-dot {
  position: absolute;
  left: 8px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: #5E0ED7;
  box-shadow: 0 0 10px rgba(94, 14, 215, 0.3);
}
.upd[data-type="notification"] .upd-dot {
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* ══════════════════════════════════════════════
   TOAST show state
   ══════════════════════════════════════════════ */
#toast.show {
  transform: translateX(0) !important;
}

/* ══════════════════════════════════════════════
   FEAT CARD — subtle top gradient on hover
   ══════════════════════════════════════════════ */
.feat-card {
  position: relative;
  overflow: hidden;
}
.feat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #3b82f6, #06b6d4);
  opacity: 0;
  transition: opacity 0.4s;
}
.feat-card:hover::after {
  opacity: 1;
}
