/* JSON:API Lens — marketing and documentation site.
   Separate from the viewer's app stylesheet so the tool stays untouched. */

:root {
  color-scheme: dark;
  --bg: #070a10;
  --bg-soft: #0b0f17;
  --surface: #0e1420;
  --surface-2: #121a28;
  --border: #1d2637;
  --border-strong: #2a3549;
  --text: #e8edf6;
  --text-soft: #c3ccdb;
  --muted: #8f9cb1;
  --faint: #66738a;
  --accent: #5eead4;
  --accent-ink: #04211d;
  --violet: #a78bfa;
  --blue: #60a5fa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 16px;
  --max: 1120px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f6fa;
    --bg-soft: #eef1f7;
    --surface: #ffffff;
    --surface-2: #f6f8fc;
    --border: #dde4ee;
    --border-strong: #c8d2e0;
    --text: #111827;
    --text-soft: #2c3648;
    --muted: #5b687c;
    --faint: #7d8a9e;
    --accent: #0f766e;
    --accent-ink: #ffffff;
    --violet: #6d28d9;
    --blue: #1d4ed8;
    --green: #047857;
    --amber: #b45309;
    --red: #be123c;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(94, 234, 212, 0.1), transparent 60%),
    radial-gradient(760px 420px at 100% 0%, rgba(167, 139, 250, 0.11), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: var(--mono);
}

code {
  font-size: 0.9em;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-soft);
}

pre {
  margin: 0;
  padding: 18px 20px;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(34px, 5vw, 54px);
}

h2 {
  font-size: clamp(25px, 3vw, 34px);
}

h3 {
  font-size: 18px;
}

p {
  margin: 0 0 16px;
}

ul,
ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

strong {
  color: var(--text);
}

/* Header ------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 14px;
}

.site-nav a {
  color: var(--text-soft);
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav .nav-cta {
  padding: 8px 15px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
}

.site-nav .nav-cta:hover {
  filter: brightness(1.06);
}

@media (max-width: 760px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .site-nav {
    gap: 14px;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

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

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

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 40px 0;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13.5px;
}

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

.hero {
  padding: 74px 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 48px;
  align-items: center;
}

.hero-grid > *,
.split > * {
  min-width: 0;
}

.hero h1 span {
  color: var(--accent);
}

.hero .lead {
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.btn:hover {
  text-decoration: none;
  border-color: var(--accent);
}

.btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  filter: brightness(1.07);
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 13.5px;
}

.hero-note span::before {
  content: "✓";
  margin-right: 6px;
  color: var(--green);
  font-weight: 700;
}

.hero-shot {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.hero-shot img {
  display: block;
  width: 100%;
}

@media (prefers-color-scheme: light) {
  .hero-shot {
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .hero {
    padding-top: 48px;
  }
}

/* Feature grid ------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.grid > *,
.steps > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 120px), var(--surface);
}

.card h3 {
  margin-bottom: 8px;
}

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

.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}

/* Steps -------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
}

.step {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Split section ------------------------------------------------------------ */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 26px;
}

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

.checklist.cross li::before {
  content: "×";
  color: var(--red);
}

/* Table -------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

td {
  color: var(--muted);
}

td strong {
  color: var(--text);
}

/* FAQ ---------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.faq summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--text);
  font-weight: 600;
  list-style: none;
}

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

.faq summary::before {
  content: "+";
  display: inline-block;
  width: 20px;
  color: var(--accent);
  font-family: var(--mono);
}

.faq details[open] summary::before {
  content: "−";
}

.faq .faq-body {
  padding: 0 18px 16px 38px;
  color: var(--muted);
  font-size: 14.5px;
}

.faq .faq-body p:last-child {
  margin-bottom: 0;
}

/* CTA ---------------------------------------------------------------------- */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(94, 234, 212, 0.12), transparent 70%),
    var(--surface);
}

.cta h2 {
  margin-bottom: 6px;
  font-size: 26px;
}

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

@media (max-width: 700px) {
  .cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Docs --------------------------------------------------------------------- */

.doc-hero {
  padding: 44px 0 10px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--faint);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs span {
  color: var(--faint);
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 44px;
  align-items: start;
  padding-bottom: 64px;
}

.doc-body {
  min-width: 0;
}

.doc-body h2 {
  margin-top: 38px;
  font-size: 27px;
}

.doc-body h3 {
  margin-top: 26px;
}

.doc-body p,
.doc-body li {
  color: var(--text-soft);
}

.doc-body .note {
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14.5px;
}

.doc-aside {
  position: sticky;
  top: 86px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
}

.doc-aside h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.doc-aside ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.doc-aside li {
  margin-bottom: 10px;
}

.doc-aside a {
  color: var(--text-soft);
}

.doc-aside .btn {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }
  .doc-aside {
    position: static;
  }
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 22px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer h3 {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

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

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--text-soft);
}

.site-footer .fine {
  margin-top: 10px;
  color: var(--faint);
  font-size: 13px;
}

@media (max-width: 700px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
  }
}

/* Utilities ---------------------------------------------------------------- */

.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
  z-index: 100;
}
