/* ==========================================================================
   NexGen Nova - shared top navigation
   --------------------------------------------------------------------------
   Mirrors template.html's header + mobile bottom-sheet navigation, but with
   this site's GOLD accent (#D4AF37) in place of the template's blue
   (#1877F2). Grays, black and white are kept identical to the template, so
   the only visible difference is blue -> gold.

   Loaded by every public page:
     - root pages ............ <link rel="stylesheet" href="css/nexgen-nav.css">
     - PHP pages (alternatives/, compare/, free-ai-audit.php) via the shared
       partials/site-styles.php, which inlines this file.

   Every rule is written so a page's own legacy `.mobile-nav` / `.overlay` /
   `.mobile-menu-btn` styles can never win (hence the !important).
   ========================================================================== */

:root {
  --drawer-width: min(84vw, 420px);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-accent: #D4AF37;   /* gold (template used #1877F2 blue) */
  --nav-text: #FFFFFF;
  --header-h: 57px;
}

/* --------------------------------------------------------------------------
   Header shell - written explicitly (not via Tailwind opacity utilities) so it
   renders identically even on a page whose Tailwind build has no `gold` colour
   or no `/90` opacity modifier (e.g. the legacy team.html).
   
   Z-index must be above the floating action button (z-50 -> header z-9990)
   -------------------------------------------------------------------------- */
body > header.fixed {
  background: rgba(255, 255, 255, 0.90);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(212, 175, 55, 0.30);
  z-index: 9990 !important;
}

/* --------------------------------------------------------------------------
   Desktop navigation links - gold underline grows on hover
   -------------------------------------------------------------------------- */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background-color: #D4AF37;
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
/* gold hover independent of the page's Tailwind colour config */
.nav-link:hover { color: #D4AF37; }

/* --------------------------------------------------------------------------
   "Account" liquid-fill pill button (top right on large screens)
   -------------------------------------------------------------------------- */
.liquid-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  border: 2px solid #D4AF37;
  border-radius: 9999px;
  background: transparent;
  color: #D4AF37;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
}
.liquid-btn-text {
  position: relative;
  z-index: 10;
  font-weight: 700;
  transition: color 0.4s ease;
}
.liquid-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #D4AF37 0%, #b8941f 100%);
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
.liquid-fill::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  width: 200%;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C150,90 350,30 600,60 C850,90 1050,30 1200,60 L1200,120 L0,120 Z' fill='%23ffffff' fill-opacity='0.3'/%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: nx-wave 2s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}
@keyframes nx-wave {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.liquid-btn:hover .liquid-fill { width: 100%; }
.liquid-btn:hover .liquid-fill::after { opacity: 1; }
.liquid-btn:hover .liquid-btn-text { color: #ffffff; }
.liquid-btn:hover {
  border-color: #b8941f;
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}
/* second liquid layer for depth */
.liquid-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(184, 148, 31, 0.6) 0%, rgba(212, 175, 55, 0.4) 100%);
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}
.liquid-btn:hover::before { width: 100%; }
/* sparkle / shine */
.liquid-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
  z-index: 5;
  pointer-events: none;
}
.liquid-btn:hover::after { left: 100%; transition: left 0.8s ease; }

/* --------------------------------------------------------------------------
   Hamburger button (morphs into an X while the sheet is open)
   Uses dark gray (#4B5563) like template.html but with NexGen Nova branding
   -------------------------------------------------------------------------- */
.mobile-menu-btn {
  background: none !important;
  border: none !important;
  color: #4B5563 !important;  /* dark gray for NexGen Nova */
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s;
  z-index: 1002;
  position: relative;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
}
.mobile-menu-btn:hover {
  transform: scale(1.05);
  color: #1F2937 !important; /* darker gray on hover */
}
.hamburger-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 26px;
  height: 22px;
}
.hamburger-icon .bar {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}
.mobile-menu-btn.open .bar-1,
body:has(nav.mobile-nav.active) #mobileMenuButton .bar-1 { transform: translateY(7.5px) rotate(45deg); }
.mobile-menu-btn.open .bar-2,
body:has(nav.mobile-nav.active) #mobileMenuButton .bar-2 { opacity: 0; transform: scaleX(0.4); }
.mobile-menu-btn.open .bar-3,
body:has(nav.mobile-nav.active) #mobileMenuButton .bar-3 { transform: translateY(-7.5px) rotate(-45deg); }

/* header + sheet merge into one seamless surface while the sheet is open */
body:has(nav.mobile-nav.active) header {
  box-shadow: none !important;
  border-bottom-color: transparent !important;
}
body:has(nav.mobile-nav.active) nav.mobile-nav { border-top-color: transparent !important; }

/* --------------------------------------------------------------------------
   Mobile bottom-sheet navigation
   -------------------------------------------------------------------------- */
