/* Site navigation, shared by the home page, the blog and standalone pages.
   Desktop: logo, a centered pill of links (the current page is a dark pill),
   then Log in and a dark call to action. Phones: logo, a compact call to
   action and a menu button that opens a sheet (a <details> element, so it
   works without JavaScript; /assets/js/nav.js only closes it on tap-away). */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid transparent; transition: border-color .25s ease, background .25s ease; }
.nav.scrolled { border-bottom-color: rgba(0,0,0,.07); }
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 68px; }
.nav .logo { justify-self: start; display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 20px; letter-spacing: -0.03em; color: #1D1D1F; }
.nav .logo img { width: 30px; height: 30px; border-radius: 8px; }

.nav-pill { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.9); border: 1px solid rgba(0,0,0,.08); box-shadow: 0 1px 2px rgba(29,29,31,.04), 0 8px 24px rgba(29,29,31,.06); }
.nav-pill a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: #48484D; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.nav-pill a .ico { color: #86868B; transition: color .18s ease; }
.nav-pill a:hover { background: #F2F2F5; color: #1D1D1F; }
.nav-pill a:hover .ico { color: #1D1D1F; }
.nav-pill a[aria-current] { background: #1D1D1F; color: #fff; box-shadow: 0 2px 8px rgba(29,29,31,.22); }
.nav-pill a[aria-current] .ico { color: #fff; }

.nav-cta { justify-self: end; display: flex; align-items: center; gap: 6px; }
.nav-login { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; color: #48484D; transition: background .18s ease, color .18s ease; }
.nav-login:hover { background: #F2F2F5; color: #1D1D1F; }
.nav-login .ico { transform: scaleX(-1); }
.nav-start { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 13px; background: #1D1D1F; color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 6px 16px rgba(29,29,31,.18); transition: background .18s ease, transform .15s ease; }
.nav-start:hover { background: #000; }
.nav-start:active { transform: scale(.98); }
.nav-start .short { display: none; }

/* Phone menu */
.nav-menu { display: none; position: relative; }
.nav-menu > summary { list-style: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; border: 1px solid rgba(0,0,0,.1); background: #fff; color: #1D1D1F; cursor: pointer; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary .close, .nav-menu[open] > summary .open { display: none; }
.nav-menu[open] > summary .close { display: block; }
.nav-sheet { position: fixed; top: 76px; left: 12px; right: 12px; padding: 8px; border-radius: 22px; background: #fff; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 24px 60px rgba(29,29,31,.22); display: grid; gap: 2px; animation: nav-sheet .22s cubic-bezier(.22,1,.36,1) both; }
@keyframes nav-sheet { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.nav-sheet a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 15px; font-size: 17px; font-weight: 500; color: #1D1D1F; }
.nav-sheet a .ico { color: #86868B; }
.nav-sheet a:hover { background: #F5F5F7; }
.nav-sheet a[aria-current] { background: #1D1D1F; color: #fff; }
.nav-sheet a[aria-current] .ico { color: #fff; }
.nav-sheet hr { border: 0; height: 1px; background: #E8E8ED; margin: 6px 12px; }
.nav-sheet .nav-sheet-cta { justify-content: center; margin-top: 4px; background: #1D1D1F; color: #fff; font-weight: 600; }
.nav-sheet .nav-sheet-cta .ico { color: #fff; }

@media (max-width: 1023px) {
  .nav-inner { grid-template-columns: 1fr auto; height: 64px; }
  .nav-pill, .nav-login { display: none; }
  .nav-menu { display: block; }
  .nav-sheet { top: 72px; }
}
@media (max-width: 480px) {
  .nav .logo { font-size: 19px; }
  .nav-start { height: 40px; padding: 0 14px; }
  .nav-start .long { display: none; }
  .nav-start .short { display: inline; }
  .nav-start .ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-sheet { animation: none; }
}
