/* ==========================================================================
   Cauldron Labs — site stylesheet
   One file. No frameworks. No external fonts or assets.
   Palette, type and spacing tokens live in :root. See BRAND.md.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand palette — sampled from the logo. Nothing else is a brand colour. */
  --tan:        #E6BD87;
  --terracotta: #B67245;
  --brown:      #59402C;
  --teal:       #61827B;
  --ink:        #2B1E16;
  --cream:      #FBF7F1;

  /* Tints, used only for hairlines and hovers. */
  --line:        rgba(89, 64, 44, 0.20);
  --line-soft:   rgba(89, 64, 44, 0.12);
  --line-light:  rgba(251, 247, 241, 0.22);
  --tan-wash:    rgba(230, 189, 135, 0.22);

  /* Type */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --fs-display: clamp(2.3rem, 5.1vw, 4.05rem);
  --fs-h2:      clamp(1.85rem, 3.5vw, 2.85rem);
  --fs-h3:      clamp(1.2rem, 1.55vw, 1.45rem);
  --fs-lead:    clamp(1.09rem, 1.35vw, 1.3rem);
  --fs-body:    1.0625rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-label:   0.75rem;

  --lh-display: 1.05;
  --lh-h2:      1.12;
  --lh-h3:      1.3;
  --lh-body:    1.62;

  --ls-display: -0.018em;
  --ls-h2:      -0.012em;
  --ls-label:    0.16em;

  /* Spacing — 4px base */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* Layout */
  --container: 1180px;
  --container-narrow: 780px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 8.5vw, 7.5rem);
  --header-h: 76px;
  --radius: 2px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

button { font: inherit; color: inherit; }

::selection { background: var(--tan); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.section--tan { background: var(--tan); color: var(--ink); }
.section--ink { background: var(--ink); color: var(--cream); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.skip-link:focus { top: var(--sp-4); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: 400;
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  font-weight: 400;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 46ch;
}

.prose p + p { margin-top: var(--sp-4); }
.prose { max-width: 62ch; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--brown);
  line-height: 1.3;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: none;
  opacity: 0.7;
}
.section--ink .eyebrow { color: var(--tan); }

.muted { color: var(--brown); }
.section--ink .muted { color: rgba(251, 247, 241, 0.78); }

.small { font-size: var(--fs-sm); }

.link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--terracotta);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 140ms ease, color 140ms ease;
}
.link:hover { text-decoration-color: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.9rem 1.4rem;
  min-height: 48px;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.btn:hover { background: var(--brown); border-color: var(--brown); }

.btn__arrow {
  font-size: 1.05em;
  line-height: 1;
  transition: transform 140ms ease;
}
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--light {
  background: var(--tan);
  border-color: var(--tan);
  color: var(--ink);
}
.btn--light:hover { background: var(--cream); border-color: var(--cream); }

.btn--sm {
  min-height: 42px;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand {
  display: block;
  flex: none;
  text-decoration: none;
  line-height: 0;
}
.brand img {
  width: 157px;
  height: 44px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.9rem);
}

.nav a:not(.btn) {
  position: relative;
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--brown);
  text-decoration: none;
  transition: color 140ms ease;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.nav a:not(.btn):hover { color: var(--ink); }
.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.nav-toggle__bars {
  display: block;
  width: 16px;
  height: 10px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(3.25rem, 7vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

/* Faint field of concentric arcs, drawn from the mark's droplet curve.
   Purely decorative, sits behind the text at very low contrast. */
.hero::after {
  content: "";
  position: absolute;
  right: -14vw;
  top: -22vw;
  width: 68vw;
  height: 68vw;
  max-width: 900px;
  max-height: 900px;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 50%,
      transparent 0 26%,
      rgba(182, 114, 69, 0.16) 26% 26.16%,
      transparent 26.16% 40%,
      rgba(182, 114, 69, 0.11) 40% 40.14%,
      transparent 40.14% 54%,
      rgba(97, 130, 123, 0.13) 54% 54.14%,
      transparent 54.14% 68%,
      rgba(182, 114, 69, 0.08) 68% 68.12%,
      transparent 68.12%);
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero__inner {
  max-width: 60rem;
}

.hero__eyebrow { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

.hero__title {
  max-width: 19ch;
  margin-bottom: clamp(1.5rem, 2.6vw, 2rem);
}

.hero__body {
  max-width: 52ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--brown);
}

.hero__actions {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-5);
}

.hero__note {
  font-size: var(--fs-sm);
  color: var(--brown);
}

/* ---------- Section heading block ---------- */
.section-head {
  display: grid;
  gap: var(--sp-5);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head__title { max-width: 24ch; }

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
  }
  .section-head__body { padding-bottom: 0.35rem; }
}

/* ---------- Offerings ---------- */
.offerings {
  border-top: 1px solid var(--line);
}

.offering {
  display: grid;
  gap: var(--sp-2) var(--sp-5);
  padding-block: clamp(1.5rem, 2.6vw, 2.1rem);
  border-bottom: 1px solid var(--line);
}

.offering__no {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--brown);
  font-variant-numeric: tabular-nums;
  padding-top: 0.42em;
}

