/* ==========================================================================
   PROVENANCE OPERATIONS · engineered editorial
   Palette: warm paper · ink · conservation green (3 colours + tints)
   Type:    Fraunces (display) · Newsreader (text) · IBM Plex Mono (labels)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper:      #F6F4EE;
  --paper-deep: #EFECE2;   /* tinted sections */
  --ink:        #1C1D17;
  --ink-70:     #45463C;   /* secondary text, 7.9:1 on paper */
  --ink-40:     #8A8B7E;   /* decorative strokes only, never body text */
  --green:      #1F5B40;   /* conservation green, 7.2:1 on paper */
  --green-deep: #14402C;
  --green-30:   #9DB5A6;   /* decorative strokes only */
  --sage:       #E2E8DE;
  --line:       #D8D3C4;
  --line-dark:  #1C1D17;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --size-hero:    clamp(2.45rem, 2.9vw + 1.7rem, 4.6rem);
  --size-h2:      clamp(1.85rem, 1.9vw + 1.2rem, 3rem);
  --size-h3:      clamp(1.3rem, .6vw + 1.1rem, 1.6rem);
  --size-body:    1.125rem;
  --size-mono:    .72rem;

  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 3.5rem;
  --space-6: 5rem;

  /* Consistent, responsive vertical rhythm for sections */
  --section-pad:  clamp(3.25rem, 6vw, 5rem);
  --section-head: clamp(2rem, 4.5vw, 3rem);

  --shell-max: 76rem;
  --shell-pad: clamp(1.25rem, 4vw, 3rem);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur: 280ms;

  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--size-body);
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: italic; }

::selection { background: var(--green); color: var(--paper); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Utilities ---------- */
.shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}
.shell-narrow { max-width: 52rem; }

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--size-mono);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-70);
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 100;
  padding: .65rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: .8rem;
  text-decoration: none;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus-visible { top: var(--space-2); }

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

/* Scroll reveal: JS adds .is-visible; if JS is absent, content stays visible.
   Travel is deliberately short (14px): the page should settle, not leap. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 600ms var(--ease-out) var(--reveal-delay, 0ms),
      transform 600ms var(--ease-out) var(--reveal-delay, 0ms);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* The kicker hairline draws itself, a rule pulled against a straightedge */
  .js .reveal .section-kicker::after {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 800ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 250ms);
  }
  .js .reveal.is-visible .section-kicker::after { transform: scaleX(1); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 3rem;
  padding: .75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper);
}
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-arrow { display: inline-block; transition: transform var(--dur) var(--ease-out); }
.btn-ghost:hover .btn-arrow { transform: translateY(3px); }
.btn:active { transform: translateY(1px); }

/* Inline text links */
.faq-body a, .footer-line a, .hero-sub a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease-out);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: .85rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
}
.wordmark-mark {
  color: var(--green);
  flex: none;
  transform-origin: 50% 50%;
  /* Angle is driven by scroll position in JS via --mark-rot; no transition
     so it tracks the scroll 1:1. Reduced motion leaves it at 0deg. */
  transform: rotate(var(--mark-rot, 0deg));
  transition: color var(--dur) var(--ease-out);
  will-change: transform;
}
.wordmark:hover .wordmark-mark,
.wordmark:focus-visible .wordmark-mark { color: var(--green-deep); }
.wordmark-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}
.wordmark-text em {
  font-style: italic;
  font-weight: 400;
  color: var(--green);
  margin-left: .28rem;
}

.nav-list {
  display: none;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2.2rem);
}
.nav-list a {
  display: inline-flex;
  align-items: baseline;
  gap: .4rem;
  padding: .6rem 0;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-70);
  background-image: linear-gradient(var(--green), var(--green));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: left calc(100% - .35rem);
  transition: color var(--dur) var(--ease-out),
              background-size var(--dur) var(--ease-out);
}
.nav-list a:hover, .nav-list a.is-current {
  color: var(--ink);
  background-size: 100% 1px;
}
.nav-num { font-size: .62rem; color: var(--green); }
.nav-contact {
  border: 1px solid var(--ink);
  padding: .5rem .9rem !important;
  color: var(--ink) !important;
  background-image: none !important;
  transition: background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out) !important;
}
.nav-contact:hover { background-color: var(--ink); color: var(--paper) !important; }

