/* =============================================================
   nav.css — Navigation Component
   Adaptive dark/light variants keyed on body.page-dark / body.page-light.
   Mobile fullscreen overlay at 640px breakpoint.
   Cursor styles scoped to .page-dark (landing page only).
   ============================================================= */


/* -------------------------------------------------------------
   Topbar — base (shared between dark and light)
   ------------------------------------------------------------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  transition: background 0.3s ease;
}


/* -------------------------------------------------------------
   Logo
   ------------------------------------------------------------- */

.topbar-logo {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.topbar-logo span {
  color: var(--amber);
}


/* -------------------------------------------------------------
   Dark variant — on body.page-dark (landing page)
   ------------------------------------------------------------- */

.page-dark .topbar {
  border-bottom: 1px solid rgba(245, 184, 0, 0.1);
  background: rgba(26, 26, 31, 0.85);
  backdrop-filter: blur(12px);
}

.page-dark .topbar-logo {
  color: #fff;
}

.page-dark .topbar-link {
  color: rgba(255, 255, 255, 0.55);
}

.page-dark .topbar-link:hover,
.page-dark .topbar-link.active {
  color: var(--amber);
}


/* -------------------------------------------------------------
   Light variant — on body.page-light (inner pages)
   ------------------------------------------------------------- */

.page-light .topbar {
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.page-light .topbar-logo {
  color: var(--text);
}

.page-light .topbar-link {
  color: var(--text-off);
}

.page-light .topbar-link:hover,
.page-light .topbar-link.active {
  color: var(--amber);
}


/* -------------------------------------------------------------
   Nav links — shared
   ------------------------------------------------------------- */

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.topbar-link {
  font-size: 0.72rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.topbar-link.active {
  color: var(--amber);
}


/* -------------------------------------------------------------
   CTA button
   ------------------------------------------------------------- */

.topbar-btn {
  background: var(--amber);
  color: #050507;
  border: none;
  padding: 0.55rem 1.4rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transition: background 0.2s, transform 0.2s;
}

.topbar-btn:hover {
  background: #ffd23f;
  transform: translateY(-1px);
}


/* -------------------------------------------------------------
   Hamburger button (mobile only — hidden at desktop)
   ------------------------------------------------------------- */

.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.topbar-hamburger svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.page-dark .topbar-hamburger {
  color: #fff;
}

.page-light .topbar-hamburger {
  color: var(--text);
}


/* -------------------------------------------------------------
   Mobile nav overlay — fullscreen, dark on all pages
   ------------------------------------------------------------- */

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hud-bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mobile-nav.open {
  display: flex;
  opacity: 1;
}

.mobile-nav-close {
  position: absolute;
  top: 1.2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-close svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
}

.mobile-nav a {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--amber);
}


/* -------------------------------------------------------------
   Mobile breakpoint — 640px
   ------------------------------------------------------------- */

@media (max-width: 640px) {
  .topbar-nav {
    display: none;
  }

  .topbar-hamburger {
    display: flex;
  }
}


/* -------------------------------------------------------------
   Custom cursor — scoped to .page-dark (landing page only)
   Cursor styles live here because cursor is page-chrome,
   not a standalone component.
   ------------------------------------------------------------- */

.page-dark #cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
}

.page-dark #cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--amber-dim);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease, top 0.12s ease;
}
