/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(222, 47%, 11%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(222, 47%, 11%);
  --primary: hsl(217, 91%, 50%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(214, 32%, 96%);
  --secondary-foreground: hsl(222, 47%, 11%);
  --muted: hsl(214, 32%, 96%);
  --muted-foreground: hsl(215, 16%, 47%);
  --accent: hsl(280, 85%, 55%);
  --border: hsl(214, 32%, 91%);
  --success: hsl(142, 76%, 36%);
  --destructive: hsl(0, 84%, 60%);
  --radius: 0.75rem;
  --gradient-primary: linear-gradient(135deg, hsl(217, 91%, 50%) 0%, hsl(280, 85%, 55%) 100%);
  --shadow-glow: 0 0 60px -12px hsla(217, 91%, 50%, 0.25);
  --shadow-card: 0 4px 24px -8px hsla(222, 47%, 11%, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

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

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

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

.btn-ghost:hover {
  color: var(--foreground);
}

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

.btn-secondary:hover {
  background: hsl(214, 32%, 92%);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: hsla(0, 0%, 100%, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: var(--gradient-primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
}

.nav {
  display: none;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}

.nav a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, hsl(214, 32%, 98%) 0%, hsl(0, 0%, 100%) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: hsla(217, 91%, 50%, 0.05);
  border-radius: 50%;
  filter: blur(120px);
}

.hero-content {
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
  padding: 5rem 1rem;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease-out;
}

.badge-primary {
  background: hsla(217, 91%, 50%, 0.1);
  border: 1px solid hsla(217, 91%, 50%, 0.3);
  color: var(--primary);
}

.badge-success {
  background: hsla(142, 76%, 36%, 0.1);
  border: 1px solid hsla(142, 76%, 36%, 0.3);
  color: var(--success);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.6s ease-out 0.1s both;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4.5rem;
  }
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  animation: fadeIn 0.6s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
  animation: fadeIn 0.6s ease-out 0.3s both;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
    justify-content: center;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  animation: fadeIn 0.6s ease-out 0.4s both;
}

@media (min-width: 768px) {
  .hero-stats {
    gap: 4rem;
  }
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 2.25rem;
  }
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* Section Styles */
.section {
  padding: 6rem 0;
}

.section-alt {
  background: hsla(214, 32%, 96%, 0.3);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-header h2 {
    font-size: 3rem;
  }
}

.section-header p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin: 0 auto;
}

/* Features Grid */
.features-grid {
  display: grid;
  gap: 1.5rem;
}

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

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s;
  box-shadow: var(--shadow-card);
}

.feature-card:hover {
  border-color: hsla(217, 91%, 50%, 0.5);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  background: var(--gradient-primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.feature-endpoint {
  display: inline-block;
  background: var(--secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--primary);
}

/* Result Comparison */
.comparison-grid {
  max-width: 72rem;
  margin: 0 auto;
}

.comparison-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .comparison-header {
    gap: 1.5rem;
  }
}

.comparison-header-item {
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.comparison-header-item.highlight {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
}

.comparison-header-item:not(.highlight) {
  background: var(--secondary);
  color: var(--muted-foreground);
}

.comparison-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .comparison-row {
    gap: 1.5rem;
  }
}

.comparison-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  aspect-ratio: 1;
  background: repeating-conic-gradient(#f0f0f0 0% 25%, #ffffff 0% 50%) 0 0/16px 16px;
}

.comparison-item.highlight {
  border-color: hsla(217, 91%, 50%, 0.5);
  box-shadow: var(--shadow-glow);
  /* ring: 2px solid hsla(217, 91%, 50%, 0.2); */
}

.comparison-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.comparison-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--success);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}

/* Video Demo */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 64rem;
  margin: 0 auto 3rem;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.video-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  aspect-ratio: 1;
  transition: all 0.3s;
}

.video-item:hover {
  box-shadow: var(--shadow-glow);
}

.video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, hsla(222, 47%, 11%, 0.8), transparent);
  padding: 0.75rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.video-cta {
  text-align: center;
}

.video-cta-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
}

@media (min-width: 640px) {
  .video-cta-box {
    flex-direction: row;
  }
}

.video-cta-text h3 {
  font-weight: 600;
}

.video-cta-text p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 5rem;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s;
  box-shadow: var(--shadow-card);
  position: relative;
}

.pricing-card:hover {
  border-color: hsla(217, 91%, 50%, 0.5);
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  border-width: 2px;
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pricing-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pricing-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.pricing-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 700;
}

.pricing-period {
  color: var(--muted-foreground);
}

.pricing-divider {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.pricing-limits {
  text-align: center;
  margin-bottom: 1rem;
}

.pricing-requests {
  font-weight: 600;
  font-size: 0.875rem;
}

.pricing-rate {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.pricing-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.pricing-features li.highlight {
  color: var(--primary);
  font-weight: 500;
}

.check-icon {
  color: var(--success);
  flex-shrink: 0;
}

/* Price Comparison Table */
.price-table {
  max-width: 56rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.price-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
}

.price-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 0.875rem;
}

.price-table-row:last-child {
  border-bottom: none;
}

.price-table-row.highlight {
  background: hsla(217, 91%, 50%, 0.05);
}

.provider-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.provider-name.muted {
  color: var(--muted-foreground);
}

.strikethrough {
  text-decoration: line-through;
  color: var(--muted-foreground);
}

.price-highlight {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.comparison-tag {
  font-size: 0.75rem;
  font-weight: 500;
}

.comparison-tag.negative {
  color: var(--destructive);
}

.comparison-tag.positive {
  background: var(--gradient-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

/* Code Example */
.code-container {
  max-width: 48rem;
  margin: 0 auto;
}

.code-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.code-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: hsla(214, 32%, 96%, 0.5);
  padding: 0 1rem;
}

.code-tab-list {
  display: flex;
  gap: 0.25rem;
}

.code-tab {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

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

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

.code-content {
  padding: 1.5rem;
  background: hsla(222, 47%, 11%, 0.03);
  overflow-x: auto;
}

.code-content pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre;
}

.code-panel {
  display: none;
}

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

.response-block {
  margin-top: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.response-header {
  padding: 0.75rem 1rem;
  background: hsla(214, 32%, 96%, 0.5);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.response-content {
  padding: 1.5rem;
}

.response-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.status-badge {
  background: hsla(142, 76%, 36%, 0.2);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}

/* FAQ */
.faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: hsla(217, 91%, 50%, 0.5);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--foreground);
}

.faq-icon {
  transition: transform 0.2s;
  color: var(--muted-foreground);
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer-content {
  padding: 0 1.5rem 1.25rem;
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: hsla(214, 32%, 96%, 0.3);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s;
}

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

.footer-copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Utility */
.text-center { text-align: center; }
.mb-6 { margin-bottom: 1.5rem; }