/* Mobile menu toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .5rem .25rem .5rem .75rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.nav-toggle-icon i {
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease-out);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: var(--paper);
  padding: 6.5rem var(--shell-pad) var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { display: flex; flex-direction: column; }
.mobile-menu a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.05rem 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color var(--dur) var(--ease-out), padding-left var(--dur) var(--ease-out);
}
.mobile-menu a:hover { color: var(--green); padding-left: .5rem; }
.mobile-menu .nav-num { font-family: var(--font-mono); font-size: .72rem; }
.mobile-menu-foot { margin-top: var(--space-4); }

@media (prefers-reduced-motion: no-preference) {
  .mobile-menu:not([hidden]) a {
    animation: menu-item .5s var(--ease-out) backwards;
  }
  .mobile-menu:not([hidden]) li:nth-child(1) a { animation-delay: .04s; }
  .mobile-menu:not([hidden]) li:nth-child(2) a { animation-delay: .08s; }
  .mobile-menu:not([hidden]) li:nth-child(3) a { animation-delay: .12s; }
  .mobile-menu:not([hidden]) li:nth-child(4) a { animation-delay: .16s; }
  .mobile-menu:not([hidden]) li:nth-child(5) a { animation-delay: .20s; }
  .mobile-menu:not([hidden]) li:nth-child(6) a { animation-delay: .24s; }
}
@keyframes menu-item {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 5vh, 4rem) clamp(3rem, 6vw, 4.5rem); }

.hero-kicker { margin-bottom: var(--space-3); }

.hero-heading {
  font-family: var(--font-display);
  font-size: var(--size-hero);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.015em;
  max-width: 20ch;
  text-wrap: balance;
}
.hero-heading em { color: var(--green); }
.br-desktop { display: none; }

.hero-sub {
  max-width: 36rem;
  margin-top: var(--space-3);
}
.hero-sub p { font-size: clamp(1.1rem, .4vw + 1rem, 1.25rem); color: var(--ink-70); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ---------- FIG. 01 · Cost calculator (ledger instrument) ---------- */
.calc {
  margin-top: clamp(2.25rem, 5vh, 3.5rem);
  border: 1px solid var(--line-dark);
  background: var(--paper);
  max-width: 52rem;
}
.calc-cap {
  padding: .85rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid var(--line-dark);
}
.calc-intro {
  padding: clamp(.9rem, 2.5vw, 1.15rem) clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 42rem;
}

.calc-form { display: grid; }
.calc-row {
  display: grid;
  gap: .6rem;
  padding: clamp(.9rem, 2.5vw, 1.15rem) clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid var(--line);
}
.calc-label-text {
  color: var(--ink-70);
  align-self: center;
  text-transform: uppercase;
}
.calc-label-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .2rem .9rem;
  align-self: center;
}
/* Text affordance, not a button shape: it must not compete with the ledger.
   The caret is the only cue that it opens something. */
.calc-workout {
  display: none;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 0;
  padding: .3rem 0;
  font-family: var(--font-mono);
  font-size: var(--size-mono);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  cursor: pointer;
  transition: color var(--dur) var(--ease-out);
}
.js .calc-workout { display: inline-flex; }
.calc-workout:hover { color: var(--green-deep); }
.calc-workout-text {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.calc-workout-caret {
  flex: none;
  transition: transform var(--dur) var(--ease-out);
}
.calc-workout[aria-expanded="true"] .calc-workout-caret { transform: rotate(180deg); }
.calc-control {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.calc-prefix {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--ink-70);
}
.calc-input {
  width: 4.25rem;
  flex: none;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-dark);
  border-radius: 0;
  padding: .15rem .2rem;
  font-variant-numeric: tabular-nums;
}
.calc-input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
/* Strip native number spinners; the range slider is the visual affordance */
.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ---------- FIG. 01a · loaded cost derivation (inset, subordinate) ----------
   Recessed inside the ledger rather than sitting beside them, mono throughout,
   and deliberately smaller than Fig. 01 so it reads as a footnote to it. */
