/* ================================================================
   Foundry: management-consulting register
   Libre Franklin. White / navy / blue-gray. Rules, exhibits, tables.
   ================================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f2f5f8;
  --ink: #17202b;
  --gray: #4e5b68;
  --line: #d9e1e8;
  --navy: #14477d;
  --navy-deep: #0e2a47;
  --blue-on-dark: #9fc0e8;
  --amber: #b07d10;
  --max: 1160px;
  --sans: "Libre Franklin", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  border-top: 4px solid var(--navy);
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--navy); color: #fff; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* display type */
.display {
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.06;
}

/* eyebrow labels */
.slug, .slug-note, .mini-label, .case-tag, .breadcrumb, .tool-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 4vw;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand img { width: 22px; height: 26px; object-fit: contain; }

.primary-nav { display: flex; align-items: center; gap: 2px; }
.primary-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--gray);
  padding: 8px 13px;
  border-radius: 2px;
}
.primary-nav a:hover { color: var(--ink); background: var(--bg-alt); }
.primary-nav a.is-active { color: var(--navy); }
.primary-nav .nav-cta {
  color: #fff;
  background: var(--navy);
  margin-left: 10px;
  font-weight: 600;
}
.primary-nav .nav-cta:hover { background: var(--navy-deep); color: #fff; }

.nav-toggle {
  display: none;
  font-size: 0.85rem;
  font-weight: 600;
  background: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--ink);
}

/* ---------------- shared section chrome ---------------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 84px 4vw;
}

.rule-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
  margin-bottom: 44px;
}
.rule-head .slug { color: var(--navy); }
.rule-head .slug-note {
  color: var(--gray);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 0.82rem;
  text-align: right;
}

h2.display { font-size: clamp(1.8rem, 3.2vw, 2.6rem); max-width: 24ch; }

.section-intro {
  margin-top: 18px;
  max-width: 62ch;
  color: var(--gray);
  font-size: 1.04rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
}

.prose { max-width: 66ch; }
.prose p + p { margin-top: 16px; }
.prose strong { font-weight: 600; }

/* ---------------- hero ---------------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 4vw 64px;
}

.hero h1 {
  font-size: clamp(2.7rem, 6.6vw, 5rem);
}
.hero h1 .accent { color: var(--navy); }

.hero-lede {
  margin-top: 28px;
  max-width: 58ch;
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--gray);
}

.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 26px;
  border: 1px solid var(--navy);
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button-primary { background: var(--navy); color: #fff; }
.button-primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.button-ghost { background: transparent; color: var(--navy); }
.button-ghost:hover { background: var(--navy); color: #fff; }

.stat-row {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 24px 20px 26px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat strong {
  display: block;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.stat span {
  display: block;
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--gray);
  max-width: 24ch;
}

/* ---------------- engagement rows ---------------- */

.engagement-table { margin-top: 8px; }

.engagement {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 5fr);
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.engagement:first-child { border-top: none; }
.engagement:last-child { border-bottom: 1px solid var(--line); }

.engagement h3 {
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  max-width: 18ch;
}

.eng-terms {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.mini-label {
  display: block;
  color: var(--gray);
  margin-bottom: 8px;
}

.eng-when p { font-size: 0.98rem; color: var(--gray); max-width: 60ch; }
.eng-what p { font-size: 0.98rem; max-width: 60ch; }

.table-footnote {
  margin-top: 26px;
  max-width: 70ch;
  font-size: 0.96rem;
  color: var(--gray);
  padding-left: 16px;
  border-left: 3px solid var(--navy);
}

/* ---------------- method ---------------- */

.method-list { list-style: none; margin-top: 8px; }
.method-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--gray);
  max-width: 56ch;
}
.method-list li:first-child { border-top: none; }
.method-list li strong { color: var(--ink); font-weight: 600; }

