/* ── Fixed Glassmorphism Nav ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(23, 23, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-logo-crypto {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}

.nav-logo-pulse {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--muted-foreground);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--foreground);
}

.nav-link--active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Auth buttons */
.btn-nav-login {
  padding: 0.4rem 1rem;
  color: var(--foreground);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.btn-nav-login:hover {
  border-color: var(--muted-foreground);
  color: var(--foreground);
}

.btn-nav-signup {
  padding: 0.4rem 1rem;
  color: var(--primary-foreground);
  background: var(--primary);
  border: none;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.btn-nav-signup:hover {
  opacity: 0.88;
  color: var(--primary-foreground);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 50%;
}

.nav-user-btn:hover .nav-avatar,
.nav-user-btn:focus-visible .nav-avatar {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.nav-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary-foreground);
  pointer-events: none;
  user-select: none;
  transition: box-shadow 0.2s ease;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  min-width: 120px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.nav-dropdown--open {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--popover-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--primary);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 0.25rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--background);
  padding: 3rem 2rem;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 33%;
  height: 1px;
  background: var(--foreground);
  opacity: 0.2;
  filter: blur(4px);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-copy {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  margin: 0;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.footer-section h3 {
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem 0;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-section a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--foreground);
}

.footer-section svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Mobile drawer */
@media (max-width: 767px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(23, 23, 23, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links--open {
    max-height: 400px;
  }

  .nav-links li { width: 100%; }

  .nav-link {
    display: block;
    padding: 0.75rem 2rem;
    border-bottom: none;
    border-left: 2px solid transparent;
  }

  .nav-link--active {
    border-left-color: var(--primary);
    border-bottom-color: transparent;
  }

  .nav-auth { display: none; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-nav {
    padding: 0 1rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
