/* QQ NET — shared site navigation
 *
 * Single source of truth for the top navbar used on landing, /blog, /pricing,
 * /download, /tools, /404 and all article pages. Originally these styles
 * were inline inside landing/index.html and the article-page template had a
 * separate `landing-nav` ruleset; the two drifted visually so we lifted the
 * landing nav into this shared sheet. Articles now use the same `.nav`
 * structure and look identical to the landing.
 */

/* Shell — the inner content rail (1200px max). */
.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 720px) {
  .nav-shell { padding: 0 32px; }
}

/* The bar itself */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 16px 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(8, 8, 10, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
@media (min-width: 900px) { .nav { padding: 20px 0; } }
.nav.scrolled { border-color: rgba(255, 255, 255, 0.08); background: rgba(8, 8, 10, 0.88); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
@media (min-width: 720px) {
  .nav__inner { padding: 0 32px; }
}

/* Brand */
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px;
  box-shadow: 0 10px 28px -10px rgba(243, 179, 77, 0.6);
  display: block;
}
@media (min-width: 900px) {
  .brand-logo { width: 52px; height: 52px; border-radius: 14px; }
}
.brand-name { font-weight: 800; letter-spacing: 0.1em; font-size: 17px; white-space: nowrap; color: var(--text); }
@media (min-width: 900px) { .brand-name { font-size: 19px; } }
@media (max-width: 420px) { .brand-name { display: none; } }

/* Inline desktop links */
.nav-links {
  display: none; gap: 30px; font-size: 15px; color: var(--text-dim, #d4cfc3); font-weight: 500;
}
.nav-links a { transition: color 0.2s; color: inherit; text-decoration: none; }
.nav-links a:hover, .nav-links a.is-active { color: var(--gold, #f3b34d); }
@media (min-width: 900px) { .nav-links { display: flex; font-size: 16px; gap: 34px; } }

/* Action cluster (right side) */
.nav-actions { display: flex; gap: 8px; align-items: center; }
@media (min-width: 900px) { .nav-actions { gap: 10px; } }

/* Compact site button — icon-only on mobile */
.nav-site-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; width: 44px; height: 44px; padding: 0; border-radius: 12px;
  color: var(--text); background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
  flex-shrink: 0; text-decoration: none;
}
.nav-site-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold, #f3b34d);
  color: var(--gold, #f3b34d);
  transform: translateY(-1px);
}
.nav-site-btn__icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav-site-btn__text { display: none; font-size: 15px; font-weight: 600; }
@media (min-width: 900px) {
  .nav-site-btn { width: auto; height: auto; padding: 14px 20px; border-radius: 14px; }
  .nav-site-btn__text { display: inline; }
  .nav-site-btn__icon { width: 18px; height: 18px; }
}

/* Primary CTA inside nav */
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; font-size: 14px; border-radius: 12px; font-weight: 600;
  color: #1a1308;
  background: linear-gradient(135deg, #f1b44f, #ffd78f);
  box-shadow: 0 12px 32px -12px rgba(243, 179, 77, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative; overflow: hidden; white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.nav-cta::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(243, 179, 77, 0.7); }
.nav-cta:hover::after { transform: translateX(100%); }
@media (min-width: 900px) { .nav-cta { padding: 14px 22px; font-size: 15px; border-radius: 14px; } }
.nav-cta__text-short { display: inline; }
.nav-cta__text-long { display: none; }
@media (min-width: 560px) {
  .nav-cta__text-short { display: none; }
  .nav-cta__text-long { display: inline; }
}

/* Hamburger toggle (mobile only) */
.nav-toggle {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0; cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--gold, #f3b34d); }
.nav-toggle__bar {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 2px;
  background: currentColor; border-radius: 2px;
  transform-origin: center;
  transition: transform 0.28s ease, opacity 0.2s ease;
}
.nav-toggle__bar:nth-child(1) { transform: translate(-50%, -8px); }
.nav-toggle__bar:nth-child(2) { transform: translate(-50%, -50%); }
.nav-toggle__bar:nth-child(3) { transform: translate(-50%, 6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; transform: translate(-50%, -50%) scaleX(0.4); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* Mobile dropdown */
.nav-drawer {
  position: fixed; top: 76px; left: 12px; right: 12px; z-index: 49;
  background: rgba(14, 14, 18, 0.96);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px; padding: 12px;
  opacity: 0; transform: translateY(-8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.nav-drawer[data-open="true"] { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.nav-drawer__link {
  display: block; padding: 14px 16px;
  font-size: 15px; font-weight: 500; color: var(--text-dim, #d4cfc3);
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-drawer__link + .nav-drawer__link { margin-top: 2px; }
.nav-drawer__link:hover, .nav-drawer__link:active { background: rgba(255, 255, 255, 0.05); color: var(--gold, #f3b34d); }
@media (min-width: 900px) { .nav-drawer { display: none; } }
