/* SecantusDB site styles. Tokens lifted directly from brandkit/brand.html
   so the marketing site reads as the same brand as the brand reference. */

:root {
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --cyan-300:  #67e8f9;
  --cyan-400:  #22d3ee;
  --cyan-500:  #06b6d4;
  --cyan-600:  #0891b2;
  --cyan-700:  #0e7490;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--cyan-700); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

code, pre {
  font-family: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
}

p code, li code {
  background: var(--slate-100);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

pre {
  background: var(--slate-900);
  color: var(--slate-100);
  padding: 20px 24px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
}
pre code { background: transparent; padding: 0; }

/* ---- Layout ---- */

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

/* ---- Beta callout ---- */
/* An inline notice card, not a page band — it sits mid-flow (below the
   hero on home, below the nav elsewhere) and must not read as a header. */

.beta-banner {
  font-size: 14px;
  padding: 28px 0;
}
.beta-banner .callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: white;
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--cyan-500);
  border-radius: 10px;
  padding: 12px 20px;
  color: var(--slate-700);
}
.beta-banner strong { color: var(--cyan-700); letter-spacing: 0.04em; }
.beta-banner .badge {
  display: inline-block;
  background: var(--cyan-500);
  color: var(--slate-950);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Site header / nav ---- */

.site-header {
  background: white;
  border-bottom: 1px solid var(--slate-200);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  gap: 24px;
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.site-header .logo img {
  width: auto;
  display: block;
  flex-shrink: 0;
}
/* Mark (shield) is the small "icon" half of the lockup; wordmark text
   is the visually-dominant half — keep this asymmetry on purpose. */
.site-header .logo-mark { height: 40px; }
.site-header .logo-wordmark { height: 39px; }   /* 56 × 0.70 ≈ 39 */
@media (max-width: 720px) {
  .site-header .logo-mark { height: 28px; }
  .site-header .logo-wordmark { height: 27px; } /* 38 × 0.70 ≈ 27 */
}
.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.site-nav a {
  color: var(--slate-700);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--slate-900);
  text-decoration: none;
  border-bottom-color: var(--cyan-500);
}
.site-nav .external::after {
  content: " ↗";
  color: var(--slate-400);
  font-size: 12px;
}

/* ---- Hero ---- */

.hero {
  background: linear-gradient(180deg, white 0%, var(--slate-100) 100%);
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--slate-200);
}
.hero .wordmark { max-width: 480px; margin: 0 auto 28px; }
.hero h1 {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
  margin: 0 0 20px;
  color: var(--slate-900);
}
.hero h1 .accent { color: var(--cyan-500); display: block; }
.hero .lead {
  font-size: 19px;
  color: var(--slate-600);
  max-width: 64ch;
  margin: 0 auto 32px;
  text-align: center;
  line-height: 1.55;
}
.hero .ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--cyan-500);
  color: var(--slate-950);
  border-color: var(--cyan-500);
}
.btn-primary:hover { background: var(--cyan-400); border-color: var(--cyan-400); }
.btn-secondary {
  background: white;
  color: var(--slate-800);
  border-color: var(--slate-300);
}
.btn-secondary:hover { border-color: var(--slate-500); }
.btn code {
  background: rgba(15, 23, 42, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ---- Sections ---- */

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--slate-200);
}
.section.alt { background: white; }
.section h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.section .section-lead {
  color: var(--slate-600);
  max-width: 64ch;
  margin: 0 0 40px;
  font-size: 17px;
}

/* ---- Admin console section ---- */

/* The screenshots are dark-UI PNGs dropped onto a light page, so they get
   a rim and a shadow to sit as objects rather than bleed into the
   background. Intrinsic width/height are set on the <img> in the template
   so the browser reserves the right box before the file loads. */
.admin-shot,
.admin-thumbs figure {
  margin: 0;
}
.admin-shot img,
.admin-thumbs img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--slate-300);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.18);
  background: var(--slate-900);
}
.admin-shot figcaption,
.admin-thumbs figcaption {
  color: var(--slate-500);
  font-size: 14px;
  margin-top: 10px;
}
.admin-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
/* Both crops trim the empty page below the content rather than letting a
   1440x900 browser shot dictate the layout. The dashboard's tiles and
   charts finish well above the fold, so the untrimmed shot contributes
   ~300px of flat background; the thumbnails would otherwise shrink a full
   page to postage-stamp size where nothing is legible. Cropping from the
   top-left keeps the sidebar and first rows, which is the part that says
   what the page is. */
.admin-shot > img {
  aspect-ratio: 12 / 5;
  object-fit: cover;
  object-position: left top;
}
.admin-thumbs figure > img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: left top;
}