.fig01a {
  grid-column: 1 / -1;
  margin-top: var(--space-2);
  border: 1px solid var(--line);
  background: var(--paper-deep);
  padding: clamp(.9rem, 2.5vw, 1.25rem);
}
.fig01a-cap {
  color: var(--ink-70);
  padding-bottom: .7rem;
  margin-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.fig01a-rows { display: grid; gap: .85rem; }
.fig01a-row { display: grid; gap: .3rem; }
.fig01a-row label { color: var(--ink-70); text-transform: uppercase; }
.fig01a-input {
  width: 7rem;
  justify-self: start;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-dark);
  border-radius: 0;
  padding: .15rem .2rem;
  min-height: 2.25rem;
  font-variant-numeric: tabular-nums;
}
.fig01a-input:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.fig01a-input::-webkit-outer-spin-button,
.fig01a-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fig01a-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.fig01a-note {
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--ink-70);
  max-width: 40rem;
}

.fig01a-out {
  display: grid;
  gap: .5rem;
  margin-top: 1.1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.fig01a-out > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.fig01a-out dt { color: var(--ink-70); }
.fig01a-figure {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fig01a-buildup {
  margin: .9rem 0 .6rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.7;
  letter-spacing: .02em;
  color: var(--ink-70);
  overflow-wrap: anywhere;
}

.fig01a-use {
  margin-top: 1.1rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}
.fig01a-use:hover { background: var(--ink); color: var(--paper); }

@media (min-width: 34em) {
  .fig01a-row {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .3rem 1.5rem;
  }
  .fig01a-row .fig01a-note { grid-column: 1 / -1; }
}

/* Hairline range control: a precise slider, not a chunky UI element */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 5rem;
  height: 16px;
  background: transparent;
  cursor: pointer;
}
.calc-range::-webkit-slider-runnable-track {
  height: 1px; background: var(--line-dark);
}
.calc-range::-moz-range-track { height: 1px; background: var(--line-dark); }
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px;
  margin-top: -5px;
  background: var(--green);
  border: 0;
  transition: transform var(--dur) var(--ease-out);
}
.calc-range::-moz-range-thumb {
  width: 11px; height: 11px;
  background: var(--green);
  border: 0; border-radius: 0;
}
.calc-range:active::-webkit-slider-thumb { transform: scale(1.25); }

.calc-output {
  display: grid;
  gap: .35rem;
  padding: clamp(1.25rem, 3.5vw, 1.75rem) clamp(1rem, 3vw, 1.5rem) .75rem;
}
.calc-figure {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.015em;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.calc-figure-caption {
  color: var(--ink-70);
  font-size: 1rem;
  max-width: 32rem;
}
/* Pounds hold attention, hours are the honest unit: same data, quieter voice */
.calc-hours {
  margin-top: .5rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink-70);
  font-variant-numeric: tabular-nums;
}

.calc-qualifier {
  margin-top: var(--space-2);
  padding: 0 clamp(1rem, 3vw, 1.5rem);
  max-width: 44rem;
  font-size: .84rem;
  line-height: 1.65;
  color: var(--ink-70);
}
.calc-foot {
  padding: 0 clamp(1rem, 3vw, 1.5rem) clamp(1.1rem, 3vw, 1.4rem);
}
.calc-foot a {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--ink-70);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease-out);
}
.calc-foot a:hover { color: var(--green); }

@media (min-width: 34em) {
  .calc-row {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .5rem 1.5rem;
  }
  .calc-control { justify-content: flex-end; min-width: 15rem; }
}

/* ---------- Definition strip ---------- */
.definition {
  border-block: 1px solid var(--line);
  background: var(--paper-deep);
  padding-block: var(--space-4);
}
.definition-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1rem;
  row-gap: .35rem;
  max-width: 60rem;
}
.definition-word {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
}
.definition-pron { color: var(--green); }
.definition-type { font-size: 1.05rem; color: var(--ink-70); }
.definition-meaning { font-size: 1.15rem; }
.definition-applied {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--green);
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section-tinted {
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
}

.section-head { margin-bottom: var(--section-head); }
.section-kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-3);
}
.section-kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-dark);
  opacity: .35;
}
.section-heading {
  font-family: var(--font-display);
  font-size: var(--size-h2);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.01em;
  max-width: 24ch;
  text-wrap: balance;
}
.section-heading em { color: var(--green); }
.section-standfirst {
  max-width: 40rem;
  margin-top: var(--space-3);
  font-size: 1.15rem;
  color: var(--ink-70);
}