.offering__title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  font-weight: 400;
  text-wrap: balance;
  transition: color 160ms ease;
}

.offering__desc {
  color: var(--brown);
  max-width: 46ch;
}

.offering:hover .offering__title { color: var(--brown); }

@media (min-width: 860px) {
  .offering {
    grid-template-columns: 3.5rem minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
    gap: var(--sp-5);
  }
  .offering__desc { padding-top: 0.55em; }
}

/* ---------- Process ---------- */
.program {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 820px) {
  .program { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
}

.phase {
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(89, 64, 44, 0.42);
}

.phase__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.phase__label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown);
}

.phase__glyph { width: 44px; height: 26px; flex: none; }

.phase__name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-3);
}

.phase__desc {
  color: var(--brown);
  max-width: 34ch;
}

/* Discovery callout inside process section */
.discovery {
  display: grid;
  gap: var(--sp-4);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(89, 64, 44, 0.28);
}
.discovery__tag {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown);
}
.discovery__text {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.35;
  max-width: 34ch;
  letter-spacing: -0.008em;
}
@media (min-width: 820px) {
  .discovery {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: var(--sp-6);
    align-items: start;
  }
  .discovery__tag { padding-top: 0.5rem; }
}

/* ---------- About / Justin ---------- */
.about-teaser__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}
@media (min-width: 900px) {
  .about-teaser__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
  }
}

.pullquote {
  border-left: 2px solid var(--terracotta);
  padding-left: clamp(1.1rem, 2vw, 1.6rem);
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  line-height: 1.42;
  letter-spacing: -0.006em;
  max-width: 34ch;
}
.pullquote cite {
  display: block;
  margin-top: var(--sp-4);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown);
}

.factrow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--brown);
}
.factrow li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.factrow li:not(:last-child)::after {
  content: "";
  width: 4px; height: 4px;
  background: var(--terracotta);
  border-radius: 50%;
  transform: translateY(-2px);
  margin-left: 0.6rem;
}

.linkrow {
  margin-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4) var(--sp-6);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* ---------- Closing CTA ---------- */
.cta__inner {
  display: grid;
  gap: var(--sp-6);
  align-items: end;
}
@media (min-width: 900px) {
  .cta__inner {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(2.5rem, 5vw, 5rem);
  }
}
.cta__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 22ch;
}
.cta__body { color: var(--brown); max-width: 40ch; }
.cta__actions {
  margin-top: var(--sp-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  border-top: 4px solid var(--terracotta);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--line-light);
}
.footer__brand { display: flex; align-items: center; gap: var(--sp-4); }
.footer__brand img { width: 40px; height: 54px; }
.footer__brandtext {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.2;
}
.footer__brandtext span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tan);
}
.footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
}
.footer__nav a {
  color: rgba(251, 247, 241, 0.85);
  text-decoration: none;
  font-size: var(--fs-sm);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.footer__nav a:hover { color: var(--cream); border-bottom-color: var(--terracotta); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-5);
  padding-top: var(--sp-5);
  font-size: var(--fs-xs);
  color: rgba(251, 247, 241, 0.62);
}
.footer__bottom a { color: rgba(251, 247, 241, 0.85); text-decoration: none; }
.footer__bottom a:hover { color: var(--cream); text-decoration: underline; }

/* ---------- Page intro (interior pages) ---------- */
.page-intro {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-soft);
}
.page-intro__title {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  max-width: 22ch;
}
.page-intro__body {
  margin-top: var(--sp-5);
  max-width: 52ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--brown);
}

/* ---------- Projects ---------- */
.projects__group + .projects__group { margin-top: clamp(2.5rem, 4.5vw, 3.5rem); }
.projects__legend {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-1);
}
.projects__legend h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}
.projects__legend span {
  font-size: var(--fs-xs);
  color: var(--brown);
}

