/* Konode site header — the floating glass pill, shared by every page.
   Self-contained on purpose: the landing page (style.css) and the doc pages
   (docs.css) carry different token sets, so this file depends on neither. */

/* The header is fixed, so anchored sections have to stop clear of it. */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

.site-header {
  position: fixed;
  /* 16px, so the pill lines up with the 16px inset on the section shells. */
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(1120px, calc(100vw - 48px));
  height: 60px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 8px 12px 8px 16px;
  border: 1px solid rgb(17 21 26 / 0.10);
  border-radius: 999px;
  background: rgb(247 248 250 / 0.62);
  box-shadow: inset 0 1px 0 0 rgb(255 255 255 / 0.6),
              0 8px 24px -18px rgb(17 21 26 / 0.35);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  color: #11151a;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.45px;
  text-decoration: none;
}
.site-header .brand img { width: 26px; height: 26px; border-radius: 8px; }

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
}
.primary-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgb(17 21 26 / 0.62);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms cubic-bezier(0.22, 1, 0.36, 1),
              background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.primary-nav a:hover { color: #11151a; background: rgb(17 21 26 / 0.05); }
.primary-nav a[aria-current="page"] { color: #11151a; background: rgb(17 21 26 / 0.05); }
.primary-nav svg { width: 14px; height: 14px; fill: currentColor; }

/* Install CTA in the header. */
.header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* The label has to stay wrapped in a single <span> in the markup. Bare
     text next to <span class="js-browser"> becomes its own anonymous flex
     item, so this gap lands between "Add to" and "Chrome" as well and the
     header button reads wider than the hero one, which is wrapped. */
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #0b8348;
  border-radius: 999px;
  background: #0b8348;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.header-cta:hover { background: #096b3b; border-color: #096b3b; }
.header-cta img { width: 18px; height: 18px; }
.header-cta .ext { width: 14px; height: 14px; opacity: 0.85; }

/* Mobile disclosure — <details>, so the menu works with JavaScript disabled. */
.mobile-nav { position: relative; display: none; justify-self: end; }
.mobile-nav summary {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid rgb(17 21 26 / 0.15);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.72);
  cursor: pointer;
  list-style: none;
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary svg { width: 20px; height: 20px; stroke: #11151a; }
.mobile-nav[open] summary { background: #11151a; }
.mobile-nav[open] summary svg { stroke: #fff; }
.mobile-nav nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 232px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(17 21 26 / 0.04),
              0 20px 50px -30px rgb(17 21 26 / 0.25),
              0 0 0 1px rgb(17 21 26 / 0.07);
}
.mobile-nav nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #5b6470;
  font-size: 14px;
  text-decoration: none;
}
.mobile-nav nav a:hover { background: #f7f8fa; color: #11151a; }
.mobile-nav .m-install {
  margin-bottom: 4px;
  background: #0b8348;
  color: #fff;
  font-weight: 600;
}
.mobile-nav .m-install:hover { background: #096b3b; color: #fff; }

@media (max-width: 1080px) {
  .header-cta { display: none; }
}

@media (max-width: 900px) {
  .primary-nav { display: none; }
  .mobile-nav { display: block; }
  .site-header { grid-template-columns: auto 1fr; gap: 16px; }
}

@media (max-width: 640px) {
  .site-header { width: calc(100vw - 40px); }
}
