/* ==========================================================================
   MVSP — design system
   --------------------------------------------------------------------------
   The FONTS + TOKENS + PRIMITIVES blocks below are shared with
   `gh_landingsite/assets/css/site.css` (mvsp.ai). Keep the two in sync; the
   only intended difference is the @font-face `src`, which points at mvsp.ai
   from here. The fonts are served with `Access-Control-Allow-Origin: *` and
   `https://mvsp.ai` is allowed in this origin's `font-src` CSP directive
   (see server.js). If mvsp.ai is unreachable the system stack is used.
   ========================================================================== */

/* ---------------------------------------------------------------- FONTS -- */
/* Geist / Geist Mono, self-hosted. See assets/fonts/README.md. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://mvsp.ai/assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://mvsp.ai/assets/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://mvsp.ai/assets/fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://mvsp.ai/assets/fonts/geist-mono-latin-ext.woff2")
    format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* --------------------------------------------------------------- TOKENS -- */
:root {
  color-scheme: dark;

  --bg: #06090f;
  --bg-2: #0a0f18;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.062);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.17);

  --text: #eaf0f7;
  --text-2: #a7b4c4;
  --muted: #6d7c8e;

  --accent: #38bdf8;
  --accent-ink: #04121c;
  --accent-soft: rgba(56, 189, 248, 0.13);
  --mint: #5eead4;
  --gold: #fbbf24;
  --success: #34d399;
  --danger: #fb7185;

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas,
    "Courier New", monospace;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px -16px rgba(0, 0, 0, 0.8);
  --shadow-2: 0 32px 90px -40px rgba(0, 0, 0, 0.95);

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* U+2192 is not in the Geist latin subset, so arrows are drawn as a
     masked SVG that inherits the current text colour instead. */
  --icon-arrow: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10h11.2M10.2 5.3 14.9 10l-4.7 4.7'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------- PRIMITIVES -- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.003em;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 10% -12%, rgba(56, 189, 248, 0.1), transparent 62%),
    radial-gradient(880px 560px at 92% -6%, rgba(94, 234, 212, 0.06), transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 140ms var(--ease);
}
a:hover {
  color: var(--mint);
}

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

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* Small uppercase mono label used above every section and in the hero. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--line-2);
}
.eyebrow .num {
  color: var(--accent);
}

/* Pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  white-space: nowrap;
}
.badge.ok::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 140ms var(--ease), background 140ms var(--ease),
    border-color 140ms var(--ease), box-shadow 140ms var(--ease),
    color 140ms var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 34px -14px rgba(56, 189, 248, 0.9);
}
.btn-primary:hover {
  background: #7dd3fc;
  color: var(--accent-ink);
  box-shadow: 0 14px 42px -14px rgba(56, 189, 248, 1);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--text);
}
.arrow {
  width: 15px;
  height: 15px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform 160ms var(--ease);
}
.btn:hover .arrow {
  transform: translateX(3px);
}

/* Glass surface */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

/* Shared chrome */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover {
  color: var(--text);
}
.brand .mark {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--mint));
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.brand em {
  font-style: normal;
  color: var(--muted);
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  padding: 8px 13px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 450;
  color: var(--text-2);
  transition: color 140ms var(--ease), background 140ms var(--ease);
}
.site-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.site-nav a.current {
  color: var(--text);
  background: var(--surface-2);
}
.site-nav .btn {
  padding: 9px 16px;
  font-size: 14px;
  margin-left: 6px;
}

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.6);
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--accent);
}

/* The header/footer chrome collapses the same way on both sites. */
@media (max-width: 680px) {
  .site-header .inner {
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 12px 20px;
  }
  .site-nav a {
    padding: 7px 11px;
    font-size: 13.5px;
  }
  .site-nav .btn {
    margin-left: 2px;
  }
  .site-footer .inner {
    padding: 26px 20px;
  }
}

/* ======================================================================
   DOCS — api.mvsp.ai only below this line.
   ====================================================================== */

