@import url('https://fonts.googleapis.com/css2?family=Lora:wght@500;600&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg:         203 77% 10%;
  --surface:    203 77% 14%;
  --ink:        0 0% 95%;
  --muted:      240 2% 70%;
  --border:     203 50% 25%;
  --accent:     34 43% 78%;
  --accent-ink: 30 40% 18%;
  --good:       142 45% 60%;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --radius: 10px;
  --max: 820px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .25);
  --shadow-md: 0 10px 30px -10px rgb(0 0 0 / .4);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: hsl(var(--bg));
  color: hsl(var(--ink));
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Nav ──────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsl(var(--bg) / .93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

header.site .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 58px;
}

/* Logo: SVG mark + "Parsed" in Lora */
a.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}

a.brand .logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

a.brand .logo-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: hsl(var(--ink));
  line-height: 1;
}

header.site nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

header.site nav a {
  color: hsl(var(--muted));
  text-decoration: none;
  padding: 6px 11px;
  font-size: 14px;
  font-weight: 400;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

header.site nav a:hover {
  color: hsl(var(--ink));
  background: hsl(var(--surface));
}

header.site nav a.cta {
  background: hsl(var(--accent));
  color: hsl(var(--accent-ink));
  font-weight: 600;
  margin-left: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s;
}

header.site nav a.cta:hover {
  opacity: 0.88;
  color: hsl(var(--accent-ink));
  background: hsl(var(--accent));
}

/* ── Main layout ──────────────────────────────────────── */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 24px 108px;
}

/* ── Type ─────────────────────────────────────────────── */

h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 20px;
  color: hsl(var(--ink));
  text-wrap: balance;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 60px 0 16px;
  color: hsl(var(--ink));
}

h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  margin: 32px 0 10px;
  color: hsl(var(--ink));
  line-height: 1.3;
}

p {
  margin: 0 0 18px;
  color: hsl(240 5% 78%);
  max-width: 68ch;
}

.lead {
  font-size: clamp(17px, 2.4vw, 20px);
  color: hsl(var(--ink));
  margin-bottom: 36px;
  max-width: 60ch;
  line-height: 1.55;
}

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

a:hover {
  text-decoration: underline;
}

ul {
  padding-left: 0;
  list-style: none;
  margin: 0 0 20px;
}

ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  color: hsl(240 5% 78%);
}

ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: hsl(var(--accent));
  opacity: 0.65;
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-block;
  background: hsl(var(--accent));
  color: hsl(var(--accent-ink));
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s;
}

.btn:hover {
  opacity: 0.88;
  text-decoration: none;
  color: hsl(var(--accent-ink));
}

.btn.secondary {
  background: transparent;
  color: hsl(var(--ink));
  border: 1px solid hsl(var(--border));
  box-shadow: none;
}

.btn.secondary:hover {
  opacity: 1;
  border-color: hsl(var(--muted));
  color: hsl(var(--ink));
}

.actions {
  display: flex;
  gap: 12px;
  margin: 32px 0;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Code ─────────────────────────────────────────────── */

code {
  font-family: var(--mono);
  font-size: 13px;
  background: hsl(var(--surface));
  padding: 2px 6px;
  border-radius: 4px;
  color: hsl(var(--good));
  word-break: break-word;
  border: 1px solid hsl(var(--border));
}

pre {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  margin: 16px 0 26px;
  box-shadow: var(--shadow-md);
}

pre code {
  background: none;
  padding: 0;
  border: none;
  color: hsl(220 20% 82%);
  font-size: 13px;
  word-break: normal;
}

/* ── Tables ───────────────────────────────────────────── */

table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0 26px;
  font-size: 14px;
}

th, td {
  border: 1px solid hsl(var(--border));
  padding: 10px 15px;
  text-align: left;
  vertical-align: top;
}

th {
  background: hsl(var(--surface));
  color: hsl(var(--muted));
  font-size: 11.5px;
  font-family: var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 400;
}

td code {
  font-size: 12.5px;
}

/* ── Cards ────────────────────────────────────────────── */

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

.card {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 22px;
  background: hsl(var(--surface));
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-family: var(--serif);
  font-weight: 500;
  color: hsl(var(--ink));
}

.card p {
  margin: 0;
  font-size: 14px;
  color: hsl(var(--muted));
  max-width: none;
}

/* ── Stat row ─────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px 32px;
  margin: 32px 0;
}

.stat .n {
  font-family: var(--mono);
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: hsl(var(--accent));
}

.stat .l {
  color: hsl(var(--muted));
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.4;
}

/* ── Callout ──────────────────────────────────────────── */

.callout {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 22px 26px;
  background: hsl(var(--surface));
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

.callout.accent-border {
  border-color: hsl(var(--accent) / .45);
  background: linear-gradient(180deg, hsl(var(--accent) / .07), transparent);
}

.callout.good-border {
  border-color: hsl(var(--good) / .4);
  background: linear-gradient(180deg, hsl(var(--good) / .07), transparent);
}

/* ── TOC ──────────────────────────────────────────────── */

.toc {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0 44px;
  box-shadow: var(--shadow-sm);
}

.toc ul {
  margin: 0;
  columns: 2;
  column-gap: 24px;
}

.toc ul li {
  padding-left: 16px;
  margin-bottom: 7px;
  font-size: 14px;
  break-inside: avoid;
}

.toc ul li::before {
  display: none;
}

.toc a {
  color: hsl(var(--muted));
  text-decoration: none;
}

.toc a:hover {
  color: hsl(var(--accent));
}

/* ── Method badge ─────────────────────────────────────── */

.endpoint {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 44px 0 14px;
}

.method {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 5px;
  flex-shrink: 0;
}

.method.post { background: hsl(var(--accent) / .18); color: hsl(var(--accent)); }
.method.get  { background: hsl(var(--good)   / .15); color: hsl(var(--good)); }

.path {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  color: hsl(var(--ink));
}

/* ── Section divider ──────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid hsl(var(--border));
  margin: 52px 0;
}

/* ── Kicker ───────────────────────────────────────────── */

.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin-bottom: 14px;
  opacity: 0.85;
}

