/* Public site nav and footer — shared across all public-facing pages.
   Included via <link rel="stylesheet" href="/static/css/public-nav.css">
   Nav HTML lives in templates/partials/public_nav.html
   Footer HTML lives in templates/partials/public_footer.html

   rebrand-2026: restyled to the bespoke. token system (white/ink, single
   emerald accent, Geist). Tokens come from bespoke-brand.css; each value also
   carries a literal fallback so the chrome stays on-brand on pages that have
   not yet adopted bespoke-brand.css. Class names and markup are unchanged. */

/* ── NAV ────────────────────────────────────────────────────────────── */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg, #FFFFFF);
  border-bottom: 1px solid var(--hairline, #EAEAEA);
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 60px;
}

.nav-wordmark {
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-weight: 600; font-style: normal;
  font-size: 22px; letter-spacing: -0.02em;
  /* !important so the brand wordmark stays emerald even on pages whose own
     link styles (e.g. landing's `.lp a`) would otherwise recolor it. */
  color: var(--emerald, #0B5D45) !important; text-decoration: none;
}
.nav-wordmark span { color: var(--emerald, #0B5D45) !important; }

.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-links a {
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-size: 14px; font-weight: 500;
  letter-spacing: -0.01em; text-decoration: none;
  color: var(--ink, #0A0A0A); transition: color 0.15s;
}
.nav-links a:hover { color: var(--emerald, #0B5D45); }
.nav-links a.active { color: var(--emerald, #0B5D45); }
.site-nav .nav-links a.nav-cta {
  background: var(--emerald, #0B5D45); color: #FFFFFF;
  padding: 9px 18px; border-radius: var(--radius, 8px);
}
.site-nav .nav-links a.nav-cta:hover { color: #FFFFFF; opacity: 0.92; }
.site-nav .nav-links a.nav-cta.active { color: #FFFFFF; }

/* Mobile Menu toggle — text "Menu", no hamburger icon */
.nav-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink, #0A0A0A); min-width: 44px; min-height: 44px;
  align-items: center; justify-content: flex-end;
}

/* Full-screen mobile menu */
.pub-mobile-menu {
  display: none; position: fixed; inset: 0;
  background: var(--bg, #FFFFFF); z-index: 200;
  flex-direction: column;
}
.pub-mobile-menu.open { display: flex; }

.pub-mm-header {
  height: 64px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 20px;
  border-bottom: 1px solid var(--hairline, #EAEAEA); flex-shrink: 0;
}
.pub-mm-close {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink, #0A0A0A); min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: flex-end;
}

.pub-mm-links { flex: 1; overflow-y: auto; }
.pub-mm-links a {
  display: flex; align-items: center;
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-size: 16px; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink, #0A0A0A);
  padding: 0 24px; height: 64px;
  border-bottom: 1px solid var(--hairline, #EAEAEA);
  transition: color 0.15s;
}
.pub-mm-links a:hover { color: var(--emerald, #0B5D45); }

/* Responsive breakpoints */
@media (max-width: 900px) { .site-nav { padding: 0 32px; } }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
  .site-nav { padding: 0 16px; }
}

/* ── FOOTER ─────────────────────────────────────────────────────────── */
/* Ink surface (near-black is a brand color), light type, emerald period. */

.pub-footer {
  background: var(--ink, #0A0A0A);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 72px 60px 40px;
}

.pub-footer-grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 56px;
}

.pub-footer-wordmark {
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-weight: 600; font-style: normal; font-size: 22px;
  letter-spacing: -0.02em; color: var(--emerald-fg, #2E9E78) !important;
  text-decoration: none; display: block; margin-bottom: 12px;
}
.pub-footer-wordmark span { color: var(--emerald-fg, #2E9E78) !important; }

.pub-footer-tagline {
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-weight: 400; font-size: 13px; font-style: normal;
  color: rgba(255,255,255,0.50); line-height: 1.6;
}

.pub-footer-col-head {
  font-family: var(--font-mono, "Geist Mono", ui-monospace, monospace);
  font-weight: 500; font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.56); margin-bottom: 18px; display: block;
}

.pub-footer-nav {
  display: flex; flex-direction: column; gap: 12px;
}
.pub-footer-nav a {
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-weight: 400; font-size: 13px;
  text-decoration: none; color: rgba(255,255,255,0.62);
  transition: color 0.15s;
}
.pub-footer-nav a:hover { color: #FFFFFF; }

.pub-footer-reach {
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-weight: 400; font-size: 13px;
  color: rgba(255,255,255,0.62);
}
.pub-footer-reach a {
  color: rgba(255,255,255,0.62); text-decoration: none;
  transition: color 0.15s;
}
.pub-footer-reach a:hover { color: #FFFFFF; }

.pub-footer-base {
  max-width: 1120px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

.pub-footer-copy {
  font-family: var(--font-mono, "Geist Mono", ui-monospace, monospace);
  font-weight: 400; font-size: 12px;
  color: rgba(255,255,255,0.56);
}

.pub-footer-legal { display: flex; gap: 24px; }
.pub-footer-legal a {
  font-family: var(--font-sans, "Geist", -apple-system, sans-serif);
  font-weight: 400; font-size: 12px;
  color: rgba(255,255,255,0.35); text-decoration: none;
  transition: color 0.15s;
}
.pub-footer-legal a:hover { color: rgba(255,255,255,0.70); }

@media (max-width: 900px) { .pub-footer { padding: 60px 32px 36px; } }
@media (max-width: 768px) {
  .pub-footer { padding: 56px 16px 32px; }
  .pub-footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .pub-footer-base { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ── FOOTER LINK CONTRAST ────────────────────────────────────────────── */
/* The footer sits on the dark --ink surface, so its links must be light.
   Some pages wrap the shared footer in `.lp` and define
   `.lp a:not(.lp-btn){color:var(--ink)}` (specificity 0,2,1), which bleeds
   onto footer anchors and renders them near-black on black (invisible).
   These descendant selectors are 0,3,1 so they win regardless of load order
   and keep every footer link readable. */
.pub-footer .pub-footer-grid a.pub-footer-wordmark { color: var(--emerald-fg, #2E9E78); }
.pub-footer .pub-footer-grid .pub-footer-nav a { color: rgba(255,255,255,0.82); }
.pub-footer .pub-footer-grid .pub-footer-nav a:hover { color: #FFFFFF; }
.pub-footer .pub-footer-grid .pub-footer-reach a { color: rgba(255,255,255,0.82); }
.pub-footer .pub-footer-grid .pub-footer-reach a:hover { color: #FFFFFF; }
.pub-footer .pub-footer-base .pub-footer-legal a { color: rgba(255,255,255,0.64); }
.pub-footer .pub-footer-base .pub-footer-legal a:hover { color: #FFFFFF; }
