/* Mindful Agents, round 5: ink on paper. Tokens follow PLAN-round5.md section 4. */

:root {
  --ivory: #F7F3EB;
  --parchment: #E8DFD2;
  --ink: #292724;
  --ink-soft: #3A3733;
  --gray-text: #6B5E50;
  --warm-gray: #9A8976;       /* rules and decoration only, never text */
  --bronze: #A16D3D;          /* display accents 24px and larger, ornaments */
  --bronze-deep: #8F5F33;     /* button fill, focus ring */
  --bronze-text: #7A4F27;     /* links and small bronze text on light grounds */
  --bronze-light: #C99A6B;    /* accents on ink */
  --gray-light: #B9AB9A;      /* secondary text on ink */
  --white: #FFFFFF;

  --font-display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-display: clamp(2.75rem, 6vw, 5rem);
  --t-h1: clamp(2.25rem, 4.5vw, 3.5rem);
  --t-h2: clamp(1.875rem, 3.2vw, 2.625rem);
  --t-h3: 1.5rem;
  --t-lead: clamp(1.125rem, 1.4vw, 1.3125rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-eyebrow: 0.75rem;
  --t-stat: clamp(2.75rem, 5.2vw, 4.5rem);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px; --s-11: 160px;

  --gutter: clamp(24px, 5.5vw, 80px);
  --section-pad: clamp(64px, 10vw, 136px);
  --rule: 1px solid var(--warm-gray);

  --dur-quick: 250ms;
  --dur-ui: 450ms;
  --dur-chapter: 750ms;
  --dur-hero: 1100ms;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --rise: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* paper grain: one small tiled noise, multiplied over the whole page */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.15 0 0 0 0 0.14 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--bronze-deep); outline-offset: 3px; border-radius: 2px; }
.site-footer :focus-visible { outline-color: var(--bronze-light); }

.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 200;
  background: var(--ink); color: var(--ivory);
  padding: 12px 16px; font-weight: 600; font-size: var(--t-small); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.eyebrow, .chapter__label {
  font-size: var(--t-eyebrow); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  line-height: 1.3; color: var(--gray-text);
}
.h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-h2); line-height: 1.12; letter-spacing: -0.005em; text-wrap: balance; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--t-h3); line-height: 1.2; }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-soft); max-width: 34em; text-wrap: pretty; }

/* ---------- links and buttons ---------- */
.link {
  color: var(--bronze-text); font-weight: 500; text-decoration: none;
  background: linear-gradient(var(--bronze), var(--bronze)) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out);
}
.link:hover { color: var(--ink); background-size: 100% 2px; }
.link--arrow::after { content: "\2192"; display: inline-block; margin-left: 8px; transition: transform var(--dur-quick) var(--ease-out); }
.link--arrow:hover::after { transform: translateX(4px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 26px;
  background: var(--bronze-deep); color: var(--white);
  font: 600 1rem/1.2 var(--font-body); letter-spacing: 0.005em; text-decoration: none;
  border: 1px solid var(--bronze-deep); border-radius: 2px;
  transition: background-color var(--dur-quick) var(--ease-out), border-color var(--dur-quick) var(--ease-out), transform var(--dur-quick) var(--ease-out);
}
.btn:hover { background: var(--bronze-text); border-color: var(--bronze-text); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn--small { min-height: 44px; padding: 10px 18px; font-size: var(--t-small); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ivory) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid color-mix(in srgb, var(--warm-gray) 45%, transparent); }
.site-header__row { display: flex; align-items: center; gap: var(--s-6); min-height: 72px; }
.brand { display: inline-flex; align-items: center; flex: none; padding-block: 8px; }
.brand { padding-block: 4px; margin-left: -6px; }
.brand img { height: 60px; width: auto; }
.brand--footer img { height: 68px; }
@media (max-width: 899px) { .brand img { height: 50px; } .brand--footer img { height: 60px; } }
.nav { display: flex; gap: var(--s-6); margin-left: auto; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--t-small); font-weight: 500; text-decoration: none; color: var(--ink);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: var(--bronze);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-quick) var(--ease-out);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; }
.menu[hidden] { display: none; }

