/* Novum Engineers — site stylesheet (v1.0)
   Design tokens are documented in docs/DESIGN_SYSTEM.md */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-var.woff2") format("woff2-variations"),
       url("/assets/fonts/source-serif-4-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-italic-var.woff2") format("woff2-variations"),
       url("/assets/fonts/source-serif-4-latin-italic-var.woff2") format("woff2");
}

:root {
  /* Colour */
  --ink: #14233a;          /* ink navy: headings, header, dark bands */
  --ink-2: #1e3150;        /* navy surface variant */
  --charcoal: #2b2f33;     /* body text */
  --muted: #56606c;        /* secondary text (5.9:1 on paper) */
  --rule: #d6dbe0;         /* hairlines, grid */
  --rule-strong: #aab3bd;
  --paper: #fafbfa;        /* drafting white */
  --paper-2: #f0f2f3;      /* light grey band */
  --mark: #f2cf4a;         /* checker's highlighter: focus, markup only */
  --on-ink: #e9edf2;
  --on-ink-muted: #a9b5c4;
  --rule-on-ink: #34476a;

  /* Type */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.125rem);
  --step-3: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem);

  /* Space & layout */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 76rem;
  --measure: 38rem;
  --section: clamp(4rem, 9vw, 7.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.62;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-stretch: 112%;
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: var(--step-3); line-height: 1.02; font-weight: 640; letter-spacing: -0.02em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-stretch: 105%; font-weight: 600; letter-spacing: -0.005em; }

p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { max-width: var(--measure); }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
}
.skip-link:focus { top: 1rem; }

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

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 251, 250, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 2.25rem; height: 2.25rem; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 650;
  font-size: 1.125rem;
  letter-spacing: -0.005em;
  line-height: 1;
}
.brand-name span { font-weight: 420; }

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 560;
  padding: 0.55rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li { max-width: none; }
.site-nav a {
  font-family: var(--font-display);
  font-size: 0.975rem;
  font-weight: 520;
  color: var(--charcoal);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 580;
  font-stretch: 108%;
  line-height: 1;
  text-decoration: none;
  padding: 1rem 1.4rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--ink-2); text-decoration: none; }
