/* ── Tokens ─────────────────────────────────────────────────────────────
   Light is the base. The company itself is achromatic; the only hues on
   the page belong to the three products.                                */
:root {
  --playa:        #e8e9e7;   /* page ground — alkali flat, cool grey     */
  --salt:         #f4f4f2;   /* raised surface                           */
  --basalt:       #191c1f;   /* ink                                      */
  --shade:        #585d63;   /* secondary text                           */
  --line:         #d2d4d0;   /* hairline                                 */
  --line-strong:  #b4b7b2;   /* rules that need to read                  */

  /* Each product's own accent, darkened on this ground to clear 4.5:1.
     WellKept's brand book says the same: safety yellow is never a fill
     behind text, because it fails contrast.                             */
  --wk:           #7d5900;   /* WellKept safety yellow  → 5.22:1         */
  --lr:           #1d4ed8;   /* Ludus Ready blue        → 5.50:1         */
  --yv:           #35683f;   /* Yolovial mint           → 5.38:1         */

  --sheet:  min(1180px, 100% - 3rem);
  --rail:   132px;

  --serif:  "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:   system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:   ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --playa:       #131619;
    --salt:        #1a1e22;
    --basalt:      #e9e8e3;
    --shade:       #979da3;
    --line:        #282d32;
    --line-strong: #3d444b;

    --wk:          #f5b800;
    --lr:          #7aa9ff;
    --yv:          #9fd4a3;
  }
}
:root[data-theme="dark"] {
  --playa:       #131619;
  --salt:        #1a1e22;
  --basalt:      #e9e8e3;
  --shade:       #979da3;
  --line:        #282d32;
  --line-strong: #3d444b;

  --wk:          #f5b800;
  --lr:          #7aa9ff;
  --yv:          #9fd4a3;
}

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

body {
  margin: 0;
  background: var(--playa);
  color: var(--basalt);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

svg { display: block; }

/* ── Survey rail ────────────────────────────────────────────────────────
   Each band is a two-column grid: a marginal label in the rail, content
   to its right. The rail's hairline is the page's spine.               */
.band {
  width: var(--sheet);
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: 2.5rem;
}

.tag {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shade);
  padding-top: 0.5rem;
  border-top: 1px solid var(--line-strong);
  align-self: start;
  position: sticky;
  top: 2rem;
}

.body-col { grid-column: 2; min-width: 0; }

/* ── Masthead ──────────────────────────────────────────────────────── */
.masthead {
  padding-block: 1.5rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
}

.brand svg { width: 30px; height: 30px; color: var(--basalt); }

.nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav a {
  color: var(--shade);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--basalt); border-bottom-color: var(--basalt); }

/* ── Hero ──────────────────────────────────────────────────────────── */
.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4.5rem); }

.thesis {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 6.4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 1.75rem;
  max-width: 15ch;
}

.standfirst {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.6;
  color: var(--shade);
  max-width: 58ch;
  margin: 0;
}
.standfirst strong { color: var(--basalt); font-weight: 600; }

/* Drawing title block — real metadata, set like a drawing sheet. */
.titleblock {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line-strong);
  background: var(--salt);
}

