@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* 
  Shared Navigation CSS
  Single source of truth for the navbar on all static pages — EXACT MATCH to Home Page (legacy.css & Navbar.jsx)
*/

.navbar,
.nav-btn,
.mob-nav-btn,
.mob-hamburger,
.mob-hamburger-label,
.mob-dropdown-item,
.nav-dropdown-item {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 997;
  width: max-content;
  min-width: 448px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 4px;
  gap: 2px;
  border-radius: 12px;
  background: rgba(245, 244, 240, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 8px;
  color: #555555;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-btn:focus,
.nav-btn:focus-visible {
  outline: none !important;
}

.nav-btn.active {
  background: #111111;
  color: #c8ff00;
  font-weight: 600;
  border-radius: 8px;
}

.nav-icon {
  width: 14px;
  height: 14px;
  flex: none;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown-arrow {
  font-size: 10px;
  margin-left: 4px;
  transition: transform 0.2s ease;
  color: inherit;
}

.nav-btn.active .dropdown-arrow {
  color: #c8ff00;
}

.dropdown-arrow.open {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 0;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.hover-dot-indicator {
  position: absolute;
  left: 14px;
  top: 27px;
  width: 6px;
  height: 6px;
  background-color: #c8ff00;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(200, 255, 0, 0.5);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
  pointer-events: none;
  transform: translateY(calc(44px * var(--dot-index)));
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 20px 0 30px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #555555;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.nav-dropdown-item.active {
  color: #ffffff;
}

.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}

/* Mobile Specific Styles — EXACT MATCH to Home Page (legacy.css) */
.mobile-nav,
.mob-menu {
  display: none;
}

@media (max-width: 768px) {
  /* Hide custom dot cursor on mobile to prevent white dot overlaying buttons */
  .cursor {
    display: none !important;
  }

  .navbar {
    top: 12px;
    bottom: auto;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 24px) !important;
    min-width: 0 !important;
    padding: 10px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06) !important;
  }

  .nav-pill {
    display: none !important;
  }

  .mobile-nav {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(245, 244, 240, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .mob-logo-link {
    display: inline-flex;
    align-items: center;
    height: auto;
  }

  .mob-logo-img {
    width: 111px;
    height: 29px;
    display: block;
  }

  .mob-right {
    margin-left: auto;
    display: flex;
    align-items: center;
  }

  .mob-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    background: #111111;
    color: #c8ff00;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    line-height: 1;
    outline: none !important;
    box-shadow: none !important;
  }

  .mob-hamburger:focus,
  .mob-hamburger:focus-visible,
  .mob-hamburger:active {
    outline: none !important;
    box-shadow: none !important;
  }

  .mob-hamburger i {
    font-size: 22px !important;
  }

  .mob-hamburger-label {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
  }

  .mob-menu {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 12px);
    bottom: auto;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    transform: translateY(-6px);
    background: rgba(245, 244, 240, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, transform 0.3s ease, padding 0.3s ease;
    z-index: 1000;
  }

  .mob-menu.open {
    max-height: 500px;
    padding: 10px;
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger animation for menu items */
  .mob-menu .mob-nav-btn,
  .mob-menu .mob-dropdown-wrapper {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, color 0.2s ease;
  }

  .mob-menu.open .mob-nav-btn,
  .mob-menu.open .mob-dropdown-wrapper {
    opacity: 1;
    transform: translateY(0);
  }

  .mob-menu.open .mob-nav-btn:nth-child(1) { transition-delay: 0.05s; }
  .mob-menu.open .mob-nav-btn:nth-child(2),
  .mob-menu.open .mob-dropdown-wrapper:nth-child(2) { transition-delay: 0.1s; }
  .mob-menu.open .mob-nav-btn:nth-child(3),
  .mob-menu.open .mob-dropdown-wrapper:nth-child(3) { transition-delay: 0.15s; }
  .mob-menu.open .mob-nav-btn:nth-child(4),
  .mob-menu.open .mob-dropdown-wrapper:nth-child(4) { transition-delay: 0.2s; }
  .mob-menu.open .mob-nav-btn:nth-child(5),
  .mob-menu.open .mob-dropdown-wrapper:nth-child(5) { transition-delay: 0.25s; }
  .mob-menu.open .mob-nav-btn:nth-child(6),
  .mob-menu.open .mob-dropdown-wrapper:nth-child(6) { transition-delay: 0.3s; }

  body:has(.mob-hamburger.open)::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 996;
    pointer-events: none;
    animation: fadeIn 200ms ease forwards;
  }

  .mob-nav-btn {
    background: transparent;
    border: none;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 15px;
    color: #555;
    text-align: left;
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
  }

  .mob-nav-btn:focus,
  .mob-nav-btn:focus-visible {
    outline: none !important;
  }

  .mob-nav-btn.active {
    background: #111;
    color: var(--accent, #c8ff00);
  }

  .mob-dropdown-wrapper {
    width: 100%;
  }

  .mob-dropdown-menu {
    display: flex;
    flex-direction: column;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 8px 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .mob-hover-dot-indicator {
    position: absolute;
    left: 14px;
    top: 27px;
    width: 6px;
    height: 6px;
    background-color: #c8ff00;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(200, 255, 0, 0.5);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
    pointer-events: none;
    transform: translateY(calc(44px * var(--dot-index)));
  }

  .mob-dropdown-item {
    height: 44px;
    font-size: 13.5px;
    color: #555555;
    font-weight: 500;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 20px 0 30px;
    transition: all 0.2s ease;
    cursor: pointer;
  }

  .mob-dropdown-item:last-child {
    border-bottom: none;
  }

  .mob-dropdown-item.active {
    color: #ffffff;
  }

  .mob-dropdown-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; pointer-events: auto; }
}
