:root {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-elevated: #1f1f23;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --success: #22c55e;
  --error: #ef4444;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --gradient-2: linear-gradient(180deg, rgba(99, 102, 241, 0.12) 0%, transparent 100%);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

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

.btn-lg {
  padding: 16px 32px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo::before {
  content: '';
  width: 32px;
  height: 32px;
  background: var(--gradient-1);
  border-radius: var(--radius-sm);
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-links .btn {
  margin-left: 8px;
}

/* Hero */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-badge span {
  background: var(--gradient-1);
  color: white;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  margin-bottom: 24px;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.hero-code {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-glow);
}

.hero-code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.hero-code-header .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated);
}

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

.hero-code-header span {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-tertiary);
}

.hero-code pre {
  padding: 24px;
  overflow-x: auto;
  margin: 0;
}

.hero-code code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-code .token-command { color: #22c55e; }
.hero-code .token-url { color: #6366f1; }
.hero-code .token-flag { color: #f59e0b; }

/* Logos Section */
.logos {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logos p {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 32px;
}

.logos-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 64px;
  flex-wrap: wrap;
  opacity: 0.5;
}

.logos-grid span {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-tertiary);
}

/* Features */
.features {
  padding: 120px 0;
}

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

.section-header h2 {
  font-size: 40px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 17px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* Code Example Section */
.code-example {
  padding: 120px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.code-example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.code-example-content h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.code-example-content p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.code-example-features {
  list-style: none;
}

.code-example-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.code-example-features li::before {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

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

.code-block-header {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.code-block-tab {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

.code-block pre {
  padding: 24px;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Pricing */
.pricing {
  padding: 120px 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-card {
  padding: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all 0.3s ease;
}

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

.pricing-card.featured {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-secondary) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-glow);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: var(--gradient-1);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.pricing-price .amount {
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
}

.pricing-price .currency {
  font-size: 20px;
  color: var(--text-tertiary);
}

.pricing-credits {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 600;
}

.pricing-card .btn {
  width: 100%;
}

/* Signup / CTA */
.cta {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
}

.cta-box h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.signup-form {
  display: flex;
  gap: 12px;
}

.signup-form input {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.signup-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.signup-form input::placeholder {
  color: var(--text-tertiary);
}

.signup-result {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: left;
}

.signup-result.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.signup-result.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.signup-result .api-key {
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--text-primary);
}

/* Footer */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

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

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

.footer-brand .logo {
  font-size: 18px;
}

.footer-brand p {
  color: var(--text-tertiary);
  font-size: 14px;
}

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

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

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

/* Responsive */
@media (max-width: 900px) {
  .code-example-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 140px 0 80px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-code {
    display: none;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .signup-form {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-brand {
    flex-direction: column;
  }
}