.tb-cell {
  padding: 0.875rem 1.125rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.tb-cell:last-child { border-right: 0; }

.tb-key {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shade);
}
.tb-val {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

/* ── Elevation profile divider ──────────────────────────────────────────
   A section through basin and range: filled terrain, a dashed basin
   floor, and survey ticks along the baseline.                          */
.profile-rule {
  width: var(--sheet);
  margin-inline: auto;
  color: var(--line-strong);
}
.profile-rule svg { width: 100%; height: 78px; }
.profile-rule .terrain {
  fill: currentColor;
  fill-opacity: 0.09;
  stroke: none;
}
.profile-rule .ridge {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.profile-rule .floor {
  stroke: currentColor;
  stroke-width: 1;
  stroke-dasharray: 2 5;
  opacity: 0.8;
}
.profile-rule .ticks {
  stroke: currentColor;
  stroke-width: 1;
  opacity: 0.55;
}

/* ── The work ──────────────────────────────────────────────────────── */
.work { padding-block: clamp(2.5rem, 6vw, 4rem); }

.section-head {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--shade);
  max-width: 62ch;
  margin: 0 0 3rem;
}

.ranges { display: flex; flex-direction: column; gap: 0; }

.range {
  --accent: var(--basalt);
  padding-block: 3.25rem;
  border-top: 1px solid var(--line);
}
.range:first-child { border-top: 0; padding-top: 0.5rem; }

.range-wk { --accent: var(--wk); }
.range-lr { --accent: var(--lr); }
.range-yv { --accent: var(--yv); }

/* Head — glyph, name, domain, status on one baseline. */
.range-head {
  display: flex;
  align-items: baseline;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.glyph { color: var(--accent); align-self: center; flex: none; }
.glyph svg { width: 64px; height: 32px; }
.glyph polyline, .glyph line, .glyph path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.glyph circle { fill: currentColor; stroke: none; }

.range-name {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 3.6vw, 2.625rem);
  font-weight: 400;
  letter-spacing: -0.024em;
  line-height: 1;
  margin: 0;
}

/* Leader rule carrying the eye from the name out to the address. */
.leader {
  flex: 1 1 2rem;
  min-width: 1.5rem;
  height: 1px;
  background: var(--line);
  align-self: center;
  position: relative;
  top: -0.15em;
}

/* Body — marginalia on the left, the argument on the right. */
.range-body {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  column-gap: 3rem;
  align-items: start;
  margin-top: 1.75rem;
}
.range-aside { grid-column: 1; display: flex; flex-direction: column; gap: 1.5rem; }
.range-prose { grid-column: 2; max-width: 64ch; }

.domain {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: 1px;
}
.domain:hover { border-bottom-color: var(--accent); }

.status {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shade);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex: none;
}
.status-planned::before { background: transparent; box-shadow: inset 0 0 0 1px var(--shade); }

.tagline {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.9vw, 1.3125rem);
  font-style: italic;
  color: var(--basalt);
  margin: 0;
  max-width: 48ch;
}

.range-prose p { margin: 0 0 1rem; color: var(--shade); }
.range-prose p:last-child { margin-bottom: 0; }
.range-prose strong { color: var(--basalt); font-weight: 600; }

/* The line each product refuses to cross, in its own words. */
.rule-quote {
  margin: 0;
  padding: 0.1rem 0 0.1rem 1.125rem;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.rule-quote p { margin: 0; color: var(--basalt); }
.rule-quote cite {
  display: block;
  margin-top: 0.625rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--shade);
}

/* Parts list, set like a drawing's. */
.spec { display: flex; flex-direction: column; gap: 0.3rem; }
.spec-key {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--shade);
  padding-bottom: 0.55rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
}
.spec span:not(.spec-key) {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--shade);
}

/* ── Approach ──────────────────────────────────────────────────────── */
.approach { padding-block: clamp(3rem, 7vw, 5rem); }

.tenets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line-strong);
}

.tenet {
  padding: 1.75rem 1.5rem 1.75rem 0;
  border-bottom: 1px solid var(--line);
}
.tenet h3 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.005em;
  margin: 0 0 0.5rem;
}
.tenet p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--shade);
  max-width: 44ch;
}

/* ── Practice ──────────────────────────────────────────────────────── */
.practice { padding-block: clamp(2.5rem, 6vw, 4rem); }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem 2.5rem;
  margin-top: 2rem;
}
.stack-grid h3 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--shade);
  margin: 0 0 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  /* Two lines' worth, so every rule in the row lands on the same baseline. */
  min-height: 3.4em;
  display: flex;
  align-items: flex-end;
}
.stack-grid p { margin: 0; font-size: 0.9375rem; }

