/* {{SERVICE}} public site.
 *
 * Design read: B2B developer-tool landing for technical buyers, restrained
 * dark-tech language, native CSS with a mono-labelled type system and one
 * non-purple accent.
 *
 * Dials: DESIGN_VARIANCE 7 / MOTION_INTENSITY 4 / VISUAL_DENSITY 4.
 *
 * Locks, audited before shipping:
 *   Colour   one accent, rust, on every interactive element in both themes.
 *            No purple, no neon glow, no gradient text. Off-black background
 *            in dark, never #000.
 *   Shape    a single radius token on every surface: buttons, inputs, cards,
 *            code blocks. No pills mixed with squares.
 *   Theme    one auto theme for the whole page. No section inverts.
 *   Motion   scroll-driven reveals in CSS only, no scroll listeners, fully
 *            disabled under prefers-reduced-motion.
 *
 * Constraint: served under a strict CSP with no build step, so this is hand
 * written CSS rather than Tailwind, with no icon library and no web fonts.
 * Hierarchy is carried by type scale, weight and space instead of icons.
 */

/* tokens ----------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #e7e9ed;
  --code-bg: #f7f8fa;

  --label: #15171a;        /* 17.9:1 on --bg */
  --label-2: #4a5058;      /*  8.1:1 */
  --label-3: #6a707a;      /*  5.0:1 */

  --line: rgba(16, 20, 26, .11);
  --line-strong: rgba(16, 20, 26, .2);

  /* The one accent. Links, buttons, focus, active nav. Nothing else. */
  --accent: #b23c0c;       /*  5.9:1 on --bg */
  --accent-hover: #93300a;
  --accent-ink: #ffffff;   /*  5.9:1 on --accent */
  --accent-wash: rgba(178, 60, 12, .08);

  --ok: #1a7f43;
  --warn: #8a5300;
  --danger: #b3261e;

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

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --maxw: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0f;         /* off-black, never pure #000 */
    --surface: #15171a;
    --surface-2: #1c1f23;
    --surface-3: #262a30;
    --code-bg: #101216;

    --label: #eceef1;      /* 16.7:1 on --bg */
    --label-2: #a5abb5;    /*  8.4:1 */
    --label-3: #8a919b;    /*  6.1:1 */

    --line: rgba(255, 255, 255, .12);
    --line-strong: rgba(255, 255, 255, .22);

    --accent: #ff8f5e;     /*  8.7:1 on --bg */
    --accent-hover: #ffa87f;
    --accent-ink: #2a1103; /*  7.9:1 on --accent */
    --accent-wash: rgba(255, 143, 94, .12);

    --ok: #3ddc84;
    --warn: #ffb340;
    --danger: #ff6961;
  }
}

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

html {
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: .4rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; }
.skip-link:focus { left: var(--gutter); top: .5rem; }

/* motion: scroll-driven, CSS only, no listeners -------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rise {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(1.5rem); }
  to   { opacity: 1; transform: none; }
}

/* layout primitives ------------------------------------------------------ */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: var(--measure); }
.mono { font-family: var(--mono); }
.muted { color: var(--label-2); }
.dim { color: var(--label-3); }
.small { font-size: .875rem; }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-line { border-top: 1px solid var(--line); }

/* Used sparingly: the pre-flight caps eyebrows at one per three sections. */
.eyebrow {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label-3);
  margin: 0 0 1rem;
}

.section-title { font-size: clamp(1.75rem, 3.6vw, 2.6rem); margin-bottom: .75rem; }
.section-lead { color: var(--label-2); max-width: var(--measure); margin-bottom: 2.75rem; }

