/* Wordmi — one stylesheet for the landing page and the legal pages.
 *
 * The palette is lifted from the app's Book theme rather than invented, so a
 * visitor who downloads the app lands somewhere that looks like the page they
 * came from. Same warm paper, same burgundy, same Baskerville for display type.
 *
 * Light and dark both, following the visitor's system setting, exactly as
 * every theme in the app does.
 */

:root {
  --paper: #f7f2e5;
  --card: #fffdf5;
  --well: #f7efdd;
  --ink: #26201a;
  --muted: #736657;
  --accent: #73261f;
  --accent-soft: #73261f1a;
  --rule: #dcd2bd;
  --shadow: 0 1px 2px rgba(60, 48, 32, 0.06), 0 8px 24px rgba(60, 48, 32, 0.06);
  --display: "Baskerville", "Libre Baskerville", "Georgia", serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1713;
    --card: #29221c;
    --well: #38302708;
    --well: #38302a;
    --ink: #e8dcc2;
    --muted: #a0917a;
    --accent: #cca359;
    --accent-soft: #cca35922;
    --rule: #40372c;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 68ch; margin: 0 auto; padding: 0 24px; }
.wide { max-width: 1080px; }

/* ── Header ─────────────────────────────────────────────────────────── */

header.site {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  z-index: 10;
}
header.site .wrap { display: flex; align-items: center; gap: 14px; }
header.site .mark { width: 30px; height: 30px; border-radius: 7px; }
header.site .name {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-right: auto;
}
header.site nav { display: flex; gap: 20px; font-size: 15px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--ink); }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero { padding: 96px 0 72px; text-align: center; }
.hero .icon {
  width: 108px; height: 108px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6.5vw, 4rem);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.015em;
}
.hero .lede {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 34ch;
  margin: 0 auto 36px;
}

.badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ink); color: var(--paper);
  padding: 13px 26px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 16px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.badge:hover { transform: translateY(-1px); opacity: 0.92; }
.badge.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--rule);
}

/* ── Feature grid ───────────────────────────────────────────────────── */

section { padding: 64px 0; }
section h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
section .sub { color: var(--muted); margin: 0 0 40px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.card h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0 0 8px;
}
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card .glyph { font-size: 26px; display: block; margin-bottom: 14px; }

/* ── Themes strip ───────────────────────────────────────────────────── */

.swatches { display: flex; gap: 14px; flex-wrap: wrap; }
.swatch {
  flex: 1 1 160px;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.swatch .band { height: 68px; display: flex; }
.swatch .band i { flex: 1; }
.swatch .label {
  padding: 11px 14px;
  font-size: 14px;
  background: var(--card);
  border-top: 1px solid var(--rule);
}

/* ── Legal pages ────────────────────────────────────────────────────── */

.doc { padding: 56px 0 96px; }
.doc h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}
.doc .effective {
  color: var(--muted); font-size: 15px;
  padding-bottom: 24px; margin-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}
.doc h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 40px 0 10px;
  padding-top: 4px;
}
.doc p, .doc li { color: var(--ink); }
.doc strong { font-weight: 650; }
.doc table {
  width: 100%; border-collapse: collapse; margin: 22px 0;
  font-size: 15.5px; display: block; overflow-x: auto;
}
.doc th, .doc td {
  text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
}
.doc th { background: var(--well); font-weight: 650; white-space: nowrap; }
.doc blockquote {
  margin: 22px 0; padding: 14px 20px;
  background: var(--well);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--muted);
}
.doc code {
  background: var(--well); padding: 1px 6px;
  border-radius: 3px; font-size: 0.92em;
}

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

footer.site {
  border-top: 1px solid var(--rule);
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 15px;
}
footer.site .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }
footer.site .spacer { margin-left: auto; }

@media (max-width: 560px) {
  .hero { padding: 64px 0 48px; }
  header.site nav { gap: 14px; font-size: 14px; }
  footer.site .spacer { margin-left: 0; width: 100%; }
}

/* Prose inside a wide section: the column stays readable while the heading
 * stays aligned with every other heading on the page. */
.prose { max-width: 68ch; }

/* The mark and the wordmark are one link home — the thing every visitor tries
 * first, and the thing this header was missing. `margin-right: auto` moves off
 * `.name` and onto the link, so the nav still sits hard right. */
header.site .home {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
  text-decoration: none;
  color: inherit;
}
header.site .home:hover .name { color: var(--accent); }
header.site .home .name { margin-right: 0; transition: color 0.15s ease; }