.button-quiet { background: transparent; color: var(--ink); }
.button-quiet:hover { background: var(--paper-2); }
.button-on-ink { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.button-on-ink:hover { background: #fff; }

.button-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

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

.hero { border-bottom: 1px solid var(--rule); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
}
.hero h1 { max-width: 11em; }
.hero-lede { font-size: 1.25rem; line-height: 1.55; color: var(--charcoal); max-width: 31rem; }

.hero-drawing { color: var(--ink); margin: 0; }
.hero-drawing svg { width: 100%; overflow: visible; }
.hero-drawing figcaption {
  font-family: var(--font-display);
  font-size: var(--step--1);
  color: var(--muted);
  margin-top: 0.75rem;
  max-width: none;
}

/* Drawing line weights (structural drawing convention: heavy = cut/structure, light = reference) */
.dwg-grid { stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 14 4 2 4; fill: none; }
.dwg-bubble circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.25; }
.dwg-bubble text, .dwg-note text, .dwg-level text {
  font-family: var(--font-display);
  fill: var(--ink);
  font-size: 17px;
  font-weight: 560;
}
.dwg-bubble text { text-anchor: middle; dominant-baseline: central; font-size: 18px; }
.dwg-note text, .dwg-level text { font-size: 16.5px; font-weight: 480; fill: var(--charcoal); }
.dwg-ground { stroke: var(--ink); stroke-width: 2; fill: none; }
.dwg-hatch { stroke: var(--rule-strong); stroke-width: 1; fill: none; }
.dwg-col { stroke: var(--ink); stroke-width: 3.5; fill: none; stroke-linecap: square; }
.dwg-beam { stroke: var(--ink); stroke-width: 2.5; fill: none; stroke-linecap: square; }
.dwg-brace { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.dwg-found { stroke: var(--ink); stroke-width: 1.6; fill: var(--paper-2); }
.dwg-existing { stroke: var(--muted); stroke-width: 1.25; fill: none; }
.dwg-existing-fill { fill: var(--paper-2); stroke: var(--muted); stroke-width: 1.25; }
.dwg-up { fill: var(--rule); stroke: var(--ink); stroke-width: 1.25; }
.dwg-soe { stroke: var(--ink); stroke-width: 2; fill: none; }
.dwg-lag { stroke: var(--ink); stroke-width: 0.9; fill: none; }
.dwg-leader { stroke: var(--charcoal); stroke-width: 0.9; fill: none; }
.dwg-level path { fill: var(--ink); }
.dwg-markup { fill: var(--mark); opacity: 0.55; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero-drawing .draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.1s cubic-bezier(.45, 0, .2, 1) forwards;
  }
  .js .hero-drawing .g-grid .draw { animation-duration: 0.8s; }
  .js .hero-drawing .g-found .draw { animation-delay: 0.35s; }
  .js .hero-drawing .g-cols .draw { animation-delay: 0.65s; }
  .js .hero-drawing .g-beams .draw { animation-delay: 1.0s; }
  .js .hero-drawing .g-braces .draw { animation-delay: 1.35s; }
  .js .hero-drawing .g-site .draw { animation-delay: 0.9s; }
  .js .hero-drawing .fade {
    opacity: 0;
    animation: fade 0.6s ease forwards;
    animation-delay: 2.1s;
  }
  .js .hero-drawing .g-bubbles.fade { animation-delay: 0.25s; }
  .js .hero-drawing .dwg-markup.fade { animation-delay: 2.5s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes fade-mark { to { opacity: 0.55; } }
.js .hero-drawing .dwg-markup.fade { animation-name: fade-mark; }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head p { color: var(--muted); }

.band-grey { background: var(--paper-2); }

.band-ink {
  background: var(--ink);
  color: var(--on-ink);
}
.band-ink h2, .band-ink h3 { color: #fff; }
.band-ink p { color: var(--on-ink); }
.band-ink a:not(.button) { color: #fff; }
.section.band-ink + .section { border-top: 0; }

/* Two-column service overview list */
.service-index {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--rule);
}
.service-index li {
  max-width: none;
  padding: 1.5rem 0 1.6rem;
  border-bottom: 1px solid var(--rule);
}
.service-index h3 { margin-bottom: 0.35rem; }
.service-index h3 a { text-decoration: none; }
.service-index h3 a:hover { text-decoration: underline; }
.service-index p { margin: 0; color: var(--muted); font-size: 1.0625rem; }

/* Process: a real sequence, so it is numbered */
.process {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--on-ink);
}
.process li {
  counter-increment: step;
  max-width: none;
  padding: 1.25rem 1.25rem 0 0;
  position: relative;
}
.process li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  margin: -2.35rem 0 1rem;
  border-radius: 50%;
  border: 1.5px solid var(--on-ink);
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.process h3 { font-size: 1.125rem; margin-bottom: 0.45rem; }
.process p { font-size: 1rem; line-height: 1.55; color: var(--on-ink-muted); margin: 0; }

/* Audience list */
.audience {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.audience ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.audience li {
  max-width: none;
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.audience strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 106%;
  color: var(--ink);
  font-size: 1.0625rem;
}
.audience span { color: var(--muted); font-size: 1.0625rem; }

/* Closing call to action */
.cta-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}
.cta-band h2 { margin-bottom: 0.4rem; }
.cta-band p { margin: 0; }
.cta-band .button-row { margin-top: 0; }

/* ---------- Inner pages ---------- */

.page-head { border-bottom: 1px solid var(--rule); }
.page-head .wrap { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.page-head h1 { max-width: 14em; }
.page-head p { font-size: 1.25rem; line-height: 1.55; max-width: 36rem; color: var(--charcoal); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.split > h2 { position: sticky; top: 6.5rem; }

.principles { display: grid; gap: 2.5rem; }
.principles h3 { margin-bottom: 0.5rem; }
.principles p { margin: 0; }

/* Services detail */
.service-group + .service-group { margin-top: clamp(3.5rem, 7vw, 6rem); }
.service-group > header {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--ink);
}
.service-group > header h2 { margin: 0; }
.service-group > header p { margin: 0; color: var(--muted); }
.service {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}
.service h3 { margin: 0; }
.service p { margin-bottom: 0.75rem; }
.service ul { margin: 0; color: var(--muted); font-size: 1.0625rem; }
.service li { margin-bottom: 0.25rem; }
.service li::marker { color: var(--rule-strong); }

.service-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}
.service-jump a {
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1rem;
}

/* Contact */
.checklist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.checklist li {
  max-width: none;
  padding: 1rem 0 1rem 2.25rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}
.checklist strong { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.0625rem; }

.notice {
  border-left: 4px solid var(--mark);
  background: var(--paper-2);
  padding: 1.25rem 1.5rem;
  max-width: 40rem;
}
.notice p:last-child { margin-bottom: 0; }

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-1); margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }

/* 404 */
.not-found { padding-block: clamp(4rem, 12vw, 9rem); }
.not-found h1 { max-width: 12em; }

/* ---------- Footer: drawing title block ---------- */

.site-footer {
  background: var(--paper);
  border-top: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: var(--step--1);
  color: var(--charcoal);
}
.title-block {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr));
  border-left: 1px solid var(--rule-strong);
  margin-block: 2.5rem 1.5rem;
}
.title-block > div {
  border-right: 1px solid var(--rule-strong);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.85rem 1rem 1rem;
  min-width: 0;
}
.title-block dt {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 480;
  margin-bottom: 0.3rem;
}
.title-block dd {
  margin: 0;
  color: var(--ink);
  font-weight: 580;
  font-size: 0.975rem;
  font-stretch: 106%;
}
.title-block dl { margin: 0; }
.tb-firm { display: flex; align-items: center; gap: 0.85rem; }
.tb-firm .brand-mark { width: 2.75rem; height: 2.75rem; }
.tb-firm p { margin: 0; color: var(--muted); }
.tb-firm strong { display: block; color: var(--ink); font-stretch: 118%; font-weight: 650; font-size: 1.05rem; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 2.5rem;
}
.footer-base ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; padding: 0; margin: 0; }
.footer-base li { max-width: none; }
.footer-base a { color: var(--charcoal); }
.footer-base p { margin: 0; color: var(--muted); max-width: none; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-drawing { max-width: 36rem; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; border-top: 0; }
  .process li { border-top: 2px solid var(--on-ink); padding-top: 1.25rem; }
  .audience { grid-template-columns: 1fr; }
  .title-block { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .title-block > .tb-firm { grid-column: 1 / -1; border-bottom: 0; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 1rem; }
  .site-nav a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); font-size: 1.0625rem; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }
  .no-js .nav-toggle { display: none; }

  .service-index { grid-template-columns: 1fr; }
  .split, .service, .service-group > header { grid-template-columns: 1fr; gap: 0.75rem; }
  .split > h2 { position: static; }
  .audience li { grid-template-columns: 1fr; gap: 0.2rem; }
  .cta-band .wrap { align-items: start; }
}

@media (max-width: 520px) {
  .process { grid-template-columns: 1fr; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block > div:last-child { grid-column: 1 / -1; border-top: 0; }
  .hero-lede, .page-head p { font-size: 1.125rem; }
  .button { width: 100%; justify-content: center; }
}

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

@media print {
  .site-header, .nav-toggle, .cta-band, .skip-link { display: none !important; }
  body { background: #fff; }
}
