:root {
  --ink: #10202b;
  --muted: #5c6872;
  --paper: #f4f6f7;
  --white: #ffffff;
  --line: #d9e0e6;
  --blue: #155dbb;
  --teal: #167a78;
  --gold: #b7791f;
  --red: #a43f35;
  --green: #2e7651;
  --violet: #6554a3;
  --shadow: 0 24px 80px rgba(16, 32, 43, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand img {
  width: 52px;
  height: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

nav a {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  min-height: 720px;
  padding: clamp(34px, 6vw, 86px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.72)),
    url("data:image/svg+xml,%3Csvg width='1400' height='900' viewBox='0 0 1400 900' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23155dbb' stroke-opacity='.18' stroke-width='2'%3E%3Cpath d='M90 170h250v90h150v-50h210v170h230v-86h260'/%3E%3Cpath d='M145 610h210v-90h155v70h250v-150h150v74h300'/%3E%3Cpath d='M320 260v260M720 210v230M940 380v130'/%3E%3Ccircle cx='340' cy='260' r='28'/%3E%3Ccircle cx='492' cy='210' r='24'/%3E%3Ccircle cx='720' cy='440' r='26'/%3E%3Ccircle cx='910' cy='514' r='24'/%3E%3C/g%3E%3Cg fill='%23167a78' fill-opacity='.14'%3E%3Crect x='104' y='154' width='78' height='32' rx='4'/%3E%3Crect x='610' y='416' width='108' height='32' rx='4'/%3E%3Crect x='1010' y='294' width='104' height='32' rx='4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.hero-copy {
  max-width: 920px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 970px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.92;
}

.hero-lead {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.48rem);
  line-height: 1.45;
}

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

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  font-weight: 800;
}

.button.primary {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.hero-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  box-shadow: var(--shadow);
  padding: 24px;
}

.panel-kicker {
  margin: 0 0 15px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel ol {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-panel li {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hero-panel li:first-child {
  border-top: 0;
  padding-top: 0;
}

.hero-panel span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel strong {
  display: block;
  line-height: 1.35;
}

.quality-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0 clamp(18px, 4vw, 54px) 34px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.quality-strip article {
  min-height: 150px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
}

.quality-strip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.quality-strip span,
.section-heading p,
.timeline-step p,
.processor-flow p,
.handshake-grid p,
.sources li,
.controlled-note {
  color: var(--muted);
  line-height: 1.45;
}

.section-band {
  padding: clamp(42px, 6vw, 78px) clamp(18px, 4vw, 54px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 4.4rem);
  line-height: 0.98;
}

.section-heading p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 1.05rem;
}

.case-study {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-layout {
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  gap: 18px;
}

.timeline,
.decision-board,
.processor-flow article,
.handshake-grid article,
.code-panel {
  background: #fbfcfc;
  border: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
}

.timeline-step span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-weight: 900;
}

.timeline-step.warning span {
  background: var(--gold);
}

.timeline-step.success span {
  background: var(--green);
}

.timeline-step h3,
.processor-flow h3,
.handshake-grid h3 {
  margin: 0 0 6px;
}

.timeline-step p,
.processor-flow p,
.handshake-grid p {
  margin: 0;
}

.decision-board {
  padding: 20px;
}

.decision-board h3 {
  margin: 0 0 14px;
  font-size: 1.3rem;
}

.decision-node {
  padding: 13px;
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 800;
}

.branch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 16px;
}

.branch-item {
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 800;
}

.branch-item.hold {
  color: #6d211a;
  background: #fff0ee;
  border: 1px solid #e0b1ac;
}

.branch-item.pass {
  color: #1f5638;
  background: #edf7f1;
  border: 1px solid #a9ccb8;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metrics div {
  padding: 16px;
  min-height: 116px;
  background: #10202b;
  color: var(--white);
}

.metrics strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
}

.metrics span {
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.35;
}

.split {
  background: var(--paper);
}

.processor-flow,
.handshake-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.processor-flow article,
.handshake-grid article {
  padding: 18px;
  min-height: 210px;
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 28px;
  margin-bottom: 28px;
  background: var(--blue);
  color: var(--white);
  font-weight: 900;
}

.controlled-note {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
  background: var(--white);
}

.handshake {
  background: #111d28;
  color: var(--white);
}

.handshake .eyebrow,
.handshake .section-heading p,
.handshake-grid p {
  color: rgba(255, 255, 255, 0.72);
}

.handshake-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.handshake-grid article,
.code-panel {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.code-panel {
  margin-top: 16px;
  padding: 18px;
}

.code-panel p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.code-panel code {
  display: block;
  margin-bottom: 14px;
  padding: 12px;
  overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.24);
  color: #ffffff;
}

.sources {
  background: var(--white);
}

.sources ul {
  display: grid;
  gap: 12px;
  max-width: 920px;
  padding-left: 20px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 20px clamp(18px, 4vw, 54px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--white);
}

@media (max-width: 980px) {
  .hero,
  .case-layout,
  .quality-strip,
  .processor-flow,
  .handshake-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .quality-strip {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(2.5rem, 16vw, 4.5rem);
  }

  .hero {
    padding: 28px 18px;
  }

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