@media (max-width: 899px) {
  .nav, .site-header__book { display: none; }
  .site-header__row { min-height: 64px; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
    min-height: 44px; padding: 8px 0 8px 12px;
    background: none; border: 0; color: var(--ink); font: 600 var(--t-small)/1 var(--font-body); cursor: pointer;
  }
  .menu-btn__bars { width: 22px; height: 9px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transition: height var(--dur-quick) var(--ease-out); }
  .menu-btn[aria-expanded="true"] .menu-btn__bars { height: 1px; border-bottom-color: transparent; }
  .menu { position: fixed; inset: 64px 0 0 0; background: var(--ivory); overflow-y: auto; border-top: var(--rule); }
  .menu__inner { display: flex; flex-direction: column; padding-block: var(--s-6) var(--s-8); }
  .menu__link { font-family: var(--font-display); font-size: 2rem; font-weight: 500; min-height: 64px; border-bottom: 1px solid color-mix(in srgb, var(--warm-gray) 50%, transparent); }
  .menu__link::after { display: none; }
  .menu__book { margin-top: var(--s-6); width: 100%; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(48px, 7vw, 104px) clamp(72px, 9vw, 128px); }
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.4vw, 32px); align-items: center; position: relative; z-index: 1; }
.hero__text { grid-column: 1 / span 6; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); }
.hero__title { font-family: var(--font-display); font-weight: 500; font-size: var(--t-display); line-height: 1.02; letter-spacing: -0.012em; text-wrap: balance; max-width: 12.5em; }
.hero__lead { margin-bottom: var(--s-3); }
.hero__art { grid-column: 8 / span 5; }
.penline { position: absolute; left: 0; right: 0; bottom: 8px; width: 100%; height: clamp(56px, 8vw, 112px); color: var(--bronze); opacity: 0.55; z-index: 0; pointer-events: none; }

.placeholder {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  aspect-ratio: 4 / 5; padding: clamp(16px, 2vw, 28px);
  background: var(--parchment); border: 1px solid var(--warm-gray); border-radius: 2px; overflow: hidden;
}
.placeholder::after { content: ""; position: absolute; inset: 10px; border: 1px dashed color-mix(in srgb, var(--gray-text) 55%, transparent); pointer-events: none; }
.placeholder__scribble { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--warm-gray); opacity: 0.6; }
.placeholder__tag, .placeholder__what, .placeholder__size { position: relative; z-index: 1; }
.placeholder__tag { font-size: var(--t-eyebrow); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--bronze-text); }
.placeholder__what { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.25rem; line-height: 1.25; color: var(--ink); max-width: 16em; }
.placeholder__size { font-size: 0.8125rem; color: var(--gray-text); font-variant-numeric: tabular-nums; }

@media (max-width: 1099px) {
  .hero__text { grid-column: 1 / span 7; }
  .hero__art { grid-column: 8 / span 5; }
  .hero__title { font-size: clamp(2.5rem, 5.2vw, 3.5rem); }
}
@media (max-width: 767px) {
  .hero__text, .hero__art { grid-column: 1 / -1; }
  .hero__art { margin-top: var(--s-7); max-width: 420px; }
  .hero .btn { width: 100%; }
}

/* ---------- stat strip ---------- */
.stats { background: var(--parchment); padding-block: clamp(56px, 7vw, 96px); border-block: 1px solid color-mix(in srgb, var(--gray-text) 60%, transparent); }
.stats__title { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; color: var(--ink); margin-bottom: clamp(32px, 4vw, 56px); }
.stats__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding-inline: clamp(16px, 2.2vw, 36px); border-left: 1px solid color-mix(in srgb, var(--gray-text) 60%, transparent); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat__value { font-family: var(--font-display); font-weight: 500; font-size: var(--t-stat); line-height: 1; letter-spacing: -0.015em; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); white-space: nowrap; }
.stat__label { margin-top: var(--s-4); font-size: var(--t-lead); line-height: 1.35; font-weight: 500; max-width: 15em; }
.stat__asof { margin-top: var(--s-2); font-size: var(--t-small); color: var(--gray-text); }
@media (max-width: 699px) {
  .stats__list { grid-template-columns: 1fr; }
  .stat { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); align-items: baseline; column-gap: var(--s-4); padding: var(--s-4) 0; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--gray-text) 60%, transparent); }
  .stat:first-child { padding-top: 0; border-top: 0; }
  .stat:last-child { padding-bottom: 0; }
  .stat__label { margin-top: 0; font-size: var(--t-body); }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* every ink illustration: the exported paper is pure white, so multiply drops it out on ivory or parchment */
.ink-art img { display: block; width: 100%; height: auto; }   /* drawings are exported with transparent paper: no blend mode, no tile */

/* ---------- sections ---------- */
.section { padding-block: var(--section-pad); }
.section--parchment { background: var(--parchment); }
.section__head { display: grid; gap: var(--s-4); max-width: 44rem; margin-bottom: clamp(40px, 5vw, 72px); }
.section__more { margin-top: clamp(32px, 4vw, 56px); }