/* ---- Benefits grid ---- */

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.benefit {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 24px 24px 22px;
  transition: border-color 0.12s, transform 0.12s;
}
.benefit:hover {
  border-color: var(--cyan-500);
  transform: translateY(-2px);
}
.benefit h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--slate-900);
}
.benefit h3 .pip {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--cyan-500);
  margin-right: 10px;
  vertical-align: middle;
}
.benefit p {
  margin: 0;
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.55;
}

/* Trailing CTA link in each benefit panel — reads as
   "summary → deep dive" rather than a dead-end blurb. */
.benefit p + p.benefit-cta {
  margin-top: 14px;
  font-size: 14px;
}
.benefit-cta a {
  color: var(--cyan-500);
  font-weight: 500;
  text-decoration: none;
}
.benefit-cta a:hover {
  text-decoration: underline;
}

/* ---- Drivers section ---- */

.drivers-section { background: white; }

/* Two grids on one page (Rust + Python): each needs a label, because a bare
   second grid reads as more drivers rather than the same drivers on the other
   server. */
.drivers-grid-label {
  margin: 40px 0 4px;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--slate-900);
}
.drivers-grid-label:first-of-type { margin-top: 8px; }
.drivers-grid-note {
  margin: 0 0 20px;
  color: var(--slate-600, #475569);
  font-size: 0.95rem;
}

.drivers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.driver {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--slate-50, #f8fafc);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.12s, transform 0.12s;
}
.driver:hover {
  border-color: var(--cyan-500);
  transform: translateY(-2px);
}
.driver header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.driver h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--slate-900);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}
.driver .lang {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-500);
  background: var(--slate-100, #f1f5f9);
  padding: 3px 10px;
  border-radius: 999px;
}
.driver .kind {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
}
.driver .kind.smoke {
  color: #115e59;
  background: #ccfbf1;
}
.driver .kind.pending {
  color: #92400e;
  background: #fef3c7;
}
.driver .pass-rate {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.driver .rate {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cyan-600, #0891b2);
  line-height: 1;
}
.driver .rate-label {
  font-size: 13px;
  color: var(--slate-500);
  letter-spacing: 0.02em;
}
.driver .counts {
  margin: 0;
  font-size: 14px;
  color: var(--slate-700);
}
.driver .counts strong { color: var(--slate-900); }
.driver .note {
  margin: 0;
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.55;
  flex: 1;
}
.driver .report {
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cyan-600, #0891b2);
  text-decoration: none;
}
.driver .report:hover { text-decoration: underline; }

.drivers-foot {
  margin: 36px auto 0;
  max-width: 72ch;
  text-align: center;
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.6;
}
.drivers-foot strong { color: var(--slate-900); }

/* Honest-performance note under the benefits grid. */
.perf-heading {
  margin: 44px auto 0;
  max-width: 72ch;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--slate-900);
}
.perf-note {
  margin: 10px auto 0;
  max-width: 72ch;
  font-size: 15px;
  color: var(--slate-600);
  line-height: 1.6;
}
.perf-note strong { color: var(--slate-900); }

/* ---- Code example block on home ---- */

.code-example { background: white; }
.code-example h2 { margin-top: 0; }
.code-example .section-lead strong { color: var(--slate-900); }
.code-example pre { margin: 0; }

