/* ==========================================================================
   Portech Solutions — design system
   Ported from the Claude Design project "Portech Components Sheet".
   Achromatic throughout. One functional red, in form validation only.
   ========================================================================== */

/* --- 00 Fonts ------------------------------------------------------------- */
/* Self-hosted. The first paint used to wait on two cross-origin round trips —
   fonts.googleapis.com for the stylesheet, then fonts.gstatic.com for the files
   — and the LCP element is the hero <h1>, so it waited on Jost. Latin subset,
   straight from Google Fonts; both families are OFL. Jost and IBM Plex Sans are
   variable and cover 300-400 from one file each. */

@font-face {
  font-family: Jost;
  src: url("/assets/fonts/jost-latin-var.woff2") format("woff2");
  font-weight: 300 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-var.woff2") format("woff2");
  font-weight: 300 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* --- 01 Palette + tokens -------------------------------------------------- */

:root {
  /* Palette — fully achromatic. */
  --ink:      #0F1315;
  --graphite: #2B3235;
  --steel:    #596266;
  --zinc:     #9AA3A7;
  --mist:     #C9CFD1;
  --bone:     #F1F3F3;
  --error:    #C1121F; /* validation only — never decorative */

  /* Type */
  --font-head: Jost, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Grid and spacing — 8px base */
  --content:   1408px; /* 1280 content + 2 x 64 margin */
  --margin:    64px;
  --gutter:    24px;
  --section:   160px;
  --nav-h:     88px;

  /* Motion — three motions exist, nothing else moves */
  --t-nav:   200ms ease-out;
  --t-hover: 200ms ease-out;
  --t-enter: 400ms ease-out;
}

@media (max-width: 900px) {
  :root {
    --margin:  24px;
    --section: 88px;
    --nav-h:   72px;
  }
}

/* --- Reset ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, figure { margin: 0; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bone);
  padding: 16px 24px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* --- 02 Type scale -------------------------------------------------------- */

.t-display {
  font-family: var(--font-head); font-weight: 300;
  font-size: 72px; line-height: 1.05; letter-spacing: -0.02em;
  text-wrap: pretty;
}
.t-h1 {
  font-family: var(--font-head); font-weight: 300;
  font-size: 48px; line-height: 1.10; letter-spacing: -0.01em;
  text-wrap: pretty;
}
.t-h2 {
  font-family: var(--font-head); font-weight: 300;
  font-size: 32px; line-height: 1.20; text-wrap: pretty;
}
.t-h3 {
  font-family: var(--font-head); font-weight: 400;
  font-size: 21px; line-height: 1.35;
}
.t-lead   { font-size: 19px; line-height: 1.65; text-wrap: pretty; }
.t-body   { font-size: 16px; line-height: 1.70; text-wrap: pretty; }
.t-caption{ font-size: 13px; line-height: 1.55; color: var(--steel); }
.t-micro {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 11px; line-height: 1.20;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.t-index { font-family: var(--font-mono); font-size: 13px; color: var(--zinc); }

@media (max-width: 900px) {
  .t-display { font-size: 40px; line-height: 1.10; }
  .t-h1      { font-size: 32px; line-height: 1.15; }
  .t-h2      { font-size: 24px; line-height: 1.25; }
  .t-h3      { font-size: 18px; line-height: 1.40; }
  .t-lead    { font-size: 17px; line-height: 1.60; }
  .t-body    { font-size: 16px; line-height: 1.65; }
  .t-micro   { font-size: 10px; letter-spacing: 0.20em; }
}

/* --- 03 Grounds, grid, rules ---------------------------------------------- */

.ground-bone { background: var(--bone); color: var(--ink); }
.ground-ink  { background: var(--ink);  color: var(--bone); }

/* Text colours resolve against the ground they sit on.
   The hero is always an Ink ground, so it answers to the same rules. */
.ground-bone .t-lead,
.ground-bone .t-body  { color: var(--steel); }
.ground-bone .t-micro { color: var(--steel); }

.ground-ink, .hero { color: var(--bone); }

.ground-ink .t-lead,  .hero .t-lead,
.ground-ink .t-body,  .hero .t-body  { color: var(--zinc); }
.ground-ink .t-micro, .hero .t-micro { color: var(--steel); }

.ground-ink .t-h1,     .hero .t-h1,
.ground-ink .t-h2,     .hero .t-h2,
.ground-ink .t-h3,     .hero .t-h3,
.ground-ink .t-display, .hero .t-display { color: var(--bone); }

.section { padding: var(--section) 0; }

.wrap {
  width: 100%; max-width: var(--content);
  margin: 0 auto; padding: 0 var(--margin);
}

.grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter);
}