/* Column counts are chosen so both groups fill their rows exactly:
   4 live projects over four columns, 6 lab projects over three. */
.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .projects__group--live .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .projects__group--lab .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.project {
  background: var(--cream);
  padding: clamp(1.15rem, 2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  position: relative;
  transition: background-color 200ms ease;
}
.project:hover { background: #fffdf9; }
.project__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.project__mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: block;
}
.project__mark svg { width: 100%; height: 100%; display: block; }
.project__name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.15;
  letter-spacing: -0.008em;
  color: var(--ink);
  font-weight: 600;
}
.project__desc {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--brown);
  max-width: 30ch;
}
.project__link {
  margin-top: auto;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.project__link span[aria-hidden] { color: var(--terracotta); }
.project__link::after { content: ""; position: absolute; inset: 0; }
.project__link:hover { color: var(--ink); }
.project__link:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.projects__foot {
  margin-top: clamp(1.75rem, 3vw, 2.25rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-3) var(--sp-5);
}
.projects__foot p { font-size: var(--fs-sm); color: var(--brown); max-width: 46ch; }

/* ---------- A new way to invest ---------- */
.prose {
  max-width: 62ch;
}
.prose > p {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--brown);
}
.prose > p + p { margin-top: var(--sp-4); }
.prose > p strong { color: var(--ink); font-weight: 600; }
.prose .pullquote { margin-block: clamp(2rem, 3.5vw, 2.75rem); }
.prose .fineprint {
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: rgba(89, 64, 44, 0.8);
  max-width: 52ch;
}

/* ---------- Writing: post page ---------- */
/* Post bodies reuse .prose, widened to a reading measure. */
.post { padding-top: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(3rem, 5vw, 4.5rem); }
.post__inner { max-width: 46rem; }
.post__back {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brown);
  text-decoration: none;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.post__back span[aria-hidden] { color: var(--terracotta); }
.post__back:hover { color: var(--ink); }
.post__kicker {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brown);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  align-items: baseline;
}
.post__kicker span[aria-hidden] { color: var(--terracotta); }
.post__title {
  margin-top: var(--sp-4);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--ink);
  max-width: 20ch;
  text-wrap: balance;
}
.post__standfirst {
  margin-top: var(--sp-5);
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--brown);
  max-width: 46ch;
}
.post__cover {
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
  border: 1px solid var(--line);
  background: var(--tan-wash);
}
.post__cover img { display: block; width: 100%; height: auto; }

.post__body { margin-top: clamp(2rem, 3.5vw, 2.75rem); max-width: 42rem; }
.post__body > p, .post__body > ul, .post__body > ol, .post__body > blockquote, .post__body > pre { margin-top: var(--sp-4); }
.post__body > p:first-child { margin-top: 0; }
.post__body p { font-size: var(--fs-body); line-height: 1.68; color: var(--brown); }
.post__body strong { color: var(--ink); font-weight: 600; }
.post__body h2 {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.post__body h3 {
  margin-top: var(--sp-7);
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.008em;
  color: var(--ink);
}
.post__body ul, .post__body ol {
  padding-left: 1.35rem;
  display: grid;
  gap: var(--sp-2);
}
.post__body li { font-size: var(--fs-body); line-height: 1.6; color: var(--brown); }
.post__body li::marker { color: var(--terracotta); }
.post__body ul { list-style: disc; }
.post__body ol { list-style: decimal; }
.post__body blockquote {
  margin-block: clamp(1.75rem, 3vw, 2.25rem);
  padding-left: clamp(1.1rem, 2vw, 1.6rem);
  border-left: 2px solid var(--terracotta);
}
.post__body blockquote p {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.9vw, 1.42rem);
  line-height: 1.42;
  color: var(--ink);
  font-style: italic;
}
.post__body blockquote p + p { margin-top: var(--sp-4); }
.post__body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(182, 114, 69, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
.post__body a:hover { text-decoration-color: var(--terracotta); }
.post__body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--tan-wash);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}
.post__body hr { margin-block: var(--sp-7); border: 0; border-top: 1px solid var(--line); }
.post__body img { max-width: 100%; height: auto; border: 1px solid var(--line); }

