/* convoy.bot, in the Deploy Forward brand: sharp corners, 1px ink borders,
   mono-700 uppercase chrome, JetBrains Mono display, Work Sans body. */
@font-face {
  font-family: "Work Sans";
  src: url("/fonts/work-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --gray-50: #f5f5f4;
  --gray-100: #edeeec;
  --gray-300: #ccd0d8;
  --gray-400: #9aa1ad;
  --gray-500: #727a89;
  --gray-600: #49505f;
  --gray-700: #2b3242;
  --ink: #0a0c12;
  --accent: #1d4ed8;
  --accent-soft: rgba(29, 78, 216, 0.07);
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.10);
  --navy: #0a1020;
  --navy-2: #0f1830;
  --navy-line: rgba(255, 255, 255, 0.09);
  --line: rgba(10, 12, 18, 0.10);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rail: 1180px;
  --gutter: clamp(1rem, 5vw, 4rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code, pre { font-family: var(--mono); font-size: .9em; }
p { margin: 0 0 1rem; max-width: 68ch; }

.wrap { max-width: var(--rail); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- chrome: mono 700 uppercase ---------- */
.chrome, .nav a, .btn, .eyebrow, .lane-name, .cli-status, th, .label {
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .68rem;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
}
.top-row { display: flex; align-items: stretch; justify-content: space-between; gap: 1rem; min-height: 3.25rem; }
.mark {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.mark .bk { color: var(--teal); }
.mark img { width: 22px; height: 22px; }
.mark .word { white-space: nowrap; }
.nav { display: flex; align-items: stretch; }
.nav a {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: var(--ink);
  text-decoration: none;
  border-left: 1px solid var(--line);
}
.nav a:last-child { border-right: 1px solid var(--line); }
.nav a:hover { background: var(--ink); color: var(--bg); }
.nav a.gh { background: var(--ink); color: var(--bg); }
.nav a.gh:hover { background: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }

/* ---------- headings ---------- */
h1, h2 {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 17ch; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); margin-bottom: 1.25rem; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.0625rem; margin: 0 0 .4rem; }

.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--teal); margin: 0 0 1.25rem; }
.eyebrow .dot { width: 7px; height: 7px; background: var(--teal); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lede { font-size: 1.1875rem; color: var(--gray-700); margin-top: 1.25rem; max-width: 56ch; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--ink); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 6rem);
}