/* ── Hero section ─────────────────────────────────────── */

.hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 0;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero .lead {
  margin-bottom: 36px;
}

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

/* ── Pipeline steps ───────────────────────────────────── */

.pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.pipeline-step {
  background: hsl(var(--surface));
  padding: 20px 22px;
}

.pipeline-step .step-num {
  font-family: var(--mono);
  font-size: 11px;
  color: hsl(var(--accent));
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  opacity: 0.75;
}

.pipeline-step .step-title {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--ink));
  margin-bottom: 6px;
}

.pipeline-step .step-desc {
  font-size: 13px;
  color: hsl(var(--muted));
  margin: 0;
  max-width: none;
}

/* ── Pricing cards ────────────────────────────────────── */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.pricing-card {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 28px;
  background: hsl(var(--surface));
  box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
  border-color: hsl(var(--accent) / .5);
  background: linear-gradient(180deg, hsl(var(--accent) / .08), hsl(var(--surface)));
  box-shadow: var(--shadow-md);
}

.pricing-card .plan-name {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted));
  margin-bottom: 10px;
}

.pricing-card .plan-price {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: hsl(var(--accent));
  margin-bottom: 4px;
}

.pricing-card .plan-desc {
  font-size: 14px;
  color: hsl(var(--muted));
  margin: 0 0 18px;
  max-width: none;
}

.pricing-card ul {
  margin: 0;
}

.pricing-card ul li {
  font-size: 14px;
  color: hsl(240 5% 78%);
}

/* ── Footer ───────────────────────────────────────────── */

footer.site {
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--muted));
  font-size: 14px;
}

footer.site .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

footer.site .brand-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

footer.site a.brand {
  /* inherits brand styles above */
}

footer.site .footer-tagline {
  font-size: 13px;
  color: hsl(var(--muted));
  padding-left: 2px;
}

footer.site .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: center;
}

footer.site .footer-links a {
  color: hsl(var(--muted));
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

footer.site .footer-links a:hover {
  color: hsl(var(--ink));
  text-decoration: none;
}

/* ── Signup page ──────────────────────────────────────── */

.signup-wrap {
  max-width: 440px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

label {
  font-size: 12.5px;
  font-weight: 600;
  color: hsl(var(--muted));
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--mono);
}

input[type="email"] {
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  outline: none;
  font-family: var(--sans);
  color: hsl(var(--ink));
  background: hsl(var(--surface));
  width: 100%;
  transition: border-color 0.15s;
}

input[type="email"]::placeholder {
  color: hsl(var(--muted) / .6);
}

input[type="email"]:focus {
  border-color: hsl(var(--accent) / .65);
}

button[type="submit"] {
  display: inline-block;
  background: hsl(var(--accent));
  color: hsl(var(--accent-ink));
  border: none;
  padding: 11px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--sans);
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s;
}

button[type="submit"]:hover {
  opacity: 0.88;
}

button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: default;
}

.error-msg {
  color: hsl(0 65% 65%);
  font-size: 14px;
  margin-top: 12px;
}

.key-block {
  display: none;
  margin-top: 32px;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--good) / .4);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-md);
}

.key-block.visible {
  display: block;
}

.save-note {
  font-size: 13px;
  color: hsl(34 85% 72%);
  font-weight: 600;
  margin: 0 0 14px;
  font-family: var(--mono);
}

.key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  background: hsl(var(--bg));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 10px 14px;
}

.key-value {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
  flex: 1;
  background: none;
  border: none;
  color: hsl(var(--good));
  cursor: text;
  padding: 0;
}

.copy-btn {
  display: inline-block;
  background: transparent;
  color: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--mono);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.copy-btn:hover {
  color: hsl(var(--ink));
  border-color: hsl(var(--muted));
}

.copy-btn.copied {
  color: hsl(var(--good));
  border-color: hsl(var(--good) / .5);
}

/* ── SEO page ─────────────────────────────────────────── */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
}

.feature-card {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 22px;
  background: hsl(var(--surface));
  box-shadow: var(--shadow-sm);
}

.feature-card .fc-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--accent));
  margin-bottom: 7px;
  opacity: 0.8;
}

.feature-card .fc-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  color: hsl(var(--ink));
  margin-bottom: 7px;
}

.feature-card .fc-desc {
  font-size: 13px;
  color: hsl(var(--muted));
  margin: 0;
  max-width: none;
}

/* ── Legal pages ──────────────────────────────────────── */

.legal-body h2 {
  font-size: 19px;
  margin: 44px 0 10px;
}

.legal-body p, .legal-body ul li {
  font-size: 15px;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 640px) {
  main {
    padding: 44px 18px 88px;
  }

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

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

  .feature-row {
    grid-template-columns: 1fr;
  }

  .toc ul {
    columns: 1;
  }

  h1 {
    font-size: 28px;
  }

  .hero {
    padding: 52px 0 44px;
  }

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

@media (max-width: 420px) {
  header.site nav a:not(.cta) {
    display: none;
  }

  a.brand .logo-word {
    display: inline; /* keep wordmark on small screens */
  }
}