/* Side-by-side comparison: Normal MongoDB vs Embedded SecantusDB. */
.code-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 36px 0 0;
}
@media (min-width: 880px) {
  .code-compare { grid-template-columns: 1fr 1fr; }
}
.code-compare figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.code-compare figcaption {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-700);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.code-compare figcaption .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--slate-400);
  flex-shrink: 0;
}
.code-compare figcaption .dot.accent { background: var(--cyan-500); }
.code-compare figcaption .hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 12px;
  color: var(--slate-500);
}
.code-compare figcaption .hint code {
  background: var(--slate-100);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.code-compare figure .highlight {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.code-compare figure pre {
  flex: 1;
  margin: 0;
  font-size: 13px;
  padding: 18px 20px;
}

/* ---- Article (blog) ---- */

.article-list { list-style: none; padding: 0; margin: 0; }
.article-list li {
  padding: 24px 0;
  border-bottom: 1px solid var(--slate-200);
}
.article-list li:last-child { border-bottom: 0; }
.article-list h3 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.article-list h3 a { color: var(--slate-900); }
.article-list h3 a:hover { color: var(--cyan-700); text-decoration: none; }
.article-list .meta {
  color: var(--slate-500);
  font-size: 13px;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}
.article-list .summary {
  color: var(--slate-600);
  margin: 0;
  font-size: 15px;
}

article.post header { margin-bottom: 28px; }
article.post h1 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.15;
}
article.post .meta {
  color: var(--slate-500);
  font-size: 14px;
  letter-spacing: 0.02em;
}
article.post .body { font-size: 17px; }
article.post .body p { margin: 0 0 18px; }
article.post .body h2 {
  font-size: 24px; margin: 36px 0 12px; font-weight: 600;
  letter-spacing: -0.01em;
}
article.post .body h3 { font-size: 19px; margin: 28px 0 10px; font-weight: 600; }

/* ---- Footer ---- */

.site-footer {
  padding: 48px 0 80px;
  color: var(--slate-500);
  font-size: 13px;
  background: var(--slate-50);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.site-footer a { color: var(--slate-600); }
.site-footer a:hover { color: var(--cyan-700); }

/* ---- Page-content (markdown pages other than home) ---- */

.page-body {
  padding: 60px 0 80px;
}
.page-body h1 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.page-body h2 { font-size: 24px; margin: 36px 0 12px; font-weight: 600; }
.page-body p { font-size: 17px; line-height: 1.65; color: var(--slate-700); }

/* ---- Responsive tweaks ---- */
@media (max-width: 720px) {
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 17px; }
  .section { padding: 56px 0; }
  .site-nav { gap: 14px; font-size: 13px; }
}

/* ---- Two servers (engines) — dark band on home + Rust-server page ---- */
.engines-section {
  background: var(--slate-950);
  border-bottom: 1px solid var(--slate-800);
}
.engines-section h2,
.engines-section h1 { color: #fff; }
.engines-section .section-lead { color: var(--slate-400); }

.page-hero-engine { padding: 88px 0 72px; }
.page-hero-engine h1 {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
}
.page-hero-engine .ctas { margin-top: 28px; }

.engines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.engine {
  background: var(--slate-900);
  border: 1px solid var(--slate-800);
  border-radius: 14px;
  padding: 28px 26px;
}
.engine-accent {
  border-color: var(--cyan-700);
  box-shadow: 0 0 0 1px var(--cyan-700), 0 18px 40px -24px var(--cyan-500);
}
.engine-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--slate-800);
  color: var(--slate-300);
}
.engine-accent .engine-tag { background: var(--cyan-500); color: var(--slate-950); }
/* Outlined variant for a maturity label sitting next to the protocol tag —
   deliberately not a new brand hue, just the accent as an outline. */
.engine-tag.tag-early,
.engine-accent .engine-tag.tag-early {
  background: transparent;
  border: 1px solid var(--cyan-500);
  color: var(--cyan-300);
  margin-left: 8px;
}
/* The `x` in a "2.4x mongod" figure, set smaller than the number it follows.
   performance.html carries its own copy for the inline chart styles; this is
   the one every other page uses. */
.unit-x { font-size: 0.82em; opacity: 0.75; }
.engine h3 {
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  margin: 14px 0 10px;
}
.engine p { color: var(--slate-400); margin: 0 0 14px; font-size: 15px; }
.engine-points { list-style: none; margin: 0; padding: 0; }
.engine-points li {
  position: relative;
  padding-left: 22px;
  margin: 8px 0;
  color: var(--slate-300);
  font-size: 14px;
}
.engine-points li::before {
  content: "";
  position: absolute;
  left: 2px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--cyan-400);
}
.engine code {
  background: rgba(148, 163, 184, 0.16);
  color: var(--cyan-300);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* Same treatment for prose sitting directly on a dark band (a page hero's
   lead), which would otherwise get the light `p code` chip. */
.engines-section .section-lead code {
  background: rgba(148, 163, 184, 0.16);
  color: var(--cyan-300);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: var(--slate-600);
}
.btn-ghost:hover { border-color: var(--cyan-400); color: var(--cyan-300); }

/* ---- Rust-server page: install columns + compare table ---- */
.install-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.install-col {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 24px;
}
.install-col h3 { font-size: 17px; font-weight: 600; margin: 0 0 10px; color: var(--slate-900); }
.install-col p { color: var(--slate-600); font-size: 15px; margin: 0 0 14px; }
.install-code {
  background: var(--slate-950);
  color: var(--slate-100);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}
.install-code code { background: none; color: inherit; padding: 0; }
.install-cta { margin: 14px 0 0 !important; }

.compare-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.compare-table th,
.compare-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}
.compare-table thead th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}
.compare-table thead th:last-child { color: var(--cyan-700); }
.compare-table tbody th {
  font-weight: 600;
  color: var(--slate-900);
  width: 26%;
}
.compare-table tbody td { color: var(--slate-600); }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table code {
  background: var(--slate-100);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .page-hero-engine h1 { font-size: 34px; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
}
