/* ==========================================================================
   Northing Labs — pages.css
   Shared subpage pattern (.page-hero, .legend) + services & process pages.
   Tokens only. Band-scoped vars (--bg, --panel, --fg, --fg-2, --rule, --ln)
   come from .band--dark / .band--light in base.css.
   ========================================================================== */

/* ---------- Band seams: two same-colour bands in a row get a drafting rule ---------- */
.band--dark + .band--dark,
.band--light + .band--light { border-top: 1px solid var(--rule); }
main:has(> .band--dark:last-child) + .band--dark { border-top: 1px solid var(--rule-dark); }

/* ---------- PAGE HERO (shared by every subpage) ---------- */
.page-hero {
  padding-top: clamp(128px, 15vw, 176px);
  padding-bottom: clamp(72px, 9vw, 128px);
}
.page-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  align-items: end;
}
.page-hero__copy { min-width: 0; }
.page-hero__title {
  margin-bottom: 28px;
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: .98;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}
.page-hero__lede {
  max-width: 52ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--fg-2);
}
.page-hero__aside { min-width: 0; align-self: end; }
@media (min-width: 1024px) {
  .page-hero__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; }
  .page-hero__aside { justify-self: end; width: 100%; max-width: 440px; }
}

/* ---------- LEGEND / SCHEDULE / CONTENTS box (bordered mono aside) ---------- */
.legend {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--fg);
}
/* drafting corner marks */
.legend::before,
.legend::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 0 solid var(--ln);
  pointer-events: none;
}
.legend::before { top: -5px; left: -5px; border-width: 1px 0 0 1px; }
.legend::after  { bottom: -5px; right: -5px; border-width: 0 1px 1px 0; }

.legend__title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--fg-2);
}
.legend__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.legend__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 14px;
  row-gap: 4px;
  padding: 16px 18px;
  border-top: 1px solid var(--rule);
  color: var(--fg);
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.legend__k { flex: none; min-width: 2.4em; color: var(--fg-2); transition: color .3s var(--ease-out); }
.legend__v { flex: 1 1 auto; min-width: 0; }
.legend__note { flex: none; text-align: right; font-size: 11px; letter-spacing: .1em; color: var(--fg-2); }
.legend__sym { flex: none; width: 44px; height: 12px; color: var(--ln); transition: color .3s var(--ease-out); }
.legend__sym svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.5; }
.legend__sym path, .legend__sym circle { vector-effect: non-scaling-stroke; }
.legend__go { flex: none; color: var(--fg-2); transition: color .3s var(--ease-out), transform .3s var(--ease-out); }
a.legend__row:hover,
a.legend__row:focus-visible { background: color-mix(in srgb, var(--signal) 8%, transparent); outline-offset: -2px; }
a.legend__row:hover .legend__sym, a.legend__row:focus-visible .legend__sym,
a.legend__row:hover .legend__go,  a.legend__row:focus-visible .legend__go { color: var(--signal); }
a.legend__row:hover .legend__go,  a.legend__row:focus-visible .legend__go { transform: translateY(2px); }
a.legend__row:hover .legend__k,   a.legend__row:focus-visible .legend__k { color: var(--fg); }
.band--light a.legend__row:hover .legend__sym, .band--light a.legend__row:focus-visible .legend__sym,
.band--light a.legend__row:hover .legend__go,  .band--light a.legend__row:focus-visible .legend__go { color: var(--signal-ink); }
@media (max-width: 479px) {
  .legend__row { padding: 14px 16px; }
  .legend__note { flex-basis: 100%; text-align: left; padding-left: calc(2.4em + 14px); }
}

/* ---------- shared small pieces ---------- */
.spec-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--fg-2);
}
.spec-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.tags--lg { gap: 10px; margin-top: 0; }
.tags--lg li {
  padding: 12px 18px;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--fg);
  background: var(--panel);
  transition: border-color .3s var(--ease-out), color .3s var(--ease-out);
}
.tags--lg li:hover { border-color: var(--ln); }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.section-head--label { margin-bottom: 0; }
.section-head--label .sheet-label { margin-bottom: 8px; }

/* Expanded ladder: text column grows, drawing rides along */
.ladder--full .rung { padding-block: clamp(56px, 7vw, 96px); }
.ladder--full .rung:first-child { padding-top: 40px; }
.ladder--full .rung:last-child { padding-bottom: 24px; }
.ladder--full .rung__title { font-size: clamp(30px, 3.6vw, 48px); max-width: 18ch; }
.ladder--full .rung__text > p:not([class]) { font-size: 18px; }
@media (min-width: 900px) {
  .ladder--full .rung__body { grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); align-items: start; }
  .ladder--full .rung__art { position: sticky; top: 112px; }
}

.spec-list { list-style: none; margin-top: 16px; border-top: 1px solid var(--rule); }
.spec-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-2);
}
.spec-list strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.spec-list span { display: block; max-width: 56ch; }

