:root {
  --color-bg: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #64748b;
  --color-primary: #0071e3;
  --color-primary-dark: #005bb5;
  --color-accent: #34c759;
  --color-surface: #f8fafc;
  --color-border: #e2e8f0;
  --color-code-bg: #f1f5f9;
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Consolas", monospace;
  --max-width: 1120px;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Nav */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 10px;
}

.nav-brand span {
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
}

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

.nav-links a:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--color-primary);
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
}

/* Badges */
.badge-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Sections */
.section {
  padding: 80px 24px;
}

.section-alt {
  background: var(--color-surface);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
  position: relative;
}

.pricing-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: 4px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-card .price-note {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.pricing-card li {
  padding: 6px 0;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pricing-card li::before {
  content: "\2713";
  color: var(--color-accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Data types ribbon */
.types-ribbon {
  text-align: center;
  padding: 48px 24px;
}

.types-ribbon p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.types-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.types-list span {
  padding: 4px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Code block */
.code-example {
  max-width: 640px;
  margin: 0 auto;
  background: #1e293b;
  border-radius: var(--radius);
  overflow: hidden;
}

.code-example .code-header {
  padding: 12px 20px;
  background: #334155;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}

.code-example pre {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Docs page */
.docs-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.docs-content h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.docs-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.docs-content h3 {
  font-size: 1.2rem;
  margin-top: 28px;
  margin-bottom: 8px;
}

.docs-content p {
  margin-bottom: 16px;
  color: var(--color-text);
}

.docs-content ul,
.docs-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.docs-content li {
  margin-bottom: 6px;
}

.docs-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.docs-content pre {
  background: #1e293b;
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.docs-content pre code.hljs {
  display: block;
  background: transparent;
  padding: 0;
  color: #e2e8f0;
}

.docs-content .highlight {
  background: #1e293b;
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow-x: auto;
}

.docs-content .highlight pre {
  margin-bottom: 0;
}

.docs-content .highlight .c,
.docs-content .highlight .c1,
.docs-content .highlight .cm {
  color: #94a3b8;
}

.docs-content .highlight .k,
.docs-content .highlight .kd,
.docs-content .highlight .kn {
  color: #f472b6;
}

.docs-content .highlight .s,
.docs-content .highlight .s1,
.docs-content .highlight .s2 {
  color: #86efac;
}

.docs-content .highlight .na,
.docs-content .highlight .nx,
.docs-content .highlight .nt {
  color: #7dd3fc;
}

.docs-content .highlight .mi,
.docs-content .highlight .mf {
  color: #fdba74;
}

.docs-content .highlight .o,
.docs-content .highlight .p {
  color: #cbd5e1;
}

#swagger-ui {
  max-width: var(--max-width);
  margin: 0 auto 48px;
  padding: 0 24px 24px;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.docs-content th,
.docs-content td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.docs-content th {
  background: var(--color-surface);
  font-weight: 600;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 24px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer h4 {
  color: var(--color-text);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 6px;
}

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

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

/* Legal pages */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.legal-content .effective-date {
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-content p,
.legal-content li {
  margin-bottom: 12px;
  color: var(--color-text);
}

.legal-content ul {
  padding-left: 24px;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(135deg, #f0f7ff, #f8fafc);
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1.05rem;
  }

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

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    height: auto;
    min-height: 56px;
    padding: 10px 0;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-brand {
    font-size: 1rem;
    gap: 10px;
  }

  .nav-brand img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .nav-links {
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
  }

  .hero {
    padding: 48px 16px 40px;
  }

  .section {
    padding: 48px 16px;
  }

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