/* 1px hairline — Mist on Bone, Graphite on Ink */
.rule { height: 1px; background: var(--mist); border: 0; }
.ground-ink .rule, .hero .rule { background: var(--graphite); }

/* --- 04 Navigation -------------------------------------------------------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-nav), border-color var(--t-nav);
}

.nav__inner {
  max-width: var(--content); margin: 0 auto; padding: 0 var(--margin);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 64px;
}

.nav__word { height: 17px; width: 140px; flex: none; filter: brightness(0) invert(1); }

.nav__links {
  display: flex; gap: 40px; flex: none; white-space: nowrap;
  color: var(--bone);
}

.nav__links a {
  color: inherit; padding-bottom: 6px;
  border-bottom: 1px solid transparent;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { border-bottom-color: currentColor; }

/* Scrolled — solid Bone ground, Ink links, 1px Mist rule beneath.
   Height unchanged. Background and colour only. */
.nav.is-solid { background: var(--bone); border-bottom-color: var(--mist); }
.nav.is-solid .nav__word { filter: none; }
.nav.is-solid .nav__links { color: var(--ink); }
.nav.is-solid .nav__toggle span { background: var(--ink); }

/* Mobile trigger — bars indented 0 / 6 / 12px, never three equal bars. */
.nav__toggle {
  display: none; flex-direction: column; gap: 6px;
  width: 36px; padding: 6px; margin-right: -6px;
  background: none; border: 0; cursor: pointer;
}
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--bone); }
.nav__toggle span:nth-child(2) { margin-left: 6px; }
.nav__toggle span:nth-child(3) { margin-left: 12px; }

/* Full-screen menu panel — Ink ground, 200ms fade only. */
.menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--ink); color: var(--bone);
  padding: 0 var(--margin);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-nav), visibility var(--t-nav);
  overflow-y: auto;
}
.menu.is-open { opacity: 1; visibility: visible; }

.menu__bar {
  height: var(--nav-h); flex: none;
  display: flex; align-items: center; justify-content: space-between;
}
.menu__word { height: 15px; width: 124px; filter: brightness(0) invert(1); }