/* the thread board: the brand mosaic, one lane per harness */
.board {
  margin: 0;
  border: 1px solid var(--ink);
  background: var(--surface);
}
.board-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .8rem;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
}
.board-head .chrome { color: var(--bg); }
.board-head .chrome.id { color: var(--gray-400); font-weight: 500; text-transform: none; letter-spacing: 0; }
.lanes { padding: 1.1rem 1rem .9rem; display: grid; gap: 8px; }
.lane { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); align-items: center; gap: .9rem; }
.lane-name { color: var(--gray-600); font-size: .7rem; }
.lane.active .lane-name { color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 16), minmax(0, 1fr)); gap: 5px; }
.tiles .tile:nth-child(n+17) { display: none; }
.tile { aspect-ratio: 1; background: var(--gray-100); transition: background .5s var(--ease); }
.tile.l1 { background: #dbe4f7; }
.tile.l2 { background: #a9c0f0; }
.tile.l3 { background: #5c86e3; }
.tile.send { background: var(--accent); }
.tile.receipt { background: var(--teal); }
.cli {
  border-top: 1px solid var(--line);
  padding: .8rem 1rem .85rem;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.55;
  color: var(--gray-700);
  min-height: 3.9rem;
}
.cli .p { color: var(--gray-400); }
.cli .tok { color: var(--accent); }
.cli .ok { color: var(--teal); }
.board-key { display: flex; flex-wrap: wrap; gap: 1rem; padding: .6rem 1rem; border-top: 1px solid var(--line); }
.key { display: inline-flex; align-items: center; gap: .4rem; color: var(--gray-600); }
.key i { width: 9px; height: 9px; display: inline-block; }
.key .s { background: var(--accent); }
.key .r { background: var(--teal); }
.key .t { background: #a9c0f0; }

/* ---------- sections ---------- */
.section { padding-block: clamp(3.5rem, 7vw, 6rem); border-bottom: 1px solid var(--ink); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem; align-items: start; margin-bottom: 2.25rem; }
.section-head p { color: var(--gray-700); margin: .35rem 0 0; }

/* install */
.install-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; }
.step h3 { margin-bottom: .6rem; }
.code { position: relative; border: 1px solid var(--ink); background: var(--ink); }
.code pre {
  margin: 0;
  padding: 1rem 1rem 1rem 1.1rem;
  overflow-x: auto;
  color: #e6e8ec;
  font-size: .82rem;
  line-height: 1.6;
  padding-right: 4.5rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code pre code::before { content: "$ "; color: #727a89; }
.code .copy {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
  border-left: 1px solid var(--navy-line);
  border-bottom: 1px solid var(--navy-line);
  background: var(--navy-2);
  color: #ccd0d8;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .6rem;
  padding: .45rem .7rem;
  cursor: pointer;
}
.code .copy:hover { background: var(--accent); color: #fff; }
.note { font-size: .95rem; color: var(--gray-600); margin-top: .75rem; }
.note code, p code { background: var(--gray-50); border: 1px solid var(--line); padding: .05em .3em; font-size: .85em; }
td code { background: var(--gray-50); padding: .1em .3em; font-size: .84em; overflow-wrap: anywhere; }

.harness { margin-top: 3rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--ink); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--gray-50); border-bottom: 1px solid var(--ink); color: var(--gray-600); }
tbody th { font-size: .7rem; color: var(--ink); white-space: nowrap; width: 11rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* how it works: one frame, cells split by hairlines */
.frame { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--surface); }
.cell { padding: 1.6rem 1.6rem 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell:nth-child(2n) { border-right: 0; }
.cell:nth-last-child(-n+2) { border-bottom: 0; }
.cell p { color: var(--gray-700); margin: 0; }
.aside { margin-top: 1.5rem; color: var(--gray-600); }

/* across machines: navy band with the white-on-navy mosaic */
.machines { position: relative; background: var(--navy); color: #e6e8ec; border-bottom: 1px solid var(--ink); overflow: hidden; }
.machines canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.machines .wrap { position: relative; padding-block: clamp(3.5rem, 7vw, 6rem); }
.machines h2 { color: #fff; max-width: 20ch; }
.machines p { color: #ccd0d8; }
.machines a { color: #9fb8ff; }
.machines a:hover { color: #fff; }
.machines .eyebrow { color: #5eead4; }
.machines .eyebrow .dot { background: #5eead4; }
.route { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; align-items: center; gap: .75rem; margin: 1.75rem 0 1.5rem; }
.route .node { border: 1px solid rgba(255, 255, 255, 0.35); padding: .5rem .8rem; color: #fff; }
.route .wire { width: 3rem; height: 1px; background: rgba(255, 255, 255, 0.35); }

/* what it is not */
.nots { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.nots li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.nots strong { font-family: var(--mono); font-weight: 500; letter-spacing: -0.01em; }
.nots span { color: var(--gray-700); }

/* skills */
.skills { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; }
.skills h3 { font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; color: var(--gray-600); margin-bottom: .8rem; }
.skills ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.skills li { font-family: var(--mono); font-size: .8rem; border: 1px solid var(--ink); background: var(--surface); padding: .3rem .55rem; }

/* footer */
footer { padding-block: 2rem 2.5rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .9rem; color: var(--gray-600); }
.foot p { margin: 0; }
.versions { font-family: var(--mono); font-size: .78rem; }
.links { display: flex; gap: 1.25rem; }

/* 404 / retired */
.retired { padding-block: clamp(4rem, 12vw, 9rem); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .section-head, .install-grid, .skills { grid-template-columns: minmax(0, 1fr); }
  .frame { grid-template-columns: minmax(0, 1fr); }
  .cell { border-right: 0; }
  .cell:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cell:last-child { border-bottom: 0; }
  .nots li { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
}
@media (max-width: 640px) {
  .nav a:not(.gh) { display: none; }
  .tiles { --cols: 12; }
  .tiles .tile:nth-child(n+13) { display: none; }
  .lane { grid-template-columns: 4.2rem minmax(0, 1fr); }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tbody th { padding-bottom: 0; border-bottom: 0; }
  .route { grid-template-columns: minmax(0, 1fr); }
  .route .wire { width: 1px; height: 1.25rem; margin-left: 1rem; }
  tbody th { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
