/* api.sentx.io front page, the lander (routes/index.js, modules/docsHome).
   Same V4 dark identity as /api-docs/ (public/css/dark.css): navy floor, cobalt
   links, Inter self-hosted at /fonts/inter. Square surfaces, no card rows, no
   icon tiles, hover changes colour or border only. Nothing under 13px. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/inter/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --cobalt: #5b8def;
  --cobalt-hover: #6d9bf2;
  --link: #8fb0f5;
  --gold: #f4be4f;
  --cyan: #65c7e1;
  --text-primary: #e7eaf3;
  --text-body: #d1d5db;
  --text-muted: #9aa5b8;
  --border-base: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --bg-page-1: #050818;
  --bg-page-2: #060c24;
  --bg-page-3: #03051a;
  --bg-panel: #070d27;
  --bg-glass-2: rgba(255, 255, 255, 0.07);
  --bg-sunken: rgba(0, 0, 0, 0.34);
  --r-sm: 3px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SFMono-Regular', 'JetBrains Mono', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg-page-3);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: linear-gradient(180deg, var(--bg-page-1) 0%, var(--bg-page-2) 700px, var(--bg-page-3) 1600px, var(--bg-page-3) 100%);
  background-repeat: no-repeat;
  background-color: var(--bg-page-3);
  overflow-x: clip;
}

a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(143, 176, 245, 0.45); text-underline-offset: 3px; transition: color 0.15s ease, text-decoration-color 0.15s ease; }
a:hover { color: var(--text-primary); text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 10; background: var(--bg-page-1); padding: 6px 10px; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 1312px; margin: 0 auto; padding: 0 16px; }

strong { color: var(--text-primary); font-weight: 600; }
code { font-family: var(--mono); font-size: max(13px, 0.875em); color: var(--text-primary); background: var(--bg-glass-2); border-radius: var(--r-sm); padding: 1px 5px; overflow-wrap: anywhere; }

/* ── Buttons ── */
.btn { display: inline-block; font: 600 15px/1 var(--font); padding: 12px 18px; text-decoration: none; color: var(--text-primary); background: transparent; border: 1px solid var(--border-strong); border-radius: var(--r-sm); cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.35); }
.btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-hover); border-color: var(--cobalt-hover); color: #fff; }

/* ── Header ── */
.top { border-bottom: 1px solid var(--border-base); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: 0.02em; }
/* The logo file is the full wordmark (1468x370): fixed height, natural width. */
.brand img { display: block; width: auto; height: 28px; }
.brand span { padding-left: 10px; border-left: 1px solid var(--border-strong); line-height: 1.2; }
.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: 14px; }
.top-nav a:not(.btn) { color: var(--text-muted); text-decoration: none; }
.top-nav a:not(.btn):hover { color: var(--text-primary); }

/* ── Art band: the 320x128 pixel grid, never smoothed ── */
.art { margin: 24px 0 0; line-height: 0; border: 1px solid var(--border-base); background: #050a20; }
.art img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; image-rendering: pixelated; }

/* ── Hero: words, then the two paths (AI agents, REST API) ── */
.hero { margin-top: 32px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(38px, 7vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
.hero .lead { margin: 0 0 12px; max-width: 34em; font-size: 20px; line-height: 1.5; color: var(--text-primary); }
.hero .sub { margin: 0 0 24px; max-width: 36em; color: var(--text-muted); }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

/* The two path cards: one treatment, same buttons, equal height side by side. */
.paths { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.path { display: flex; flex-direction: column; min-width: 0; padding: 22px 22px 22px; background: var(--bg-panel); border: 1px solid var(--border-mid); }
.path > h2, .connect h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: 0; color: var(--text-primary); }
.path > p { margin: 0 0 14px; font-size: 15px; }
.path .ctas { margin-top: auto; padding-top: 8px; }
.path > .code { margin-bottom: 14px; }
.path-links { margin: 0 0 14px; padding-left: 20px; font-size: 15px; }
.path-links li + li { margin-top: 4px; }

/* Use SentX in Claude or ChatGPT: first in the AI agents card while the MCP server is on */
.connect { margin: 0; }
.connect p { margin: 0 0 12px; font-size: 15px; }
.connect .code { margin-bottom: 12px; }
.connect .connect-ask { margin-bottom: 4px; color: var(--text-muted); }
.connect-examples { margin: 0 0 12px; padding-left: 20px; }
.connect-examples li { margin: 0 0 4px; font-size: 15px; color: var(--text-primary); }

.qs { background: var(--bg-panel); border: 1px solid var(--border-mid); }
.qs-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--border-mid); }
.qs-tabs button { flex: none; font: 500 14px/1 var(--font); color: var(--text-muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 13px 10px 11px; cursor: pointer; white-space: nowrap; transition: color 0.15s ease, border-color 0.15s ease; }
.qs-tabs button:hover { color: var(--text-primary); }
.qs-tabs button[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--cobalt); }
.qs-pane { padding: 16px 16px 4px; }
.qs-pane + .qs-pane { border-top: 1px solid var(--border-base); }
.qs.tabbed .qs-pane + .qs-pane { border-top: 0; }
.qs-h { margin: 0 0 8px; font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: 0; color: var(--text-primary); }
.qs.tabbed .qs-h { display: none; }
.qs-pane p { margin: 0 0 12px; font-size: 15px; }
.qs-note { margin: 0; padding: 12px 16px 16px; border-top: 1px solid var(--border-base); font-size: 14px; color: var(--text-muted); }

