/* Premium navigation & mobile menu layer (shared across the site) */

/* ---------------------------------------------------------------- *
 * Desktop: frosted pill nav
 * ---------------------------------------------------------------- */
.nav-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.header-light .nav-pill {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.18);
}

.nav-pill a {
  position: relative;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav-pill a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  width: 60%;
  height: 2px;
  border-radius: 2px;
  background: #f3c623;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-pill a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* Give the hamburger button on the floating nav a translucent chip */
#mainNav #mobileMenuBtn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

#mainNav.header-light #mobileMenuBtn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

/* ---------------------------------------------------------------- *
 * Full-screen premium mobile menu (both drawer & overlay variants)
 * ---------------------------------------------------------------- */
@media (max-width: 767px) {
  .mobile-menu-overlay {
    background:
      radial-gradient(120% 55% at 85% -10%, rgba(243, 198, 35, 0.12), transparent 55%),
      radial-gradient(120% 55% at -10% 110%, rgba(0, 100, 102, 0.28), transparent 55%),
      rgba(9, 11, 16, 0.94);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.45s;
  }

  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition-delay: 0s;
  }

  #mobileMenu.translate-x-full {
    background:
      radial-gradient(120% 55% at 85% -10%, rgba(243, 198, 35, 0.12), transparent 55%),
      radial-gradient(120% 55% at -10% 110%, rgba(0, 100, 102, 0.28), transparent 55%),
      rgba(9, 11, 16, 0.94);
    backdrop-filter: blur(26px) saturate(150%);
    -webkit-backdrop-filter: blur(26px) saturate(150%);
    transform: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.45s;
  }

  #mobileMenu:not(.translate-x-full) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
  }

  /* generic overlay links */
  .mobile-menu-overlay nav a,
  .mobile-menu-overlay > a {
    color: #ffffff;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
  }

  .mobile-menu-overlay.active nav a,
  .mobile-menu-overlay.active > a {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu-overlay nav a:hover,
  .mobile-menu-overlay > a:hover {
    color: #f3c623;
  }

  /* staggered cascade */
  .mobile-menu-overlay nav > a:nth-child(1) { transition-delay: 0.06s; }
  .mobile-menu-overlay nav > a:nth-child(2) { transition-delay: 0.12s; }
  .mobile-menu-overlay nav > a:nth-child(3) { transition-delay: 0.18s; }
  .mobile-menu-overlay nav > a:nth-child(4) { transition-delay: 0.24s; }
  .mobile-menu-overlay nav > a:nth-child(5) { transition-delay: 0.30s; }
  .mobile-menu-overlay nav > a:nth-child(6) { transition-delay: 0.36s; }
  .mobile-menu-overlay nav > a:nth-child(7) { transition-delay: 0.42s; }
  .mobile-menu-overlay nav > a:nth-child(8) { transition-delay: 0.48s; }

  .mobile-menu-overlay.active nav > a:nth-child(1) { transition-delay: 0.05s; }
  .mobile-menu-overlay.active nav > a:nth-child(2) { transition-delay: 0.10s; }
  .mobile-menu-overlay.active nav > a:nth-child(3) { transition-delay: 0.15s; }
  .mobile-menu-overlay.active nav > a:nth-child(4) { transition-delay: 0.20s; }
  .mobile-menu-overlay.active nav > a:nth-child(5) { transition-delay: 0.25s; }
  .mobile-menu-overlay.active nav > a:nth-child(6) { transition-delay: 0.30s; }
  .mobile-menu-overlay.active nav > a:nth-child(7) { transition-delay: 0.35s; }
  .mobile-menu-overlay.active nav > a:nth-child(8) { transition-delay: 0.40s; }

  /* call-to-action pill on the overlay */
  .mobile-menu-overlay nav > a:last-of-type,
  .mobile-menu-overlay > a:last-of-type {
    background: #f3c623;
    color: #0b1220;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.95rem 2.5rem;
    margin-top: 1.25rem;
    border-radius: 9999px;
    box-shadow: 0 16px 40px -12px rgba(243, 198, 35, 0.45);
  }

  .mobile-menu-overlay nav > a:last-of-type:hover,
  .mobile-menu-overlay > a:last-of-type:hover {
    color: #0b1220;
    transform: translateY(-2px);
  }

  /* drawer variant (index / prompts index) */
  #mobileMenu.translate-x-full > .flex {
    height: 100%;
  }

  #mobileMenu.translate-x-full nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 1.25rem;
  }

  #mobileMenu.translate-x-full ul {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  #mobileMenu.translate-x-full ul a {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
  }

  #mobileMenu:not(.translate-x-full) ul a {
    opacity: 1;
    transform: translateY(0);
  }

  #mobileMenu:not(.translate-x-full) ul li:nth-child(1) a { transition-delay: 0.05s; }
  #mobileMenu:not(.translate-x-full) ul li:nth-child(2) a { transition-delay: 0.10s; }
  #mobileMenu:not(.translate-x-full) ul li:nth-child(3) a { transition-delay: 0.15s; }
  #mobileMenu:not(.translate-x-full) ul li:nth-child(4) a { transition-delay: 0.20s; }
  #mobileMenu:not(.translate-x-full) ul li:nth-child(5) a { transition-delay: 0.25s; }
  #mobileMenu:not(.translate-x-full) ul li:nth-child(6) a { transition-delay: 0.30s; }

  #mobileMenu.translate-x-full ul a:hover {
    color: #f3c623;
  }

  #mobileMenu.translate-x-full .border-b {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: transparent;
  }

  #mobileMenu.translate-x-full .border-b span {
    color: #ffffff;
  }

  #mobileMenu.translate-x-full .mt-8 {
    border-color: rgba(255, 255, 255, 0.12) !important;
    width: 100%;
    max-width: 22rem;
  }

  #mobileMenu.translate-x-full .mt-8 a {
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 1rem;
  }

  #mobileMenu.translate-x-full .mt-8 a:first-child {
    background: #f3c623;
    border-color: transparent;
    color: #0b1220;
  }

  #mobileMenu.translate-x-full #mobileMenuClose {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
  }

  /* hamburger chip on hierarchical navs */
  nav .hamburger-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 9999px;
    padding: 11px;
    width: 44px;
    height: 44px;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* ---------------------------------------------------------------- *
 * Hero buttons — mobile-first tap targets
 * ---------------------------------------------------------------- */
.hero-cta-btn {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, color 0.25s ease;
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
}

.hero-cta-btn:nth-of-type(1):hover {
  box-shadow: 0 20px 45px -15px rgba(10, 102, 194, 0.6);
}

.hero-cta-btn:nth-of-type(2):hover {
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  #hero {
    align-items: center;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 5rem;
    padding-bottom: 3.5rem;
    min-height: 100svh;
  }

  #hero > div:first-child {
    max-width: 100%;
  }

  #hero .magnetic-wrap {
    width: 100%;
  }

  #hero .hero-cta-btn {
    width: 100%;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 0.9rem;
    gap: 0.65rem;
  }
}

/* ---------------------------------------------------------------- *
 * Motion safety
 * ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-overlay,
  #mobileMenu.translate-x-full,
  .mobile-menu-overlay nav a,
  .mobile-menu-overlay > a,
  #mobileMenu.translate-x-full ul a,
  .hero-cta-btn {
    transition: none !important;
    animation: none !important;
  }
}