/* ── Unified Global Nav Styles (Highly Specific to prevent conflicts) ── */

#global-nav.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 65px;
  padding: 0 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 8, 12, 0.6);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.3s;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#global-nav * {
  box-sizing: border-box;
}

#global-nav .nav-container {
  width: 100%;
  max-width: 1354px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#global-nav .nav-brand {
  font-size: 32px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: #F4F4F5 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  height: 40px !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  transition: opacity 0.3s ease;
}

#global-nav .nav-brand span {
  color: #0A66FF !important;
}

#global-nav .nav-links {
  display: flex;
  gap: 34px;
  align-items: center;
  overflow: visible;
  /* Right-aligned: the auto left margin absorbs the free space between the
     brand and the links. (On mobile the drawer is position:fixed and resets
     these margins, so its layout is unaffected.) */
  margin-left: auto;
}

#global-nav .nav-links a {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
  letter-spacing: 0 !important;
  transition: color .2s ease !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#global-nav .nav-links a:hover {
  color: #3D8BFF !important;
}

#global-nav .nav-cta {
  font-size: 1.1875rem !important;
  font-weight: 600 !important;
  color: #F4F4F5 !important;
  padding: .5rem .9rem !important;
  border-radius: 8px !important;
  background: rgba(10, 102, 255, .15) !important;
  border: 1px solid rgba(10, 102, 255, .35) !important;
  transition: all .2s ease !important;
}

#global-nav .nav-cta:hover {
  background: rgba(10, 102, 255, .25) !important;
  transform: scale(1.1);
}

/* ── Mobile Menu Toggle ── */
#global-nav .hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 200;
  height: 22px;
}

#global-nav .hamburger span {
  width: 25px !important;
  height: 2px !important;
  background-color: #F4F4F5 !important;
  transition: all 0.3s ease !important;
  border-radius: 2px !important;
}

#global-nav .hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#global-nav .hamburger.active span:nth-child(2) {
  opacity: 0;
}

#global-nav .hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#global-nav .nav-cta-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 1024px) {
  #global-nav.nav {
    height: 60px !important;
    padding: 0 30px !important;
  }

  #global-nav .nav-brand {
    font-size: 28px !important;
    height: 36px !important;
  }

  #global-nav .hamburger {
    display: flex;
  }

  /* Mobile nav: slide in from left (same on all pages) */
  #global-nav .nav-links {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    /* Reset the desktop left/right margins so the fixed drawer isn't offset. */
    margin: 0 !important;
    width: 100% !important;
    max-width: 320px !important;
    height: 100vh !important;
    background: rgba(6, 8, 12, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 2.5rem !important;
    transition: left 0.3s ease !important;
    z-index: 150 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
  }

  #global-nav .nav-links.active {
    left: 0 !important;
  }

  #global-nav .nav-links a {
    font-size: 20px !important;
  }
}

@media (max-width: 480px) {
  #global-nav.nav {
    height: 55px !important;
    padding: 0 20px !important;
  }

  #global-nav .nav-brand {
    font-size: 24px !important;
    height: 32px !important;
  }
}

/* ── Inline early-access signup (sits in the nav ribbon) ── */
#global-nav .nav-signup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 4px 4px 4px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#global-nav .nav-signup:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

#global-nav .nav-signup:focus-within {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(10, 102, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(10, 102, 255, 0.18);
}

#global-nav .nav-signup>input {
  width: 176px;
  height: 30px;
  border: 0;
  outline: none;
  background: transparent;
  color: #F4F4F5;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 0 6px 0 10px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

#global-nav .nav-signup>input::placeholder {
  color: rgba(244, 244, 245, 0.45);
  opacity: 1;
}

#global-nav .nav-signup>button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 9999px;
  background: #0A66FF;
  color: #F4F4F5;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

#global-nav .nav-signup>button:hover {
  background: #3D8BFF;
  box-shadow: 0 2px 10px rgba(10, 102, 255, 0.45);
}

#global-nav .nav-signup>button:disabled {
  opacity: 0.65;
  cursor: default;
}

/* Popover holding the SMS consent + status toast */
#global-nav .nav-signup-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 200;
  width: 340px;
  max-width: calc(100vw - 40px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#global-nav .nav-signup-popover .sms-consent {
  max-width: none;
  margin: 0;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(12, 15, 22, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#global-nav .nav-signup-popover .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.55;
  color: #9CA3AF;
  cursor: pointer;
}

#global-nav .nav-signup-popover .consent-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: #0A66FF;
}

#global-nav .nav-signup-popover a {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #3D8BFF !important;
  text-decoration: underline !important;
}

#global-nav .nav-signup-popover a:hover {
  color: #6BA5FF !important;
}

/* Toast: no phantom box when empty */
#global-nav .nav-signup-popover .form-toast:empty {
  display: none;
}

#global-nav .nav-signup-popover .form-toast {
  margin: 0;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  background: rgba(12, 15, 22, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Tablet / mobile: form lives inside the slide-in drawer */
@media (max-width: 1024px) {
  #global-nav .nav-signup {
    width: 268px;
    height: 44px;
  }

  #global-nav .nav-signup>input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 34px;
    font-size: 15px;
  }

  #global-nav .nav-signup>button {
    height: 34px;
  }

  #global-nav .nav-signup-popover {
    top: calc(100% + 12px);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 268px;
  }
}