/* masthead: wordmark only, no mark, single line, 64px --------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(16px)) {
  .masthead {
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(150%) blur(16px);
  }
}
.masthead-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wordmark {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--label);
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }

.masthead nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.masthead nav a {
  color: var(--label-2);
  font-size: .9375rem;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  white-space: nowrap;
}
.masthead nav a:hover { color: var(--label); background: var(--surface-2); text-decoration: none; }
.masthead nav a[aria-current="page"] { color: var(--label); font-weight: 500; }

/* buttons: one radius, tactile press, never pills ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .625rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: .9375rem;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-quiet { background: transparent; color: var(--label); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--surface-2); }

.btn-mini {
  min-height: 1.9rem;
  padding: .2rem .6rem;
  font-size: .75rem;
  font-family: var(--mono);
  background: transparent;
  color: var(--label-2);
  border-color: var(--line);
  border-radius: calc(var(--radius) - 4px);
}
.btn-mini:hover { background: var(--surface-3); color: var(--label); }
@media (pointer: coarse) { .btn-mini { min-height: 2.75rem; padding-inline: 1rem; } }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* hero: asymmetric split, never centred ----------------------------------- */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
/* Six-word headline, so the scale is planned to land on two lines at desktop
   rather than starting large and wrapping to three. */
.hero h1 {
  font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.hero-lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--label-2);
  max-width: 40ch;
  margin-bottom: 2rem;
}

/* code surfaces ---------------------------------------------------------- */
.snippet {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.snippet-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .5rem .4rem .875rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--label-3);
  flex-wrap: wrap;
}
.snippet-bar .btn-mini { margin-left: auto; }
.snippet pre { margin: 0; padding: 1rem 1.125rem; overflow-x: auto; }
.snippet code {
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.75;
  color: var(--label);
  white-space: pre;
}

.tabs { display: flex; gap: .1rem; flex-wrap: wrap; }
.tab {
  background: none;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  color: var(--label-3);
  font: inherit;
  font-family: var(--mono);
  font-size: .75rem;
  padding: .25rem .6rem;
  min-height: 1.9rem;
  cursor: pointer;
}
.tab:hover { color: var(--label); }
.tab[aria-selected="true"] { background: var(--bg); border-color: var(--line); color: var(--label); }
@media (pointer: coarse) { .tab { min-height: 2.75rem; padding-inline: .85rem; } }

code:not(.snippet code) {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .1em .35em;
}

