:root {
  --ink: #111827;
  --ink-soft: #1f2937;
  --muted: #55606e;
  --line: #d8dee5;
  --line-strong: #aeb8c4;
  --paper: #ffffff;
  --soft: #f4f7f7;
  --soft-teal: #e8f3f1;
  --accent: #0f766e;
  --accent-dark: #0a5a55;
  --signal: #b45309;
  --critical: #b42318;
  --code: #131d2a;
  --code-muted: #9cadbd;
  --max: 1180px;
  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --body: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--accent-dark);
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.34);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  position: relative;
  display: inline-block;
  border: 1px solid var(--ink);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--accent);
}

.brand-mark::before {
  width: 1px;
  height: 30px;
  left: 9px;
  top: -5px;
  transform: rotate(38deg);
}

.brand-mark::after {
  width: 6px;
  height: 6px;
  right: -3px;
  top: 4px;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  text-decoration: none;
}

.nav-cta {
  padding: 9px 13px;
  border: 1px solid var(--ink);
  color: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  width: 1px;
  top: 0;
  bottom: 0;
  left: calc(50% + 190px);
  background: var(--line);
}

.hero-grid {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
  align-items: stretch;
}

.hero-copy {
  align-self: center;
  padding: 88px 72px 88px 0;
}

.eyebrow,
.utility-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  line-height: 1.08;
}

h1 {
  max-width: 780px;
  margin-top: 22px;
  font-size: clamp(55px, 7vw, 91px);
  font-weight: 710;
  letter-spacing: -0.065em;
}

h2 {
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 680;
  letter-spacing: -0.05em;
}

h3 {
  font-size: 27px;
  font-weight: 670;
  letter-spacing: -0.035em;
}

h4 {
  font-size: 19px;
  font-weight: 660;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.lead {
  max-width: 700px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover {
  background: var(--soft);
  color: var(--ink);
}

.hero-note {
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

.trace-wrap {
  display: flex;
  align-items: center;
  padding: 64px 0 64px 46px;
}

.trace-panel {
  width: 100%;
  min-height: 470px;
  padding: 28px;
  color: #e9f0f5;
  background: var(--code);
  box-shadow: 16px 16px 0 var(--soft-teal);
}

.trace-head,
.trace-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--code-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trace-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #82d3c9;
}

.trace-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45b8aa;
}

.trace-list {
  position: relative;
  margin: 34px 0;
  padding-left: 26px;
}

.trace-list::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 5px;
  width: 1px;
  background: #405064;
}

.trace-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #28374a;
  font-family: var(--mono);
  font-size: 13px;
}

.trace-step::before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  top: 20px;
  left: -25px;
  border: 2px solid #728196;
  border-radius: 50%;
  background: var(--code);
}

.trace-step strong {
  font-weight: 500;
}

.trace-step span {
  color: var(--code-muted);
}

.trace-step.bottleneck {
  margin: 8px -12px;
  padding: 14px 12px;
  border: 1px solid #74501c;
  background: #241f18;
}

.trace-step.bottleneck::before {
  left: -14px;
  border-color: #e9a13a;
  background: #e9a13a;
}

.trace-step.bottleneck span,
.trace-step.bottleneck small {
  color: #efb55f;
}

.trace-step small {
  display: block;
  margin-top: 3px;
  color: var(--code-muted);
  font-family: var(--body);
  font-size: 12px;
}

.trace-foot strong {
  color: white;
  font-size: 15px;
  font-weight: 500;
}

