/* The public header: clear at the top of the page, gathered into a floating island once
   site-header.js sees the page scroll. Colors are tokens so app-themed pages can restyle it. */
:root { --site-header-height: 80px; }
:where(.site-header) {
  --site-header-text: #f5f5f5;
  --site-header-link: #c9c9c9;
  --site-header-link-hover: #fff;
  --site-header-accent: #ef4b4b;
  --site-header-rule: #ffffff1f;
  --site-header-island: #080808cc;
  --site-header-island-border: #ffffff1c;
  --site-header-menu: #161616f5;
}
/* The wrapper reserves the bar's height while the absolutely placed bar animates. */
.site-header { position: sticky; top: 0; z-index: 20; height: var(--site-header-height); font-size: 1rem; line-height: 1.65; pointer-events: none; }
.site-header .topbar {
  pointer-events: auto;
  position: absolute;
  inset-inline: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  height: var(--site-header-height);
  margin-inline: auto;
  padding: 0 max(clamp(1rem, 4vw, 4rem), (100% - 88rem) / 2) 0 max(clamp(1rem, 7vw, 7rem), (100% - 88rem) / 2);
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: width 320ms cubic-bezier(.22, 1, .36, 1),
    top 320ms cubic-bezier(.22, 1, .36, 1),
    height 320ms cubic-bezier(.22, 1, .36, 1),
    padding 320ms cubic-bezier(.22, 1, .36, 1),
    border-radius 320ms cubic-bezier(.22, 1, .36, 1),
    background 240ms, border-color 240ms, box-shadow 240ms;
}
.site-header .topbar.is-floating {
  top: 16px;
  width: min(1040px, calc(100% - 48px));
  height: 64px;
  padding-inline: 28px;
  border-radius: 18px;
  border-color: var(--site-header-island-border);
  background: var(--site-header-island);
  box-shadow: 0 8px 32px #00000040, 0 2px 6px #00000030;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.site-header .wordmark { display: inline-flex; align-items: center; gap: .45em; margin: 0; color: var(--site-header-accent); font-family: var(--font-mono); font-size: 1rem; font-weight: 600; letter-spacing: -.02em; text-decoration: none; }
.site-header .account-links { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 1.5rem; margin: 0; padding: .5rem 0; font-family: var(--font-mono); font-size: .8rem; }
.site-header .account-links a { color: var(--site-header-text); text-decoration: none; white-space: nowrap; }
.site-header .account-links span { color: var(--site-header-accent); }
.site-header .mission-link { position: absolute; left: 50%; transform: translateX(-50%); gap: 26px; padding: 0; }
.site-header .mission-link a { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: 0; font: 500 14px var(--font-sans); color: var(--site-header-link); transition: color 120ms; }
.site-header .mission-link a:is(:hover, :focus-visible, [aria-current="page"]) { color: var(--site-header-link-hover); }
.site-header .account-links:has(.nav-button) { gap: 24px; }
.site-header .account-links .nav-button { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; font: 500 14px var(--font-sans); color: var(--site-header-link); }
.site-header .account-links .nav-button:hover,
.site-header .account-links .nav-button.is-primary { color: var(--site-header-link-hover); }
.site-header .mobile-signup,
.site-header .menu-toggle { display: none; }
@media (min-width: 900px) { .site-header .site-menu { display: contents; } }
@media (max-width: 1100px) and (min-width: 900px) {
  .site-header .topbar { padding-inline: 24px; }
  .site-header .mission-link { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .topbar { transition: none; }
}

@media (max-width: 899px) {
  :root { --site-header-height: 72px; }
  .site-header .topbar { flex-wrap: nowrap; gap: 16px; padding: 0 1rem; }
  .site-header .topbar.is-floating { top: 12px; width: calc(100% - 24px); height: 60px; padding-inline: 20px; }
  .site-header .wordmark { flex-shrink: 0; white-space: nowrap; }
  .site-header .mobile-signup { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; font: 500 14px var(--font-sans); color: var(--site-header-text); text-decoration: none; }
  .site-header .mobile-signup span { color: var(--site-header-accent); }
  .site-header .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -10px -10px -10px 0; padding: 0; border: 0; border-radius: 2px; background: transparent; color: var(--site-header-text); cursor: pointer; }
  .site-header .menu-toggle:is(:hover, :has(+ .site-menu:popover-open)) { background: transparent; color: var(--site-header-accent); }
  .site-header .site-menu:popover-open { position: fixed; inset: 80px 1rem auto auto; display: flex; flex-direction: column; width: min(320px, calc(100vw - 32px)); min-width: 11rem; margin: 0; padding: 12px; border: 1px solid var(--site-header-rule); border-radius: 20px; background: var(--site-header-menu); box-shadow: 0 12px 40px #00000080; color: var(--site-header-text); }
  .site-header .site-menu .account-links { flex-direction: column; gap: 0; padding: 0; }
  .site-header .site-menu .mission-link { position: static; transform: none; gap: 2px; padding: 0 0 8px; border-bottom: 1px solid var(--site-header-rule); }
  .site-header .site-menu .mission-link a { display: flex; justify-content: flex-start; gap: .5em; min-height: 48px; padding-inline: 12px; }
  .site-header .site-menu .account-links:has(.nav-button) { gap: .5rem; padding: .75rem 0; }
}
