:root {
  --navy: #12355B;
  --blue: #1F64B0;
  --teal: #1B8F95;
  --orange: #E9852A;
  --ink: #1A2633;
  --muted: #55657A;
  --mist: #EEF3F7;
  --line: #D5DEE7;
  --paper: #FFFFFF;
  --measure: 68ch;
  --wide: 1180px;
  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
strong, b { font-weight: inherit; }

h1, h2, h3, h4 {
  font-family: var(--head);
  font-stretch: 87.5%;
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.3rem; font-weight: 600; margin-top: 1.4em; }
h4 { font-size: 1.05rem; font-weight: 600; }
p, ul, ol, dl { margin: 0 0 1.1em; }
.prose { max-width: var(--measure); }
.lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink); max-width: 60ch; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--navy); }
.brand img { width: 52px; }
.brand span { font-family: var(--head); font-stretch: 87.5%; font-weight: 700; font-size: 1.25rem; line-height: 1.05; }
.brand small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.8rem; color: var(--muted); letter-spacing: 0; }
.nav { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.menu-btn { display: none; }

@media (max-width: 900px) {
  .menu-btn { display: inline-block; font: 600 1rem var(--body); background: none; border: 1px solid var(--line); border-radius: 4px; padding: 0.4rem 0.8rem; color: var(--navy); cursor: pointer; }
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--paper); flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); padding: 0.5rem 1.5rem 1rem; }
  .nav.open { display: flex; }
  .nav a { display: block; padding: 0.6rem 0; }
}

/* Page heads */
.page-head { background: var(--mist); padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--line); }
.page-head p.trail { font-size: 0.95rem; color: var(--muted); margin-bottom: 1rem; }
.page-head p.trail a { color: var(--muted); }
.page-head h1 { max-width: 22ch; }

main section { padding: 3.5rem 0; }
main section + section { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding: 4.5rem 0 3.5rem; background: linear-gradient(180deg, var(--mist) 0%, var(--paper) 100%); }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-bottom: 2.2rem; }
.chain { width: 100%; max-width: 1100px; margin: 2.5rem 0 0; }
.chain text { font-family: var(--body); }
.btn { display: inline-block; font-weight: 600; text-decoration: none; padding: 0.75rem 1.3rem; border-radius: 4px; background: var(--navy); color: #fff; margin: 0 0.6rem 0.6rem 0; }
.btn:hover { background: var(--blue); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; }

/* Grids */
.grid { display: grid; gap: 2rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.split { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Service list: rows, not cards */
.svc-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--navy); }
.svc-list li { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.svc-list h3 { margin: 0; font-size: 1.25rem; }
.svc-list h3 a { color: var(--navy); text-decoration: none; }
.svc-list h3 a:hover { color: var(--blue); text-decoration: underline; }
.svc-list p { margin: 0; color: var(--muted); }
.svc-list .who { display: block; margin-top: 0.35rem; font-size: 0.92rem; color: var(--teal); font-weight: 600; }
@media (max-width: 700px) { .svc-list li { grid-template-columns: 1fr; gap: 0.5rem; } }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--line); margin: 1.5rem 0 2rem; }
.figures div { padding: 1.2rem 1.2rem 1.2rem 0; }
.figures div + div { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.figures .n { font-family: var(--head); font-stretch: 87.5%; font-weight: 700; font-size: 2.3rem; color: var(--navy); line-height: 1; display: block; }
.figures .l { font-size: 0.98rem; color: var(--muted); display: block; margin-top: 0.4rem; }
@media (max-width: 600px) { .figures div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); } }

