/* ==========================================================================
   Top bar + header — Figma 8:1877 / 8:1879 (top bar), 8:1980 (nav row in 8:1898)
   ========================================================================== */

/* --- Figma fonts not in the Next build ------------------------------------
   Geist (nav + pill buttons), Geist Pixel Square (top bar), DM Sans (logo,
   "Backed by", footer). Declared once here; used by hero.css/footer.css too. */
@font-face {
  font-family: "Geist";
  src: url(../assets/fonts/geist-variable.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Pixel";
  src: url(../assets/fonts/geist-pixel-square.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url(../assets/fonts/dm-sans-variable-latin.woff2) format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* Font helpers (Figma: Geist Regular / DM Sans opsz 14) */
.font-geist {
  font-family: "Geist", var(--font-sans);
  font-variation-settings: normal;
}
.font-dm {
  font-family: "DM Sans", var(--font-sans);
  font-variation-settings: "opsz" 14;
}

/* --- Top bar (8:1877 1440×39 black; text 8:1879 at y=10) ----------------- */
.topbar {
  min-height: 39px;
  padding-top: 10px;
  padding-bottom: 9px;
}
.topbar__text {
  font-family: "Geist Pixel", var(--font-mono);
  font-size: 12px;
  line-height: 20px;
}
@media (min-width: 40rem) {
  .topbar__text { font-size: 14px; }
}

/* --- Sticky header: transparent at top, white/80 + blur once scrolled ----- */
.site-header {
  border-bottom: 1px solid transparent;
  background-color: transparent;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition-property: background-color, border-color, backdrop-filter, -webkit-backdrop-filter;
  transition-duration: 300ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.site-header.is-scrolled {
  border-bottom-color: rgb(230 235 246 / 0.8); /* #e6ebf6 / 80% */
  background-color: rgb(255 255 255 / 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.site-header.is-open {
  border-bottom-color: rgb(230 235 246 / 0.8);
  background-color: rgb(255 255 255 / 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* --- Pill buttons (Figma 8:1972 / 8:1976; hero CTA 8:1982) ----------------
   Border is "inside" in Figma and does not push content, so the 2.175px border
   is part of the height AND of the side padding (21.748 − 2.175 = 19.573). */
.pill-btn {
  box-sizing: border-box;
  height: 32.75px;
  align-items: center;
  justify-content: center;
  padding: 0 13.825px; /* 16px from the outer edge on mobile */
  border: 2.175px solid;
  border-radius: 21.748px;
  font-family: "Geist", var(--font-sans);
  font-variation-settings: normal;
  font-size: 15.223px;
  line-height: 1;
  letter-spacing: -0.5437px;
  white-space: nowrap;
  transition: color 200ms, background-color 200ms, border-color 200ms;
}
@media (min-width: 48rem) {
  .pill-btn { padding: 0 19.573px; }
}
.pill-btn--ghost {
  border-color: #e6ebf6;
  background: #fff;
  color: #475569;
}
.pill-btn--ghost:hover { border-color: #d5ddef; color: #0f172a; }
.pill-btn--primary {
  border-color: rgb(232 239 255 / 0.8);
  background: #4d84fe;
  color: #fff;
}
.pill-btn--primary:hover { background: var(--color-passport); }

/* --- Mobile menu button + panel ------------------------------------------ */
.menu-btn {
  display: flex;
  width: 33px;
  height: 33px;
  align-items: center;
  justify-content: center;
  border: 2.175px solid #e6ebf6;
  border-radius: 9999px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}
.menu-btn__close { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: inline; }
@media (min-width: 48rem) {
  .menu-btn { display: none; }
}

.mobile-nav { overflow: hidden; }
.mobile-nav[hidden] { display: none; }

/* Top bar link: arrow nudges right on hover */
.topbar__link { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.topbar__arrow { width: 14px; height: 14px; flex: none; fill: none; stroke: #91b2fc; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.topbar__link:hover .topbar__arrow, .topbar__link:focus-visible .topbar__arrow { transform: translateX(4px); }

/* Header language switch (left of Log In) — same control as the footer */
.hdr-lang { align-items: center; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(217, 217, 217, 0.45); font-family: "Geist", var(--font-sans); font-variation-settings: normal; font-size: 13px; font-weight: 500; line-height: 1; }
.hdr-lang a { padding: 6px 10px; border-radius: 6px; color: #64748b; transition: color 0.2s; }
.hdr-lang a:hover { color: #0f172a; }
.hdr-lang a[aria-current] { background: #fff; color: #0f172a; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); }
