/*
 * The site header, shared by every page (home, pricing, legal, docs, guides).
 * Pages link this file and use the same markup, so the logo, links and
 * buttons sit in the same place at the same size everywhere:
 *
 *   <header class="site-nav"><div class="site-nav-inner">
 *     <div class="site-start">[docs: .menu-toggle]<a class="site-logo">Min<span>Pin</span></a></div>
 *     <nav class="site-links">…</nav>
 *     <div class="site-actions"><button id="themeToggle" class="theme-toggle">…<a class="site-cta">Download</a></div>
 *   </div></header>
 *
 * Colours come from each page's tokens (--bg, --fg, --muted, --card, --border, --accent).
 */
.site-nav {
  position: sticky; top: 0; z-index: 30;
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  line-height: 1;
}
.site-nav-inner {
  box-sizing: border-box;
  max-width: 1200px; height: 100%;
  margin: 0 auto; padding: 0 28px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.site-start { justify-self: start; display: flex; align-items: center; gap: 10px; }
.site-logo {
  font-size: 20px; font-weight: 800; letter-spacing: -.02em;
  color: var(--fg); text-decoration: none;
}
.site-logo span { color: var(--accent); }
.site-logo:hover { text-decoration: none; }

.site-links { display: flex; align-items: center; gap: 4px; }
.site-links a {
  font-size: 14px; font-weight: 500; line-height: 20px;
  padding: 8px 12px; border-radius: 9px;
  color: var(--muted); text-decoration: none;
  transition: color .12s ease, background-color .12s ease;
}
.site-links a:hover, .site-links a.active { color: var(--fg); background: var(--card); text-decoration: none; }

.site-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
/* Secondary: a quiet icon at the far right, after Download. */
.site-nav .theme-toggle {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: 0 -6px 0 0; padding: 0;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--fg);
  font-size: 14px; line-height: 1; cursor: pointer;
  opacity: .6;
  transition: opacity .12s ease, background-color .12s ease;
}
.site-nav .theme-toggle:hover, .site-nav .theme-toggle:focus-visible { opacity: 1; background: var(--card); }
.site-cta {
  box-sizing: border-box;
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 16px; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: background-color .12s ease;
}
.site-cta:hover { background: var(--accent-hover, #d94e31); color: #fff; text-decoration: none; }

/* Docs and guides only: opens the sidebar on small screens. */
.site-nav .menu-toggle {
  display: none;
  box-sizing: border-box; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--fg); font-size: 15px; cursor: pointer;
}

@media (max-width: 880px) {
  .site-nav-inner { display: flex; justify-content: space-between; padding: 0 16px; }
  .site-links { display: none; }
  .site-nav .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}