.post__principle {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 42rem;
}
.post__principle span {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.post__foot {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  max-width: 42rem;
}
.post__foot p { font-size: var(--fs-xs); color: rgba(89, 64, 44, 0.8); }

/* ---------- "How I write here" note ---------- */
.how-i-write {
  margin-top: clamp(2.5rem, 4.5vw, 3.5rem);
  padding-top: clamp(1.5rem, 2.5vw, 2rem);
  border-top: 1px solid var(--line);
  max-width: 52ch;
}
.how-i-write p:not(.eyebrow) {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--brown);
}

/* ---------- Who we work with ---------- */
/* A plain, open list. No revenue bands, no company sizes, no exclusions. */
.who-list {
  border-top: 1px solid var(--line);
}
.who-list__item {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: baseline;
  padding-block: clamp(1.15rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--line);
}
.who-list__no {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--terracotta);
  font-weight: 600;
  padding-top: 0.2em;
}
.who-list__item p {
  font-family: var(--font-serif);
  font-size: clamp(1.12rem, 1.65vw, 1.32rem);
  line-height: 1.38;
  letter-spacing: -0.004em;
  color: var(--ink);
  max-width: 62ch;
  text-wrap: pretty;
}
@media (min-width: 900px) {
  .who-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 4vw, 3.5rem); }
  .who-list__item:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Index pages: News and Writing ---------- */
/* A card grid for dated items. One component, used by both indexes. */
.index-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 780px) {
  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 3.25rem);
  }
}

.entry {
  display: flex;
  flex-direction: column;
  padding-block: clamp(1.5rem, 2.6vw, 2rem);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.entry__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-3);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--brown);
}
.entry__date {
  font-variant-numeric: tabular-nums;
}
.entry__meta .entry__sep {
  color: var(--terracotta);
  opacity: 0.85;
}
.entry__kicker {
  color: var(--terracotta);
  font-weight: 600;
}
.entry__via {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: rgba(89, 64, 44, 0.78);
  font-style: italic;
}
.entry__via a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(182, 114, 69, 0.5);
  text-underline-offset: 0.15em;
}
.entry__via a:hover { color: var(--ink); text-decoration-color: var(--terracotta); }
.entry__source {
  color: var(--teal);
  font-weight: 600;
}
.entry__title {
  margin-top: var(--sp-3);
  font-family: var(--font-serif);
  font-size: clamp(1.16rem, 1.6vw, 1.34rem);
  line-height: 1.26;
  letter-spacing: -0.005em;
  color: var(--ink);
  font-weight: 600;
  text-wrap: pretty;
}
/* One anchor per card. Its ::after stretches over the whole card, so the
   card is a single tab stop and the whole tile is clickable. */
.entry__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 220ms ease;
}
.entry__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.entry:hover .entry__title a,
.entry__title a:focus-visible {
  background-size: 100% 1px;
}
.entry__title a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}
.entry__title a:focus-visible::after {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}
.entry__summary {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--brown);
  max-width: 46ch;
  text-wrap: pretty;
}
.entry__out {
  margin-top: var(--sp-4);
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--brown);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.entry__out span[aria-hidden] { color: var(--terracotta); }
.entry:hover .entry__out { color: var(--ink); }

/* Unwired feed notice. Deliberately quiet, but impossible to mistake
   for published content: dashed rule, tan wash, explicit label. */
.feed-notice {
  border: 1px dashed rgba(182, 114, 69, 0.55);
  background: var(--tan-wash);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.feed-notice__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--brown);
}
.feed-notice__label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  flex: none;
}
.feed-notice__title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: var(--sp-3);
  color: var(--ink);
}
.feed-notice p {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--brown);
  max-width: 56ch;
}

.page-intro__actions {
  margin-top: clamp(1.5rem, 2.5vw, 2rem);
}
.feed-foot {
  margin-top: clamp(2rem, 3.5vw, 2.75rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-5);
}
.feed-foot__note {
  font-size: var(--fs-sm);
  color: var(--brown);
}
.feed-foot__note .link { margin-left: 0.35em; }

/* Card template preview inside the notice. Structure only, no content. */
.entry--template {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  margin-top: var(--sp-5);
  opacity: 0.75;
}
.entry--template .entry__title a { background-size: 0% 1px; }
.template-note {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: rgba(89, 64, 44, 0.72);
  font-style: italic;
}

/* Writing: clean empty state. */
.empty-state {
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(1rem, 2vw, 2rem);
  max-width: 46ch;
}
.empty-state__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.empty-state p {
  margin-top: var(--sp-4);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--brown);
}
.empty-state .linkrow { margin-top: var(--sp-6); }

/* ---------- About page ---------- */
.split {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
  }
}