/* bento: asymmetric, exact cell count ------------------------------------ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cell { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.25rem); grid-column: span 2; }
.cell-lead { grid-column: span 6; background: var(--surface-2); }
.cell-half { grid-column: span 3; }
.cell h3 { font-size: 1.0625rem; margin-bottom: .5rem; }
.cell p { color: var(--label-2); font-size: .9375rem; margin: 0; max-width: 46ch; }
.cell-lead h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; }
.cell-lead p { font-size: 1.0625rem; max-width: 52ch; }
.cell-key {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--accent);
  display: block;
  margin-bottom: .75rem;
}

/* stats: hairline row, no card containers -------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); border-top: 1px solid var(--line); }
.stat { display: flex; flex-direction: column; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.stat dt { color: var(--label-3); font-size: .8125rem; order: 2; margin-top: .25rem; }
.stat dd { order: 1; margin: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -0.03em; }

/* pricing: the one place elevation is earned ----------------------------- */
.price-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.price {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.25rem);
}
.price-figure { font-size: clamp(2.75rem, 6vw, 3.5rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.price-for { color: var(--label-2); margin: .625rem 0 .25rem; }
.price-each { color: var(--label-3); font-size: .875rem; margin-bottom: 1.5rem; }
/* Nothing follows the list inside the card, so it carries no trailing space. */
.price-list { list-style: none; padding: 0; margin: 0; }
.price-list li { padding: .5rem 0; color: var(--label-2); font-size: .9375rem; margin: 0; border-top: 1px solid var(--line); }
.price-list li:first-child { border-top: 0; }

/* getting started: plain steps, no numbering labels ---------------------- */
.steps { display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step h3 { font-size: 1.125rem; letter-spacing: -0.015em; }
.step p { color: var(--label-2); margin: 0; max-width: 54ch; }

/* closing band ----------------------------------------------------------- */
.band {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.25rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.band h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .5rem; }
.band p { color: var(--label-2); margin: 0; max-width: 46ch; }
.handle { font-family: var(--mono); font-size: .875rem; color: var(--label-3); margin-top: .75rem; }

/* tables ----------------------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
caption { text-align: left; color: var(--label-3); font-size: .875rem; padding: 0 0 .5rem; }
th {
  text-align: left;
  background: var(--surface-2);
  color: var(--label-3);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .7rem .875rem;
  white-space: nowrap;
}
td { padding: .7rem .875rem; border-top: 1px solid var(--line); vertical-align: top; color: var(--label-2); }
td:first-child { color: var(--label); }
td code, th code { white-space: nowrap; }

.code-2xx, .code-4xx, .code-5xx { font-family: var(--mono); font-weight: 600; }
.code-2xx { color: var(--ok); }
.code-4xx { color: var(--warn); }
.code-5xx { color: var(--danger); }
.required { color: var(--danger); font-weight: 600; }
.optional { color: var(--label-3); }

/* docs ------------------------------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  padding-block: 2.5rem 5rem;
}
.docs-nav { position: sticky; top: 5rem; }
.docs-nav h2 {
  font-family: var(--mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--label-3);
  margin-bottom: .75rem;
  font-weight: 500;
}
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav li { margin: 0; }
.docs-nav a {
  display: block;
  color: var(--label-2);
  font-size: .9375rem;
  padding: .3rem .7rem;
  border-radius: calc(var(--radius) - 4px);
  border-left: 2px solid transparent;
}
.docs-nav a:hover { color: var(--label); text-decoration: none; }
.docs-nav a[aria-current="true"] {
  color: var(--label);
  border-left-color: var(--accent);
  background: var(--accent-wash);
  font-weight: 500;
}

.docs-body { min-width: 0; }
.docs-body h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin: 3rem 0 .75rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}
.docs-body > section:first-child h2 { margin-top: 0; }
.docs-body h3 { font-size: 1.0625rem; margin: 2rem 0 .6rem; }
.docs-body p, .docs-body li { color: var(--label-2); }
.docs-body p { max-width: var(--measure); }
.docs-body strong { color: var(--label); font-weight: 600; }
.docs-body .snippet { margin-bottom: 1.25rem; }

.route {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.method {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 5px;
  background: var(--accent-wash);
  color: var(--accent);
  flex: none;
}
.route-path { font-family: var(--mono); font-size: .9375rem; word-break: break-all; color: var(--label); }

.callout {
  border-left: 2px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .875rem 1.125rem;
  margin-bottom: 1.5rem;
  max-width: var(--measure);
}
.callout-warn { border-left-color: var(--warn); }
.callout > *:last-child { margin-bottom: 0; }
.callout b { display: block; margin-bottom: .2rem; color: var(--label); }

/* footer ----------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--label-3); font-size: .875rem; }
.site-foot-inner { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.site-foot a { color: var(--label-2); }

/* 404 -------------------------------------------------------------------- */
.notfound { display: grid; place-items: center; min-height: 60vh; text-align: center; padding: 3rem var(--gutter); }
.notfound h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); margin-bottom: .75rem; }
.notfound p { color: var(--label-2); }
.notfound .actions { justify-content: center; }

/* toast ------------------------------------------------------------------ */
.toasts { position: fixed; inset-inline-end: 1rem; inset-block-end: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 90; }
.toast {
  background: var(--surface-2);
  color: var(--label);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .65rem 1rem;
  font-size: .875rem;
  box-shadow: 0 8px 24px rgba(16, 20, 26, .16);
}

/* narrow ----------------------------------------------------------------- */
@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero-lead { max-width: var(--measure); }
  .price-band { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; }
  .cell, .cell-half { grid-column: span 6; }
  .docs-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .docs-nav { position: static; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: .1rem; }
  .docs-nav a { border-left: 0; border-bottom: 2px solid transparent; }
  .docs-nav a[aria-current="true"] { border-left: 0; border-bottom-color: var(--accent); }
}

@media (max-width: 40rem) {
  .step { grid-template-columns: 1fr; gap: .5rem; }
  .masthead nav a { padding-inline: .5rem; font-size: .875rem; }
  .actions .btn { flex: 1 1 auto; }
}