.chapter { display: flex; align-items: center; gap: var(--s-4); margin-bottom: clamp(32px, 4vw, 56px); color: var(--bronze); }
.chapter__label { flex: none; }
.chapter__num { color: var(--bronze-text); }
.chapter__rule { flex: 1 1 auto; height: 1px; background: var(--warm-gray); transform-origin: left center; }
.chapter__rule--short { flex: 0 0 clamp(24px, 6vw, 88px); }
.section--parchment .chapter__rule { background: color-mix(in srgb, var(--gray-text) 60%, transparent); }
.ornament { flex: none; width: 64px; height: 16px; }

/* ---------- agents ---------- */
.agents { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(20px, 2.4vw, 32px); row-gap: var(--s-8); }
.agent { display: flex; flex-direction: column; }
.agent__art { margin: 0 -4% var(--s-4); }
.agent__art img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.agent__name { font-family: var(--font-display); font-weight: 600; font-size: 1.625rem; line-height: 1.15; padding-top: var(--s-4); border-top: var(--rule); }
.agent__job { margin-top: var(--s-3); color: var(--ink-soft); }
.agent__rule { margin-top: auto; padding-top: var(--s-4); font-size: var(--t-small); color: var(--gray-text); font-style: italic; font-family: var(--font-display); font-size: 1.125rem; }
@media (max-width: 1099px) { .agents { grid-template-columns: repeat(2, minmax(0, 1fr)); } .agent__art { margin-inline: 0; max-width: 360px; } }
@media (max-width: 559px) { .agents { grid-template-columns: 1fr; row-gap: var(--s-7); } .agent__art { max-width: 300px; } }

/* ---------- stages ---------- */
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); row-gap: var(--s-7); }
.stage { display: grid; gap: var(--s-3); align-content: start; padding-top: var(--s-5); border-top: 1px solid var(--ink); }
.stage__num { font-family: var(--font-display); font-weight: 500; font-size: clamp(3.5rem, 6vw, 5rem); line-height: 0.9; color: var(--bronze); font-variant-numeric: lining-nums; }
.stage p { color: var(--ink-soft); max-width: 26em; }
@media (max-width: 767px) { .stages { grid-template-columns: 1fr; } }

/* ---------- limits ---------- */
.limits { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.4vw, 32px); }
.limits > .chapter { grid-column: 1 / -1; }
.limits__head { grid-column: 1 / span 5; display: grid; gap: var(--s-4); align-content: start; }
.limits__close { margin-top: var(--s-4); font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.5rem; line-height: 1.25; color: var(--bronze); }
.plainlist { grid-column: 7 / -1; border-top: var(--rule); }
.plainlist li { display: flex; align-items: flex-start; gap: var(--s-5); padding-block: var(--s-5); border-bottom: var(--rule); font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.25; }
.ico { flex: none; width: 28px; height: 28px; margin-top: 3px; fill: none; stroke: var(--bronze); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 899px) {
  .limits__head, .plainlist { grid-column: 1 / -1; }
  .plainlist { margin-top: var(--s-7); }
}

/* ---------- cases ---------- */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.case {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: clamp(24px, 3vw, 40px);
  background: var(--ivory); border: 1px solid color-mix(in srgb, var(--gray-text) 60%, transparent); border-radius: 2px;
  text-decoration: none; color: var(--ink);
  transition: transform var(--dur-quick) var(--ease-out), border-color var(--dur-quick) var(--ease-out);
}
.case:hover { transform: translateY(-2px); border-color: var(--ink); }
.case__num { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.5rem; line-height: 1; color: var(--bronze); }
.case .h3 { font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 500; text-wrap: balance; }
.case p { color: var(--ink-soft); max-width: 30em; }
.case__more { margin-top: auto; padding-top: var(--s-5); align-self: flex-start; color: var(--bronze-text); font-weight: 500; font-size: var(--t-small); background: linear-gradient(var(--bronze), var(--bronze)) 0 100% / 0 1px no-repeat; padding-bottom: 3px; transition: background-size var(--dur-quick) var(--ease-out); }
.case__more::after { content: "\2192"; margin-left: 8px; }
.case:hover .case__more { background-size: 100% 1px; }
@media (max-width: 767px) { .cases { grid-template-columns: 1fr; } }

