/* ============================================================================
   site.css — shared chrome for every bwee.app marketing page.
   Replaces the per-page duplicated inline blocks (fonts, tokens, base reset,
   nav, footer, download CTA, wrap container, one mobile breakpoint).
   Page-specific styles (hero sizing, pillars, pricing cards, faq accordion,
   compare table/widget, about features/triptych, examples grid, demo) stay in
   each page's own inline <style>, which loads AFTER this file and can override.
   Served at /site.css (copied verbatim by build-site.sh). Absolute /fonts/ +
   root-relative links so it works identically from /, /docs/, /examples/.
   ========================================================================== */

/* ─────────────────────────── fonts ──────────────────────────────────────
   Self-hosted Inter + JetBrains Mono (variable, latin + latin-ext). One woff2
   per subset covers every weight; latin-ext loads on demand for accented glyphs. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jbmono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jbmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─────────────────────────── tokens ─────────────────────────────────────
   Brand tokens — kept in sync with the real app (src/renderer/src/styles/main.css). */
:root {
  --paper:     #f3f1eb;
  --linen:     #e4e0d3;
  --hairline:  #d2cdbc;
  --ink:       #23211e;
  --graphite:  #3a3631;
  --stone:     #7a7264;
  --persimmon: #c2502d;
  --sage:      #4a5d4f;

  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 20px;

  --rule: rgba(28,28,26,0.10);
  --rule-strong: rgba(28,28,26,0.18);
}

/* ─────────────────────────── base reset ─────────────────────────────────── */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }

/* Page container — one width for every page. */
.wrap { max-width: 920px; margin: 0 auto; padding: 0 40px; }
.narrow { max-width: 660px; margin-left: auto; margin-right: auto; }

/* ─────────────────────────── page transitions ───────────────────────────
   Fade in on load, fade out on internal-link click. The JS at the bottom of
   each page intercepts same-origin <a> clicks. */
body { opacity: 0; transition: opacity 250ms ease; }
body.site-in { opacity: 1; }
body.site-out { opacity: 0; }

/* ─────────────────────────── top nav ────────────────────────────────────
   Canonical: brand + links grouped in .nav-left, the download CTA a SIBLING of
   .nav-left so space-between pins it right. Used on every page. */
.topnav {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 0 20px;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
}
.nav-left { display: flex; align-items: center; gap: 26px; }
.nav-link {
  font-size: 13.5px; font-weight: 500; color: var(--stone);
  transition: color 0.15s ease;
  height: 34px;
  display: inline-flex; align-items: center;
}
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current=page] { color: var(--ink); }

.nav-dl-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.nav-dl {
  display: inline-flex; align-items: center; white-space: nowrap;
  height: 34px; box-sizing: border-box;
  background: var(--persimmon); color: var(--paper);
  font-size: 13px; font-weight: 500; letter-spacing: -0.005em;
  padding: 0 14px; border-radius: var(--r-sm);
  transition: background 0.15s ease;
}
.nav-dl:hover { background: #ad4626; }
.nav-dl .apple { width: 13px; height: 13px; fill: currentColor; margin: -2px 7px 0 0; }
.nav-req { font-size: 11px; color: var(--stone); }

/* arch separator ("· Apple silicon") — canonical middle dot, no surrounding markup. */
.nav-dl .arch, .cta .arch { opacity: 0.8; font-weight: 400; }
.nav-dl .arch::before, .cta .arch::before { content: "\00b7"; margin: 0 0.4em; }

/* ─────────────────────────── download CTA ───────────────────────────────
   Bottom-of-page centered download button (shared). */
.download-cta {
  margin: 64px 0 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cta {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  background: var(--persimmon);
  color: var(--paper);
  padding: 13px 22px;
  border-radius: var(--r-sm);
  font-weight: 500; font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: background 0.15s ease, transform 0.12s ease;
}
.cta:hover { background: #ad4626; transform: translateY(-1px); }
.cta .apple { width: 15px; height: 15px; fill: currentColor; margin: -2px 9px 0 0; }
.dl-req, .cta-req { font-size: 12px; color: var(--stone); margin: 0; text-align: center; }

/* ─────────────────────────── footer ─────────────────────────────────────
   Canonical footer: brand tagline left, the same link set right on every page. */
.foot {
  margin: 56px 0 64px;
  padding-top: 22px;
  border-top: 1px solid var(--linen);
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px;
  font-size: 12px; color: var(--stone);
}
.foot .links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a:hover { color: var(--ink); }

/* ─────────────────────────── hero (canonical) ───────────────────────────
   Identical on every page (eyebrow + h1 + lede), centered in a fixed 680px
   column so heroes match regardless of body width. Pages must NOT override
   these. (index.html uses its own .hdr marquee instead.) */
.hero { text-align: center; max-width: 680px; margin: 56px auto 0; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--persimmon);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 16px;
}
.hero p, .hero .lede, .hero .subtitle {
  font-size: 17px;
  line-height: 1.5;
  color: var(--stone);
  margin: 0 auto;
  max-width: 52ch;
}

/* ─────────────────────────── mobile (one breakpoint) ────────────────────
   ≤640px: collapse nav to brand + download (the text links live in the footer),
   tighten wrap padding, stack the footer, and guard against horizontal scroll. */
@media (max-width: 640px) {
  body { overflow-x: hidden; }
  .wrap { padding: 0 24px; }
  .topnav { align-items: center; }
  .nav-left { gap: 0; }
  .nav-left .nav-link { display: none; }
  .nav-dl-wrap { gap: 3px; }
  .hero { margin-top: 36px; }
  .hero h1 { font-size: 30px; }
  .hero p, .hero .lede, .hero .subtitle { font-size: 16px; }
  .foot {
    flex-direction: column; gap: 10px; text-align: center; align-items: center;
  }
  .foot .links { justify-content: center; }
}