/* ---------- 01 Method ---------- */
.method-list {
  display: grid;
  gap: var(--space-4);
  counter-reset: method;
}
.method-item {
  border-top: 1px solid var(--line-dark);
  padding-top: var(--space-3);
}
.method-num { color: var(--green); margin-bottom: var(--space-2); }
.method-title {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.method-item > p:last-child { color: var(--ink-70); max-width: 34rem; }

.removes { margin-top: var(--space-5); }
.removes-label { margin-bottom: var(--space-3); }
.removes-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.removes-list li { display: inline-flex; }

/* Each pill does two jobs: recognition on the surface, mechanism on interaction */
.pill {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-70);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .9rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}
.pill:hover,
.pill:focus-visible { border-color: var(--green); color: var(--green); }
.pill[aria-expanded="true"] {
  border-color: var(--green);
  color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

/* Quiet readout beneath the cloud: shows the hovered/tapped pill's mechanism.
   Space is reserved so revealing text never shifts the layout. */
.removes-readout {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  min-height: 6.2em;          /* reserves space so a reveal never shifts layout */
  max-width: 46rem;
  font-size: .98rem;
  line-height: 1.55;
  color: var(--ink-70);
  transition: opacity 180ms var(--ease-out);
}
/* Reveals wrap to fewer lines on wider screens, so less space is needed there */
@media (min-width: 45em) {
  .removes-readout { min-height: 4.2em; }
}
.removes-readout.is-prompt { font-style: italic; }
.removes-readout .ra { color: var(--green); padding: 0 .1em; }

/* Pills arrive one at a time, 50ms apart: ledger entries, not a block paste */
@media (prefers-reduced-motion: no-preference) {
  .js .removes.reveal .removes-list li {
    opacity: 0;
    transform: translateY(6px);
    transition:
      opacity 450ms var(--ease-out) var(--pill-delay, 0ms),
      transform 450ms var(--ease-out) var(--pill-delay, 0ms);
  }
  .js .removes.reveal.is-visible .removes-list li {
    opacity: 1;
    transform: none;
  }
  .removes-list li:nth-child(2) { --pill-delay: 50ms; }
  .removes-list li:nth-child(3) { --pill-delay: 100ms; }
  .removes-list li:nth-child(4) { --pill-delay: 150ms; }
  .removes-list li:nth-child(5) { --pill-delay: 200ms; }
  .removes-list li:nth-child(6) { --pill-delay: 250ms; }
  .removes-list li:nth-child(7) { --pill-delay: 300ms; }
  .removes-list li:nth-child(8) { --pill-delay: 350ms; }
}

/* ---------- 02 Principles (spec sheet) ---------- */
.spec-list { display: grid; }
.spec-item {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line-dark);
}
.spec-list .spec-item:last-child { border-bottom: 1px solid var(--line-dark); }
.spec-item dt {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.spec-ref { color: var(--green); }
.spec-item dd { color: var(--ink-70); max-width: 38rem; }

/* Sec. 02: the spec-sheet rules rule themselves in as each row arrives,
   a ledger being drawn up line by line, left to right. */
@media (prefers-reduced-motion: no-preference) {
  .js .spec-item.reveal { position: relative; border-top-color: transparent; }
  .js .spec-list .spec-item.reveal:last-child { border-bottom-color: transparent; }

  .js .spec-item.reveal::before,
  .js .spec-list .spec-item.reveal:last-child::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--line-dark);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 750ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 120ms);
  }
  .js .spec-item.reveal::before { top: 0; }
  .js .spec-list .spec-item.reveal:last-child::after {
    bottom: 0;
    transition-delay: calc(var(--reveal-delay, 0ms) + 260ms);
  }
  .js .spec-item.reveal.is-visible::before,
  .js .spec-list .spec-item.reveal.is-visible:last-child::after { transform: scaleX(1); }
}

/* ---------- 03 The person ---------- */
.founder-grid {
  display: grid;
  gap: var(--space-5);
}
.founder-bio { display: grid; gap: var(--space-2); max-width: 36rem; }
.founder-bio p + p { text-indent: 0; }