/* ---------- closing call ---------- */
.cta { padding-block: var(--section-pad); }
.cta__inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); }
.cta__inner > [data-reveal]:first-child { line-height: 0; }
.cta .ornament { color: var(--bronze); }
.cta__title { font-family: var(--font-display); font-weight: 500; font-size: var(--t-h1); line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
.cta__line { font-size: var(--t-lead); color: var(--ink-soft); max-width: 30em; }
.cta__quiet { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.25rem; color: var(--gray-text); }
@media (max-width: 559px) { .cta .btn { width: 100%; } }

/* ---------- accordion: a heading button that opens its panel (company brain, FAQ) ---------- */
.acc { border-top: var(--rule); }
.acc:last-child { border-bottom: var(--rule); }
.section--parchment .acc, .section--parchment .acc:last-child { border-color: color-mix(in srgb, var(--gray-text) 60%, transparent); }
.acc__head { margin: 0; font: inherit; }
.acc__btn {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); width: 100%; min-height: 64px;
  padding: var(--s-4) 0; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.2;
}
.acc__btn::after {
  content: ""; flex: none; width: 14px; height: 14px; margin-right: 4px;
  background: linear-gradient(var(--bronze-deep), var(--bronze-deep)) center / 100% 1.5px no-repeat, linear-gradient(var(--bronze-deep), var(--bronze-deep)) center / 1.5px 100% no-repeat;
  transition: transform var(--dur-quick) var(--ease-out);
}
.acc__btn[aria-expanded="true"]::after { transform: rotate(45deg); }
.acc__btn:hover { color: var(--bronze-text); }
.acc__panel { display: grid; grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; min-height: 0; }
.acc__body { padding-bottom: var(--s-6); max-width: 46rem; color: var(--ink-soft); }
.acc__body > * + * { margin-top: var(--s-4); }
.js .acc__panel[data-open="false"] { grid-template-rows: 0fr; visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .js .acc__panel { transition: grid-template-rows var(--dur-ui) var(--ease-out), visibility 0s linear var(--dur-ui); }
  .js .acc__panel[data-open="true"] { transition: grid-template-rows var(--dur-ui) var(--ease-out), visibility 0s; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--ivory); padding-block: clamp(56px, 7vw, 96px) var(--s-7); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); column-gap: clamp(20px, 2.4vw, 32px); row-gap: var(--s-7); align-items: start; }
.site-footer__line { margin-top: var(--s-3); color: var(--gray-light); max-width: 22em; }
.site-footer__nav { display: grid; grid-template-columns: repeat(2, max-content); column-gap: var(--s-8); }
.foot-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--ivory); text-decoration: none; font-size: var(--t-small); font-weight: 500; background: linear-gradient(var(--bronze-light), var(--bronze-light)) 0 calc(100% - 10px) / 0 1px no-repeat; transition: background-size var(--dur-quick) var(--ease-out); }
.foot-link:hover { background-size: 100% 1px; }
.foot-link--accent { color: var(--bronze-light); background-size: 100% 1px; }
.site-footer__book { justify-self: end; }
.site-footer__base { display: flex; align-items: center; gap: var(--s-5); margin-top: clamp(48px, 6vw, 88px); padding-top: var(--s-5); border-top: 1px solid var(--ink-soft); color: var(--gray-light); font-size: var(--t-small); }
.site-footer .ornament { color: var(--bronze-light); }
@media (max-width: 767px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__book { justify-self: start; }
}

/* ---------- inner-page hero (Services, Method, Work, About) ---------- */
.page-hero { position: relative; padding-block: clamp(64px, 9vw, 128px) clamp(48px, 6vw, 88px); }
.page-hero .wrap { display: grid; gap: var(--s-5); justify-items: start; }
.page-hero__title { font-family: var(--font-display); font-weight: 500; font-size: var(--t-h1); line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; max-width: 16em; }

