:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --border: #2a2a3a;
  --accent: #6c63ff;
  --accent2: #a78bfa;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --text: #e8e8f0;
  --muted: #6b6b80;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #f59e0b;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

/* ─── LAYOUT ─── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HEADER ─── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

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

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: var(--font-sans);
}

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

.btn-primary:hover {
  background: #7c74ff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

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

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

/* ─── HERO ─── */
.hero {
  padding: 90px 0 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--accent2);
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

h1 .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

/* ─── DEMO ─── */
.demo-section {
  padding: 0 0 80px;
}

.demo-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 60px rgba(0,0,0,0.4);
}

.demo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.demo-dots {
  display: flex;
  gap: 6px;
}

.demo-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.demo-dots span:nth-child(1) { background: #ff5f57; }
.demo-dots span:nth-child(2) { background: #febc2e; }
.demo-dots span:nth-child(3) { background: #28c840; }

.demo-title-bar {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.demo-body {
  padding: 24px;
}

.demo-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.demo-input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.demo-input-row input:focus {
  border-color: var(--accent);
}

.demo-input-row input::placeholder {
  color: var(--muted);
}

.demo-options {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.demo-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
  transition: all 0.2s;
  user-select: none;
}

.demo-opt input[type=radio] { display: none; }

.demo-opt.active {
  border-color: var(--accent);
  color: var(--accent2);
  background: var(--accent-glow);
}

.demo-output {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 220px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow: auto;
  max-height: 400px;
  color: var(--muted);
  position: relative;
}

.demo-output.loading::after {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.demo-output pre {
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
}

.demo-output .placeholder-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.demo-output .placeholder-text span {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.demo-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.demo-meta .tag {
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-meta .tag.ok { color: var(--green); }
.demo-meta .tag.err { color: var(--red); }

/* ─── API CODE ─── */
.api-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .api-grid { grid-template-columns: 1fr; }
  nav { display: none; }
  h1 { font-size: 32px; }
}

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

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.code-lang {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.copy-btn {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
  transition: color 0.2s;
  padding: 0;
}

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

.code-block pre {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text);
}

.code-block pre .kw { color: #c678dd; }
.code-block pre .str { color: #98c379; }
.code-block pre .fn { color: #61afef; }
.code-block pre .cm { color: var(--muted); }
.code-block pre .num { color: #d19a66; }
.code-block pre .key { color: #e06c75; }

/* ─── FEATURES ─── */
.features-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

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

.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── PRICING ─── */
.pricing-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

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

.pricing-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: border-color 0.2s;
}

.pricing-card.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.08) 0%, var(--bg2) 100%);
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.plan-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.plan-price {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.plan-price .currency {
  font-size: 22px;
  font-weight: 600;
  vertical-align: super;
  margin-right: 2px;
  color: var(--muted);
}

.plan-price .period {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

.plan-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.plan-features li {
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.rate-table {
  margin-top: 40px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.rate-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rate-table th {
  background: var(--bg3);
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.rate-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.rate-table tr:last-child td { border-bottom: none; }

.rate-table .price-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent2);
}

/* ─── USE CASES ─── */
.usecases-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

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

.usecase-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.usecase-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-2px);
}

.usecase-icon {
  font-size: 28px;
}

.usecase-card h3 {
  font-size: 16px;
  font-weight: 700;
}

.usecase-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.usecase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.usecase-tags span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-glow);
  border: 1px solid rgba(108, 99, 255, 0.2);
  color: var(--accent2);
  font-family: var(--font-mono);
}

/* ─── CREDIBILITY ─── */
.sites-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.sites-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.site-pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-pill .dot-ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* ─── SITES COLUMNS ─── */
.sites-columns {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.sites-group {
  flex: 1;
}

.sites-group-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 16px;
}

.sites-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 0 32px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .sites-columns { flex-direction: column; gap: 32px; }
  .sites-divider { display: none; }
}

/* ─── RESELLERS ─── */
.resellers-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, rgba(108, 99, 255, 0.04) 100%);
}

.resellers-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: start;
}

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

.resellers-perks {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.perk {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.perk-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.perk-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.perk-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.resellers-cta-card {
  background: var(--bg2);
  border: 1px solid rgba(108, 99, 255, 0.35);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  position: sticky;
  top: 80px;
  box-shadow: 0 0 40px rgba(108, 99, 255, 0.08);
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

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

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

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

.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ─── CONTENT PAGES ─── */
.page-main {
  padding: 40px 0 80px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.2s;
}

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

.breadcrumb span:not(:last-child) {
  opacity: 0.4;
}

.page-hero {
  max-width: 760px;
  margin-bottom: 60px;
}

.page-hero h1 {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  text-align: left;
}

.page-lead {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}

.page-content {
  max-width: 760px;
  margin-bottom: 64px;
}

.page-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 14px;
  letter-spacing: -0.3px;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.page-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--accent2);
}

.content-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.content-list li::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
}

.page-content .code-block {
  margin-bottom: 8px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: rgba(108, 99, 255, 0.3);
}

.faq-item[open] {
  border-color: rgba(108, 99, 255, 0.4);
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* Page CTA */
.page-cta {
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1) 0%, var(--bg2) 100%);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 600px;
}

.page-cta h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-cta p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* ─── ERROR ─── */
.demo-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 8px;
  display: none;
}