:root {
  color-scheme: dark;
  --bg: #080b10;
  --bg-elevated: #0e1319;
  --card: #121820;
  --card-hover: #161f2a;
  --text: #e8eef5;
  --muted: #8b9bb0;
  --accent: #5b9cff;
  --accent-dim: #3d7fd4;
  --green: #3dd68c;
  --border: #243041;
  --border-light: #2f3f54;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --max: 1120px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 15% -5%, rgba(91, 156, 255, 0.12), transparent 60%),
    radial-gradient(700px 400px at 85% 0%, rgba(61, 214, 140, 0.06), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

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

img, svg { display: block; max-width: 100%; }

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 16, 0.85);
  backdrop-filter: blur(12px);
}

.site-nav .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand img { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, #6aadff 0%, var(--accent) 45%, var(--accent-dim) 100%);
  color: #fff;
  font-weight: 650;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 4px 14px rgba(91, 156, 255, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #7db8ff 0%, #6aadff 45%, #4a8ee0 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 6px 20px rgba(91, 156, 255, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(91, 156, 255, 0.3);
}

/* Nav links are muted — don't let that bleed into CTA buttons */
.nav-links a.btn {
  color: inherit;
  text-decoration: none;
}

.nav-links a.btn-primary {
  color: #fff;
}

.nav-links a.btn-primary:hover,
.nav-links a.btn-primary.active {
  color: #fff;
  text-decoration: none;
}

.nav-links a.btn-ghost {
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover { background: var(--card); color: var(--text); }

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(91, 156, 255, 0.12);
  border: 1px solid rgba(91, 156, 255, 0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 18ch;
  margin-inline: auto;
}

.hero .lead {
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 52ch;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

/* Code block */
.code-window {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
}

.code-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.code-dots { display: flex; gap: 5px; }
.code-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-light);
}

.code-window pre {
  margin: 0;
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #c8d8ff;
}

.copy-btn {
  background: var(--card-hover);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.copy-btn:hover { color: var(--text); }

/* Sections */
section { padding: 3.5rem 0; }

.section-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.section-desc {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 2rem;
}

/* Grid cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  transition: border-color 0.15s, background 0.15s;
}

.card:hover {
  border-color: var(--border-light);
  background: var(--card-hover);
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Stats row */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Use cases */
.use-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(61, 214, 140, 0.1);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  position: relative;
}

.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(91, 156, 255, 0.2), var(--shadow);
}

.price-card .tier {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.price-card .amount {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.35rem 0;
}

.price-card .amount span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
}

.price-card li {
  padding: 0.35rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  padding-left: 1.4rem;
  position: relative;
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.badge-popular {
  position: absolute;
  top: -10px;
  right: 1rem;
  background: var(--accent);
  color: #061018;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Docs */
.docs-hero {
  padding: 2rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.docs-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
}

.docs-hero h1 {
  font-size: 2.1rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
}

.docs-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
}

.docs-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.docs-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.docs-pill:hover {
  text-decoration: none;
  color: var(--text);
  border-color: var(--border-light);
  background: var(--card-hover);
}

.docs-pill-accent {
  border-color: rgba(91, 156, 255, 0.35);
  color: var(--accent);
  background: rgba(91, 156, 255, 0.08);
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  padding: 2rem 0 4rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(18, 24, 32, 0.6);
}

.docs-sidebar nav a {
  display: block;
  padding: 0.45rem 0.65rem;
  margin: 0.1rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}

.docs-sidebar nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.docs-sidebar nav a.active {
  color: var(--text);
  background: rgba(91, 156, 255, 0.12);
  font-weight: 600;
}

.docs-sidebar h4 {
  margin: 1.1rem 0 0.25rem;
  padding: 0 0.65rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.85;
}

.docs-sidebar h4:first-child { margin-top: 0; }

.docs-content { min-width: 0; }

.docs-content > h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--text);
}

.docs-content h2 {
  font-size: 1.25rem;
  margin: 2.75rem 0 0.85rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.docs-content h2:first-of-type { margin-top: 0; }

.docs-content h3 {
  font-size: 0.95rem;
  margin: 1.75rem 0 0.65rem;
  color: var(--text);
  font-weight: 650;
}

.docs-content p { color: var(--muted); line-height: 1.7; }

.docs-content ul {
  color: var(--muted);
  line-height: 1.75;
  padding-left: 1.2rem;
}

.docs-lead {
  font-size: 1.02rem;
  color: var(--text) !important;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.docs-callout {
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 156, 255, 0.25);
  background: rgba(91, 156, 255, 0.06);
  margin: 1.25rem 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
}

.docs-callout strong { color: var(--text); }

.endpoint-card {
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.endpoint-title {
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--text);
  margin-left: auto;
}

.endpoint-body {
  padding: 1.15rem 1.25rem 1.25rem;
}

.endpoint-body > p:first-child { margin-top: 0; }

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.docs-content th,
.docs-content td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.docs-content tr:last-child td { border-bottom: none; }

.docs-content th {
  color: var(--text);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-content td { color: var(--muted); }

.docs-content td code {
  font-size: 0.82em;
}

.docs-content code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(91, 156, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  color: #b8cffd;
  border: 1px solid rgba(91, 156, 255, 0.12);
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  min-width: 3.1rem;
}

.method-post {
  background: rgba(61, 214, 140, 0.18);
  color: #5eead4;
  border: 1px solid rgba(61, 214, 140, 0.25);
}

.method-get {
  background: rgba(91, 156, 255, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(91, 156, 255, 0.25);
}

.endpoint-path {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text);
  background: transparent;
  border: none;
  padding: 0;
}

.docs-content .code-window {
  margin: 1rem 0 0;
}

.docs-sidebar .nav-method {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.55;
  margin-right: 0.35rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 2rem 0;
}

.cta-band h2 { margin: 0 0 0.5rem; }

.cta-band p {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-grid h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li { margin-bottom: 0.4rem; }

.footer-grid a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-grid a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.dev-credit {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.dev-credit strong,
.dev-credit .fleet13-mark {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.dev-credit a {
  color: var(--muted);
  text-decoration: none;
}

.dev-credit a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Page header (inner pages) */
.page-header {
  padding: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

.page-header p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem 1rem;
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.5rem 0; }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
}
