/* ── Reset & Tokens ──────────────────────────────────────── */

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

:root {
  --bg:           #0a0a0a;
  --bg-card:      #141414;
  --bg-code:      #111;
  --border:       #222;
  --border-hover: #333;
  --accent:       #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow:  rgba(59, 130, 246, 0.15);
  --green:        #22c55e;
  --text:         #e5e5e5;
  --text-dim:     #737373;
  --text-muted:   #525252;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 8px;
  --max-w: 1080px;
}

html {
  scroll-behavior: smooth;
}

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

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

code {
  font-family: var(--mono);
  font-size: 0.875em;
}

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

.center { text-align: center; }

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}

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

.logo { flex-shrink: 0; vertical-align: middle; }

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

.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--sans);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { background: rgba(255,255,255,0.06); border-color: var(--border-hover); text-decoration: none; }

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

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

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-lg { padding: 10px 24px; font-size: 15px; }

.btn-sm { padding: 6px 14px; font-size: 13px; }

.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── GitHub nav button ────────────────────────────────────── */

.github-nav-btn {
  gap: 6px;
}

.github-star-icon {
  opacity: 0.7;
  color: #e3b341;
}

#github-stars:empty {
  display: none;
}

#github-stars {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  min-width: 0;
}

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

.hero {
  padding: 160px 24px 100px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(to bottom right, #fff 30%, #737373);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 18px;
  color: var(--text-dim);
  line-height: 1.7;
}

.hero-sub em {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-video {
  max-width: 720px;
  margin: 0 auto;
}

.hero-video-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.hero-video-placeholder span {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Copy button ─────────────────────────────────────────── */

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

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

/* ── Sections ────────────────────────────────────────────── */

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 16px;
  line-height: 1.7;
}

/* ── Steps ───────────────────────────────────────────────── */

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.step {
  text-align: center;
  max-width: 220px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.step code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

.step-arrow {
  color: var(--text-muted);
  font-size: 24px;
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── Providers ───────────────────────────────────────────── */

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.provider-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.15s;
}

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

.provider-icon {
  font-size: 24px;
  margin-bottom: 8px;
  opacity: 0.8;
}

.provider-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.provider-tag {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.provider-card-more {
  border-style: dashed;
  opacity: 0.6;
}

/* ── Integration ─────────────────────────────────────────── */

.integrate-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 32px;
  align-items: start;
}

.integrate-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.integrate-preview {
  display: flex;
  flex-direction: column;
}

.pma-button-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px 32px;
  text-align: center;
  margin-bottom: 20px;
}

.pma-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 14px;
  font-family: var(--sans);
  background: #fff;
  color: #1f1f1f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
}

.pma-btn-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

.pma-btn span {
  font-family: 'Inter', var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.pma-button-caption {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 20px;
}

.integrate-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.integrate-code {
  min-width: 0;
}

.code-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.code-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--sans);
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  transition: all 0.15s;
}

.code-tab:hover { color: var(--text); }

.code-tab.active {
  background: var(--bg-code);
  color: var(--text);
  border-color: var(--border);
}

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow: hidden;
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  background: none;
  border: none;
}

.code-block code {
  background: none;
  padding: 0;
  font-size: 13px;
}

.hidden { display: none; }

/* Syntax colors */
.c { color: #525252; }          /* comment */
.k { color: #c084fc; }          /* keyword */
.s { color: #34d399; }          /* string */
.f { color: #60a5fa; }          /* function */

/* ── Install box ─────────────────────────────────────────── */

.install-box {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.install-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
}

.install-alt code {
  background: rgba(255,255,255,0.06);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--text-dim);
}

.badge-soon {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
}

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

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-family: 'JetBrains Mono', var(--mono);
  font-weight: 500;
  font-size: 14px;
}

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

.footer-links a {
  color: var(--text-dim);
  font-size: 14px;
  text-decoration: none;
}

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

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 12px;
  }

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

  .hero { padding: 120px 24px 60px; }
  .hero-sub { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-video-placeholder { border-radius: 8px; }

  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }

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

  .provider-grid { grid-template-columns: repeat(2, 1fr); }

  .section { padding: 60px 0; }
  .section-title { font-size: 24px; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }

  .install-box { font-size: 12px; padding: 12px 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Adopt page ──────────────────────────────────────────── */

.page-hero {
  padding: 120px 24px 60px;
  text-align: center;
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.doc-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.doc-section h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.doc-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

.doc-section p, .doc-section li {
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 12px;
}

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

.doc-section ul li {
  position: relative;
  padding-left: 20px;
}

.doc-section ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.doc-section pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  margin: 16px 0;
  color: var(--text-dim);
}

.doc-section code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 3px;
}

.doc-section pre code {
  background: none;
  padding: 0;
}

.diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.diagram-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
}

.diagram-box strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.diagram-box span {
  font-size: 12px;
  color: var(--text-muted);
}

.diagram-arrow {
  color: var(--text-muted);
  font-size: 20px;
}

.callout {
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: var(--text);
}

.callout-warn {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.2);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 32px auto;
  max-width: 400px;
}

.toc h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-dim);
}

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