/* ===========================================================================
   Conveyor.AI — home page. Single stylesheet, no build step, no external
   assets or fonts, no JavaScript. Dark-only on purpose: it matches the
   product's own sign-in and dashboard surfaces.
   =========================================================================== */

:root {
  --bg: #0b0d11;
  --bg-2: #0f1218;
  --surface: #14181f;
  --surface-2: #191e26;
  --border: #232935;
  --border-2: #2e3644;

  --text: #e8ebf1;
  --dim: #9aa4b4;
  --faint: #6a7484;

  --accent: #6f9bff;
  --accent-2: #8b5cf6;
  --ok: #3ddc97;
  --warn: #f0b429;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --r: 12px;
  --wrap: 1120px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Anchored sections must clear the sticky header. */
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Two soft light sources behind the page, fixed so they don't scroll away. */
  background-image:
    radial-gradient(900px 520px at 78% -8%, rgba(111, 155, 255, .16), transparent 62%),
    radial-gradient(760px 460px at 8% 4%, rgba(139, 92, 246, .13), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0; font-weight: 650; }
p { margin: 0; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Keyboard users get a real way past the header. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--accent); color: #0b0d11;
  border-radius: 0 0 8px 0; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── nav ──────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(11, 13, 17, .72);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  height: 100%;
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.mark { width: 27px; height: 27px; display: block; }
.wordmark { font-size: 16.5px; font-weight: 650; letter-spacing: -0.015em; }
.dot { color: var(--accent); }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  text-decoration: none; color: var(--dim); font-size: 14.5px;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }

/* ── buttons ──────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 9px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn-sm { padding: 8px 15px; font-size: 14px; border-radius: 8px; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #080a0e;
  box-shadow: 0 6px 20px rgba(111, 155, 255, .22);
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: #3b4557; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-row.center { justify-content: center; margin-top: 34px; }

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero { padding: 86px 0 92px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}

/* min-width:0 on both grid children, or a long code line / nowrap log row can
   force the whole track wider than the viewport. */
.hero-copy { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 11px; border-radius: 999px;
  background: rgba(111, 155, 255, .08); border: 1px solid rgba(111, 155, 255, .22);
  color: #b9caf5; font-size: 13px; font-weight: 550; letter-spacing: .01em;
}
.pip {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, .16);
}

h1 { font-size: clamp(2.35rem, 5.2vw, 3.65rem); margin: 22px 0 0; font-weight: 680; }
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede { margin-top: 20px; font-size: 17.5px; color: var(--dim); max-width: 46ch; }

.hero-facts {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px;
  margin: 32px 0 0; padding: 0;
  font-size: 13.5px; color: var(--faint);
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); opacity: .8;
}

/* ── hero visual: the product, mid-run ────────────────────────────────── */