/* Single founder note: the only first-person voice on the page */
.founder-note {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--line-dark);
  max-width: 36rem;
}
.founder-note p {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, .5vw + 1.05rem, 1.4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
}
.founder-note-sign {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .35rem .9rem;
  margin-top: var(--space-2);
}
.founder-sig {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--green);
}

.founder-figure { max-width: 26rem; }
.portrait-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  position: relative;
}
.portrait-frame svg, .portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait-caption { margin-top: var(--space-1); }

/* Fig. 02: contour lines survey themselves in, lowest first, once, on entry */
@media (prefers-reduced-motion: no-preference) {
  .js .founder-figure.reveal .portrait-frame path {
    stroke-dasharray: 640;
    stroke-dashoffset: 640;
    transition: stroke-dashoffset 1500ms var(--ease-out) var(--contour-delay, 200ms);
  }
  .js .founder-figure.reveal.is-visible .portrait-frame path { stroke-dashoffset: 0; }
  .portrait-frame path:nth-of-type(2) { --contour-delay: 270ms; }
  .portrait-frame path:nth-of-type(3) { --contour-delay: 340ms; }
  .portrait-frame path:nth-of-type(4) { --contour-delay: 410ms; }
  .portrait-frame path:nth-of-type(5) { --contour-delay: 480ms; }
  .portrait-frame path:nth-of-type(6) { --contour-delay: 550ms; }
  .portrait-frame path:nth-of-type(7) { --contour-delay: 620ms; }
  .portrait-frame path:nth-of-type(8) { --contour-delay: 690ms; }
}

.title-block {
  margin-top: var(--space-3);
  border: 1px solid var(--line-dark);
  display: grid;
}
.title-block > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  border-top: 1px solid var(--line);
}
.title-block > div:first-child { border-top: 0; }
.title-block dt {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-70);
  padding: .6rem .75rem;
  border-right: 1px solid var(--line);
}
.title-block dd {
  font-size: .95rem;
  padding: .55rem .75rem;
}

/* ---------- 04 Engagement ---------- */
.stages {
  display: grid;
  gap: var(--space-4);
  position: relative;
}
.stage {
  position: relative;
  padding-left: 2.1rem;
}
.stage::before {
  content: "";
  position: absolute;
  left: .45rem;
  top: .5rem;
  bottom: calc(-1 * var(--space-4));
  width: 1px;
  background: var(--line-dark);
  opacity: .3;
}
.stage:last-child::before { display: none; }
.stage::after {
  content: "";
  position: absolute;
  left: 0;
  top: .35rem;
  width: .95rem;
  height: .95rem;
  border: 1.5px solid var(--green);
  background: var(--paper-deep);
  transform: rotate(45deg);
}
/* The stage marker sets itself like a compass point, just after its text */
@media (prefers-reduced-motion: no-preference) {
  .js .stage.reveal::after {
    transform: rotate(45deg) scale(0);
    transition: transform 500ms var(--ease-out) calc(var(--reveal-delay, 0ms) + 200ms);
  }
  .js .stage.reveal.is-visible::after { transform: rotate(45deg) scale(1); }
}

.stage-num { color: var(--green); margin-bottom: .4rem; }
.stage-title {
  font-family: var(--font-display);
  font-size: var(--size-h3);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.stage p:last-child { color: var(--ink-70); max-width: 36rem; }

/* ---------- 05 Questions ---------- */
.faq { border-top: 1px solid var(--line-dark); }
.faq-item { border-bottom: 1px solid var(--line-dark); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 1.15rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease-out);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--green); }
.faq-marker {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}
.faq-marker::before, .faq-marker::after {
  content: "";
  position: absolute;
  background: var(--green);
  transition: transform var(--dur) var(--ease-out);
}
.faq-marker::before { left: 0; top: 6.25px; width: 14px; height: 1.5px; }
.faq-marker::after  { left: 6.25px; top: 0; width: 1.5px; height: 14px; }
.faq-item[open] .faq-marker::after { transform: scaleY(0); }
.faq-body { padding-bottom: var(--space-3); }
.faq-body p { color: var(--ink-70); max-width: 44rem; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-body { animation: faq-in .35s var(--ease-out); }
}
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  --contact-line: color-mix(in srgb, var(--paper) 22%, transparent);
}
.contact .mono-label { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); }
.contact .section-kicker::after { background: var(--paper); opacity: .3; }
.contact .section-heading em { color: var(--sage); }
.contact .section-standfirst { color: color-mix(in srgb, var(--paper) 78%, var(--ink)); }

