/* Enroot Capital — brand tokens */
:root {
  --pine: #1B3A2A;
  --pine-deep: #122619;
  --field: #5E8A66;
  --field-light: #C9D8CB;
  --chalk: #EEF0EA;
  --chalk-deep: #E2E5DC;
  --brass: #B8892E;
  --ink: #1F2622;
  --ink-soft: #4A554E;
  --white: #FBFBF9;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --measure: 65ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section: clamp(4rem, 10vw, 8rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--chalk);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

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

/* Type scale — Elements of Typographic Style ratios */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 0.6em;
  color: var(--pine);
}
h1 { font-size: clamp(2.5rem, 7vw, 5.25rem); max-width: 18ch; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 22ch; }
h3 { font-size: 1.35rem; line-height: 1.25; font-variation-settings: "opsz" 48, "SOFT" 30; }
p { margin: 0 0 1.1em; max-width: var(--measure); }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.5; color: var(--ink-soft); }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
section { padding-block: var(--section); }
section + section { padding-top: 0; }
.survey, .band, .survey + section, .band + section { padding-top: var(--section); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--chalk) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--chalk-deep);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: 1.55rem;
  text-decoration: none; color: var(--pine); letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.wordmark .mark { width: 30px; height: 35px; flex: none; }
.wordmark .wm-sub { font-family: var(--body); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--field); margin-left: 0.15rem; align-self: center; padding-top: 0.2rem; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-size: 0.97rem; color: var(--ink-soft); }
.nav a:hover { color: var(--pine); }
.nav .quiet { color: var(--ink-soft); }
.nav .btn { color: var(--white); }
.nav .btn:hover { color: var(--white); }
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--body); font-weight: 500; font-size: 0.97rem;
  padding: 0.7rem 1.15rem; border-radius: 4px; border: 1.5px solid var(--pine);
  background: var(--pine); color: var(--white);
  transition: background 120ms ease;
}
.btn:hover { background: var(--pine-deep); }
.btn.ghost { background: transparent; color: var(--pine); }
.btn.ghost:hover { background: var(--chalk-deep); }
.menu-toggle { display: none; background: none; border: 1.5px solid var(--pine); border-radius: 4px; padding: 0.45rem 0.7rem; font: inherit; color: var(--pine); cursor: pointer; }

/* Hero */
.hero { padding-top: clamp(3.5rem, 9vw, 7rem); }
.hero .kicker { color: var(--field); font-weight: 500; margin-bottom: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-note { margin-top: 2.25rem; color: var(--ink-soft); font-size: 0.95rem; max-width: 52ch; }

/* Survey line — the instrument */
.survey { background: var(--pine); color: var(--chalk); }
.survey h2 { color: var(--chalk); }
.survey p { color: color-mix(in srgb, var(--chalk) 82%, transparent); }
.survey .lede { color: color-mix(in srgb, var(--chalk) 82%, transparent); }
.survey-figure { margin: 2.5rem 0 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.survey-figure svg { min-width: 760px; width: 100%; }
.survey-figure text { font-family: var(--body); }
.survey-figure .label { fill: var(--chalk); font-size: 15px; font-weight: 500; }
.survey-figure .sub { fill: color-mix(in srgb, var(--chalk) 70%, transparent); font-size: 13px; }
.survey-figure .baseline { stroke: color-mix(in srgb, var(--chalk) 35%, transparent); stroke-width: 1.5; }
.survey-figure .ground { stroke: var(--chalk); stroke-width: 2.5; fill: none; }
.survey-figure .ground.owner { stroke: var(--brass); }
.survey-figure .pin { fill: var(--brass); stroke: var(--pine); stroke-width: 3; }
.survey-figure .tick { stroke: var(--brass); stroke-width: 2; }
.survey-legend { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 1.5rem; font-size: 0.95rem; }
.survey-legend span::before { content: ""; display: inline-block; width: 1.6rem; height: 3px; vertical-align: middle; margin-right: 0.55rem; background: var(--chalk); }
.survey-legend span.owner::before { background: var(--brass); }

/* Stacked milestones (mobile only) */
.survey-steps { display: none; list-style: none; padding: 0; margin: 2rem 0 0; }
.survey-steps li { position: relative; padding: 0 0 1.5rem 1.75rem; }
.survey-steps li::before { content: ""; position: absolute; left: 0.3rem; top: 0.45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 3px var(--pine); z-index: 1; }
.survey-steps li::after { content: ""; position: absolute; left: calc(0.3rem + 4px); top: 0.9rem; bottom: -0.2rem; width: 2px; background: color-mix(in srgb, var(--chalk) 35%, transparent); }
.survey-steps li:last-child::after { display: none; }
.survey-steps li.owner::before { background: var(--brass); }
.survey-steps li.owner::after { display: none; }
.survey-steps strong { display: block; color: var(--chalk); font-weight: 500; }
.survey-steps span { font-size: 0.93rem; color: color-mix(in srgb, var(--chalk) 70%, transparent); }

/* Terms grid */
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 2.5rem; margin-top: 2.5rem; }
.term { padding: 1.5rem 0; border-top: 1px solid color-mix(in srgb, var(--chalk) 25%, transparent); }
.term strong { display: block; font-family: var(--display); font-weight: 500; font-size: 1.45rem; margin-bottom: 0.35rem; color: var(--chalk); }
.term p { font-size: 0.97rem; margin: 0; }

/* Criteria list */
.criteria { list-style: none; padding: 0; margin: 2rem 0 0; max-width: 62ch; }
.criteria li { padding: 1.15rem 0 1.15rem 2rem; border-top: 1px solid var(--chalk-deep); position: relative; }
.criteria li:last-child { border-bottom: 1px solid var(--chalk-deep); }
.criteria li::before { content: ""; position: absolute; left: 0.35rem; top: 1.65rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brass); }
.criteria strong { display: block; font-weight: 600; color: var(--pine); margin-bottom: 0.2rem; }
.criteria p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }

/* Resources */
.resources { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem 3rem; margin-top: 2.5rem; }
.resource h3 { margin-bottom: 0.4rem; }
.resource p { font-size: 0.98rem; color: var(--ink-soft); margin: 0; }

/* Two-column prose split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3rem; align-items: start; }
.split h2 { position: sticky; top: 5.5rem; }

/* Process (a real sequence — numbering earned) */
.process { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: 62ch; }
.process li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--chalk-deep); }
.process li::before { content: counter(step); font-family: var(--display); font-size: 1.6rem; color: var(--brass); line-height: 1; padding-top: 0.15rem; }
.process strong { display: block; color: var(--pine); font-weight: 600; margin-bottom: 0.2rem; }
.process p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); grid-column: 2; }

/* FAQ */
.faq details { border-top: 1px solid var(--chalk-deep); max-width: 68ch; }
.faq details:last-of-type { border-bottom: 1px solid var(--chalk-deep); }
.faq summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 500; color: var(--pine); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.95rem; font-family: var(--display); font-size: 1.5rem; color: var(--brass); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.1rem; color: var(--ink-soft); font-size: 0.98rem; }

/* GP block */
.gp { display: grid; grid-template-columns: 160px 1fr; gap: 2.5rem; align-items: start; max-width: 60rem; }
.gp .portrait { width: 160px; aspect-ratio: 4/5; background: var(--field-light); border-radius: 3px; display: grid; place-items: center; color: var(--pine); font-family: var(--display); font-size: 3rem; }
.gp p { font-size: 1rem; }
.gp .origin { font-size: 0.95rem; color: var(--ink-soft); border-left: 3px solid var(--brass); padding-left: 1rem; }

/* Closing band */
.band { background: var(--pine-deep); color: var(--chalk); }
.band h2 { color: var(--chalk); }
.band p { color: color-mix(in srgb, var(--chalk) 80%, transparent); }
.band .btn { background: var(--brass); border-color: var(--brass); color: var(--pine-deep); }
.band .btn:hover { background: #CDA046; }
.band .btn.ghost { background: transparent; color: var(--chalk); border-color: color-mix(in srgb, var(--chalk) 55%, transparent); }
.band .btn.ghost:hover { background: color-mix(in srgb, var(--chalk) 10%, transparent); }

/* Footer */
.site-footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--chalk-deep); font-size: 0.92rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--pine); text-decoration: underline; }

/* Auth pages */
.auth { min-height: calc(100vh - 4.25rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--pine); color: var(--chalk); padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { color: var(--chalk); font-size: clamp(2rem, 4.5vw, 3.4rem); max-width: 14ch; }
.auth-side p { color: color-mix(in srgb, var(--chalk) 80%, transparent); }
.auth-side .fine { font-size: 0.9rem; }
.auth-form { padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); display: flex; align-items: center; }
.auth-form form { width: min(26rem, 100%); }
.auth-form h2 { font-size: 1.9rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: 0.92rem; font-weight: 500; margin-bottom: 0.35rem; color: var(--pine); }
.field input { width: 100%; font: inherit; padding: 0.75rem 0.85rem; border: 1.5px solid var(--field-light); border-radius: 4px; background: var(--white); color: var(--ink); }
.field input:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 35%, transparent); }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0.5rem 0 1.25rem; font-size: 0.92rem; }
.form-row a { color: var(--ink-soft); }
.btn.block { width: 100%; text-align: center; padding: 0.85rem; }
.form-note { margin-top: 1.25rem; font-size: 0.92rem; color: var(--ink-soft); }
.notice { display: none; margin-top: 1.1rem; padding: 0.9rem 1rem; border-left: 3px solid var(--brass); background: var(--white); font-size: 0.95rem; }
.notice.show { display: block; }

/* Responsive */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 1rem; }
  .split h2 { position: static; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-side { min-height: 40vh; }
  .gp { grid-template-columns: 1fr; gap: 1.25rem; }
  .gp .portrait { width: 120px; }
}
@media (max-width: 720px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 4.25rem; flex-direction: column; align-items: stretch; gap: 0; background: var(--chalk); border-bottom: 1px solid var(--chalk-deep); padding: 0.5rem var(--gutter) 1rem; }
  .nav.open { display: flex; }
  .nav-simple { display: flex; position: static; flex-direction: row; gap: 1.1rem; background: none; border: none; padding: 0; }
  .nav-simple a { padding: 0; border: none; font-size: 0.95rem; }
  .nav a { padding: 0.8rem 0; border-top: 1px solid var(--chalk-deep); font-size: 1.05rem; }
  .nav .btn { margin-top: 0.75rem; text-align: center; border-top: none; }
  .terms { grid-template-columns: 1fr; }
  .survey-figure { display: none; }
  .survey-steps { display: block; }
  h1 { max-width: none; }
}
