/* Reframed — the app's own palette and typography, on the web.
   Ground, ink and the three mark colours are lifted from constants/colors.ts
   and ReframeLoader so the site and the app read as one thing. */
:root {
  --ground: #EDE9DD;
  --paper: #F5F2E9;
  --ink: #1A1612;
  --muted: #5C5347;
  --rule: rgba(26, 22, 18, 0.12);
  --green: #2C5C45;
  --plum: #523352;
  --rust: #8B4210;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: 40rem;         /* ~65 characters of body text */
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Masthead ─────────────────────────────────────────────────────────── */
header.site {
  padding: 2.5rem 0 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.brand img { width: 34px; height: 34px; display: block; }
.brand span {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
nav.site {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
}
nav.site a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
nav.site a:hover,
nav.site a:focus-visible { color: var(--ink); border-bottom-color: var(--rule); }
nav.site a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 3rem 0 2.5rem; }
.hero .mark { width: 132px; height: 132px; display: block; margin-bottom: 2rem; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.75rem, 9vw, 4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.hero p.lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 32rem;
  text-wrap: balance;
}

.cta {
  display: inline-block;
  background: var(--ink);
  color: var(--ground);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
}
.cta:hover, .cta:focus-visible { background: #332C24; }

/* ── Sections ─────────────────────────────────────────────────────────── */
section { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.pillars { display: grid; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 34rem) { .pillars { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.pillars h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--rule);
}
.pillars li:nth-child(1) h3 { border-left-color: var(--green); }
.pillars li:nth-child(2) h3 { border-left-color: var(--plum); }
.pillars li:nth-child(3) h3 { border-left-color: var(--rust); }
.pillars p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ── Long-form documents ──────────────────────────────────────────────── */
article { padding: 1rem 0 2rem; }
article h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.25rem, 7vw, 3rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  text-wrap: balance;
}
article h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 2.5rem 0 0.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-wrap: balance;
}
article h2:first-of-type { border-top: none; padding-top: 0; }
article p, article li { color: #2E2820; }
article ul { padding-left: 1.15rem; }
article li { margin-bottom: 0.5rem; }
article strong { font-weight: 500; color: var(--ink); }
article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: rgba(26, 22, 18, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
article blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.15rem;
  background: var(--paper);
  border-left: 3px solid var(--rust);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 0.95rem;
}
article blockquote p { margin: 0; color: inherit; }
.updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 2rem;
}
article a { color: var(--green); }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 1rem;
  padding: 2rem 0 3rem;
  font-size: 0.88rem;
  color: var(--muted);
}
footer.site p { margin: 0 0 0.4rem; }
footer.site a { color: var(--muted); }
.entity { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