.hero-visual { min-width: 0; }
.win {
  border: 1px solid var(--border-2); border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), #10141a);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.win-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 15px; border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .015);
}
.tl { width: 10px; height: 10px; border-radius: 50%; background: #333c4a; }
.win-title {
  margin-left: 10px; font-size: 12.5px; color: var(--faint);
  font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.rail {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 15px; border-bottom: 1px solid var(--border);
}
.stage {
  font-size: 11.5px; padding: 4px 9px; border-radius: 6px;
  background: #1b212b; color: var(--faint); border: 1px solid transparent;
  white-space: nowrap;
}
.stage.done { color: #8ea0b8; }
.stage.done::before { content: "✓ "; color: var(--ok); }
.stage.live {
  background: rgba(111, 155, 255, .12); border-color: rgba(111, 155, 255, .38);
  color: #cddcff; font-weight: 600;
}

.log { padding: 15px; font-family: var(--mono); font-size: 12.5px; line-height: 1.85; }
.log p { color: #9fb0c6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt { display: inline-block; min-width: 26px; margin-right: 8px; font-weight: 600; }
.lt.run  { color: var(--accent-2); }
.lt.ok   { color: var(--ok); }
.lt.work { color: var(--warn); }
.caret {
  display: inline-block; width: 7px; height: 14px; margin-left: 3px;
  background: var(--accent); vertical-align: -2px;
  animation: blink 1.15s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.ask { margin: 0 15px 15px; padding: 13px 14px; border-radius: 10px;
       background: rgba(139, 92, 246, .08); border: 1px solid rgba(139, 92, 246, .26); }
.ask-q { font-size: 13px; color: #d6cdf7; }
.ask-a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 9px; padding: 8px 11px; border-radius: 7px;
  background: #0d1016; border: 1px solid var(--border-2);
  font-family: var(--mono); font-size: 12.5px; color: var(--text);
}
.ask-hint { color: var(--faint); font-size: 11px; }

/* ── bands ────────────────────────────────────────────────────────────── */

.band { padding: 84px 0; border-top: 1px solid var(--border); }
.band.alt { background: rgba(255, 255, 255, .014); }

.kicker {
  font-size: 12.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent);
}
.h2 { font-size: clamp(1.6rem, 3.1vw, 2.15rem); margin-top: 13px; }
.sub { margin-top: 16px; color: var(--dim); font-size: 16.5px; max-width: 62ch; }

/* ── steps ────────────────────────────────────────────────────────────── */

.steps {
  list-style: none; margin: 46px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px;
}
.steps li { position: relative; padding-top: 8px; }
/* A hairline above each step, tinted for the first — a subtle progress bar. */
.steps li::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--border-2); border-radius: 2px;
}
.steps li:first-child::before { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.num {
  display: inline-block; margin-top: 20px;
  font-family: var(--mono); font-size: 12.5px; color: var(--accent); font-weight: 600;
}
.steps h3 { font-size: 18.5px; margin: 8px 0 10px; }
.steps p { color: var(--dim); font-size: 15px; }

/* ── feature cards ────────────────────────────────────────────────────── */

.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  margin-top: 44px;
}
.card {
  padding: 26px 24px 27px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.card:hover { border-color: var(--border-2); background: var(--surface-2); transform: translateY(-2px); }
.ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 17px;
  background: rgba(111, 155, 255, .1); border: 1px solid rgba(111, 155, 255, .2);
  color: var(--accent);
}
.ico svg { width: 19px; height: 19px; }
.card h3 { font-size: 17px; margin-bottom: 9px; }
.card p { color: var(--dim); font-size: 14.7px; }

/* ── two-column copy + visual (pipeline, config) ──────────────────────── */

.pipe-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px; align-items: center;
}
.pipe-copy { min-width: 0; }

.ticks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.ticks li {
  position: relative; padding-left: 27px; color: var(--dim); font-size: 15px;
}
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3.5px rgba(111, 155, 255, .14);
}

/* ── flow rail ────────────────────────────────────────────────────────── */

.flow {
  list-style: none; margin: 0; padding: 0; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface); overflow: hidden;
}
.flow li {
  position: relative; display: grid;
  grid-template-columns: 22px minmax(0, 1fr); align-items: baseline;
  column-gap: 12px; padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}