nav.mobile-nav {
  position: fixed !important;
  top: calc(var(--header-h) - 1px) !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-top: 1px solid rgba(212, 175, 55, 0.25) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  color: #000000 !important;
  z-index: 50 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  box-shadow: none !important;
  transform: translateY(100%) !important;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    visibility 0s linear 0.55s !important;
  will-change: transform;
}
nav.mobile-nav.active {
  left: 0 !important;
  transform: translateY(0) !important;
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    visibility 0s linear 0s !important;
}
nav.mobile-nav .mobile-nav-header { display: none !important; }
nav.mobile-nav ul { list-style: none; margin: 0; padding: 2.25rem 0 3rem; }
nav.mobile-nav ul li {
  margin: 0 !important;
  text-align: center;
  opacity: 0;
  transform: translateY(18px) !important;
  transition: opacity 0.45s ease, transform 0.45s ease;
  transition-delay: 0s;
}
nav.mobile-nav.active ul li {
  opacity: 1;
  transform: translateY(0) !important;
  transition-delay: calc(var(--i, 1) * 55ms);
}
nav.mobile-nav ul li a {
  display: block !important;
  padding: 1.15rem 1rem !important;
  color: #000000 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  font-size: 1.3rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center !important;
  margin: 0 !important;
  transition: color 0.3s ease, background 0.3s ease;
}
nav.mobile-nav ul li a:hover,
nav.mobile-nav ul li a:active {
  color: #D4AF37 !important;
  background: rgba(212, 175, 55, 0.06) !important;
  transform: none !important;
  box-shadow: none !important;
}
nav.mobile-nav ul li.sheet-divider { margin: 0 !important; opacity: 0; }
nav.mobile-nav.active ul li.sheet-divider { opacity: 1; }
nav.mobile-nav ul li.sheet-divider hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.09);
  margin: 0 2.75rem;
}
nav.mobile-nav ul li a.cta {
  width: max-content !important;
  margin: 1.25rem auto 0 !important;
  padding: 0.9rem 2.4rem !important;
  border-radius: 8px !important;
  background: linear-gradient(90deg, #D4AF37, #b8941f) !important;
  color: #ffffff !important;
  font-weight: 700;
}
nav.mobile-nav ul li a.cta:hover,
nav.mobile-nav ul li a.cta:active {
  color: #ffffff !important;
  background: linear-gradient(90deg, #b8941f, #D4AF37) !important;
}

/* spread the rows top-to-bottom so the sheet never leaves dead space */
nav.mobile-nav > ul {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto !important;
  padding: clamp(1.4rem, 4vh, 2.6rem) 0 clamp(1.1rem, 3vh, 2rem) !important;
}
nav.mobile-nav > ul > li { flex: 0 0 auto; }
nav.mobile-nav ul li a {
  padding: 1.32rem 1rem !important;
  font-size: clamp(1.28rem, 4.2vw + 0.45rem, 1.55rem) !important;
  line-height: 1.25;
}
nav.mobile-nav ul li a.cta { padding: 1rem 3.25rem !important; }

/* sheet footer: mission line + Powered by NexGen Nova + closing rule */
nav.mobile-nav .sheet-footer {
  flex: 0 0 auto;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 0 1.5rem calc(clamp(0.9rem, 2.4vh, 1.6rem) + env(safe-area-inset-bottom));
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  transition-delay: 0s;
}
nav.mobile-nav.active .sheet-footer {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--i, 10) * 55ms);
}
nav.mobile-nav .sheet-footer .sheet-tagline {
  margin: 0 auto;
  max-width: 22rem;
  font-size: clamp(0.6rem, 2.6vw, 0.76rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.55);
}
nav.mobile-nav .sheet-footer .sheet-powered {
  margin: 0.55rem 0 0.85rem;
  font-size: clamp(0.78rem, 3.3vw, 0.92rem);
  letter-spacing: 0.02em;
  color: #000000;
}
nav.mobile-nav .sheet-footer .sheet-powered a { color: #D4AF37; font-weight: 800; text-decoration: none; }
nav.mobile-nav .sheet-footer .sheet-powered a:hover,
nav.mobile-nav .sheet-footer .sheet-powered a:active { color: #b8941f; text-decoration: underline; }
nav.mobile-nav .sheet-footer hr { border: 0; border-top: 1px solid rgba(0, 0, 0, 0.09); margin: 0; }

/* --------------------------------------------------------------------------
   Overlay (dim behind the open sheet; sits below the fixed header)
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0, 0, 0, 0.55) !important;
  z-index: 40 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.overlay.active { opacity: 1 !important; visibility: visible !important; }

/* --------------------------------------------------------------------------
   Breakpoints - use the same lg breakpoint as the template (1024px)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  nav.mobile-nav { display: none !important; }
  .mobile-menu-btn { display: none !important; }
}
@media (max-width: 1023.98px) {
  nav.mobile-nav { display: flex !important; flex-direction: column !important; }
  .mobile-menu-btn { display: inline-flex !important; }
}

/* Short phones / landscape - tighten so nothing is ever cut off */
@media (max-height: 720px) {
  nav.mobile-nav > ul { padding-top: 1.1rem !important; padding-bottom: 0.9rem !important; }
  nav.mobile-nav ul li a { padding: 1rem !important; font-size: 1.22rem !important; }
  nav.mobile-nav ul li a.cta { padding: 0.85rem 3rem !important; }
}
@media (max-height: 600px) {
  nav.mobile-nav > ul { padding-top: 0.7rem !important; padding-bottom: 0.7rem !important; }
  nav.mobile-nav ul li a { padding: 0.72rem !important; font-size: 1.1rem !important; }
  nav.mobile-nav ul li a.cta { padding: 0.7rem 2.6rem !important; }
}
