/* =========================================================
   Section · top bar, desktop links, phone, mobile menu.
   ========================================================= */

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 244, 248, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.nav__links { display: flex; gap: clamp(20px, 2.4vw, 34px); }
.nav__links a { position: relative; white-space: nowrap; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--mech);
}
.nav__links a:hover::after { transform: scaleX(1); }

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__logo { display: block; width: auto; height: 56px; }
.brand__logo--lg { height: 64px; }

.nav__end { display: flex; align-items: center; gap: 10px; }

/* ⋮ beside "Book a free demo" — hover (or tap) shows the Admin link */
.nav__more { position: relative; }
.nav__dots {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 32px; height: 40px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; transition: background-color .2s;
}
.nav__dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--ink); }
.nav__dots:hover, .nav__more.is-open .nav__dots { background: var(--surface); }
.nav__dots:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav__more-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 150px; padding: 6px;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 12px;
  box-shadow: 0 18px 40px -20px rgba(46, 49, 146, .45);
  opacity: 0; visibility: hidden; translate: 0 -4px;
  transition: opacity .18s, translate .18s, visibility .18s;
}
.nav__more-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }   /* bridge, so the pointer can reach it */
.nav__more:hover .nav__more-menu, .nav__more.is-open .nav__more-menu, .nav__more-menu:focus-within { opacity: 1; visibility: visible; translate: 0 0; }
.nav__more-menu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  font: 600 14px var(--sans); color: var(--ink); text-decoration: none;
}
.nav__more-menu a::before { content: ""; width: 6px; height: 6px; background: var(--accent); }
.nav__more-menu a:hover, .nav__more-menu a:focus-visible { background: var(--bg); outline: none; }
.nav__toggle {
  display: none; position: relative; flex: none;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px;
  background: var(--ink);
  cursor: pointer;
}
.nav__toggle span {
  position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px;
  background: var(--accent-light); transition: transform .45s var(--servo);
}
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 24px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
.nav__toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.nav__sheet { max-height: calc(100dvh - 72px); overflow-y: auto; border-top: 1px solid var(--line); }
.nav__sheet[hidden] { display: none; }
.nav__sheet .container { display: grid; padding: 8px 0 24px; }
.nav__sheet .container > a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px dashed var(--line-strong);
  font-size: 20px; font-weight: 500; letter-spacing: -.02em; text-decoration: none;
}
.nav__sheet .container > a::after { content: "→"; color: var(--accent); }
.nav__sheet .container > a.nav__sheet-admin { font: 500 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }   /* quieter than the page links */
.nav__sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.nav__sheet-actions .btn { flex: 1; justify-content: center; }

/* seven links need ~1080px beside the logo + button; below that, the menu icon takes over */
@media (max-width: 1080px) { .nav__links, .nav__more { display: none; } .nav__toggle { display: block; } }   /* phones: Admin sits in the menu instead */
@media (min-width: 1081px) { .nav__sheet { display: none !important; } }
@media (max-width: 400px) { .brand__logo { height: 42px; } }
@media (max-width: 380px) { .nav__end .btn { display: none; } }
