/*
 * The public site's one top bar and one footer (markup: src/site/chrome.mjs).
 *
 * Linked by every public page — the generated ones, the hand-written ones, the
 * Worker's — and by the app shell, so the lobby wears exactly the same bar and
 * footer. Because the app loads it too, every rule is scoped under
 * `.site-head` or `.site-foot` (see the memory on public-pages.css: one
 * unscoped selector there once restyled every message bubble). The page
 * stylesheets underneath (naven-page.css, legal.css, lobby.css) style bare
 * elements, so the rules here state their own type, colour and spacing.
 */

.site-head, .site-foot {
  --site-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --site-ease: cubic-bezier(.22, 1, .36, 1);
  --site-max: 1120px;
  font-family: var(--site-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
}
.site-head *, .site-head *::before, .site-head *::after,
.site-foot *, .site-foot *::before, .site-foot *::after { box-sizing: border-box; }

/* The React pages (lobby, developer) mount the same markup inside a wrapper that takes no space. */
.site-chrome { display: contents; }

/* ---- The bar: a floating pill, centred, the same on every page ---------- */

.site-head {
  position: fixed; z-index: 45;
  top: calc(12px + var(--safe-top, env(safe-area-inset-top, 0px)));
  left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  margin: 0 auto; max-width: 780px; height: 58px;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 6px 6px 12px; border-radius: 999px;
  background: rgba(22, 22, 26, .68);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .22);
  color: #fff; font-size: 14px; line-height: 1.2; text-align: left;
}
@media (prefers-reduced-transparency: reduce) {
  .site-head { background: #16161a; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.site-head a { text-decoration: none; }
.site-head .site-brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none; min-height: 44px; padding-right: 6px;
  color: #fff; font-size: 16.5px; font-weight: 700; letter-spacing: -.015em;
}
.site-head .site-mark, .site-foot .site-mark { display: block; flex: none; width: 28px; height: 28px; border-radius: 8px; }

.site-head .site-links { display: flex; align-items: center; gap: 2px; margin: 0 auto; min-width: 0; }
.site-head .site-links a, .site-head .site-signin {
  display: inline-flex; align-items: center; height: 38px; padding: 0 12px; border-radius: 999px;
  color: rgba(255, 255, 255, .76); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color 160ms var(--site-ease), background-color 160ms var(--site-ease);
}
.site-head .site-links a:hover, .site-head .site-signin:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-head .site-links a[aria-current='page'] { color: #fff; background: rgba(255, 255, 255, .1); }

.site-head .site-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }
.site-head .site-links + .site-actions { margin-left: 0; }
.site-head .site-cta {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 999px;
  background: #fff; color: #000; font-size: 14.5px; font-weight: 650; white-space: nowrap;
  transition: transform 160ms var(--site-ease);
}
.site-head .site-cta:hover { transform: scale(1.03); }
.site-head .site-cta[aria-disabled='true'] { opacity: .6; pointer-events: none; }
.site-head a:focus-visible, .site-head summary:focus-visible,
.site-foot a:focus-visible { outline: 2px solid #b9a6ff; outline-offset: 2px; }

/* The phone menu: no JavaScript needed to open it. */
.site-head .site-menu { display: none; }
.site-head .site-menu summary {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  list-style: none; cursor: pointer; background: rgba(255, 255, 255, .08);
  -webkit-tap-highlight-color: transparent;
}
.site-head .site-menu summary::-webkit-details-marker { display: none; }
.site-head .site-menu summary::marker { content: ''; }
.site-head .site-burger { position: relative; display: block; width: 16px; height: 10px; }
.site-head .site-burger i {
  position: absolute; left: 0; right: 0; height: 1.6px; border-radius: 2px; background: #fff;
  transition: transform 220ms var(--site-ease), top 220ms var(--site-ease);
}
.site-head .site-burger i:first-child { top: 1px; }
.site-head .site-burger i:last-child { top: 7.4px; }
.site-head .site-menu[open] .site-burger i:first-child { top: 4.2px; transform: rotate(45deg); }
.site-head .site-menu[open] .site-burger i:last-child { top: 4.2px; transform: rotate(-45deg); }
.site-head .site-sheet {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  display: grid; gap: 2px; padding: 8px; border-radius: 26px;
  background: rgba(24, 24, 28, .97); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  transform-origin: top center; animation: site-sheet-in 200ms var(--site-ease) both;
}
.site-head .site-sheet a {
  display: flex; align-items: center; min-height: 50px; padding: 0 16px; border-radius: 16px;
  color: #fff; font-size: 17px; font-weight: 550; letter-spacing: -.01em;
}
.site-head .site-sheet a:hover, .site-head .site-sheet a[aria-current='page'] { background: rgba(255, 255, 255, .08); }
.site-head .site-sheet .site-sheet-signin { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); border-radius: 0 0 16px 16px; color: rgba(255, 255, 255, .78); }
@keyframes site-sheet-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

@media (max-width: 860px) {
  .site-head .site-links, .site-head .site-signin { display: none; }
  .site-head .site-menu { display: block; }
  .site-head .site-links + .site-actions { margin-left: auto; }
}
@media (max-width: 359px) {
  .site-head { padding-left: 10px; gap: 4px; }
  .site-head .site-cta { padding: 0 14px; }
}

/* ---- The footer: black, edge to edge, the same on every page ------------ */

.site-foot {
  display: block; margin: clamp(64px, 8vw, 104px) 0 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .08);
  background: #000; color: #86868b; font-size: 14px; line-height: 1.5;
  padding: clamp(56px, 7vw, 88px) max(20px, env(safe-area-inset-right, 0px)) calc(28px + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) max(20px, env(safe-area-inset-left, 0px));
}
.site-foot .site-foot-in { max-width: var(--site-max); margin: 0 auto; }
.site-foot a { color: #a1a1a6; text-decoration: none; transition: color 160ms var(--site-ease); }
.site-foot a:hover { color: #fff; }
.site-foot p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; max-width: none; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0; padding: 0; font-size: inherit; color: inherit; max-width: none; }

.site-foot .site-foot-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: clamp(36px, 5vw, 72px); }
.site-foot .site-brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.site-foot .site-foot-intro p { margin-top: 14px; max-width: 22em; color: #a1a1a6; font-size: 14.5px; line-height: 1.55; }
.site-foot .site-foot-cta {
  display: inline-flex; align-items: center; height: 44px; margin-top: 20px; padding: 0 20px; border-radius: 999px;
  background: #fff; color: #000; font-size: 14.5px; font-weight: 650;
  transition: transform 160ms var(--site-ease);
}
.site-foot .site-foot-cta:hover { color: #000; transform: scale(1.03); }
.site-foot .site-foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.site-foot h2 { margin: 0 0 12px; color: #f5f5f7; font-size: 13px; font-weight: 650; line-height: 1.3; letter-spacing: .01em; font-family: inherit; }
.site-foot h2::before { content: none; }
.site-foot .site-foot-col a { display: inline-flex; align-items: center; min-height: 30px; font-size: 14px; }

.site-foot .site-foot-contact {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 24px;
  margin-top: clamp(40px, 5vw, 56px); padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.site-foot .site-foot-contact li { display: grid; gap: 2px; min-width: 0; }
.site-foot .site-foot-contact span { color: #6e6e73; font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.site-foot .site-foot-contact a { color: #d2d2d7; font-size: 14px; overflow-wrap: anywhere; }

.site-foot .site-foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px;
}

@media (max-width: 1023px) {
  .site-foot .site-foot-top { grid-template-columns: minmax(0, 1fr); }
  .site-foot .site-foot-contact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-foot .site-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .site-foot .site-foot-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
  .site-foot .site-foot-contact a { font-size: 13px; }
}
/* Fingers, not pointers: every footer link a full 44px tall. */
@media (pointer: coarse) {
  .site-foot .site-foot-col a { min-height: 44px; }
  .site-foot .site-foot-contact a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-foot .site-foot-base p:last-child a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .site-head *, .site-foot * { transition: none !important; animation: none !important; }
}
@media print {
  .site-head, .site-foot .site-foot-cols, .site-foot .site-foot-cta, .site-foot .site-foot-contact { display: none; }
  .site-foot { background: none; color: #555; padding: 24px 0 0; border: 0; }
}
