/* ── Navigation ── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  backdrop-filter: blur(20px);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

nav.nav--scrolled {
  border-bottom-color: var(--border-strong);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}

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

.nav-links a.active {
  color: var(--accent);
}

.nav-cta {
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* Theme toggle */
.theme-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--fill);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ── Mobile hamburger ── */
.nav-hamburger {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--fill);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 8px 6px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--muted);
  border-radius: 1px;
  transition: all 0.2s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile slide-down panel */
.nav-mobile {
  display: flex;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 20px;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), visibility 0.25s;
  pointer-events: none;
}

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

.nav-mobile a {
  font-size: 15px;
  color: var(--muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

.nav-mobile a:last-of-type {
  border-bottom: none;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--accent);
}

.nav-mobile .nav-cta {
  display: inline-block;
  text-align: center;
  margin-top: 4px;
}

/* ── CTA Dropdown ── */
.nav-cta-wrap {
  position: relative;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
}

.cta-chevron {
  transition: transform 0.25s var(--ease);
}

.nav-cta-wrap.open .cta-chevron {
  transform: rotate(180deg);
}

.cta-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 40px var(--shadow), 0 0 0 1px var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  z-index: 101;
  pointer-events: none;
}

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

.cta-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.cta-dropdown-item:hover,
.cta-dropdown-item:focus-visible {
  background: var(--accent-dim);
  outline: none;
}

.cta-dropdown-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--fill);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  transition: background 0.15s, border-color 0.15s;
}

.cta-dropdown-item:hover .cta-dropdown-icon {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.cta-dropdown-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.cta-dropdown-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}

.nav-cta-wrap.open .cta-dropdown-item:nth-child(1) { animation: dropIn 0.25s var(--ease) 0.02s both; }
.nav-cta-wrap.open .cta-dropdown-item:nth-child(2) { animation: dropIn 0.25s var(--ease) 0.06s both; }
.nav-cta-wrap.open .cta-dropdown-item:nth-child(3) { animation: dropIn 0.25s var(--ease) 0.10s both; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile Get Started Section ── */
.nav-mobile-getstarted {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-strong);
}

.nav-mobile-gs-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dim);
  margin-bottom: 8px;
}

.nav-mobile-gs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}

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

.nav-mobile-gs-item:hover {
  color: var(--accent);
}

.nav-mobile-gs-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--fill);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent);
}
