/* --- FLOATING PILL NAVBAR --- */
.navbar {
  position: fixed !important;
  left: 50%;
  right: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  top: auto;
  z-index: 9000;
  width: fit-content;
  max-width: calc(100vw - 28px);
  padding: 0;
  transform: translateX(-50%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

body:not(.site-ready) .navbar,
body.is-loading .navbar,
body.is-transitioning .navbar,
body:not(.site-ready) .mobile-header,
body.is-loading .mobile-header,
body.is-transitioning .mobile-header {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.navbar.scrolled {
  background: transparent;
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.nav-inner {
  width: fit-content;
  margin: 0 auto;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20,20,20,0.98), rgba(0,0,0,0.95));
  box-shadow:
    0 20px 60px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.04),
    inset 0 1px 0 rgba(255,255,255,0.09);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
}
.nav-logo,
.nav-burger,
.mobile-menu {
  display: none;
}
.nav-links {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  filter: none;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  overflow: hidden;
  border-radius: 999px;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition:
    color 0.35s ease,
    background 0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0;
  transform: translateX(-50%) scale(0.4);
  box-shadow: 0 0 16px rgba(0,255,136,0.5);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}
.nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.07) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 22px rgba(0,255,136,0.08);
}
.nav-link.active::before {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.nav-home {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  color: #fff;
  background: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.nav-home::before {
  display: none;
}
.nav-cta,
.btn-cta.nav-cta {
  min-height: 46px;
  margin-left: 2px;
  padding: 0 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #00FF88, #00C46A);
  color: #03130b;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 8px 30px rgba(0,255,136,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease,
    filter 0.35s ease;
}
.nav-cta:hover,
.nav-cta:focus-visible {
  color: #000;
  transform: translateY(-2px) scale(1.035);
  filter: saturate(1.08) brightness(1.05);
  box-shadow: 0 12px 42px rgba(0,255,136,0.48), inset 0 1px 0 rgba(255,255,255,0.48);
}
.nav-link:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid rgba(0,255,136,0.72);
  outline-offset: 3px;
}
.nav-ripple {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255,255,255,0.36);
  transform: translate(-50%, -50%) scale(0);
  animation: nav-ripple 0.6s ease-out forwards;
}
@keyframes nav-ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(14);
  }
}

/* --- MOBILE MENU EXPERIENCE --- */
.mobile-header,
.mobile-menu-overlay {
  display: none;
}

body.mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .navbar {
    display: none !important;
  }

  .mobile-header {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: 50%;
    z-index: 100002;
    width: min(calc(100vw - 28px), 430px);
    min-height: 60px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(18, 18, 18, 0.94), rgba(3, 3, 3, 0.9));
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
  }

  .mobile-brand-pill,
  .mobile-menu-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #050505;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 34px rgba(0, 0, 0, 0.24);
  }

  .mobile-brand-pill {
    width: 84px;
    height: 44px;
  }

  .mobile-brand-pill img {
    width: auto;
    height: 30px;
    filter: drop-shadow(0 0 16px rgba(0, 255, 136, 0.34));
  }

  .mobile-brand-pill span,
  .mobile-menu-badge span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.75);
  }

  .mobile-menu-toggle,
  .mobile-menu-close {
    border: 0;
    cursor: pointer;
    color: var(--white);
    background: #050505;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 12px 28px rgba(0, 0, 0, 0.24);
  }

  .mobile-menu-toggle {
    width: 46px;
    height: 46px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 50%;
  }

  .mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s ease, background 0.42s ease, backdrop-filter 0.42s ease;
  }

  .mobile-menu-overlay.is-open {
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-panel {
    width: min(100%, 430px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 18px clamp(20px, 6vw, 30px) 24px;
    border-radius: 36px;
    background:
      radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.45), transparent 22%),
      linear-gradient(145deg, #55f5d1 0%, #2fe8c5 52%, #0edb91 100%);
    color: #04130d;
    box-shadow: 0 34px 110px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.52);
    transform: translateY(-34px) scale(0.96);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  }

  .mobile-menu-overlay.is-open .mobile-menu-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(26px, 8vw, 44px);
  }

  .mobile-menu-badge {
    width: 92px;
    height: 50px;
  }

  .mobile-menu-badge img {
    width: auto;
    height: 34px;
    filter: drop-shadow(0 0 14px rgba(0, 255, 136, 0.3));
  }

  .mobile-menu-close {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
  }

  .mobile-menu-nav {
    display: grid;
    gap: clamp(18px, 5vw, 30px);
  }

  .mobile-menu-link {
    position: relative;
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: baseline;
    gap: 14px;
    color: #04130d;
    transform: translateY(18px);
    opacity: 0;
    transition:
      opacity 0.45s ease,
      transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
      scale 0.35s ease;
  }

  .mobile-menu-overlay.is-open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(var(--menu-index, 0) * 70ms + 150ms);
  }

  .mobile-menu-link span {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    opacity: 0.7;
  }

  .mobile-menu-link strong {
    position: relative;
    width: fit-content;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 11vw, 4rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.05em;
  }

  .mobile-menu-link strong::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 3px;
    border-radius: 3px;
    background: #04130d;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-menu-link:hover,
  .mobile-menu-link:focus-visible {
    transform: translateX(8px) scale(1.015);
  }

  .mobile-menu-link:hover strong::after,
  .mobile-menu-link:focus-visible strong::after {
    transform: scaleX(1);
  }

  .mobile-menu-link:focus-visible,
  .mobile-menu-close:focus-visible,
  .mobile-menu-toggle:focus-visible,
  .mobile-brand-pill:focus-visible,
  .mobile-menu-badge:focus-visible {
    outline: 2px solid #04130d;
    outline-offset: 4px;
  }

  .mobile-menu-socials {
    margin-top: clamp(34px, 10vw, 58px);
    padding-top: 18px;
    border-top: 1px solid rgba(4, 19, 13, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease 0.62s, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.62s;
  }

  .mobile-menu-overlay.is-open .mobile-menu-socials {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-menu-socials a {
    color: #04130d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.74;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-overlay,
  .mobile-menu-panel,
  .mobile-menu-link,
  .mobile-menu-socials,
  .mobile-menu-toggle span {
    transition-duration: 0.01ms !important;
  }
}
