@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,700;1,9..144,300;1,9..144,400&family=Figtree:wght@300;400;500;600&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
  --bg: #080808;
  --bg-1: #0f0f0f;
  --bg-2: #161616;
  --bg-3: #1e1e1e;
  --border: rgba(255,255,255,0.07);
  --border-hi: rgba(255,255,255,0.14);
  --text: #e8e6e0;
  --text-2: #888680;
  --text-3: #4a4845;
  --accent: #00e5b0;
  --accent-dim: rgba(0,229,176,0.12);
  --accent-glow: rgba(0,229,176,0.06);
  --amber: #f5a623;
  --red: #e84040;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;
  --radius: 6px;
  --radius-lg: 12px;
  --max: 1160px;
}

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

html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

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

/* ─── NAV ────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,8,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.3px;
  color: var(--text);
}

.nav-logo-mark {
  width: 28px; height: 28px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

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

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-2);
  transition: color 0.15s;
  font-family: var(--font-body);
}

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

.nav-cta {
  padding: 8px 18px;
  background: var(--accent);
  color: #000;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  font-family: var(--font-body);
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* ─── HERO ───────────────────────────────────────── */
.hero {
  padding: 160px 24px 100px;
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
  padding: 6px 12px;
  border: 1px solid rgba(0,229,176,0.25);
  border-radius: 20px;
  background: var(--accent-dim);
}

.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 860px;
  margin-bottom: 24px;
}

.hero-headline em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  font-family: var(--font-body);
  transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border: 1px solid var(--border-hi);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  border-radius: var(--radius);
  font-family: var(--font-body);
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn-secondary:hover { border-color: var(--text-3); color: var(--text); transform: translateY(-1px); }

.hero-stats {
  display: flex;
  gap: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-item { }
.stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-num span { color: var(--accent); }
.stat-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── TERMINAL ───────────────────────────────────── */
.terminal-wrap {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 48px;
  max-width: 680px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.terminal-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
  margin-right: auto;
}

.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
}

.t-prompt { color: var(--text-3); }
.t-cmd { color: var(--text); }
.t-comment { color: var(--text-3); font-style: italic; }
.t-key { color: var(--accent); }
.t-str { color: #f5c542; }
.t-num { color: #e06c75; }
.t-out { color: var(--text-2); }
.t-success { color: var(--accent); }
.t-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── SECTION SHARED ─────────────────────────────── */
section { padding: 100px 24px; position: relative; }

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-title em { font-style: italic; color: var(--accent); }

.section-sub {
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.65;
  font-weight: 300;
}

/* ─── DIVIDER ────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* ─── APIs GRID ──────────────────────────────────── */
#apis { background: var(--bg-1); }

.apis-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.apis-head {
  margin-bottom: 52px;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.api-card {
  background: var(--bg-1);
  padding: 28px 28px 24px;
  transition: background 0.15s;
  cursor: default;
  position: relative;
}

.api-card:hover { background: var(--bg-2); }

.api-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.api-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,176,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  margin-bottom: 16px;
}

.api-credits {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  white-space: nowrap;
}

.api-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.api-route {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.api-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  font-weight: 300;
}

.api-framework {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ─── HOW IT WORKS ───────────────────────────────── */
#how {
  background: var(--bg);
}

.how-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

@media (max-width: 768px) {
  .how-inner { grid-template-columns: 1fr; gap: 48px; }
}

.how-steps { display: flex; flex-direction: column; gap: 0; }

.how-step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.how-step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  padding-top: 4px;
  min-width: 20px;
}

.step-content { }
.step-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.step-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
  font-weight: 300;
}

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

.code-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.code-tab {
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.code-tab.active { color: var(--accent); border-color: var(--accent); }

.code-panel {
  display: none;
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  overflow-x: auto;
}

.code-panel.active { display: block; }

/* ─── PRICING ────────────────────────────────────── */
#pricing { background: var(--bg-1); }

.pricing-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.pricing-head { margin-bottom: 52px; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.price-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
}

.price-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }

.price-card.featured {
  border-color: rgba(0,229,176,0.4);
  background: rgba(0,229,176,0.04);
}

.price-badge {
  position: absolute;
  top: -11px; left: 24px;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.price-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.price-amount sup {
  font-size: 20px;
  font-weight: 300;
  vertical-align: super;
  line-height: 0;
}

.price-credits {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 20px;
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-features li {
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 300;
}

.price-features li::before {
  content: '✓';
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.price-free {
  font-size: 13.5px;
  color: var(--text-2);
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  font-weight: 300;
}

.price-free strong { color: var(--text); font-weight: 500; }
.price-free .accent { color: var(--accent); }

/* ─── CREDIT TABLE ───────────────────────────────── */
.credit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--font-mono);
  margin-top: 40px;
}

.credit-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}

.credit-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}

.credit-table tr:last-child td { border-bottom: none; }
.credit-table tr:hover td { background: var(--bg-3); }
.credit-table .endpoint { color: var(--accent); }
.credit-table .credits-num { color: var(--text); }

/* ─── INSTALL ────────────────────────────────────── */
#install { background: var(--bg); }

.install-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.install-head { margin-bottom: 52px; }

.install-steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.install-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.install-step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.install-step-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

.install-cmd {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.install-cmd:hover { border-color: var(--border-hi); }

.copy-icon {
  color: var(--text-3);
  font-size: 14px;
  transition: color 0.15s;
}

.install-cmd:hover .copy-icon { color: var(--text-2); }

.install-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
  font-weight: 300;
}

/* ─── LISTINGS ───────────────────────────────────── */
#listings { background: var(--bg-1); }

.listings-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.listing-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.1s;
}

.listing-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }

.listing-icon {
  font-size: 20px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3);
  border-radius: 8px;
}

.listing-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.listing-type {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}

.listing-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  width: fit-content;
}

.listing-status.submit { background: rgba(245,166,35,0.12); color: var(--amber); }
.listing-status.live { background: var(--accent-dim); color: var(--accent); }

/* ─── CTA ────────────────────────────────────────── */
#cta {
  background: var(--bg);
  text-align: center;
  padding: 120px 24px;
}

.cta-inner { max-width: 640px; margin: 0 auto; }

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}

.cta-title em { color: var(--accent); font-style: italic; }

.cta-sub {
  font-size: 16px;
  color: var(--text-2);
  font-weight: 300;
  margin-bottom: 40px;
  line-height: 1.6;
}

.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

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

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

.footer-left {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
}

.footer-left strong { color: var(--text-2); font-weight: 400; }
.footer-left .accent { color: var(--accent); }

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

.footer-links a {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 300;
  transition: color 0.15s;
}

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

/* ─── MOBILE ─────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-stats { flex-direction: column; gap: 24px; }
  .nav-links { display: none; }
  .hero { padding: 120px 0 80px; }
  section { padding: 72px 0; }
}

/* ─── ANIMATIONS ─────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.07s; }
.fade-up:nth-child(3) { transition-delay: 0.14s; }
.fade-up:nth-child(4) { transition-delay: 0.21s; }
.fade-up:nth-child(5) { transition-delay: 0.28s; }
.fade-up:nth-child(6) { transition-delay: 0.35s; }