/* ── Contact ───────────────────────────────────────────────────────── */
.contact { padding-block: clamp(3rem, 7vw, 5rem); }

.contact-lead {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}

.contact p { color: var(--shade); max-width: 54ch; margin: 0 0 2rem; }

.mailto {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1.0625rem;
  text-decoration: none;
  color: var(--basalt);
  border-bottom: 2px solid var(--line-strong);
  padding-bottom: 3px;
}
.mailto:hover { border-bottom-color: var(--basalt); }

/* ── Colophon ──────────────────────────────────────────────────────── */
.colophon {
  border-top: 1px solid var(--line);
  padding-block: 2rem 3rem;
  margin-top: 2rem;
}
.colophon .body-col {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--shade);
}
.colophon p { margin: 0; }

/* ── Load sequence ─────────────────────────────────────────────────── */
.draw {
  stroke-dasharray: var(--len, 2000);
  stroke-dashoffset: var(--len, 2000);
  animation: draw 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .draw { animation: none; stroke-dashoffset: 0; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ── Narrow ────────────────────────────────────────────────────────── */
@media (max-width: 1040px) {
  .range-body {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.75rem;
  }
  .range-aside,
  .range-prose { grid-column: 1; }
  .range-prose { max-width: 68ch; }
  /* The argument reads before the marginalia once they stack. */
  .range-prose { order: 1; }
  .range-aside { order: 2; }
}

@media (max-width: 860px) {
  :root { --sheet: min(1180px, 100% - 2rem); }

  .band {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.75rem;
  }
  .tag {
    grid-column: 1;
    position: static;
    justify-self: start;
    padding-right: 2rem;
  }
  .body-col { grid-column: 1; }
  .wordmark { grid-column: 1; }

  .profile-rule svg { height: 56px; }
  .tenet { padding-right: 0; }
}

/* ── People ─────────────────────────────────────────────────────────────
   No photographs, so the entries carry themselves on type. Each person is
   a plate in the same drawing: rule, name, role, then the ground line.
   Deliberately achromatic — colour on this site belongs to the products. */
.people { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line-strong);
}

.person {
  padding: 2.25rem 2.5rem 2.25rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-start;
}

.person-glyph { color: var(--line-strong); }
.person-glyph svg { width: 56px; height: 26px; }
.person-glyph polyline, .person-glyph line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.person-name {
  font-family: var(--serif);
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  font-weight: 400;
  letter-spacing: -0.024em;
  line-height: 1;
  margin: 0;
}

.person-role {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shade);
  margin: 0;
}

.person-bio {
  margin: 0.25rem 0 0;
  color: var(--shade);
  font-size: 0.9375rem;
  max-width: 42ch;
}

@media (max-width: 860px) {
  .person { padding-right: 0; }
}

.person-mail {
  /* Pushed to the bottom of the cell so both addresses share a baseline
     even when the two bios differ in length. */
  margin-top: auto;
  padding-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--basalt);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.person-mail:hover { border-bottom-color: var(--basalt); }

/* ── Legal prose ────────────────────────────────────────────────────────
   Policy pages. Long-form reading, so a real measure and clear hierarchy;
   plain language, because a policy nobody can read protects nobody.     */
.legal { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem); }

.legal-meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shade);
  margin: 0 0 2rem;
}

.legal-lede {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.5;
  max-width: 54ch;
  margin: 0 0 2.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--line-strong);
}

.prose { max-width: 68ch; }

.prose h2 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.prose p { margin: 0 0 1rem; color: var(--shade); }
.prose strong { color: var(--basalt); font-weight: 600; }

.prose ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--shade); }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--line-strong); }

.prose code {
  font-family: var(--mono);
  font-size: 0.8125em;
  color: var(--basalt);
  background: var(--salt);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.1em 0.35em;
}

.prose a { color: var(--basalt); text-decoration: underline; text-underline-offset: 2px; }