/* Case study tiles */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.case { display: block; text-decoration: none; color: var(--ink); border-top: 4px solid var(--blue); background: var(--mist); padding: 1.4rem 1.4rem 1.6rem; }
.case.jon { border-top-color: var(--teal); }
.case.joint { border-top-color: var(--orange); }
.case:hover { background: #E3EBF2; color: var(--ink); }
.case .where { font-size: 0.92rem; color: var(--muted); display: block; margin-bottom: 0.5rem; }
.case h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.case p { margin: 0; font-size: 1rem; }
.key { font-size: 0.95rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 0 0 1.2rem; }
.key span::before { content: ""; display: inline-block; width: 14px; height: 4px; margin-right: 0.45rem; vertical-align: middle; background: var(--blue); }
.key span.k-jon::before { background: var(--teal); }
.key span.k-joint::before { background: var(--orange); }

/* Fact box on case studies */
.facts { background: var(--mist); padding: 1.4rem 1.5rem; border-left: 4px solid var(--navy); margin: 0 0 2rem; }
.facts dl { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.45rem 1rem; margin: 0; font-size: 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts dl { grid-template-columns: 1fr; } .facts dd { margin-bottom: 0.5rem; } }

.side-note { font-size: 1rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; }

/* Figures with infographics */
figure { margin: 2rem 0; }
figure img { border: 1px solid var(--line); background: #fff; }
figcaption { font-size: 0.95rem; color: var(--muted); margin-top: 0.6rem; max-width: var(--measure); }

/* Things to discuss before launch */
.flag { border: 2px dashed var(--orange); background: #FDF4EA; padding: 1.2rem 1.4rem; margin: 2rem 0; max-width: 900px; }
.flag .t { font-family: var(--head); font-stretch: 87.5%; font-weight: 700; color: #9A4F0B; display: block; margin-bottom: 0.3rem; font-size: 1.05rem; }
.flag p { margin: 0; font-size: 1rem; }
.flag.tall { min-height: 240px; display: flex; flex-direction: column; justify-content: center; }

/* Team */
.person { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.photo { aspect-ratio: 4 / 5; background: var(--mist); border: 2px dashed var(--orange); display: flex; align-items: center; justify-content: center; text-align: center; color: #9A4F0B; font-size: 0.95rem; padding: 1rem; }
@media (max-width: 640px) { .person { grid-template-columns: 1fr; } .photo { max-width: 220px; } }

blockquote { margin: 1.5rem 0; padding: 0 0 0 1.4rem; border-left: 4px solid var(--teal); font-size: 1.15rem; max-width: 60ch; }
blockquote footer { font-size: 0.95rem; color: var(--muted); margin-top: 0.5rem; }

table { border-collapse: collapse; width: 100%; font-size: 1rem; margin: 1rem 0 2rem; }
th, td { text-align: left; padding: 0.6rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); font-stretch: 87.5%; color: var(--navy); border-bottom: 2px solid var(--navy); }

.cta-band { background: var(--navy); color: #fff; padding: 3rem 0; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { max-width: 60ch; }
.cta-band .btn { background: #fff; color: var(--navy); }
.cta-band .btn:hover { background: var(--orange); color: var(--ink); }

/* Footer */
.site-foot { background: var(--ink); color: #C9D4DF; padding: 3rem 0 2rem; font-size: 0.98rem; }
.site-foot a { color: #fff; }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.site-foot h4 { color: #fff; font-size: 1rem; margin-bottom: 0.6rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 0.35rem; }
.site-foot .legal { border-top: 1px solid #33465A; margin-top: 2rem; padding-top: 1.2rem; font-size: 0.9rem; }
@media (max-width: 800px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  .chain .stage { opacity: 0; animation: rise 0.5s ease-out forwards; }
  .chain .stage:nth-of-type(2) { animation-delay: 0.12s; }
  .chain .stage:nth-of-type(3) { animation-delay: 0.24s; }
  .chain .stage:nth-of-type(4) { animation-delay: 0.36s; }
  .chain .stage:nth-of-type(5) { animation-delay: 0.48s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
.chain-wrap { overflow-x: auto; margin-top: 2.5rem; }
.chain-wrap .chain { margin-top: 0; min-width: 820px; }
.prose > h2:first-child { margin-top: 0; }

/* Compact page headers */
.page-head { padding: 1.6rem 0 1.4rem; }
.page-head p.trail { margin-bottom: 0.4rem; }
.page-head h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 0.35em; max-width: 30ch; }
.page-head .lede { font-size: 1.1rem; margin-bottom: 0; max-width: 75ch; }
main section { padding: 2.5rem 0; }

/* Compact home hero */
.hero { padding: 2rem 0 1.5rem; }
.hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); max-width: 26ch; margin-bottom: 0.4em; }
.hero .lede { font-size: 1.1rem; margin-bottom: 1.2rem; max-width: 75ch; }
.hero .btn { padding: 0.6rem 1.1rem; }
.hero .chain-wrap { margin-top: 1.2rem; }
.hero .chain { max-width: 980px; }

/* Full-width home hero text */
.hero h1 { max-width: none; }
.hero .lede { max-width: none; }
.hero .chain { max-width: none; }
.hero h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); text-wrap: balance; }
