:root {
  --paper: #EEF0ED;
  --paper-2: #E2E6E2;
  --ink: #1D262B;
  --ink-2: #56626A;
  --line: #B7C0BE;
  --blue: #2340A8;
  --blue-soft: #D9DFF2;
  --red: #C23A22;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10;
}
.skip:focus { top: 12px; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font-size: 1.45rem; font-weight: 800; font-variation-settings: "wdth" 125; letter-spacing: -0.01em; }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linecap: round; }
.main-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); font-size: 0.95rem; }
.main-nav a { text-decoration: none; color: var(--ink-2); }
.main-nav a:hover { color: var(--ink); }
.main-nav .nav-cta { color: var(--blue); font-weight: 650; border-bottom: 2px solid currentColor; padding-bottom: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 650; text-decoration: none; border-radius: 4px;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1B3388; }
.btn-quiet { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-quiet:hover { background: var(--paper-2); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: clamp(56px, 8vw, 112px);
}
.hero-copy { padding-top: 8px; }
h1 {
  margin: 0 0 28px;
  font-size: clamp(2.2rem, 4.1vw, 3.5rem);
  line-height: 1.02;
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead { margin: 0 0 36px; max-width: 46ch; font-size: 1.15rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Drawing */
.drawing { margin: 0; }
.drawing-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.rev-switch { display: inline-flex; padding: 3px; border-radius: 6px; background: var(--paper-2); }
.rev-switch button {
  font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--ink-2);
  border: 0; background: transparent; padding: 9px 16px; border-radius: 4px; cursor: pointer; min-height: 40px;
}
.rev-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.drawing[data-rev="a"] .rev-switch button[data-set-rev="a"] { color: var(--red); }
.drawing[data-rev="b"] .rev-switch button[data-set-rev="b"] { color: var(--blue); }
.rev-tag { font-size: 0.9rem; color: var(--ink-2); font-variation-settings: "wdth" 75; }
.rev-tag b { font-weight: 700; color: var(--ink); }

.sheet {
  position: relative;
  background: #F7F8F6;
  border: 1.5px solid var(--ink);
  padding: 26px 18px 18px 30px;
}
.zones { position: absolute; display: flex; color: var(--ink-2); font-size: 0.7rem; font-variation-settings: "wdth" 75; }
.zones span { flex: 1; text-align: center; }
.zones-top { top: 0; left: 30px; right: 18px; height: 22px; align-items: center; border-bottom: 1px solid var(--line); }
.zones-top span + span { border-left: 1px solid var(--line); }
.zones-side { top: 26px; bottom: 18px; left: 0; width: 22px; flex-direction: column; border-right: 1px solid var(--line); }
.zones-side span { display: flex; align-items: center; justify-content: center; }
.zones-side span + span { border-top: 1px solid var(--line); }

.plan { display: block; width: 100%; height: auto; font-family: var(--font); overflow: visible; }
.plan .frame { fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.plan .frame-thin { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.plan .box { fill: none; stroke: var(--ink-2); stroke-width: 1.1; }
.plan .label-bg { fill: #fff; stroke: var(--ink-2); stroke-width: 1; }
.plan .hatch-line { stroke: var(--line); stroke-width: 1.2; }
.plan .ink-lines line { stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.plan text { fill: var(--ink); font-variation-settings: "wdth" 85; }
.plan .t-tiny { font-size: 9px; fill: var(--ink-2); }
.plan .t-small { font-size: 11.5px; }
.plan .t-mid { font-size: 14px; font-weight: 600; }
.plan .t-big { font-size: 19px; font-weight: 750; font-variation-settings: "wdth" 110; }
.plan .t-strong { font-weight: 700; }
.plan .t-invert { fill: #fff; font-weight: 650; }
.plan .fill-blue { fill: var(--blue); }
.plan .field { fill: #fff; stroke: var(--line); stroke-width: 1; }
.plan .row-hi { fill: var(--blue-soft); }

.plan .cloud { fill: none; stroke: var(--red); stroke-width: 2; stroke-linejoin: round; }
.plan .marker path { fill: var(--red); }
.plan .marker text { fill: #fff; font-size: 11px; font-weight: 700; font-variation-settings: "wdth" 100; }

.plan .path-line { fill: none; stroke: var(--blue); stroke-width: 2; }
.plan .arrow-head { fill: var(--blue); }
.plan .path-ticks line { stroke: var(--blue); stroke-width: 1; stroke-dasharray: 3 3; }
.plan .steps circle { fill: var(--blue); }
.plan .steps text { fill: #fff; font-size: 12px; font-weight: 700; font-variation-settings: "wdth" 100; }

.rev { transition: opacity 0.25s ease; }
.drawing[data-rev="a"] .rev-b, .drawing[data-rev="b"] .rev-a { opacity: 0; visibility: hidden; }

/* Draw-in on load and on switch (motion only when allowed) */
@media (prefers-reduced-motion: no-preference) {
  .plan .cloud { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
  .is-drawn .plan .cloud { animation: draw 0.9s cubic-bezier(.6,.1,.3,1) forwards; animation-delay: var(--delay, 0s); }
  .plan .marker { opacity: 0; }
  .is-drawn .plan .marker { animation: appear 0.3s ease forwards; animation-delay: calc(var(--delay, 0s) + 0.6s); }
  .drawing[data-rev="b"] .path-line { stroke-dasharray: 300; animation: draw-path 0.9s cubic-bezier(.6,.1,.3,1) both; }
  .drawing[data-rev="b"] .steps g, .drawing[data-rev="b"] .steps circle,
  .drawing[data-rev="b"] .steps text { animation: appear 0.3s ease both 0.5s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes draw-path { from { stroke-dashoffset: 300; } to { stroke-dashoffset: 0; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

figcaption { margin-top: 18px; }
.legend { margin: 0; padding: 0; list-style: none; counter-reset: item; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; font-size: 0.95rem; color: var(--ink-2); }
.legend li { counter-increment: item; display: grid; grid-template-columns: 26px 1fr; align-items: start; }
.legend li::before {
  content: counter(item); width: 19px; height: 19px; margin-top: 2px;
  display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: #fff;
}
.legend-a li::before { background: var(--red); clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 4px; }
.legend-b li::before { background: var(--blue); border-radius: 50%; }
.drawing[data-rev="a"] .legend-b, .drawing[data-rev="b"] .legend-a { display: none; }

/* Sections */
.section { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(24px, 3vw, 40px); border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); margin-bottom: clamp(32px, 4vw, 56px); align-items: end; }
.section-head p { margin: 0; max-width: 52ch; color: var(--ink-2); }
h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.08;
  font-weight: 780;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; font-variation-settings: "wdth" 105; }

/* Findings table */
.findings { width: 100%; border-collapse: collapse; }
.findings th {
  text-align: left; font-weight: 600; font-size: 0.9rem; color: var(--ink-2);
  padding: 0 0 12px; border-bottom: 1.5px solid var(--ink); font-variation-settings: "wdth" 85;
}
.findings th:first-child, .findings td:first-child { width: 50%; padding-right: clamp(20px, 4vw, 56px); }
.findings td { padding: 20px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.findings td:first-child { font-weight: 560; }
.findings td:first-child::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 12px;
  border: 2px solid var(--red); border-radius: 50%; vertical-align: 0;
}
.findings td:last-child { color: var(--ink-2); }

/* Services */
.services { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.services > div { padding: 22px 0 30px; border-top: 1.5px solid var(--ink); }
.services dt { font-size: 1.2rem; font-weight: 700; font-variation-settings: "wdth" 108; margin-bottom: 10px; }
.services dd { margin: 0; color: var(--ink-2); max-width: 40ch; }

/* Process */
.steps-list { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: relative; }
.steps-list::before { content: ""; position: absolute; left: 14px; right: 0; top: 14px; border-top: 2px solid var(--blue); }
.steps-list li { counter-increment: step; position: relative; padding: 48px clamp(12px, 2vw, 28px) 0 0; }
.steps-list li::before {
  content: counter(step); position: absolute; top: 0; left: 0; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.steps-list p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

/* Sectors + about */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); padding-bottom: clamp(56px, 8vw, 104px); }
.split h2 { margin-bottom: 24px; }
.sectors { margin: 0; padding: 0; list-style: none; }
.sectors li { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 560; }
.about { margin: 0 0 16px; max-width: var(--measure); font-size: 1.1rem; }

/* Contact */
.contact { background: var(--blue); color: #fff; }
.contact-inner { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.contact h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-variation-settings: "wdth" 118; max-width: 18ch; margin-bottom: 20px; }
.contact p { margin: 0 0 36px; max-width: 48ch; font-size: 1.15rem; color: #DCE2F5; }
.contact-mail {
  display: inline-block; font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 700;
  font-variation-settings: "wdth" 105; text-decoration: none; border-bottom: 3px solid rgba(255,255,255,.5);
  padding-bottom: 4px; overflow-wrap: anywhere;
}
.contact-mail:hover { border-bottom-color: #fff; }
.contact :focus-visible { outline-color: #fff; }

/* Footer title block */
.site-footer { padding: 32px 0 40px; }
.title-block { margin: 0 0 0 auto; display: grid; grid-template-columns: 1.2fr 2fr 2fr 0.8fr; max-width: 820px; border: 1.5px solid var(--ink); }
.title-block > div { padding: 8px 12px 10px; border-left: 1px solid var(--ink); min-width: 0; }
.title-block > div:first-child { border-left: 0; }
.title-block dt { font-size: 0.72rem; color: var(--ink-2); font-variation-settings: "wdth" 75; }
.title-block dd { margin: 0; font-size: 0.92rem; font-weight: 600; overflow-wrap: anywhere; }
.title-block a { text-decoration: none; }
.title-block a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 1040px) {
  .hero { grid-template-columns: 1fr; }
  .lead { max-width: 60ch; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-list { grid-template-columns: 1fr; }
  .steps-list::before { left: 14px; right: auto; top: 14px; bottom: 14px; border-top: 0; border-left: 2px solid var(--blue); }
  .steps-list li { padding: 0 0 30px 52px; }
  .steps-list li:last-child { padding-bottom: 0; }
}
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .main-nav a:not(.nav-cta) { display: none; }
  .section-head, .split { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .legend { grid-template-columns: 1fr; }
  .sheet { padding: 10px; }
  .zones { display: none; }
  .findings thead { display: none; }
  .findings, .findings tbody, .findings tr, .findings td { display: block; width: 100%; }
  .findings th:first-child, .findings td:first-child { width: 100%; padding-right: 0; }
  .findings tr { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .findings td { padding: 0; border: 0; }
  .findings td:last-child { margin-top: 6px; padding-left: 22px; }
  .title-block { grid-template-columns: 1fr 1fr; margin: 0; }
  .title-block > div:nth-child(3) { border-left: 0; }
  .title-block > div:nth-child(n+3) { border-top: 1px solid var(--ink); }
  .rev-switch button { padding: 8px 12px; }
}

/* ---------- Liveliness layer ---------- */

/* Colour bands */
.band-white { background: #fff; }
.band-blue { background: var(--blue-soft); }
.band .section { border-top: 0; padding-bottom: clamp(56px, 8vw, 104px); }
.band-white .findings td:first-child { color: var(--ink); }

/* Process line fills as the section scrolls into view */
.steps-list::before { border-color: rgba(35, 64, 168, 0.22); }
.steps-list::after { content: ""; position: absolute; left: 14px; right: 0; top: 14px; border-top: 2px solid var(--blue); transform-origin: left center; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .steps-list::after { animation: fill-x linear both; animation-timeline: view(); animation-range: entry 60% cover 55%; }
  }
}
@keyframes fill-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fill-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.steps-list li::before { box-shadow: 0 0 0 5px var(--blue-soft); z-index: 1; }

/* Product finder chips inside the drawing */
.plan .chip { cursor: pointer; outline: none; }
.plan .chip rect { fill: #fff; stroke: var(--ink-2); stroke-width: 1.1; transition: fill .2s ease, stroke .2s ease; }
.plan .chip text { fill: var(--ink); transition: fill .2s ease; }
.plan .chip:hover rect { stroke: var(--blue); }
.plan .chip.is-on rect { fill: var(--blue); stroke: var(--blue); }
.plan .chip.is-on text { fill: #fff; font-weight: 650; }
.plan .chip:focus-visible rect { stroke: var(--blue); stroke-width: 3; }
.plan .row-hi { transition: transform .45s cubic-bezier(.6,.1,.3,1); }
.plan .cells line { transform-box: fill-box; transform-origin: left center; transition: transform .45s cubic-bezier(.6,.1,.3,1); }
.plan [data-col] { transition: opacity .15s ease; }
.plan .table.is-swapping [data-col] { opacity: 0; }

/* Legend <-> drawing highlighting */
.legend li { cursor: default; border-radius: 3px; transition: color .15s ease; }
.legend li:focus-visible { outline-offset: 4px; }
.legend li.hl { color: var(--ink); }
.plan .cloud, .plan .marker { transition: filter .2s ease; }
.drawing.has-focus .rev-a .cloud:not(.hl), .drawing.has-focus .rev-a .marker:not(.hl) { filter: opacity(.18); }
.plan .cloud.hl { stroke-width: 3; }
.plan .focus-zones { pointer-events: none; }
.plan .focus-zones rect { fill: rgba(35, 64, 168, .06); stroke: var(--blue); stroke-width: 1.6; stroke-dasharray: 6 4; opacity: 0; transition: opacity .2s ease; }
.plan .focus-zones rect.hl { opacity: 1; }
.plan .steps g { transform-box: fill-box; transform-origin: center; transition: transform .2s ease; }
.plan .steps g.hl { transform: scale(1.3); }

/* Drafting crosshair (mouse only) */
.crosshair { position: absolute; top: 26px; right: 18px; bottom: 18px; left: 30px; pointer-events: none; opacity: 0; transition: opacity .2s ease; overflow: hidden; }
.sheet.is-hover .crosshair { opacity: 1; }
.ch-x, .ch-y { position: absolute; }
.ch-x { left: 0; right: 0; top: var(--y, 0); border-top: 1px dashed rgba(35, 64, 168, .55); }
.ch-y { top: 0; bottom: 0; left: var(--x, 0); border-left: 1px dashed rgba(35, 64, 168, .55); }
.ch-read {
  position: absolute; left: var(--x, 0); top: var(--y, 0); transform: translate(10px, 10px);
  background: var(--blue); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 3px;
  font-variation-settings: "wdth" 90; white-space: nowrap;
}
.zones span { transition: background-color .15s ease, color .15s ease; }
.zones span.on { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .sheet { cursor: crosshair; } .plan .chip { cursor: pointer; } }
@media (hover: none), (max-width: 720px) { .crosshair { display: none; } }

/* Autoplay progress hint on the active tab */
.rev-switch button { position: relative; overflow: hidden; }
.rev-switch button.is-next::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 2px; background: var(--blue);
  transform-origin: left center; animation: fill-x var(--wait, 3s) linear both;
}

@media (max-width: 1040px) {
  .steps-list::after { left: 14px; right: auto; top: 14px; bottom: 14px; border-top: 0; border-left: 2px solid var(--blue); transform-origin: center top; }
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) { .steps-list::after { animation-name: fill-y; } }
  }
}

.band + .section { border-top: 0; }
