:root {
  --paper: #FBF6EF;
  --paper-deep: #F4EADC;
  --ink: #241C15;
  --ink-soft: #6A5949;
  --ink-faint: #9A8977;
  --ember: #B8481A;
  --ember-lit: #E4842E;
  --rule: rgba(36, 28, 21, 0.10);
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: clamp(16px, 0.45vw + 15px, 18px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One warm light, low and to the left, as if a fire were just out of frame.
   Fixed so the page moves through the light rather than dragging it along. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% 4%, rgba(228, 132, 46, 0.18), transparent 60%),
    radial-gradient(44rem 30rem at 92% 88%, rgba(184, 72, 26, 0.09), transparent 58%);
}

/* The WebGL hearth, when it loads, renders the same two pools as body::before
   with the light alive. It replaces them rather than stacking on top, or the
   warmth doubles. Everything below stays the fallback: reduced motion, save
   data, narrow screens and absent WebGL never load the library at all, and
   standing still the two look nearly identical. */
.hearth {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hearth-live body::before { display: none; }

/* Paper tooth. Very low opacity — felt, not seen. Sits above the hearth so
   the grain reads on the light, not under it. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

header, main, footer { position: relative; z-index: 2; }

.wrap { width: min(100% - 2.5rem, 64rem); margin-inline: auto; }

/* ---------- masthead ---------- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2.25rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.mark svg { width: 1.15rem; height: 1.15rem; flex: none; }

.mark span {
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.est {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

nav a {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.15rem;
  transition: color 160ms ease, border-color 160ms ease;
}

nav a:hover,
nav a[aria-current="page"] { color: var(--ember); border-bottom-color: rgba(184, 72, 26, 0.4); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(4.5rem, 13vw, 10rem) clamp(3.5rem, 9vw, 7rem); }

.eyebrow {
  margin: 0 0 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 7rem;
  background: linear-gradient(90deg, rgba(184, 72, 26, 0.45), transparent);
}

h1 {
  margin: 0 0 1.75rem;
  font-family: Fraunces, Georgia, serif;
  font-weight: 200;
  font-size: clamp(3rem, 8.5vw, 6.75rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  max-width: 13ch;
}

h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--ember);
}

/* Break the headline before the italic, never inside it — "keep a home"
   is one phrase and reads as an orphan when it splits. Narrow screens keep
   natural wrapping, where forcing it would overflow. */
@media (min-width: 48rem) {
  h1 em { white-space: nowrap; }
}

.lede {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(1.1rem, 0.7vw + 0.95rem, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- founding note ---------- */

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.note {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.note-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.5rem;
}

.note-body { max-width: 60ch; }

.note-body p {
  margin: 0 0 1.35rem;
  color: var(--ink-soft);
}

.note-body p:first-child {
  font-family: Fraunces, Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.25rem, 1vw + 1.05rem, 1.6rem);
  line-height: 1.45;
  color: var(--ink);
}

.note-body p:last-child { margin-bottom: 0; }

.sign {
  margin-top: 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- three ---------- */

.three {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.three article h2 {
  margin: 0 0 0.7rem;
  font-family: Fraunces, Georgia, serif;
  font-weight: 300;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.three article p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.num {
  display: block;
  margin-bottom: 1.1rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--ember);
}

/* ---------- journal index ---------- */

/* The hub headline is a page title, not the home page's display line. */
.page-head { padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(2.5rem, 5vw, 3.5rem); }

.page-head h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 18ch;
  margin-bottom: 1.5rem;
}

.entries { padding-block: 0 clamp(3.5rem, 8vw, 6rem); }

.entry {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2.25rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
}

.entry:last-of-type { border-bottom: 1px solid var(--rule); }

.entry-meta {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.55rem;
}

.entry-body { max-width: 56ch; }

.entry-body h2 {
  margin: 0 0 0.6rem;
  font-family: Fraunces, Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.entry-body h2 a { color: var(--ink); text-decoration: none; }
.entry-body h2 a:hover { color: var(--ember); }

.entry-body p { margin: 0; color: var(--ink-soft); }

/* ---------- article ---------- */

/* The reading column is narrower than the masthead above it. Centre it, or a
   34rem measure sits pinned to the left of a 64rem wrapper with the right half
   of the screen empty. */
.article-head,
.prose,
.article-foot { max-width: 36rem; margin-inline: auto; }

.article-head {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(2rem, 4vw, 3rem);
}

.article-head h1 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  max-width: 20ch;
  margin-bottom: 1.25rem;
  line-height: 1.04;
}

.deck {
  margin: 0 0 1.75rem;
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.byline {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.prose {
  padding-block: clamp(2.5rem, 5vw, 3.5rem) clamp(3.5rem, 8vw, 5.5rem);
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 1.4rem; color: var(--ink-soft); }

/* The opening paragraph carries the scene; give it the serif weight the
   founding note uses so an article opens the same way the site does. */
.prose .opener {
  font-family: Fraunces, Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.2rem, 0.9vw + 1rem, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
}

.prose h2 {
  margin: 2.75rem 0 1rem;
  font-family: Fraunces, Georgia, serif;
  font-weight: 300;
  font-size: clamp(1.35rem, 1.2vw + 1.1rem, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.prose h3 {
  margin: 2rem 0 0.6rem;
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.prose a { color: var(--ember); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--ember-lit); }

.prose ul { margin: 0 0 1.4rem; padding-left: 1.1rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.6rem; }
.prose li::marker { color: var(--ink-faint); }

.prose strong { font-weight: 500; color: var(--ink); }

/* A quiet aside — the honest variation, the thing that is true for some
   homes and not others. Set apart without shouting. */
.prose .aside {
  margin: 2.25rem 0;
  padding: 1.4rem 1.5rem;
  background: var(--paper-deep);
  border-left: 2px solid rgba(184, 72, 26, 0.35);
  font-size: 0.95rem;
}

.prose .aside p { margin: 0; }
.prose .aside p + p { margin-top: 0.9rem; }

.prose .stop {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: Fraunces, Georgia, serif;
  font-weight: 300;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
}

.article-foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.25rem clamp(3rem, 6vw, 4.5rem);
}

.article-foot p { margin: 0; color: var(--ink-faint); font-size: 0.9rem; }
.article-foot a { color: var(--ember); text-decoration: none; }
.article-foot a:hover { text-decoration: underline; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 3.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

footer a { color: var(--ink-faint); text-decoration: none; border-bottom: 1px solid var(--rule); }
footer a:hover { color: var(--ember); }

@media (max-width: 40rem) {
  .note { grid-template-columns: 1fr; }
  .note-label { padding-top: 0; }
  .entry { grid-template-columns: 1fr; gap: 0.75rem; }
  .entry-meta { padding-top: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .flame-lit { animation: breathe 5.5s ease-in-out infinite; transform-origin: 50% 85%; }
  @keyframes breathe {
    0%, 100% { opacity: 1;    transform: scaleY(1); }
    40%      { opacity: 0.82; transform: scaleY(0.96); }
    75%      { opacity: 0.95; transform: scaleY(1.03); }
  }
}
