/* apifolio.dev: no web fonts, no external requests. */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --text: #16163a;
  --muted: #545a78;
  --border: #e3e5f0;
  --brand: #4f46e5;
  --brand-dark: #312e81;
  --brand-soft: #eef0ff;
  --code-bg: #1d2125;
  --code-text: #e6eaf0;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(22 22 58 / 6%), 0 8px 24px rgb(22 22 58 / 8%);
  --font: ui-sans-serif, -apple-system, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12121f;
    --bg-alt: #181829;
    --text: #e7e8f5;
    --muted: #a3a7c2;
    --border: #2b2d45;
    --brand: #8b85ff;
    --brand-dark: #c7c4ff;
    --brand-soft: #23234a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
}
.skip:focus { left: 8px; z-index: 100; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}
.btn:hover { text-decoration: none; border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); color: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* Hero */
.hero { padding: 72px 0 40px; background: radial-gradient(1200px 500px at 85% -10%, var(--brand-soft), transparent 70%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft); padding: 4px 12px; border-radius: 999px; margin: 0 0 18px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 18px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-shot img, .shot { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }

.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.strip-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; padding: 16px 24px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Sections */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; }
.section-lead { font-size: 18px; color: var(--muted); max-width: 720px; margin: 0 0 40px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.feature svg { fill: var(--brand); background: var(--brand-soft); padding: 8px; width: 40px; height: 40px; border-radius: 10px; }
.feature h3 { font-size: 18px; margin: 14px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234f46e5' d='m9.5 16.2-4.2-4.2-1.4 1.4 5.6 5.6L21.1 7.4 19.7 6z'/%3E%3C/svg%3E") center / 12px no-repeat; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.plan { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.plan.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.plan h3 { margin: 0 0 6px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.price { font-size: 36px; font-weight: 750; letter-spacing: -0.02em; margin: 6px 0 2px; }
.price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .checks { margin: 18px 0 22px; }
.plan .btn { width: 100%; }
.tag { font-size: 12px; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }

.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.final { text-align: center; background: linear-gradient(135deg, #4f46e5, #312e81); color: #fff; }
.final h2 { color: #fff; margin-bottom: 24px; }
.final .btn-primary { background: #fff; color: #312e81; border-color: #fff; }

/* Docs */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 80px; }
.docs-nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 110px); overflow: auto; }
.docs-nav-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.docs-nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.docs-nav a:hover { background: var(--bg-alt); color: var(--text); text-decoration: none; }
.docs-nav a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }

.prose { padding: 40px 0 80px; min-width: 0; }
.page-docs .prose { padding-top: 0; }
.prose h1 { font-size: 38px; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
.prose h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.01em; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--text); }
.prose .lead { font-size: 19px; color: var(--muted); }
.prose code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-alt); border: 1px solid var(--border); padding: 1px 5px; border-radius: 5px; }
.prose pre { background: var(--code-bg); color: var(--code-text); padding: 16px 18px; border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.prose pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 24px; background: var(--bg-alt); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 6px 0 12px; }
.footer-grid a:not(.brand) { display: block; color: var(--text); font-size: 15px; margin-bottom: 8px; }
.footer-grid p { max-width: 340px; font-size: 15px; }
.fineprint { margin-top: 28px; font-size: 13px; color: var(--muted); }

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

@media (max-width: 920px) {
  .hero-inner, .split { grid-template-columns: 1fr; }
  .features, .plans { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .features, .plans { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