/* Balanced two-pane ledger box: email left, quote request right */
.contact-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--contact-line);
}
.contact-primary,
.contact-form {
  padding: clamp(1.5rem, 4.5vw, 2.5rem);
}
.contact-primary {
  border-bottom: 1px solid var(--contact-line);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.contact-col-label { margin-bottom: var(--space-3); }

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw + .6rem, 2.3rem);
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
  background-image: linear-gradient(var(--sage), var(--sage));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: left bottom;
  transition: color var(--dur) var(--ease-out);
}
.contact-email:hover { color: var(--sage); }
.contact-form { max-width: none; }

.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--size-mono);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 72%, var(--ink));
  margin-bottom: .55rem;
}
.field input, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: .7rem .9rem;
  background: color-mix(in srgb, var(--paper) 6%, var(--ink));
  border: 1px solid color-mix(in srgb, var(--paper) 30%, var(--ink));
  border-radius: 0;
  color: var(--paper);
  font-family: var(--font-text);
  font-size: 1.05rem;
  transition: border-color var(--dur) var(--ease-out);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage);
}
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #E0A9A0;
}
.field-hint, .field-error {
  margin-top: .5rem;
  font-size: .9rem;
  line-height: 1.5;
}
.field-hint { color: color-mix(in srgb, var(--paper) 74%, var(--ink)); font-style: italic; }
.field-error { color: #E8B7AE; }

.contact .btn-primary {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--ink);
}
.contact .btn-primary:hover { background: var(--paper); border-color: var(--paper); }

.form-status {
  margin-top: var(--space-2);
  min-height: 1.5em;
  font-size: .95rem;
  font-style: italic;
  color: var(--sage);
}
.form-status.is-error { color: #E8B7AE; font-style: normal; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-5) var(--space-4);
}
.footer-grid { display: grid; gap: var(--space-4); }
.footer-mark { display: block; margin-bottom: .85rem; }
.footer-wordmark { font-size: 1.15rem; font-weight: 600; }
.footer-wordmark em { font-style: italic; font-weight: 400; color: var(--green); margin-left: .28rem; }
.footer-line { margin-top: .5rem; color: var(--ink-70); font-size: 1rem; }
.footer-conservation { color: var(--green); }

.footer-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer-nav a {
  display: inline-block;
  padding: .5rem 0;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-70);
  transition: color var(--dur) var(--ease-out);
}
.footer-nav a:hover { color: var(--green); }

.footer-meta { display: grid; gap: .5rem; }

/* ==========================================================================
   BREAKPOINTS · mobile-first
   ========================================================================== */

/* ---------- ≥ 720px ---------- */
@media (min-width: 45em) {
  :root { --size-mono: .74rem; }

  .br-desktop { display: inline; }

  .process-svg-wide { display: block; }
  .process-svg-tall { display: none; }

  .method-list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4) var(--space-3);
  }

  .spec-item {
    grid-template-columns: minmax(16rem, 22rem) 1fr;
    gap: var(--space-4);
    align-items: start;
  }

  .stages {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5) var(--space-4);
  }
  .stage { padding-left: 2.3rem; }
  .stage::before { display: none; }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .contact-primary {
    border-bottom: 0;
    border-right: 1px solid var(--contact-line);
    justify-content: center;
  }
  .contact-primary .contact-col-label { margin-bottom: var(--space-4); }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
  .footer-meta { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: var(--space-3); }
}

/* ---------- ≥ 1080px ---------- */
@media (min-width: 67.5em) {
  .nav-list { display: flex; }
  .nav-toggle { display: none; }

  .hero { padding-top: clamp(4rem, 10vh, 7.5rem); }

  .founder-grid {
    grid-template-columns: 1.25fr 1fr;
    gap: var(--space-6);
    align-items: start;
  }
  .founder-figure { justify-self: end; width: 100%; }

  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-meta { grid-column: auto; border-top: 0; padding-top: 0; justify-self: end; text-align: right; }
}