/* ---- hero ---- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 96px 32px 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}
h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.042em;
  max-width: 19ch;
  margin: 0;
}
.lede {
  font-size: clamp(1.03rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 56ch;
  margin: 0;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

/* ---- article ---- */
.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 32px 110px;
}
.section {
  padding: 52px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.section:first-child {
  border-top: none;
  padding-top: 24px;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--line-2);
}
.section-label .num {
  color: var(--accent);
  font-weight: 500;
}
h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.032em;
  margin: 0 0 18px;
  max-width: 26ch;
}
h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0 12px;
}
p {
  margin: 0 0 16px;
  color: var(--text-2);
}
p:last-child {
  margin-bottom: 0;
}
.note-inline {
  font-size: 14px;
  color: var(--muted);
}

.highlight {
  color: var(--text);
  font-weight: 550;
  background: linear-gradient(to bottom, transparent 58%, var(--accent-soft) 58%);
  padding: 0 3px;
  border-radius: 2px;
}

/* ---- code ---- */
:root {
  --code-bg: rgba(255, 255, 255, 0.04);
}
code:not(pre code) {
  background: var(--code-bg);
  border: 1px solid var(--line);
  padding: 1.5px 6px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text);
  font-weight: 400;
}
.code-block {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin: 18px 0;
  overflow: hidden;
}
.code-block pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  tab-size: 2;
}
.code-block button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(10, 15, 24, 0.9);
  border: 1px solid var(--line-2);
  color: var(--text-2);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-mono);
  opacity: 0;
  transition: opacity 140ms var(--ease), color 140ms var(--ease),
    border-color 140ms var(--ease);
}
.code-block:hover button,
.code-block button:focus-visible {
  opacity: 1;
}
.code-block button:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.comment {
  color: var(--muted);
  font-style: italic;
}
.str {
  color: var(--mint);
}
.kw {
  color: var(--danger);
}
.fn {
  color: var(--text);
  font-weight: 500;
}

/* ---- tables ---- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 14px 0;
}
th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border-bottom: 1px solid var(--line-2);
}
td {
  color: var(--text-2);
}
td strong {
  color: var(--text);
  font-weight: 550;
}
td code {
  font-size: 12px;
}
tbody tr:last-child td {
  border-bottom: none;
}

.method {
  display: inline-block;
  padding: 2.5px 9px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-right: 8px;
}
.method.get {
  background: rgba(52, 211, 153, 0.14);
  color: var(--success);
}
.method.post {
  background: var(--accent-soft);
  color: var(--accent);
}
.method.patch,
.method.delete {
  background: rgba(251, 113, 133, 0.14);
  color: var(--danger);
}

/* ---- lists ---- */
ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text-2);
}
ul li {
  margin: 6px 0;
}
ul li::marker {
  color: var(--line-2);
}

/* ---- callouts ---- */
.note {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin: 24px 0;
  color: var(--text-2);
  font-size: 15px;
}
.note strong {
  display: block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.pull {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 30px 0;
  font-weight: 500;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 34ch;
}

/* ---- waitlist signup ---- */
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  max-width: 480px;
}
.signup input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 11px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
}
.signup input::placeholder {
  color: var(--muted);
}
.signup input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}
.signup button {
  padding: 11px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 34px -14px rgba(56, 189, 248, 0.9);
  cursor: pointer;
  transition: background 140ms var(--ease), box-shadow 140ms var(--ease),
    opacity 140ms var(--ease);
}
.signup button::after {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 8px;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
}
.signup button:hover:not(:disabled) {
  background: #7dd3fc;
}
.signup button:disabled {
  opacity: 0.45;
  cursor: default;
}
.signup-msg {
  min-height: 1.6em;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
.signup-msg.ok {
  color: var(--success);
}
.signup-msg.err {
  color: var(--danger);
}

/* ---- responsive ---- */
@media (max-width: 640px) {
  .site-header .inner,
  .hero,
  .article,
  .site-footer .inner {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero {
    padding-top: 60px;
    padding-bottom: 44px;
  }
  .section {
    padding: 40px 0;
  }
}

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