/* ═══════════════════════════════════════════════════════
   Extracto — Breathtaking Premium Design
   Absolute top-tier aesthetic (Stripe/Vercel inspired)
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #000;
  color: #ededed;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Animated Background ───────────────────────────── */
.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 0%, #000 70%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 800px;
  background: radial-gradient(circle, rgba(6, 214, 160, 0.12), rgba(17, 138, 178, 0.05), transparent 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

/* ── Typography & Variables ────────────────────────── */
:root {
  --cyan: #06d6a0;
  --cyan-dim: rgba(6, 214, 160, 0.15);
  --blue: #118ab2;
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --surface: rgba(10, 10, 10, 0.6);
  --surface-solid: #0d0d0d;
  --text: #ffffff;
  --text-dim: #a1a1aa;
  --max-w: 1200px;
  --gradient: linear-gradient(135deg, #00ffaa 0%, #00b8ff 100%);
}

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

code,
pre {
  font-family: 'JetBrains Mono', monospace;
}

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

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(6, 214, 160, 0.1);
  color: #00ffaa;
  border: 1px solid rgba(6, 214, 160, 0.2);
  backdrop-filter: blur(10px);
  margin-bottom: 24px;
}

/* ── Nav ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.nav.scrolled {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.8);
}

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

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo img {
  width: 24px;
  height: 24px;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.nav-cta {
  padding: 8px 16px !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #000 !important;
  font-weight: 600 !important;
  transition: transform 0.2s, background 0.2s !important;
}

.nav-cta:hover {
  transform: translateY(-1px) !important;
  background: #e0e0e0 !important;
}

.nav-mobile {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Hero ──────────────────────────────────────────── */
.hero {
  padding: 180px 0 120px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 32px;
  color: #fff;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-dim);
  max-width: 650px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: #fff;
  color: #000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

/* ── Terminal Animation ────────────────────────────── */
.terminal-wrap {
  text-align: left;
  max-width: 800px;
  margin: 80px auto 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d0d0d;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: perspective(1000px) rotateX(2deg);
  transition: transform 0.5s ease;
}

.terminal-wrap:hover {
  transform: perspective(1000px) rotateX(0deg);
}

.terminal-bar {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.terminal-dot:nth-child(1) {
  background: #ff5f56;
}

.terminal-dot:nth-child(2) {
  background: #ffbd2e;
}

.terminal-dot:nth-child(3) {
  background: #27c93f;
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: #666;
  font-family: 'JetBrains Mono', monospace;
}

.terminal-body {
  padding: 32px;
  font-size: 0.9rem;
  line-height: 1.8;
  height: 280px;
  overflow: hidden;
  color: #a1a1aa;
}

.terminal-body .prompt {
  color: #00ffaa;
  margin-right: 8px;
}

.terminal-body .cmd {
  color: #fff;
}

.terminal-body .success {
  color: #00ffaa;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: #fff;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ── Section Base ──────────────────────────────────── */
section {
  padding: 120px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Features Grid ─────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  background: rgba(20, 20, 20, 0.8);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #fff;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #fff;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* ── Comparison Page Specifics ────────────────────── */
.compare-hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.compare-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 214, 160, 0.4), transparent);
}

.compare-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.compare-hero .vs {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  font-weight: 900;
  padding: 0 12px;
}

.llm-feed-banner {
  background: rgba(17, 138, 178, 0.1);
  border: 1px solid rgba(17, 138, 178, 0.3);
  border-radius: 16px;
  padding: 32px;
  margin-top: 48px;
  text-align: left;
  display: flex;
  gap: 24px;
  align-items: center;
}

.llm-icon {
  font-size: 3rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.llm-feed-banner h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #fff;
}

.llm-feed-banner p {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.premium-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  margin: 40px 0;
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-table th {
  padding: 20px 24px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.premium-table th.highlight {
  color: var(--cyan);
  background: rgba(6, 214, 160, 0.05);
}

.premium-table td {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  transition: background 0.2s;
}

.premium-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.premium-table td.highlight-cell {
  color: #fff;
  font-weight: 500;
  background: rgba(6, 214, 160, 0.02);
  border-left: 1px solid rgba(6, 214, 160, 0.2);
  border-right: 1px solid rgba(6, 214, 160, 0.2);
}

/* ── Playground ────────────────────────────────────── */
.playground-wrap {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.playground-wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0, 255, 170, 0.05), transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.playground-input,
.playground-output {
  position: relative;
  z-index: 1;
}

.playground-input label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.playground-input input,
.playground-input textarea,
.playground-input select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 12px;
  padding: 16px;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 24px;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.playground-input input:focus,
.playground-input textarea:focus,
.playground-input select:focus {
  border-color: #00b8ff;
  background: rgba(255, 255, 255, 0.05);
}

.playground-input select {
  cursor: pointer;
  appearance: none;
}

.playground-input textarea {
  min-height: 100px;
  resize: none;
}

.playground-output {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.playground-output-bar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.playground-output-body {
  flex: 1;
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  overflow: auto;
  min-height: 400px;
  white-space: pre-wrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-dot.ready {
  background: #00ffaa;
}

.status-dot.running {
  background: #ffbd2e;
  animation: pulse 1s infinite;
}

.json-key {
  color: #ffb86c;
}

.json-string {
  color: #f1fa8c;
}

.json-number {
  color: #bd93f9;
}

/* ── Providers ─────────────────────────────────────── */
.providers-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  align-items: center;
}

.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-card:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Install Steps ─────────────────────────────────── */
.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.install-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.step-number {
  color: #00ffaa;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.install-step h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: #fff;
}

.install-step pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  font-size: 0.85rem;
  color: #a1a1aa;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
  margin-top: auto;
}

/* ── Architecture ──────────────────────────────────── */
.arch-diagram {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px;
  font-size: 0.95rem;
  line-height: 2;
  color: var(--text-dim);
  margin: 40px auto 0;
  max-width: 960px;
  overflow-x: auto;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
  white-space: pre;
  font-family: 'JetBrains Mono', monospace;
}

.arch-diagram .module {
  color: #fff;
  font-weight: 600;
}

.arch-diagram .desc {
  color: #00ffaa;
}

/* ── Footer ────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0;
  text-align: center;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-links a {
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .playground-wrap {
    grid-template-columns: 1fr;
  }

  .install-steps {
    grid-template-columns: 1fr;
  }
}

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

  .nav-links {
    display: none;
  }

  .nav-mobile {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 20px;
  }
}