/* ──────────────────────────────────────────────
   Shared navigation styles for the marketing site.
   The nav markup is baked into each page's HTML (identical everywhere), so the
   header never reflows between pages. This file only:
     - keeps items on one line (no wrapping)
     - reserves the scrollbar gutter so pages don't shift left/right
     - collapses the nav into a hamburger on phones (nav.js adds the button)
   ────────────────────────────────────────────── */

/* Reserve space for the vertical scrollbar on every page, so navigating
   between a short page and a long one never nudges the layout sideways. */
html { scrollbar-gutter: stable; }
html, body { overflow-x: hidden; max-width: 100%; }

/* Neutralise per-page `nav a { margin-left }` so the header is identical on
   every page: the logo sits flush-left and link spacing comes only from the
   flex `gap`. Without this, some pages push the logo/links 40px right. */
header nav > a { margin-left: 0; }
/* Keep every top-level nav item on a single line, spaced only by the flex gap,
   at one fixed size so the middle items land in the same place on every page. */
header nav > div > a { white-space: nowrap; margin-left: 0; font-size: 0.95rem; font-weight: 500; }

/* Hamburger button — hidden on desktop, injected by nav.js. */
.cyb-navtoggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
}

@media (max-width: 768px) {
  header nav { position: relative; }
  .cyb-navtoggle { display: block; }

  header nav > div {
    display: none !important;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 0.35rem 0;
    box-shadow: 0 16px 32px rgba(0,0,0,0.45);
    z-index: 60;
  }
  header nav > div.open { display: flex !important; }

  header nav > div > a { margin: 0 !important; padding: 0.85rem 1.2rem !important; font-size: 1rem !important; }
  header nav > div > a + a { border-top: 1px solid #1e293b; }
}
