/* ==========================================================================
   Reusable site navigation + burger menu
   Shared by index.html, privacy-policy.html, terms.html
   Depends on each page providing the CSS variables in :root
   (--muted, --soft, --cream, --line) and a .container helper.
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(5, 11, 22, 0.78);
  backdrop-filter: blur(18px);
}

.nav-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.018em;
  font-size: 25px;
  white-space: nowrap;
}

.mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(231, 189, 85, 0.28);
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(31, 140, 255, 0.12),
      transparent 62%
    ),
    rgba(231, 189, 85, 0.035);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(31, 140, 255, 0.1);
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
}

.nav-links a:hover {
  color: var(--cream);
}

.nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #1787ff 0%, #0d5cf5 100%);
  color: #fff;
  font-weight: 600;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  white-space: nowrap;
  box-shadow: 0 14px 36px rgba(31, 140, 255, 0.34);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.nav .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(31, 140, 255, 0.43);
  filter: brightness(1.05);
}

/* Burger toggle ----------------------------------------------------------- */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(8, 18, 34, 0.6);
  cursor: pointer;
  z-index: 30;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--soft);
  transition:
    transform 0.26s ease,
    opacity 0.2s ease;
}

.nav.open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav.open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile dropdown --------------------------------------------------------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-inner {
    height: 64px;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 22px;
    background: rgba(5, 11, 22, 0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.45);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.24s ease,
      transform 0.24s ease,
      visibility 0.24s ease;
  }

  .nav.open .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links a:not(.btn) {
    padding: 15px 4px;
    font-size: 16px;
    color: var(--soft);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav .btn {
    margin-top: 16px;
    width: 100%;
  }
}