.bio p + p { margin-top: var(--sp-4); }
.bio__name {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.bio__role {
  margin-top: var(--sp-2);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown);
  font-weight: 600;
}

.card-slab {
  background: var(--tan);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
}
.card-slab .eyebrow { color: var(--brown); }
.card-slab__mark {
  width: 68px;
  height: auto;
  margin-bottom: var(--sp-5);
}

.timeline { border-top: 1px solid var(--line); }
.timeline li {
  display: grid;
  gap: var(--sp-1) var(--sp-5);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) {
  .timeline li { grid-template-columns: 10rem minmax(0, 1fr); }
}
.timeline__when {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown);
  padding-top: 0.35em;
}
.timeline__what { max-width: 60ch; }

.list-plain li {
  position: relative;
  padding-left: 1.35rem;
  margin-top: var(--sp-3);
}
.list-plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(3rem, 7vw, 6rem);
  }
}

.email-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--cream);
}

.email-block__label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: var(--sp-3);
}

.email-block__address {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.9vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--terracotta);
  padding-bottom: 2px;
  word-break: break-word;
}
.email-block__address:hover { border-bottom-color: var(--ink); }

.email-block__note {
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--brown);
}

.steps { border-top: 1px solid var(--line); counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: var(--sp-3);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brown);
  padding-top: 0.3em;
}
.steps strong { display: block; font-weight: 600; }
.steps span { color: var(--brown); font-size: var(--fs-sm); }

/* ---------- Scroll reveal ----------
   Hidden state is gated on html.reveal-on, which the inline head script only
   sets when IntersectionObserver exists and motion is welcome. If the script
   fails, a timer clears the class and everything stays visible. */
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal-on .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

/* ---------- Responsive header ---------- */
@media (max-width: 899px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-2) var(--gutter) var(--sp-5);
    box-shadow: 0 18px 30px -24px rgba(43, 30, 22, 0.55);
  }
  .js .nav.is-open { display: flex; }
  .js .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .js .nav li { border-bottom: 1px solid var(--line-soft); }
  .js .nav a:not(.btn) {
    display: block;
    padding: 0.9rem 0;
    font-size: 1rem;
  }
  .js .nav a:not(.btn)::after { display: none; }
  .js .nav .btn { margin-top: var(--sp-4); width: 100%; }

  .site-header { position: sticky; }
  .header-inner { position: relative; }
}

@media (min-width: 900px) {
  .nav { position: static; }
}

/* Without JavaScript the menu button cannot work, so the links stack instead. */
@media (max-width: 899px) {
  .no-js .nav-toggle { display: none; }
  .no-js .header-inner {
    flex-wrap: wrap;
    gap: var(--sp-1);
    padding-block: var(--sp-3);
  }
  .no-js .brand { flex: 1 0 100%; }
  .no-js .nav { width: 100%; }
  .no-js .nav ul {
    justify-content: flex-start;
    gap: var(--sp-2) var(--sp-5);
    flex-wrap: wrap;
  }
  .no-js .nav a:not(.btn) { font-size: 0.875rem; }
}

/* ---------- Hero at wide sizes ---------- */
@media (min-width: 920px) {
  .hero__title { max-width: 18ch; }
}

/* ---------- Small-screen tuning ---------- */
@media (max-width: 600px) {
  :root { --header-h: 68px; }
  .brand img { width: 137px; height: 38.5px; }
  .hero__title { max-width: 100%; }
  .offering__no { padding-top: 0; }
  .offering { gap: var(--sp-1); }
  .offering__title { margin-top: 2px; }
  .footer__top { gap: var(--sp-5); }
  .btn { width: 100%; }
  .hero__actions .btn,
  .cta__actions .btn { width: auto; }
  .linkrow { flex-direction: column; gap: var(--sp-3); }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .btn { display: none !important; }
  .reveal-on .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
  .section--ink, .section--tan { background: #fff !important; color: #000 !important; }
}

/* ---------- Lab familiars (decorative, injected by site.js) ----------
   Remove this block and the matching site.js block to revert. */
.cl-bots {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 50; /* below .site-header (100) and skip link (200) */
  contain: strict;
}
.cl-bot {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  pointer-events: none;
  will-change: transform;
  transform-origin: 50% 60%;
}
.cl-bot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cl-bot [data-eye] { transform-box: fill-box; transform-origin: 50% 50%; }
@media print { .cl-bots { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .cl-bot, .cl-bot * { transition: none !important; animation: none !important; will-change: auto; }
}
