/* ═══════════════════════════════════════════════════
   Atomi — Navigation
   ═══════════════════════════════════════════════════ */

.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px clamp(16px, 3vw, 48px);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
}
.top-nav.scrolled {
  background: oklch(0.992 0.01 82 / 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 oklch(0.3 0.02 250 / 0.06), 0 4px 20px oklch(0.3 0.02 250 / 0.04);
  padding: 10px clamp(16px, 3vw, 48px);
}
.nav-inner {
  max-width: 1680px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
}
.nav-logo-icon { width: 40px; height: 40px; }
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.55rem; font-weight: 650; line-height: 1;
}
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.24s var(--ease);
}
.nav-links a:hover { color: var(--violet); }
.nav-center {
  display: flex; align-items: center; gap: 12px;
}
.nav-alpha-badge {
  padding: 5px 14px; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 560;
  color: oklch(0.56 0.09 50);
  background: oklch(0.88 0.10 72 / 0.25);
  border: 1px solid oklch(0.82 0.11 74 / 0.3);
  white-space: nowrap;
}
.nav-menu-btn {
  display: none;
  background: none; border: none; padding: 8px;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-menu-btn span {
  display: block; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Mobile Menu ───────────────────────────────────── */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: oklch(0.992 0.01 82 / 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-inner {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.mobile-link {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 600;
  color: var(--ink);
  transition: color 0.24s var(--ease);
}
.mobile-link:hover { color: var(--violet); }
.mobile-link--cta {
  margin-top: 16px;
  font-family: var(--font-ui);
  font-size: 1rem; font-weight: 650;
  padding: 16px 40px;
  border: 1px solid var(--violet-soft);
  border-radius: var(--radius-full);
  color: var(--violet);
  transition: background 0.28s var(--ease), color 0.28s var(--ease);
}
.mobile-link--cta:hover { background: var(--violet); color: oklch(0.99 0.01 82); }
/* nav styles — extracted live from refine.css */

.top-nav:not(.scrolled) {
  padding-top: clamp(34px, 5.5vh, 58px);
  padding-left: clamp(48px, 5vw, 84px);
  padding-right: clamp(48px, 5vw, 84px);
  background: transparent;
  box-shadow: none;
}

.top-nav:not(.scrolled) .nav-center,
.top-nav:not(.scrolled) .nav-links,
.top-nav:not(.scrolled) .nav-cta {
  opacity: 0;
  pointer-events: none;
}

.top-nav:not(.scrolled) .nav-logo-icon {
  width: 48px;
  height: 48px;
}

.top-nav:not(.scrolled) .nav-logo-text {
  font-size: clamp(1.75rem, 2.3vw, 2.16rem);
}

.nav-inner {
  gap: clamp(14px, 2vw, 28px);
}

.nav-center {
  margin-left: auto;
}

.nav-links {
  margin-left: clamp(10px, 2vw, 28px);
}

.nav-links,
.nav-links a,
.nav-cta {
  position: relative;
  z-index: 2;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 560;
}

.nav-cta {
  color: var(--ink);
  background: oklch(0.99 0.01 82 / 0.7);
  border-color: oklch(0.75 0.06 73 / 0.32);
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════
   Spinning atom logo (continuous, gentle)
   ═══════════════════════════════════════════════════ */
.nav-logo-icon {
  transform-origin: 50% 50%;
  animation: nav-atom-spin 14s linear infinite;
  will-change: transform;
}
@keyframes nav-atom-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-logo-icon { animation: none; }
}

/* ═══════════════════════════════════════════════════
   Mobile nav — force hamburger visible, fold links into overlay
   (high-specificity + !important so nothing can hide it)
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .top-nav .nav-inner .nav-links,
  .top-nav .nav-inner .nav-center,
  .top-nav .nav-inner .nav-cta {
    display: none !important;
  }
  .top-nav .nav-inner .nav-menu-btn,
  .top-nav:not(.scrolled) .nav-inner .nav-menu-btn {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 102;
  }
  .top-nav .nav-inner .nav-menu-btn span {
    display: block;
    width: 26px;
    height: 2.5px;
    border-radius: 2px;
    background: oklch(0.25 0.03 270) !important;
  }
}
