/* ============================================================================
   NOVA — SITE CHROME                                     spec §3.1, §3.3, §3.14
   Nav · sticky mobile CTA · footer. Shared by /, /pricing, /product.
   ========================================================================= */

/* ---- NAV ---------------------------------------------------------------- */
/* 56px, sticky, and deliberately NO backdrop-filter: it costs 15-30% of the
   frame rate on the mid-range Android this site is built for, which is a worse
   trade than any amount of frosted glass is worth. */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: 56px;
  display: flex; align-items: center; gap: var(--s-4);
  padding-inline: var(--s-6);
  background: var(--bg-base);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
/* The hairline arrives only once the page has actually moved, so a nav at rest
   reads as part of the page rather than as a bar bolted to the top. */
.nav[data-scrolled] { border-bottom-color: var(--border-hairline); }
@media (min-width: 768px) { .nav { padding-inline: var(--s-8); } }

.nav__mark {
  font-size: var(--text-sm); font-weight: 640; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-primary); text-decoration: none;
  white-space: nowrap;
}
.nav__sp { flex: 1; }

/* Centre links exist at >=1024px only. Below that the nav is the wordmark and
   one button — no hamburger. Removing the mobile menu is measured to roughly
   double conversion; the full sitemap lives in the footer, one scroll away. */
.nav__links { display: none; }
@media (min-width: 1024px) {
  .nav__links { display: flex; gap: var(--s-6); }
}
.nav__link {
  font-size: var(--text-sm); color: var(--text-secondary);
  text-decoration: none; white-space: nowrap;
  transition: color var(--dur-instant) var(--ease-out);
}
@media (hover: hover) { .nav__link:hover { color: var(--text-primary); } }
.nav__link[aria-current="page"] { color: var(--text-primary); }

/* "Log in" is a text link, not a second button — exactly one primary CTA per
   viewport (§1.5). It is hidden on the narrowest screens so the CTA is the
   only thing competing for the tap. */
.nav__login { display: none; }
@media (min-width: 480px) { .nav__login { display: inline-flex; } }
.nav .btn { min-height: 36px; padding-inline: var(--s-4); }

/* ---- STICKY MOBILE CTA -------------------------------------------------- */
/* Mobile only. On desktop the nav CTA is always visible, so a second fixed bar
   would be a duplicate primary action. */
.stickycta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; gap: var(--s-3); align-items: center;
  padding: var(--s-3) var(--s-4);
  padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
  background: var(--bg-raised);
  border-top: 1px solid var(--border-hairline);
  transform: translateY(110%);
  transition: transform var(--dur-base) var(--ease-out);
}
.stickycta[data-show] { transform: none; }
.stickycta .btn { min-height: 44px; }
.stickycta__primary { flex: 1 1 68%; }
.stickycta__secondary { flex: 0 1 32%; white-space: nowrap; }
@media (min-width: 768px) { .stickycta { display: none; } }

/* WCAG 2.2 · 2.4.11 Focus Not Obscured. Without this a keyboard user tabbing
   down the page lands behind the fixed bar and cannot see what is focused. */
@media (max-width: 767px) {
  html { scroll-padding-bottom: 88px; }
  body { padding-bottom: 76px; }
}

/* ---- FOOTER ------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  padding-block: var(--s-16) var(--s-12);
}
.footer__cols {
  display: grid; gap: var(--s-8);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .footer__cols { grid-template-columns: repeat(4, 1fr); gap: var(--s-6); } }
.footer h2 {
  font-family: var(--font-mono);
  font-size: var(--text-xs); line-height: 1;
  letter-spacing: .16em; text-transform: uppercase;
  /* Same reason as .scrollcue: a 12px uppercase column heading is small text,
     and tertiary is 3.21:1 on white. */
  color: var(--text-secondary);
  margin-bottom: var(--s-4);
}
.footer ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: var(--s-3); }
.footer a {
  font-size: var(--text-sm); color: var(--text-secondary); text-decoration: none;
  transition: color var(--dur-instant) var(--ease-out);
}
@media (hover: hover) { .footer a:hover { color: var(--text-primary); text-decoration: underline; } }
/* An item whose route does not exist yet renders as plain text rather than as
   a link. A dead link is worse than a missing one, and §9 forbids 404s. */
.footer li > span { font-size: var(--text-sm); color: var(--text-tertiary); }

.footer__base {
  margin-top: var(--s-12); padding-top: var(--s-6);
  border-top: 1px solid var(--border-hairline);
  display: flex; flex-direction: column; gap: var(--s-4);
}
@media (min-width: 768px) {
  .footer__base { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer__social { display: flex; gap: var(--s-4); }
.footer__legal { font-size: var(--text-xs); line-height: var(--lh-sm); color: var(--text-tertiary); max-width: 62ch; }

/* ---- Theme toggle -------------------------------------------------------
   Sits with the nav links and reads as one of them, not as a control. It is a
   <button> so it is keyboard-reachable and announces as pressable; buttons do
   not inherit font or colour, which is why both are stated. */
.nav__theme {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit;
  font-size: var(--text-sm);
}
.nav__theme:hover { color: var(--text-primary); }
@media (max-width: 700px) { .nav__theme { display: none; } }

/* Touch: the wordmark (26px tall) and footer links (17px) get a 44px-tall
   tap area around the same centre; the visible layout does not move. */
@media (pointer: coarse) {
  .nav__mark, .footer a { position: relative; }
  .nav__mark::after, .footer a::after {
    content: ''; position: absolute; left: 0; right: 0; top: 50%;
    height: max(100%, 44px); transform: translateY(-50%);
  }
}

/* The Nova mark beside the wordmark — the same N as the app icon. */
.nav__mark { display: inline-flex; align-items: center; gap: 9px; }
.nav__mark::before {
  content: ''; width: 24px; height: 24px; flex: none; border-radius: 6px;
  background: #000 url(/icon-192.png) center / cover no-repeat;
  box-shadow: 0 0 0 1px var(--border-hairline);
}
