/* Marketing site — static pages only.
 *
 * These pages are plain HTML. They never load React, the router, Firebase, or
 * the app stylesheet, so this file has to stand entirely on its own. Keep it
 * small: it is the whole cost of a marketing page load.
 *
 * Colours are duplicated here rather than imported from tokens.css on purpose.
 * tokens.css carries the full app palette; these pages need eight values, and
 * pulling the rest in to avoid repeating them would defeat the point.
 */

:root {
  --m-navy: #1a2744;
  --m-navy-soft: #26365c;
  --m-ink: #35435c;
  --m-muted: #6b7280;
  --m-line: #d7dfe9;
  --m-bg: #f5f7fa;
  --m-card: #ffffff;
  --m-accent: #b8e04a;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--m-bg);
  color: var(--m-ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--m-navy); }

/* ── Header ─────────────────────────────────────────────────────────────── */
/* Mirrors PublicNavbar in src/components/Navbar.jsx. Values copied from
 * src/styles/navbar.css rather than guessed — the logo is 161px, the pill is
 * absolutely centred to the viewport, and the CTA is 7px/16px at 6px radius.
 * If that component changes, this has to change with it. That duplication is
 * the known cost of a static marketing site; the alternative was a header that
 * looked almost right, which is worse. */

.m-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  padding: 0.65rem 20px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, rgba(8, 18, 38, 0.96), rgba(8, 18, 38, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.m-brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: min(100%, 200px);
  text-decoration: none;
}

.m-logo {
  display: block;
  width: 161px;
  height: auto;
}

/* True viewport centre, matching the app's navbar pill. */
.m-header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  text-align: center;
  min-width: 0;
  max-width: min(100vw - 2.5rem, calc(100vw - 22rem));
  padding: 0 0.25rem;
  pointer-events: none;
}

.m-fpr-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.m-fpr-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(184, 224, 74, 0.55);
  color: #fff;
}

.m-header-right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.m-signin {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}

.m-signin:hover { color: #fff; }

.m-cta {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--m-accent);
  color: var(--m-navy);
}

.m-cta:hover { background: #c6ea62; }

/* The centred pill has nowhere to go on a narrow screen — the app hides it
   behind a mobile menu; here it simply steps out of the centre and sits under
   the logo rather than colliding with the buttons. */
@media (max-width: 860px) {
  .m-header-center {
    position: static;
    transform: none;
    order: 3;
    flex-basis: 100%;
    max-width: none;
    text-align: left;
    padding: 0.5rem 0 0;
  }
  .m-header { flex-wrap: wrap; }
  .m-fpr-link { white-space: normal; }
}

/* ── Page body ──────────────────────────────────────────────────────────── */

.m-main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.m-main--wide { max-width: 68rem; }

.m-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--m-muted);
}

.m-title {
  margin: 0 0 1rem;
  color: var(--m-navy);
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.m-lede {
  margin: 0 0 2.5rem;
  font-size: 1.06rem;
  color: var(--m-ink);
}

.m-prose h2 {
  margin: 2.5rem 0 0.75rem;
  color: var(--m-navy);
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.m-prose h3 {
  margin: 1.9rem 0 0.5rem;
  color: var(--m-navy);
  font-size: 1.06rem;
}

.m-prose p { margin: 0 0 1rem; }
.m-prose ul, .m-prose ol { margin: 0 0 1.25rem; padding-left: 1.3rem; }
.m-prose li { margin: 0 0 0.5rem; }
.m-prose strong { color: var(--m-navy); }
.m-prose hr { border: 0; border-top: 1px solid var(--m-line); margin: 2.25rem 0; }

.m-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.m-prose th, .m-prose td {
  border: 1px solid var(--m-line);
  padding: 0.5rem 0.7rem;
  text-align: left;
}

.m-prose th { background: #eef2f7; color: var(--m-navy); }

/* ── Cards ──────────────────────────────────────────────────────────────── */

.m-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.m-card {
  display: block;
  background: var(--m-card);
  border: 1px solid var(--m-line);
  border-radius: 14px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
}

.m-card:hover { border-color: var(--m-navy-soft); }

.m-card h2 {
  margin: 0 0 0.5rem;
  color: var(--m-navy);
  font-size: 1.05rem;
  line-height: 1.35;
}

.m-card p { margin: 0 0 0.75rem; font-size: 0.93rem; color: var(--m-ink); }

.m-card-cta { font-size: 0.86rem; font-weight: 700; color: var(--m-navy); }

/* ── Keep reading ───────────────────────────────────────────────────────── */

.m-more {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--m-line);
}

.m-more-heading {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--m-muted);
}

.m-more a { display: block; margin-bottom: 0.5rem; font-size: 0.95rem; }

.m-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--m-muted);
  text-decoration: none;
}

.m-back:hover { color: var(--m-navy); }

/* ── Footer ─────────────────────────────────────────────────────────────── */

/* Mirrors .lp-footer on the homepage: dark, logo left, links, copyright. */
.m-footer {
  background: #040b18;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 2rem;
}

.m-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.m-footer-logo { display: block; width: 132px; height: auto; }

.m-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.35rem;
  font-size: 0.88rem;
}

.m-footer-links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.m-footer-links a:hover { color: #fff; }

.m-footer-copy {
  margin: 0;
  margin-left: auto;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 720px) {
  .m-footer-inner { gap: 1.25rem; }
  .m-footer-copy { margin-left: 0; flex-basis: 100%; }
}

@media (max-width: 640px) {
  .m-header-inner { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .m-nav { flex-wrap: wrap; gap: 0.9rem; }
  .m-main { padding: 2rem 1.25rem 3rem; }
}