.flow li:last-child { border-bottom: 0; }
.fdot {
  grid-row: 1 / span 2; align-self: center; justify-self: center;
  width: 9px; height: 9px; border-radius: 50%; background: var(--faint);
}
/* The dashboard's own status hues, in the order the flow walks them. */
.c-def  { background: #93a0b0; }
.c-plan { background: #a986f0; }
.c-impl { background: #6f9bff; }
.c-rev  { background: #e6a53a; }
.c-int  { background: #3ec8d6; }
.c-done { background: var(--ok); }

.flow b { font-size: 15px; font-weight: 600; }
.flow i { grid-column: 2; font-style: normal; font-size: 13.5px; color: var(--faint); }

/* ── code blocks ──────────────────────────────────────────────────────── */

.code {
  min-width: 0; border: 1px solid var(--border-2); border-radius: var(--r);
  background: #0d1016; overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38);
}
.code-bar {
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}
.fname { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.code pre {
  margin: 0; padding: 18px 16px; overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.72; color: #c6d0de;
  -webkit-overflow-scrolling: touch;
}
.code code { font: inherit; }
.code .c { color: #5f6b7d; font-style: italic; }
.code .k { color: #7fb2ff; }
.code .s { color: #9ae6b4; }
.code .n { color: #f0b429; }
.code .p { color: #6c7787; }
.code .pr { color: var(--accent-2); user-select: none; margin-right: 8px; }

/* ── quick start ──────────────────────────────────────────────────────── */

.start-inner { max-width: 760px; text-align: center; }
.start-inner .kicker,
.start-inner .h2 { text-align: center; }
.start-inner .sub { margin-left: auto; margin-right: auto; }
.start .code { margin-top: 38px; text-align: left; }

/* ── footer ───────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--border); padding: 36px 0 44px; }
.foot-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
}
.foot-brand { font-weight: 650; letter-spacing: -0.015em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { color: var(--dim); text-decoration: none; font-size: 14.5px; }
.foot-links a:hover { color: var(--text); }
.foot-note { margin-left: auto; color: var(--faint); font-size: 13.5px; }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-grid, .pipe-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .lede { max-width: none; }
  .cards, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The page is one scroll on a small screen — the wordmark and the CTA are
     enough, so the section links step aside rather than becoming a menu. */
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 58px; }
  .wrap, .nav-inner { padding: 0 18px; }

  .hero { padding: 54px 0 60px; }
  .band { padding: 60px 0; }

  h1 { font-size: clamp(2rem, 8.4vw, 2.5rem); }
  .lede { font-size: 16.5px; }
  .sub { font-size: 15.5px; }

  .cards, .steps { grid-template-columns: minmax(0, 1fr); }
  .steps { gap: 26px; }

  /* Full-width tap targets, comfortably above the 44px minimum. */
  .cta-row .btn { flex: 1 1 100%; padding: 13px 20px; }

  .code pre { font-size: 12px; padding: 15px 14px; }
  .flow li { padding: 12px 16px; }

  .foot-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .foot-note { margin-left: 0; }
  /* Line-height alone leaves these ~23px tall — too small to hit with a thumb. */
  .foot-links { gap: 0 22px; }
  .foot-links a { padding: 9px 0; }
}

/* ── motion ───────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Printing a marketing page is rare, but a dark slab of ink is never right. */
@media print {
  body { background: #fff; color: #000; }
  .nav, .hero-visual, .skip { display: none; }
}

/* ── long-form prose (privacy.html) ──────────────────────────────────────────
   The home page is all cards and grids, so it never needed running text. This
   is the one block that does: readable measure, explicit paragraph spacing
   (the reset above zeroes it), and headings that step down from .h2. */
.prose { max-width: 72ch; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  font-size: 1.18rem;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.prose h2:first-of-type { margin-top: 30px; }
.prose h3 { font-size: 1rem; margin-top: 26px; color: var(--text); }
.prose p, .prose li { color: var(--dim); }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.prose a { color: var(--accent); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose .updated { color: var(--faint); font-size: 14px; }
.page-head { padding: calc(var(--nav-h) + 56px) 0 0; }

/* ── rendered docs ────────────────────────────────────────────────────────
   Pages built from markdown by scripts/build-site.mjs. They reuse .prose for
   running text and add the blocks a hand-written page never needed: tables,
   numbered lists, quotes and inline code. Wider than .prose's 72ch measure
   because reference tables and ASCII diagrams don't fold. */
.prose.doc { max-width: 900px; }

.doc h2 { scroll-margin-top: calc(var(--nav-h) + 16px); }
.doc h3, .doc h4 { scroll-margin-top: calc(var(--nav-h) + 16px); }
.doc h4 { font-size: .94rem; margin-top: 22px; color: var(--text); }

/* Each --- in the source already separates sections, and .prose h2 draws its
   own rule — keep one line, not two. */
.doc hr {
  height: 0; margin: 40px 0 0; border: 0; border-top: 1px solid var(--border);
}
.doc hr + h2 { margin-top: 22px; padding-top: 0; border-top: 0; }

.doc ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.doc ol li::marker { color: var(--faint); font-variant-numeric: tabular-nums; }
.doc li > ul, .doc li > ol { margin-top: 10px; }

/* Inline code. The .code block styles only apply inside a fenced block, so
   prose-level `code` needs its own chip. */
.doc :not(pre) > code {
  font-family: var(--mono); font-size: .875em;
  padding: .12em .38em; border-radius: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: #c6d0de; overflow-wrap: break-word;
}
.doc a > code { color: var(--accent); }

.doc blockquote {
  margin: 0; padding: 2px 0 2px 18px;
  border-left: 2px solid var(--border-2); color: var(--faint);
}
.doc blockquote p { color: inherit; }

/* Tables scroll rather than squash — some have long command strings in them. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc table {
  width: 100%; border-collapse: collapse; font-size: 14.5px;
  border: 1px solid var(--border); border-radius: var(--r);
}
.doc thead th {
  text-align: left; font-weight: 600; color: var(--text); white-space: nowrap;
  background: rgba(255, 255, 255, .022);
}
.doc th, .doc td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  vertical-align: top; color: var(--dim);
}
.doc tbody tr:last-child td { border-bottom: 0; }
.doc td > code { white-space: nowrap; }

@media (max-width: 640px) {
  .doc table { font-size: 13.5px; }
  .doc th, .doc td { padding: 9px 11px; }
}