.menu__close {
  position: relative; width: 24px; height: 24px;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.menu__close span {
  position: absolute; top: 11px; left: 0;
  width: 24px; height: 2px; background: var(--bone);
}
.menu__close span:first-child { transform: rotate(45deg); }
.menu__close span:last-child  { transform: rotate(-45deg); }

.menu__links { margin-top: 56px; display: flex; flex-direction: column; }
.menu__links a {
  font-family: var(--font-head); font-weight: 300;
  font-size: 32px; line-height: 1.25; color: var(--bone);
  padding: 32px 0; border-bottom: 1px solid var(--graphite);
}
.menu__links a:first-child { padding-top: 0; }
.menu__links a[aria-current="page"] span {
  border-bottom: 1px solid var(--bone); padding-bottom: 6px;
}

.menu__meta {
  margin: 64px 0; display: flex; flex-direction: column; gap: 12px;
}
.menu__meta .t-micro { color: var(--steel); }
.menu__meta a { font-size: 16px; line-height: 1.65; color: var(--bone); }

@media (max-width: 900px) {
  .nav__word { height: 15px; width: 124px; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* --- 05 Hero -------------------------------------------------------------- */

.hero {
  position: relative; background: var(--ink); overflow: hidden;
  display: flex; align-items: center;
  min-height: 100vh; min-height: 100svh;
}
.hero--short {
  min-height: 0; height: 60vh; min-height: 560px;
  align-items: flex-end;
}
.hero--shortest {
  min-height: 0; height: 50vh; min-height: 480px;
  align-items: flex-end;
}

.hero .wrap { position: relative; padding-top: 160px; padding-bottom: 160px; }
.hero--short .wrap,
.hero--shortest .wrap { padding-top: 0; padding-bottom: 120px; }

/* Graphite bands on Ink, flat fill, constant 8% horizontal offset,
   running off the right trim. Barely perceptible by intent. */
.hero__bands { position: absolute; inset: 0; overflow: hidden; }
.hero__bands span {
  position: absolute; right: -80px; height: 108px;
  background: var(--graphite); opacity: 0.55;
}
.hero__bands span:nth-child(1) { left: 46%; top: 24%; }
.hero__bands span:nth-child(2) { left: 54%; top: calc(24% + 148px); }
.hero__bands span:nth-child(3) { left: 62%; top: calc(24% + 296px); }

.hero--short .hero__bands span,
.hero--shortest .hero__bands span { height: 92px; }
.hero--short .hero__bands span:nth-child(1) { left: 48%; top: 22%; }
.hero--short .hero__bands span:nth-child(2) { left: 56%; top: calc(22% + 128px); }
.hero--short .hero__bands span:nth-child(3) { left: 64%; top: calc(22% + 256px); }
.hero--shortest .hero__bands span:nth-child(1) { left: 48%; top: 20%; }
.hero--shortest .hero__bands span:nth-child(2) { left: 56%; top: calc(20% + 112px); }
.hero--shortest .hero__bands span:nth-child(3) { left: 64%; top: calc(20% + 224px); }

.hero__copy { grid-column: 1 / span 7; }
.hero__copy .t-display,
.hero__copy .t-h1 { margin-top: 40px; }
.hero__copy .t-lead { margin-top: 40px; max-width: 56ch; }
.hero .btn { margin-top: 64px; }

@media (max-width: 900px) {
  .hero, .hero--short, .hero--shortest {
    height: auto; min-height: 600px; align-items: flex-end;
  }
  .hero .wrap { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 88px; }
  .hero__copy { grid-column: 1 / -1; }
  .hero__copy .t-display,
  .hero__copy .t-h1,
  .hero__copy .t-lead { margin-top: 24px; }
  .hero .btn { margin-top: 40px; }
  .hero__bands span { height: 44px; right: -24px; }
  .hero__bands span:nth-child(1) { left: 36%; top: auto; bottom: 300px; }
  .hero__bands span:nth-child(2) { left: 46%; top: auto; bottom: 236px; }
  .hero__bands span:nth-child(3) { left: 56%; top: auto; bottom: 172px; }
}

/* --- 06 Buttons and links ------------------------------------------------- */

/* Square corners, 1px border, no shadow. */
.btn {
  display: inline-flex; align-items: center;
  border: 1px solid var(--ink); padding: 16px 32px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink);
  background: transparent; cursor: pointer;
  transition: background-color var(--t-hover), color var(--t-hover);
}
.btn:hover { background: var(--ink); color: var(--bone); }

.ground-ink .btn, .hero .btn, .btn--inverted {
  border-color: var(--bone); color: var(--bone);
}
.ground-ink .btn:hover, .hero .btn:hover, .btn--inverted:hover {
  background: var(--bone); color: var(--ink);
}

.link {
  display: inline-flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--ink); padding-bottom: 6px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink);
}
.link .arrow { display: inline-block; transition: transform var(--t-hover); }
.link:hover .arrow { transform: translateX(4px); }

.ground-ink .link, .hero .link { border-bottom-color: var(--bone); color: var(--bone); }

@media (max-width: 900px) {
  .btn, .link { font-size: 10px; letter-spacing: 0.20em; }
}

/* --- 07 Section header ---------------------------------------------------- */

.sec-head .t-micro { color: var(--steel); }
.sec-head .rule    { margin-top: 16px; }
.sec-head .t-h2    { margin-top: 40px; }

@media (max-width: 900px) { .sec-head .t-h2 { margin-top: 24px; } }

/* --- 08 Service line item ------------------------------------------------- */
/* The 8px horizontal shift is the site's signature interaction. */

.lines { display: flex; flex-direction: column; }

.line {
  display: flex; gap: 40px; padding: 32px 0;
  border-bottom: 1px solid var(--mist);
  color: var(--ink);
  transition: transform var(--t-hover), border-color var(--t-hover);
}
.line:hover { transform: translateX(8px); border-bottom-color: var(--ink); }

.ground-ink .line { border-bottom-color: var(--graphite); color: var(--bone); }
.ground-ink .line:hover { border-bottom-color: var(--bone); }

.line__index {
  font-family: var(--font-mono); font-size: 13px; color: var(--zinc);
  width: 32px; flex: none; padding-top: 4px;
}
.line__title { width: 340px; flex: none; }
.line__desc  { max-width: 60ch; }

