@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500&display=swap');

/* Bottom spacing so footer content isn't hidden behind the navbar */
body {
  padding-bottom: 70px;
}

/* nad.is-style floating navbar */
.nad-navbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 16px 20px;
  pointer-events: none;
  /* Entrance animation */
  animation: navSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes navSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nad-nav-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(20, 20, 43, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(20, 20, 43, 0.08);
  pointer-events: auto;
  transition: box-shadow 0.3s ease;
}

.nad-nav-pill:hover {
  box-shadow: 0 8px 40px rgba(20, 20, 43, 0.14);
}

/* Sliding active indicator */
.nad-nav-indicator {
  position: absolute;
  height: 32px;
  border-radius: 999px;
  background: rgba(20, 20, 43, 0.07);
  box-shadow: 0 0 12px rgba(20, 20, 43, 0.06);
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.nad-nav-indicator.nad-visible {
  opacity: 1;
}

.nad-nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nad-nav-menu li {
  margin: 0;
  padding: 0;
  /* Staggered entrance */
  opacity: 0;
  animation: navItemFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nad-nav-menu li:nth-child(1) { animation-delay: 0.15s; }
.nad-nav-menu li:nth-child(2) { animation-delay: 0.22s; }
.nad-nav-menu li:nth-child(3) { animation-delay: 0.29s; }
.nad-nav-menu li:nth-child(4) { animation-delay: 0.36s; }
.nad-nav-menu li:nth-child(5) { animation-delay: 0.43s; }

@keyframes navItemFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nad-nav-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 999px;
  font-family: Inter, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.25px;
  color: #14142b;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease,
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              text-shadow 0.3s ease;
}

.nad-nav-link:hover {
  color: #14142b;
  transform: scale(1.06);
  text-shadow: 0 0 8px rgba(20, 20, 43, 0.08);
}

.nad-nav-link:active {
  transform: scale(0.97);
}

.nad-nav-link.w--current,
.nad-nav-link[aria-current="page"] {
  color: #14142b;
  font-weight: 600;
}

.nad-nav-link.nad-brand {
  padding: 4px 8px;
}

.nad-logo {
  display: block;
  width: auto;
  height: 24px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nad-nav-link.nad-brand:hover .nad-logo {
  transform: rotate(-10deg) scale(1.12);
}

.nad-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}

.nad-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #14142b;
  transition: transform 250ms ease, opacity 250ms ease;
}

.nad-navbar.nad-open .nad-nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nad-navbar.nad-open .nad-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nad-navbar.nad-open .nad-nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Override top spacing from old fixed-top header (navbar is now at bottom) */
.section.hero-section {
  padding-top: 2% !important;
}

/* Tablet: shrink the pill */
@media (max-width: 991px) {
  .nad-nav-link {
    padding: 6px 14px;
    font-size: 16px;
  }
}

/* Mobile: compact pill with pop-up list */
@media (max-width: 767px) {
  .nad-navbar {
    padding: 12px 16px;
  }

  .nad-nav-pill {
    gap: 6px;
    padding: 6px 10px;
  }

  .nad-nav-link.nad-brand {
    padding: 4px 4px;
  }

  .nad-nav-toggle {
    display: flex;
  }

  .nad-nav-menu {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    min-width: 220px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(20, 20, 43, 0.08);
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(20, 20, 43, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 250ms ease, transform 250ms ease, visibility 250ms ease;
  }

  .nad-navbar.nad-open .nad-nav-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nad-nav-menu li {
    width: 100%;
  }

  .nad-nav-link {
    width: 100%;
    justify-content: center;
    padding: 10px 18px;
    font-size: 16px;
  }

  .nad-nav-link:hover {
    transform: none;
  }

  .nad-nav-indicator {
    display: none;
  }

  /* Re-stagger items inside the mobile popup */
  .nad-nav-menu li {
    opacity: 0;
    animation: none;
  }

  .nad-navbar.nad-open .nad-nav-menu li {
    animation: navItemFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .nad-navbar.nad-open .nad-nav-menu li:nth-child(1) { animation-delay: 0.05s; }
  .nad-navbar.nad-open .nad-nav-menu li:nth-child(2) { animation-delay: 0.1s; }
  .nad-navbar.nad-open .nad-nav-menu li:nth-child(3) { animation-delay: 0.15s; }
  .nad-navbar.nad-open .nad-nav-menu li:nth-child(4) { animation-delay: 0.2s; }
  .nad-navbar.nad-open .nad-nav-menu li:nth-child(5) { animation-delay: 0.25s; }
}