.fit-list { list-style: none; display: grid; gap: 12px; margin-top: 18px; }
.fit-list li {
  position: relative;
  padding-left: 32px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--fg-2);
}
.fit-list li::before {
  content: "";
  position: absolute;
  left: 3px; top: .38em;
  width: 12px; height: 6.5px;
  border-left: 1.5px solid var(--ln);
  border-bottom: 1.5px solid var(--ln);
  transform: rotate(-45deg);
  transition: border-color .6s var(--ease-out);
}
.rung.is-live .fit-list li::before { border-color: var(--signal); }

/* Included: six-cell drawing schedule (cells carry their own borders so a pre-reveal cell never shows a slab) */
.spec-grid,
.commit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 1px 1px 0;
  list-style: none;
}
.spec-grid > *,
.commit-grid > * {
  display: grid;
  gap: 12px;
  align-content: start;
  margin: 0 -1px -1px 0;
  border: 1px solid var(--rule);
  background: transparent;
  transition: background-color .4s var(--ease-out);
}
.spec-grid > *:hover,
.commit-grid > *:hover { background: var(--panel); }
@media (min-width: 640px) {
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) { .spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .commit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.spec-grid > * { padding: 28px 28px 36px; min-height: 220px; }
.spec-grid__no {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--signal-ink);
}
.spec-grid__no::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.spec-grid h3 { font-size: clamp(22px, 2vw, 26px); line-height: 1.12; }
.spec-grid p:not(.spec-grid__no) { font-size: 16px; line-height: 1.55; color: var(--fg-2); }

/* Connections */
.connect { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.connect .section-head { margin-bottom: 0; }
.connect__side { min-width: 0; }
.connect__note { max-width: 46ch; margin-top: 32px; font-size: 15.5px; line-height: 1.55; color: var(--fg-2); }
.connect__note::before {
  content: "NOTE";
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--fg-2);
}
@media (min-width: 1024px) {
  .connect { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
  .connect__side { padding-top: 52px; }
}

/* ==========================================================================
   PROCESS
   ========================================================================== */
/* Vertical sequence at every width. The wire runs node-to-node; motion.js fits it. */
.process--detailed { margin-top: 0; }
.process--detailed .process__wire {
  top: 7px; bottom: 0;
  left: 6px; right: auto;
  width: 2px; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 96px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 96px), transparent);
}
.process--detailed.is-fitted .process__wire { -webkit-mask-image: none; mask-image: none; }
.process--detailed .process__wire-fill { transform-origin: top; transform: scaleY(1); }
html.js:not(.reduce-motion) .process--detailed .process__wire-fill { transform: scaleY(0); }

.process--detailed .process__steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(56px, 7vw, 96px);
}
.process--detailed .process__step { padding-left: 48px; }
.process--detailed .process__node { position: absolute; display: block; }
.process--detailed .process__node::after {
  content: "";
  position: absolute;
  left: 100%; top: 50%;
  width: 22px; height: 1px;
  background: var(--rule-dark);
  transition: background-color .5s var(--ease-out);
}
.process--detailed .process__step.is-live .process__node::after { background: color-mix(in srgb, var(--signal) 55%, var(--rule-dark)); }

.process--detailed .process__step .process__no {
  margin: 0 0 18px;
  font-size: 12px;
  line-height: 14px;
}
.process--detailed .process__step h2 {
  margin-bottom: 8px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.04;
}
.process--detailed .process__step .process__sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--fg);
}
.process--detailed .process__step .process__body {
  max-width: 54ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg-2);
}
.process__main { margin-top: 28px; min-width: 0; }

.step-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 32px;
  max-width: 720px;
  border: 1px solid var(--rule);
  background: var(--panel);
}
.step-table > div { padding: 18px 20px 20px; }
.step-table > div + div { border-top: 1px solid var(--rule); }
.step-table dt {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color .5s var(--ease-out);
}
.process__step.is-live .step-table > div:first-child dt { color: var(--signal); }
.step-table dd { font-size: 15.5px; line-height: 1.5; color: var(--fg); }
@media (min-width: 640px) {
  .step-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-table > div + div { border-top: 0; border-left: 1px solid var(--rule); }
}

@media (min-width: 1024px) {
  .process--detailed .process__step {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: 56px;
    align-items: start;
    padding-left: 104px;
  }
  .process--detailed .process__node::after { width: 56px; }
  .process__main { margin-top: 0; padding-top: 2px; }
  .step-table { margin-top: 36px; }
}

/* Commitments */
.commit-grid > * { padding: 32px 28px 36px; gap: 10px; }
.commit-grid__fig {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(30px, 3.1vw, 42px);
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--fg);
  white-space: nowrap;
}
.commit-grid__fig::after {
  content: "";
  display: block;
  width: 28px; height: 2px;
  margin-top: 18px;
  background: var(--signal-ink);
}
.commit-grid h3 { font-size: 20px; line-height: 1.2; }
.commit-grid p:not(.commit-grid__fig) { font-size: 16px; line-height: 1.55; color: var(--fg-2); }

.note-panel {
  margin-top: 28px;
  padding: clamp(24px, 3.4vw, 40px);
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--signal-ink);
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg-2);
}
.note-panel strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: -0.02em;
  color: var(--fg);
}
.note-panel p { max-width: 74ch; }

/* Offer band: one panel, tighter vertical padding */
.offer-band { padding-block: clamp(72px, 9vw, 128px); }
.offer-band .offer { margin-top: 0; }