@media (max-width: 900px) {
  .line { display: block; gap: 0; padding: 20px 0; }
  .line:hover { transform: none; }
  .line__index { width: auto; padding-top: 0; margin-bottom: 8px; }
  .line__title { width: auto; }
}

/* --- 09 Sector card ------------------------------------------------------- */
/* Portrait 3:4, full colour, no overlay, no border. */

.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gutter); }

.card__media { width: 100%; aspect-ratio: 3 / 4; }
.card .t-micro { margin-top: 24px; color: var(--zinc); }
.card .t-h3    { margin-top: 12px; }
.card .t-caption { margin-top: 12px; }

@media (max-width: 1200px) { .cards { grid-template-columns: repeat(2, 1fr); row-gap: 56px; } }
@media (max-width: 900px)  { .cards { grid-template-columns: 1fr; row-gap: 56px; } }

/* --- 10 Stepped process --------------------------------------------------- */
/* Five stages, each indented by the mark's constant interval. */

.stages { position: relative; padding-top: 32px; }
.stages::before {
  content: ""; position: absolute; inset: 0 0 auto 0;
  height: 1px; background: var(--graphite);
}
.stages__row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gutter);
  align-items: start;
}
.stage:nth-child(2) { padding-top: 24px; }
.stage:nth-child(3) { padding-top: 48px; }
.stage:nth-child(4) { padding-top: 72px; }
.stage:nth-child(5) { padding-top: 96px; }

.stage .t-index { color: var(--steel); }
.stage__name {
  margin-top: 16px; font-family: var(--font-head); font-weight: 400;
  font-size: 21px; line-height: 1.35; color: var(--bone);
}
.stage .t-caption { margin-top: 12px; color: var(--zinc); }

@media (max-width: 900px) {
  .stages__row { grid-template-columns: 1fr; gap: 40px; }
  .stage:nth-child(2) { padding: 0 0 0 20px; }
  .stage:nth-child(3) { padding: 0 0 0 40px; }
  .stage:nth-child(4) { padding: 0 0 0 60px; }
  .stage:nth-child(5) { padding: 0 0 0 80px; }
  .stage__name { font-size: 18px; line-height: 1.40; }
}

/* --- 11 Form fields ------------------------------------------------------- */
/* Bottom rule only. Red exists here and nowhere else. */

.field { display: block; }
.field + .field { margin-top: 40px; }
.field__label {
  display: block; margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--steel);
}

.field input,
.field textarea,
.field select {
  font-family: var(--font-body); font-weight: 300;
  font-size: 16px; line-height: 1.7; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--mist); border-radius: 0;
  padding: 8px 0 12px; width: 100%; min-height: 44px;
  outline: none; appearance: none;
  transition: border-color var(--t-hover);
}
.field textarea { min-height: 120px; resize: vertical; }

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%),
                    linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position: right 5px center, right 0 center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--zinc); }

.field input:focus,
.field textarea:focus,
.field select:focus { border-bottom-color: var(--ink); }

.field__error {
  display: none; margin-top: 12px;
  font-size: 13px; line-height: 1.55; color: var(--error);
}
.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid select { border-bottom-color: var(--error); }
.field.is-invalid .field__error { display: block; }

.form__sent {
  display: none; margin-top: 40px;
  border-top: 1px solid var(--ink); padding-top: 32px;
}
.form.is-sent .form__sent { display: block; }
.form.is-sent .form__body { display: none; }
.form__sent p { margin-top: 24px; font-size: 19px; line-height: 1.65; color: var(--ink); }

