/* Shared marketing nav — used by index.php and auth pages (_marketing-nav.php).
   Sticky nav: brand (left) — link group (centered) — theme toggle + CTA +
   mobile hamburger (right). An optional promo-banner slot can sit above the
   nav (see _marketing-nav.php); unused today (no live promo), so it renders
   nothing unless a page sets $GLOBALS['gd_promo_banner'] before including
   the partial. */

.promo-banner {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #061018;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px clamp(20px, 5vw, 72px);
  line-height: 1.5;
}
.promo-banner a { color: inherit; text-decoration: underline; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; text-decoration: none; color: var(--text); }
.nav-brand svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); }

.nav-links { justify-self: center; display: flex; gap: 28px; align-items: center; font-size: 15px; }
.nav-links a { color: var(--text); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }

.nav-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }

.nav-cta { background: linear-gradient(180deg, #5aa7ee, #3f86d4); color: #061018; padding: 10px 18px; border-radius: var(--radius-m); font-weight: 700; text-decoration: none; font-size: 14px; white-space: nowrap; }

/* Mobile bar shows only theme toggle + hamburger; the "Try it free" CTA
   lives inside the dropdown menu, under Login (.nav-cta-menu, mobile-only —
   see the 768px block). Hidden on desktop where the top-bar CTA shows. */
.nav-cta-menu { display: none; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
/* Icon shows the theme you'd SWITCH TO (opposite of current): sun in dark
   mode, moon in light mode. */
.theme-toggle .ic-sun { display: block; }
.theme-toggle .ic-moon { display: none; }
html[data-theme="light"] .theme-toggle .ic-sun { display: none; }
html[data-theme="light"] .theme-toggle .ic-moon { display: block; }

.nav-toggle { display: none; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--text); width: 38px; height: 38px; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 768px) {
  .nav { grid-template-columns: auto auto; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    justify-self: stretch;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px clamp(20px, 5vw, 72px) 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 10px 0; }
  .nav-cta-menu { display: block; width: 100%; text-align: center; padding: 12px 18px; margin-top: 6px; box-sizing: border-box; }
  .nav-toggle { display: flex; }
  /* Mobile bar: theme toggle + hamburger only (CTA moves into the menu). */
  .nav-actions .nav-cta { display: none; }
}