.capability-rail {
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.rail-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.rail-inner span {
  white-space: nowrap;
}

.rail-inner i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

.section {
  padding: 94px 0;
  border-bottom: 1px solid var(--line);
}

.section.soft {
  background: var(--soft);
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 90px;
  align-items: end;
  margin-bottom: 54px;
}

.section-intro p {
  max-width: 690px;
  color: var(--muted);
  font-size: 19px;
}

.service-list {
  border-top: 1px solid var(--ink);
}

.service-row {
  display: grid;
  grid-template-columns: 120px minmax(240px, 0.7fr) minmax(0, 1.3fr) 28px;
  gap: 32px;
  align-items: start;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.service-row:hover h3,
.service-row:hover .row-arrow {
  color: var(--accent-dark);
}

.service-code {
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.service-row p {
  color: var(--muted);
}

.row-arrow {
  font-family: var(--mono);
  font-size: 21px;
  transition: transform 160ms ease;
}

.service-row:hover .row-arrow {
  transform: translateX(4px);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.process-step {
  min-height: 240px;
  padding: 28px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: white;
}

.process-step .step-number {
  display: block;
  margin-bottom: 52px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
}

.process-step p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.guide-card {
  min-height: 290px;
  padding: 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.guide-card:nth-child(even) {
  border-right: 0;
}

.guide-card:hover {
  background: var(--soft-teal);
}

.guide-card .utility-label {
  margin-bottom: 54px;
}

.guide-card p {
  margin-top: 14px;
  color: var(--muted);
}

.guide-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.product-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.product-item {
  padding: 32px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.product-item p {
  margin-top: 12px;
  color: var(--muted);
}

.product-item a {
  display: inline-block;
  margin-top: 22px;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: 90px;
}

.contact-copy p {
  margin-top: 22px;
  color: var(--muted);
  font-size: 18px;
}

.contact-form {
  padding: 34px;
  border: 1px solid var(--line-strong);
  background: white;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

.form-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.form-status.ok {
  color: var(--accent-dark);
}

.form-status.error {
  color: var(--critical);
}

.site-footer {
  padding: 38px 0;
  background: var(--ink);
  color: #d9e0e7;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

.footer-inner p,
.footer-links {
  color: #aeb9c6;
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  text-decoration: none;
}

/* Consulting overview and educational guides */
.page-hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 920px;
  font-size: clamp(52px, 7vw, 82px);
}

.page-hero .lead {
  max-width: 790px;
}

.breadcrumb {
  margin-bottom: 30px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--accent-dark);
}

.page-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.page-rail div {
  padding: 20px 26px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.page-rail div:last-child {
  border-right: 0;
}

.content-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: 86px;
  justify-content: center;
  align-items: start;
}

.toc {
  position: sticky;
  top: 104px;
  border-top: 1px solid var(--ink);
}

.toc-title {
  padding: 14px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-dark);
}

.article {
  min-width: 0;
}

.article section {
  padding: 0 0 68px;
  scroll-margin-top: 100px;
}

.article section + section {
  padding-top: 68px;
  border-top: 1px solid var(--line);
}

.article h2 {
  font-size: clamp(34px, 4vw, 48px);
}

.article h3 {
  margin-top: 38px;
  font-size: 24px;
}

.article p {
  margin-top: 20px;
  color: var(--ink-soft);
}

.article ul,
.article ol {
  margin: 22px 0 0;
  padding-left: 22px;
}

.article li {
  margin-top: 10px;
  padding-left: 6px;
}

.article strong {
  color: var(--ink);
}

.callout {
  margin: 34px 0;
  padding: 24px 26px;
  border-left: 4px solid var(--accent);
  background: var(--soft-teal);
}

.callout p:first-child {
  margin-top: 0;
  color: var(--ink);
  font-weight: 650;
}

.symptom-grid,
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 30px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.symptom,
.metric {
  min-height: 148px;
  padding: 22px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.symptom p,
.metric p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.metric strong {
  display: block;
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.method-list {
  margin-top: 32px;
  border-top: 1px solid var(--ink);
}

.method-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 20px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.method-item > span {
  color: var(--accent-dark);
  font-family: var(--mono);
  font-size: 12px;
}

.method-item p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 15px;
}

.source-list a {
  color: var(--accent-dark);
}

.next-guide {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line-strong);
  background: var(--soft);
}

.next-guide p {
  margin-top: 8px;
  color: var(--muted);
}

@media (max-width: 940px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero::before {
    display: none;
  }

  .hero-grid,
  .section-intro,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 72px 0 44px;
  }

  .trace-wrap {
    padding: 0 0 72px;
  }

  .trace-panel {
    max-width: 620px;
  }

  .service-row {
    grid-template-columns: 100px minmax(220px, 0.8fr) minmax(0, 1.2fr) 24px;
    gap: 22px;
  }

  .process-grid {
    grid-template-columns: 1fr 1fr;
  }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .toc {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toc-title {
    grid-column: 1 / -1;
  }

  .toc a:nth-child(even) {
    border-right: 1px solid var(--line);
    padding-right: 16px;
  }

  .toc a:nth-child(odd) {
    padding-left: 16px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: min(100% - 32px, var(--max));
  }

  .site-nav {
    min-height: 64px;
  }

  .nav-cta {
    padding: 7px 10px;
    font-size: 12px;
  }

  h1,
  .page-hero h1 {
    font-size: 49px;
  }

  .lead {
    font-size: 18px;
  }

  .trace-panel {
    min-height: 0;
    padding: 22px;
    box-shadow: 8px 8px 0 var(--soft-teal);
  }

  .rail-inner {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 16px;
  }

  .section,
  .page-hero {
    padding: 70px 0;
  }

  .section-intro {
    gap: 22px;
    margin-bottom: 38px;
  }

  .service-row {
    grid-template-columns: 1fr 24px;
    gap: 12px 18px;
  }

  .service-code,
  .service-row h3,
  .service-row p {
    grid-column: 1;
  }

  .row-arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .process-grid,
  .guide-grid,
  .product-strip,
  .form-grid,
  .symptom-grid,
  .metric-grid,
  .page-rail {
    grid-template-columns: 1fr;
  }

  .guide-card,
  .guide-card:nth-child(even) {
    border-right: 0;
  }

  .process-step {
    min-height: 200px;
  }

  .process-step .step-number {
    margin-bottom: 30px;
  }

  .contact-form {
    padding: 24px;
  }

  .footer-inner,
  .next-guide {
    grid-template-columns: 1fr;
  }

  .page-rail div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .page-rail div:last-child {
    border-bottom: 0;
  }

  .toc {
    display: block;
  }

  .toc a:nth-child(even),
  .toc a:nth-child(odd) {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