/* Spam trap — out of layout, out of the tab order, out of the a11y tree. */
.honeypot {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.form__actions { margin-top: 40px; }

/* Submission failure — caption size in the one functional red, same as a
   field error, but it sits outside a .field so it carries its own display. */
.form__failure {
  margin-top: 24px;
  font-size: 13px; line-height: 1.55; color: var(--error);
}
.form__failure a { color: inherit; text-decoration: underline; }
.form__failure[hidden] { display: none; }

.btn[disabled] { border-color: var(--mist); color: var(--zinc); cursor: default; }
.btn[disabled]:hover { background: transparent; color: var(--zinc); }

/* --- 12 Image treatments -------------------------------------------------- */
/* Full colour, square corners, no shadow. */

.media { width: 100%; }
.media picture { display: block; width: 100%; height: 100%; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--3x4  { aspect-ratio: 3 / 4; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media + .rule { margin-top: 16px; }
.media__caption { margin-top: 16px; }

/* Placeholder — carries the photography brief until the frame is supplied. */
.media--empty {
  background: var(--mist);
  display: flex; align-items: flex-end;
  padding: 24px;
}
.ground-ink .media--empty { background: var(--graphite); }
.media--empty span {
  font-family: var(--font-mono); font-size: 11px; line-height: 1.5;
  letter-spacing: 0.06em; color: var(--steel);
}

/* --- 13 Motion ------------------------------------------------------------ */
/* Section entry: fade with a 12px rise, 400ms, ease-out. Once, on entry. */

[data-reveal] {
  opacity: 0; transform: translateY(12px);
  transition: opacity var(--t-enter), transform var(--t-enter);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* No JS: never hide content. */
.no-js [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .line:hover { transform: none; }
}

/* --- 14 Footer ------------------------------------------------------------ */

.footer { background: var(--ink); color: var(--bone); padding: 120px 0 0; }
.footer__grid { padding-bottom: 88px; }

.footer__brand { grid-column: 1 / span 3; }
.footer__word  { height: 20px; width: 165px; filter: brightness(0) invert(1); }
.footer__brand .t-micro { margin-top: 12px; color: var(--steel); }
.footer__brand p { margin-top: 32px; max-width: 40ch; color: var(--zinc); }

.footer__col--site  { grid-column: 5 / span 2; }
.footer__col--cap   { grid-column: 7 / span 3; }
.footer__col--sect  { grid-column: 10 / span 3; }
.footer__col .t-micro { color: var(--steel); }

.footer__links {
  margin-top: 24px; display: flex; flex-direction: column; gap: 12px;
  font-size: 16px; line-height: 1.7;
}
.footer__links a {
  color: var(--bone); transition: transform var(--t-hover);
}
.footer__links a:hover { transform: translateX(8px); }

.footer__base {
  border-top: 1px solid var(--graphite);
  padding: 32px 0 64px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--gutter);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--steel);
}
.footer__base :nth-child(2) { text-align: center; }
.footer__base :nth-child(3) { text-align: right; }
.footer__base a { color: inherit; }

@media (max-width: 900px) {
  .footer { padding-top: 80px; }
  .footer__grid { grid-template-columns: 1fr; gap: 48px; padding-bottom: 56px; }
  .footer__brand, .footer__col--site, .footer__col--cap, .footer__col--sect {
    grid-column: 1 / -1;
  }
  .footer__links a:hover { transform: none; }
  .footer__base {
    grid-template-columns: 1fr; gap: 8px;
    font-size: 10px; letter-spacing: 0.20em;
    padding: 24px 0 56px;
  }
  .footer__base :nth-child(2), .footer__base :nth-child(3) { text-align: left; }
}

/* --- Page: What we do — sticky index rail --------------------------------- */

.indexed { position: relative; }

.rail-holder { position: sticky; top: 160px; height: 0; z-index: 30; }
.rail {
  grid-column: 1 / span 3;
  display: flex; flex-direction: column; gap: 20px;
}
.rail a {
  display: flex; gap: 16px; padding-left: 16px;
  border-left: 1px solid transparent; color: var(--steel);
  transition: color var(--t-hover), border-color var(--t-hover);
}
.rail a.is-active { color: var(--ink); border-left-color: var(--ink); }
.rail a.is-active[data-ground="ink"] { color: var(--bone); border-left-color: var(--bone); }

.svc { grid-column: 4 / span 9; }
.svc--narrow { grid-column: 4 / span 5; }
.svc__head { display: flex; gap: 40px; }
.svc__index {
  font-family: var(--font-mono); font-size: 13px; color: var(--zinc);
  width: 32px; flex: none; padding-top: 8px;
}
.ground-ink .svc__index { color: var(--steel); }
.svc__body { flex: 1; }
.svc__body > .t-lead { margin-top: 40px; max-width: 58ch; }
.svc__body > .lines,
.svc__body > .subs { margin-top: 56px; }

.subs { display: flex; flex-direction: column; }
.sub {
  display: grid; grid-template-columns: 64px 280px 1fr; gap: var(--gutter);
  padding: 24px 0; border-bottom: 1px solid var(--mist);
}
.sub__ref { font-family: var(--font-mono); font-size: 13px; color: var(--zinc); }
.sub__desc { max-width: 60ch; }

.svc__aside { grid-column: 9 / span 4; }

@media (max-width: 1200px) {
  .rail-holder { display: none; }
  .svc, .svc--narrow, .svc__aside { grid-column: 1 / -1; }
  .svc__aside { margin-top: 56px; }
}
@media (max-width: 900px) {
  .svc__head { display: block; }
  .svc__index { width: auto; padding-top: 0; margin-bottom: 12px; }
  .svc__body > .t-lead { margin-top: 24px; }
  .svc__body > .lines, .svc__body > .subs { margin-top: 40px; }
  .sub { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
}

/* --- Page: Sectors — alternating detail blocks ---------------------------- */

.sector { align-items: start; }
.sector__copy { grid-column: 1 / span 7; display: flex; gap: 40px; }
.sector__copy--right { grid-column: 6 / span 7; }
.sector__media { grid-column: 9 / span 4; }
.sector__media--left { grid-column: 1 / span 4; }
.sector__body { flex: 1; }
.sector__body .t-lead { margin-top: 40px; }
.sector__body > .t-body { margin-top: 32px; max-width: 60ch; }
.sector__where { margin-top: 64px; }
.sector__where + .lines { margin-top: 24px; }
.sector__where.t-micro { color: var(--steel); }

.lines--plain .line { display: block; padding: 24px 0; }

@media (max-width: 1200px) {
  .sector__copy, .sector__copy--right { grid-column: 1 / -1; }
  .sector__media, .sector__media--left { grid-column: 1 / -1; grid-row: 1; margin-bottom: 56px; }
  .sector__media .media--3x4 { aspect-ratio: 16 / 9; }
}
@media (max-width: 900px) {
  .sector__copy { display: block; }
  .sector__body .t-lead { margin-top: 24px; }
  .sector__body > .t-body { margin-top: 24px; }
  .sector__where { margin-top: 40px; }
  .sector__where + .lines { margin-top: 16px; }
}

/* --- Page: How we work — principles and delivery -------------------------- */

.principles { border-bottom: 1px solid var(--ink); }
.principle { border-top: 1px solid var(--mist); padding: 56px 0; }
.principle > div { max-width: 640px; }
.principle:nth-child(2) { padding-left: 200px; }
.principle:nth-child(3) { padding-left: 400px; }
.principle:nth-child(4) { padding-left: 600px; }
.principle .t-h2 { margin-top: 24px; }
.principle .t-body { margin-top: 32px; max-width: 60ch; }

@media (max-width: 1200px) {
  .principle:nth-child(2) { padding-left: 80px; }
  .principle:nth-child(3) { padding-left: 160px; }
  .principle:nth-child(4) { padding-left: 240px; }
}
@media (max-width: 900px) {
  .principle { padding: 32px 0; }
  .principle:nth-child(2) { padding-left: 16px; }
  .principle:nth-child(3) { padding-left: 32px; }
  .principle:nth-child(4) { padding-left: 48px; }
  .principle .t-h2 { margin-top: 12px; }
  .principle .t-body { margin-top: 16px; }
}

/* Delivery model — five stages, a constant offset, no connecting stem. */
.delivery { margin-top: 88px; padding-left: var(--margin); overflow: hidden; }
.delivery__row { display: flex; flex-direction: column; gap: 56px; }
.delivery__stage:nth-child(2) { padding-left: 120px; }
.delivery__stage:nth-child(3) { padding-left: 240px; }
.delivery__stage:nth-child(4) { padding-left: 360px; }
.delivery__stage:nth-child(5) { padding-left: 480px; }
.delivery__bar { height: 24px; background: var(--bone); margin-right: -80px; }
.delivery__text {
  display: flex; gap: 40px; margin-top: 24px; padding-right: var(--margin);
}
.delivery__index {
  font-family: var(--font-mono); font-size: 13px; color: var(--zinc);
  width: 32px; flex: none; padding-top: 6px;
}
.delivery__name {
  font-family: var(--font-head); font-weight: 400; font-size: 21px;
  line-height: 1.35; color: var(--bone); width: 200px; flex: none;
}
.delivery__desc { max-width: 60ch; color: var(--zinc); }

@media (max-width: 1200px) {
  .delivery__stage:nth-child(2) { padding-left: 60px; }
  .delivery__stage:nth-child(3) { padding-left: 120px; }
  .delivery__stage:nth-child(4) { padding-left: 180px; }
  .delivery__stage:nth-child(5) { padding-left: 240px; }
  .delivery__name { width: 160px; }
}
@media (max-width: 900px) {
  .delivery { margin-top: 56px; }
  .delivery__row { gap: 40px; }
  .delivery__stage:nth-child(2) { padding-left: 20px; }
  .delivery__stage:nth-child(3) { padding-left: 40px; }
  .delivery__stage:nth-child(4) { padding-left: 60px; }
  .delivery__stage:nth-child(5) { padding-left: 80px; }
  .delivery__bar { height: 16px; margin-right: -24px; }
  .delivery__text { display: block; margin-top: 16px; }
  .delivery__index { width: auto; padding-top: 0; }
  .delivery__name { width: auto; font-size: 18px; line-height: 1.4; margin-top: 8px; }
  .delivery__desc { margin-top: 8px; }
}

/* Position — hanging index, oversized headings */
.position { display: flex; flex-direction: column; }
.position__row { padding: 88px 0; border-bottom: 1px solid var(--mist); }
.position__row:first-child { padding-top: 0; }
.position__row:last-child  { padding-bottom: 0; border-bottom: 0; }
.position__index { grid-column: 1 / span 1; padding-top: 12px; }
.position__title { grid-column: 2 / span 7; }
.position__desc  { grid-column: 9 / span 4; }

@media (max-width: 900px) {
  .position__row { padding: 56px 0; }
  .position__index, .position__title, .position__desc { grid-column: 1 / -1; }
  .position__title { margin-top: 16px; }
  .position__desc  { margin-top: 16px; }
}

/* --- Page: Contact -------------------------------------------------------- */

.contact__aside { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 56px; }
.contact__form  { grid-column: 6 / span 7; }
.contact__aside .t-micro { color: var(--steel); }
.contact__value { margin-top: 16px; font-size: 19px; line-height: 1.65; color: var(--ink); }
.contact__value + .rule { margin-top: 16px; }

@media (max-width: 1200px) {
  .contact__aside, .contact__form { grid-column: 1 / -1; }
  .contact__form { margin-top: 72px; }
}
@media (max-width: 900px) {
  .contact__aside { gap: 40px; }
  .contact__value { font-size: 17px; line-height: 1.6; margin-top: 12px; }
}

/* --- Page: Home — split blocks and the staggered bar motif ---------------- */

.split__a     { grid-column: 1 / span 6; }
.split__b     { grid-column: 7 / span 6; }
.two-up__copy { grid-column: 1 / span 7; }

/* The mark, enlarged: three bars on a constant offset. */
.bars {
  grid-column: 9 / span 4;
  display: flex; flex-direction: column; gap: var(--gutter);
  padding-top: 8px;
}
.bars span { display: block; height: 64px; background: var(--graphite); }
.bars span:nth-child(2) { width: calc(100% - 48px); margin-left: 48px; }
.bars span:nth-child(3) { width: calc(100% - 96px); margin-left: 96px; }

@media (max-width: 1200px) {
  .split__a, .split__b, .two-up__copy { grid-column: 1 / -1; }
  .split__b { margin-top: 56px; }
  .bars { grid-column: 1 / -1; margin-top: 56px; }
}
@media (max-width: 900px) {
  .split__b { margin-top: 24px; }
  .bars span { height: 40px; }
  .bars span:nth-child(2) { width: calc(100% - 24px); margin-left: 24px; }
  .bars span:nth-child(3) { width: calc(100% - 48px); margin-left: 48px; }
}

/* --- Shared closing band -------------------------------------------------- */

.closing__copy { grid-column: 1 / span 7; }
.closing__copy .t-lead { margin-top: 40px; max-width: 54ch; }
.closing__actions { margin-top: 64px; display: flex; align-items: center; gap: 56px; }

@media (max-width: 900px) {
  .closing__copy { grid-column: 1 / -1; }
  .closing__copy .t-lead { margin-top: 24px; }
  .closing__actions {
    margin-top: 40px; flex-direction: column; align-items: flex-start; gap: 32px;
  }
}

/* --- Utilities ------------------------------------------------------------ */

.stack-40 > * + * { margin-top: 40px; }
.mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; }
.mt-64 { margin-top: 64px; }
.mt-88 { margin-top: 88px; }

@media (max-width: 900px) {
  .mt-64 { margin-top: 40px; }
  .mt-88 { margin-top: 56px; }
}