/* Code blocks: scroll inside the block, never the page. */
.code { margin: 0 0 14px; border: 1px solid var(--border-mid); border-radius: var(--r-sm); background: var(--bg-sunken); min-width: 0; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 3px 6px 3px 12px; border-bottom: 1px solid var(--border-base); font-size: 13px; color: var(--text-muted); }
.code pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: var(--text-primary); tab-size: 2; }
.code pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: anywhere; }
.copy { font: inherit; font-size: 13px; color: var(--text-body); background: transparent; border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 3px 10px; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.copy:hover { color: var(--text-primary); border-color: var(--cobalt); }

/* ── Live strip ── */
.live { margin-top: 56px; border-top: 1px solid var(--border-base); border-bottom: 1px solid var(--border-base); background: rgba(5, 10, 32, 0.6); }
.live-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 22px; padding-bottom: 22px; align-items: center; }
.live-label h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--text-primary); }
.live-label p { margin: 0; font-size: 14px; color: var(--text-muted); }
.live-label code { font-size: 13px; }
.live-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 16px 24px; margin: 0; }
.live-nums div { display: flex; flex-direction: column-reverse; }
.live-nums dt { font-size: 14px; color: var(--text-muted); }
.live-nums dd { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; margin: 0; font: 700 clamp(24px, 7vw, 30px)/1.15 var(--font); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.live-nums small { font-size: 15px; font-weight: 500; color: var(--text-muted); }

/* ── Sections ── */
main section { margin-top: 72px; scroll-margin-top: 16px; }
main .part > h2 { margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--border-mid); }
.part .sub-part { margin-top: 48px; }
.part h3 { font-size: 21px; margin-bottom: 10px; }
.part h4 { font-size: 16px; }
.part .qs { margin-bottom: 24px; }
.part-lines { max-width: 46em; }
.rest-answer { max-width: 46em; }
.part .sub-part ul, .part .sub-part > p { max-width: 46em; }

/* The film: 16:9, the poster until play */
.film { margin: 0 0 32px; max-width: 960px; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--border-mid); }
.film figcaption { margin-top: 8px; font-size: 14px; color: var(--text-muted); }

/* What you can build: the three /api-docs/ access modes */
.build { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--border-mid); }
.build > div { min-width: 0; padding: 20px; }
.build > div + div { border-top: 1px solid var(--border-mid); }
.build h4 { margin-top: 0; }
.build p { margin-bottom: 10px; font-size: 15px; }
.build p:last-child { margin-bottom: 0; }
main h2 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 32px); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); }
main h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.35; font-weight: 600; color: var(--text-primary); }
main h4 { margin: 18px 0 6px; font-size: 15px; font-weight: 600; color: var(--text-primary); }
main p { margin: 0 0 14px; }
main ul { margin: 0 0 16px; padding-left: 20px; }
main li { margin: 0 0 8px; }
main li::marker { color: var(--text-muted); }
.section-intro { max-width: 46em; margin-bottom: 28px; }

/* Ask it */
.ask { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.ask > * { min-width: 0; }
.ask-single { max-width: 860px; }
.chat { background: var(--bg-panel); border: 1px solid var(--border-mid); padding: 20px; }
.msg + .msg { margin-top: 18px; }
.who { margin: 0 0 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.q { margin: 0; font-size: 17px; color: var(--text-primary); }
.call { margin: 4px 0 10px; }
.call code { background: none; padding: 0; font-size: 13.5px; color: var(--cyan); }
.asof { margin: 10px 0 0; font-size: 14px; color: var(--text-muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--border-base); }
thead th { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
tbody th { font-weight: 500; color: var(--text-primary); }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr > :last-child { padding-right: 0; }

.ask-tools h3 { margin-bottom: 4px; }
.tools { margin: 0 0 12px; }
.tools dt { padding-top: 10px; }
.tools dt code { background: none; padding: 0; font-size: 14px; color: var(--gold); }
.tools dd { margin: 2px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--border-base); font-size: 15px; }
details { margin: 0 0 14px; }
summary { cursor: pointer; color: var(--link); font-size: 15px; padding: 4px 0; }
summary:hover { color: var(--text-primary); }
.ask-tools > p { font-size: 14px; color: var(--text-muted); }

/* Try it */
.try-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; margin-bottom: 8px; }
.try-form input { flex: 1 1 14rem; min-width: 0; font: 15px var(--font); padding: 10px 12px; color: var(--text-primary); background: var(--bg-sunken); border: 1px solid var(--border-strong); border-radius: var(--r-sm); }
.try-form input:focus { border-color: var(--cobalt); }
.try-status { min-height: 1.6em; margin: 0 0 8px; font-size: 14px; color: var(--text-muted); }
.try-panes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 32px; }
.try-panes > * { min-width: 0; }
pre.json { margin: 0; min-height: 9rem; max-height: 26rem; overflow: auto; padding: 14px 16px; background: var(--bg-panel); border: 1px solid var(--border-mid); font: 13px/1.55 var(--mono); color: #cfe3ff; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Keys, limits and errors */
.docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.docs > * { min-width: 0; }
.docs dl { margin: 0 0 14px; }
.docs dt { margin-top: 14px; font-weight: 600; color: var(--text-primary); }
.docs dt:first-child { margin-top: 0; }
.docs dd { margin: 4px 0 0; }

/* ── Footer ── */
.foot { margin-top: 96px; padding: 28px 0 48px; border-top: 1px solid var(--border-base); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot a { color: var(--text-muted); }
.foot a:hover { color: var(--text-primary); }

@media (min-width: 900px) {
  .hero { margin-top: 40px; }
  .paths { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
  .path { padding: 28px; }
  .live-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 3fr); gap: 32px; }
  .ask { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; }
  .ask-single { grid-template-columns: minmax(0, 1fr); }
  .try-panes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .build { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .build > div { padding: 24px; }
  .build > div + div { border-top: 0; border-left: 1px solid var(--border-mid); }
  .docs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  a, .btn, .copy, .qs-tabs button { transition: none; }
}