/* ---------- page transitions: a soft cross-fade with a slight upward drift; the header stays put ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }

/* ---------- motion (only when scripting is on and motion is welcome) ---------- */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out 200ms var(--ease-out) both; }
  ::view-transition-new(root) { animation: vt-in 280ms var(--ease-out) both; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

  .js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .chapter[data-reveal] { opacity: 1; transform: none; }
  .js .chapter .chapter__rule { transform: scaleX(0); transition: transform var(--dur-chapter) var(--ease-out); }
  .js .chapter .chapter__label { opacity: 0; transition: opacity var(--dur-chapter) var(--ease-out); }
  .js .chapter.is-in .chapter__rule { transform: scaleX(1); }
  .js .chapter.is-in .chapter__label { opacity: 1; }
  /* the squiggle draws left to right */
  .js [data-reveal] .ornament path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--dur-chapter) var(--ease-out) 200ms; }
  .js [data-reveal].is-in .ornament path { stroke-dashoffset: 0; }
  .js [data-reveal] .ornament circle { opacity: 0; transition: opacity var(--dur-quick) var(--ease-out) 700ms; }
  .js [data-reveal].is-in .ornament circle { opacity: 1; }
  /* once in, cards answer the pointer at once */
  .js a[data-reveal].is-in { transition: transform var(--dur-quick) var(--ease-out), border-color var(--dur-quick) var(--ease-out), opacity var(--dur-ui) var(--ease-out); transition-delay: 0ms; }

  /* ink reveal: a soft radial mask opens over a static drawing as it enters; nothing essential waits for it */
  @property --ink-r { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
  .js [data-ink-reveal] {
    --ink-r: 0%;
    -webkit-mask-image: radial-gradient(circle at 42% 58%, #000 calc(var(--ink-r) - 22%), transparent var(--ink-r));
    mask-image: radial-gradient(circle at 42% 58%, #000 calc(var(--ink-r) - 22%), transparent var(--ink-r));
  }
  .js [data-ink-reveal].is-in { animation: ink-open var(--dur-hero) var(--ease-out) 120ms forwards; }
  @keyframes ink-open { to { --ink-r: 190%; } }

  /* hero headline words */
  .js [data-words]:not(.is-split) { opacity: 0; }
  .js [data-words] .word { display: inline-block; opacity: 0; transform: translateY(10px); animation: word-in 520ms var(--ease-out) forwards; animation-delay: calc(var(--w, 0) * 55ms + 80ms); }
  @keyframes word-in { to { opacity: 1; transform: none; } }

  .js [data-penline] path { stroke-dasharray: 1; stroke-dashoffset: var(--pen, 1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Phase F: what the audit includes, under every closing ask ---------- */
.cta__beats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); width: 100%; max-width: 60rem; margin: var(--s-3) 0; counter-reset: beat; }
.cta__beats li { counter-increment: beat; padding-top: var(--s-4); border-top: var(--rule); color: var(--ink-soft); }
.cta__beats li::before { content: counter(beat); display: block; margin-bottom: var(--s-2); font-family: var(--font-display); font-weight: 500; font-size: 1.75rem; line-height: 1; color: var(--bronze); font-variant-numeric: lining-nums; }
@media (max-width: 767px) { .cta__beats { grid-template-columns: 1fr; row-gap: var(--s-4); } }
h2.chapter__label { font-family: var(--font-body); }
.site-footer__base p { max-width: 44em; }

/* ---------- Phase G: Substack signup in the footer (a quiet, secondary path) ---------- */
.site-footer__notes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-8); margin-top: clamp(40px, 5vw, 72px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--ink-soft); }
.site-footer__notes-text { display: grid; gap: var(--s-2); max-width: 36em; }
.site-footer__notes-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.2; color: var(--ivory); }
.site-footer__notes p { color: var(--gray-light); font-size: var(--t-small); }
.btn--ghost { min-height: 48px; padding: 12px 22px; background: transparent; color: var(--ivory); border-color: var(--bronze-light); font-size: var(--t-small); }
.btn--ghost:hover { background: var(--ink-soft); border-color: var(--ivory); }
.site-footer__notes + .site-footer__base { margin-top: clamp(28px, 3vw, 40px); }

/* ---------- Phase H: client quote (Home under the stats, Results large) ---------- */
.stats__proof { margin-top: clamp(28px, 3.5vw, 44px); font-size: var(--t-lead); }
.stats__proof .link { display: inline-block; padding-block: 10px; background-position: 0 calc(100% - 8px); color: var(--ink); }
.quote { position: relative; display: grid; gap: var(--s-5); margin: 0; max-width: 62rem; }
.quote__mark { font-family: var(--font-display); font-weight: 500; font-size: 6rem; line-height: 0.6; height: 2.25rem; color: var(--bronze); }
.quote__text { margin: 0; }
.quote__text p { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.5vw, 2.125rem); line-height: 1.28; letter-spacing: -0.004em; text-wrap: pretty; }
.quote--large .quote__text p { font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.2; }
.quote__by { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-7); padding-top: var(--s-5); border-top: var(--rule); }
.quote__who { display: grid; gap: 2px; }
.quote__name { font-weight: 600; }
.quote__role { color: var(--gray-text); font-size: var(--t-small); }
.quote__logo { height: 16px; width: auto; }
.home-quote { padding-block: clamp(56px, 7vw, 104px) 0; }
.home-quote__more { margin-top: var(--s-4); }
.home-quote__more .link { display: inline-block; padding-block: 12px; background-position: 0 calc(100% - 9px); }

/* long chapter labels on phones: let the label wrap and drop the short trailing rule so nothing runs past the edge */
.chapter__label { flex: 0 1 auto; min-width: 0; }
.chapter__rule { min-width: 12px; }
@media (max-width: 479px) { .chapter__rule--short { display: none; } }