/* figure plates -> exhibits */
.plate {
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(23, 32, 43, 0.07);
}
.plate img { width: 100%; }
.plate figcaption {
  font-size: 0.82rem;
  color: var(--gray);
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.plate figcaption em {
  font-style: normal;
  font-weight: 600;
  color: var(--navy);
}

.plate-stack { display: grid; gap: 28px; }

/* ---------------- work index (dark navy) ---------------- */

.band-dark {
  background: var(--navy-deep);
  color: #eff3f8;
}
.band-dark .section { padding-top: 84px; padding-bottom: 84px; }
.band-dark .rule-head { border-top-color: #eff3f8; }
.band-dark .rule-head .slug { color: var(--blue-on-dark); }
.band-dark .rule-head .slug-note { color: #8ba3bd; }
.band-dark h2.display { color: #fff; }
.band-dark .section-intro { color: #b4c6d9; }

.case-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #2d4a68;
  border: 1px solid #2d4a68;
}
.case-card {
  background: var(--navy-deep);
  padding: 34px 32px 38px;
  text-decoration: none;
  display: block;
  transition: background 0.15s ease;
}
.case-card:hover { background: #123354; }
.case-card .case-tag { color: var(--blue-on-dark); }
.case-card h3 {
  margin-top: 14px;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
}
.case-card p { margin-top: 14px; font-size: 0.96rem; color: #b4c6d9; max-width: 48ch; }
.case-card .case-numbers {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.case-card .case-numbers span {
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid #2d4a68;
  border-radius: 2px;
  padding: 5px 10px;
  color: #dfe8f1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.case-card .case-go {
  display: block;
  margin-top: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-on-dark);
}

/* ---------------- toolkit ---------------- */

.tool-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.tool-grid article {
  padding: 26px 24px 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tool-grid h3 {
  font-weight: 700;
  font-size: 1.08rem;
  margin-bottom: 6px;
}
.tool-grid .tool-meta {
  color: var(--navy);
  font-size: 0.66rem;
  margin-bottom: 10px;
}
.tool-grid p { font-size: 0.92rem; color: var(--gray); }
.tool-grid .tool-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--navy);
  padding-bottom: 1px;
}
.tool-grid .tool-link:hover { color: var(--navy-deep); border-bottom-color: var(--navy-deep); }

.toolkit-cta {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  background: var(--bg-alt);
  padding: 22px 26px;
  max-width: 660px;
}
.toolkit-cta p { font-size: 0.98rem; }
.toolkit-cta a { color: var(--navy); font-weight: 600; }

/* ---------------- firm ---------------- */

.who-split { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.leader { max-width: 380px; }
.leader img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.03);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(23, 32, 43, 0.07);
}
.leader figcaption {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.leader figcaption strong { font-weight: 700; font-size: 1.05rem; }
.leader figcaption span { font-size: 0.85rem; color: var(--gray); }
.leader figcaption a { color: var(--navy); }

/* ---------------- contact ---------------- */

.contact { padding-top: 104px; }
.contact h2.display { font-size: clamp(2.1rem, 4.2vw, 3.2rem); max-width: 20ch; }
.contact-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- footer ---------------- */

.site-footer {
  border-top: 2px solid var(--ink);
  padding: 28px 4vw 44px;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer p { font-size: 0.85rem; color: var(--gray); }

/* ================================================================
   CASE PAGES
   ================================================================ */

.case-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 4vw 56px;
}
.breadcrumb { color: var(--gray); }
.breadcrumb a { color: var(--navy); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.case-hero h1 {
  margin-top: 26px;
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  max-width: 22ch;
}
.case-hero .case-lede {
  margin-top: 22px;
  max-width: 62ch;
  font-size: 1.12rem;
  color: var(--gray);
}

/* spec sheet */
.spec {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-top: 2px solid var(--ink);
}
.spec div { padding: 16px 18px 18px; border-right: 1px solid var(--line); }
.spec div:last-child { border-right: none; }
.spec .mini-label { margin-bottom: 6px; color: var(--navy); }
.spec p { font-size: 0.94rem; line-height: 1.5; }

.case-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 4vw;
}

/* big outcome digits */
.digit-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.digit-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.digit {
  padding: 24px 20px 26px;
  border-right: 1px solid var(--line);
}
.digit:last-child { border-right: none; }
.digit strong {
  display: block;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.digit span { display: block; margin-top: 9px; font-size: 0.88rem; color: var(--gray); line-height: 1.45; }

/* data tables */
.data-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-top: 2px solid var(--ink); }
.data-table th, .data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 0.92rem;
  vertical-align: top;
}
.data-table th:last-child, .data-table td:last-child { border-right: none; }
.data-table thead th {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: var(--bg-alt);
  color: var(--ink);
}
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: none; }
.data-table tbody th[scope="row"] {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  width: 22%;
}
.data-table caption { color: var(--navy); }

.table-scroll { overflow-x: auto; }
.table-scroll .data-table { min-width: 640px; }

/* case CTA + next */
.case-next {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 4vw 84px;
}
.case-next .next-link {
  display: block;
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  padding: 30px 32px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.case-next .next-link:hover { background: var(--bg-alt); }
.case-next .next-link .mini-label { color: var(--navy); }
.case-next .next-link strong { font-weight: 700; font-size: 1.35rem; }

.anon-note {
  margin-top: 26px;
  font-size: 0.82rem;
  color: var(--gray);
  max-width: 72ch;
}

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .split, .who-split { grid-template-columns: 1fr; gap: 40px; }
  .engagement { grid-template-columns: 1fr; gap: 18px; padding: 26px 0; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .spec { grid-template-columns: 1fr 1fr; }
  .spec div:nth-child(2) { border-right: none; }
  .spec div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .digit-row, .digit-row.cols-4 { grid-template-columns: 1fr 1fr; }
  .digit { border-bottom: 1px solid var(--line); }
  .digit:nth-child(even) { border-right: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--ink);
    padding: 8px 4vw 16px;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .primary-nav .nav-cta { margin: 12px 0 0; text-align: center; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .hero { padding-top: 56px; }
  .section, .case-section { padding: 56px 5vw; }
  .tool-grid { grid-template-columns: 1fr; }
  .case-hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
}
