/* ===== CSS Variables ===== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #f59e0b;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --dark-lighter: #334155;
  --gray: #64748b;
  --gray-light: #94a3b8;
  --gray-lighter: #cbd5e1;
  --light: #f1f5f9;
  --white: #ffffff;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-dark: linear-gradient(
    135deg,
    var(--dark) 0%,
    var(--dark-light) 100%
  );
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--dark);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

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

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--dark-light);
  color: var(--white);
  border: 1px solid var(--dark-lighter);
}

.btn-secondary:hover {
  background: var(--dark-lighter);
  border-color: var(--gray);
}

.btn-download {
  background: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-download:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--gray);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.nav-logo i {
  color: var(--primary);
  font-size: 1.75rem;
}

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

.nav-link {
  color: var(--gray-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  padding: 120px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(99, 102, 241, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  color: var(--primary-light);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-badge i {
  color: var(--accent);
}

.hero-content h1 {
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--gray-light);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray);
}

/* Terminal Demo */
.hero-demo {
  perspective: 1000px;
}

.terminal {
  background: var(--dark-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(99, 102, 241, 0.1);
  border: 1px solid var(--dark-lighter);
  transform: rotateY(-5deg) rotateX(5deg);
  transition: var(--transition);
}

.terminal:hover {
  transform: rotateY(0) rotateX(0);
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--dark);
  border-bottom: 1px solid var(--dark-lighter);
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

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

.terminal-btn.red {
  background: #ff5f57;
}
.terminal-btn.yellow {
  background: #febc2e;
}
.terminal-btn.green {
  background: #28c840;
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray);
}

.terminal-body {
  padding: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.8;
}

.terminal-line {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.prompt {
  color: var(--secondary);
}

.command {
  color: var(--white);
}

.user-input {
  color: var(--primary-light);
}

.terminal-output {
  color: var(--gray-light);
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

.success {
  color: var(--secondary);
}

.info {
  color: var(--accent);
}

.ai-response {
  color: var(--gray-lighter);
}

.ai-label {
  color: var(--primary-light);
}

/* ===== Section Styles ===== */
section {
  padding: 100px 0;
}

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

.section-header h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.section-header p {
  color: var(--gray-light);
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Features Section ===== */
.features {
  background: var(--dark);
}

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

.feature-card {
  background: var(--dark-light);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--dark-lighter);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--gradient);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon i {
  font-size: 1.5rem;
  color: var(--white);
}

.feature-card h3 {
  color: var(--white);
  margin-bottom: 12px;
}

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

/* ===== Providers Section ===== */
.providers {
  background: var(--dark-light);
}

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

.provider-card {
  background: var(--dark);
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--dark-lighter);
  transition: var(--transition);
}

.provider-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.provider-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gray-light);
}

.provider-logo svg {
  width: 48px;
  height: 48px;
}

.provider-logo.openai {
  color: #10a37f;
}
.provider-logo.anthropic {
  color: #d4a27f;
}
.provider-logo.google {
  color: #4285f4;
}
.provider-logo.cohere {
  color: #d4587a;
}
.provider-logo.ollama {
  color: var(--gray-light);
}

.cohere-icon {
  font-size: 2.5rem;
  font-weight: 800;
  color: #d4587a;
}

.provider-card h4 {
  color: var(--white);
  margin-bottom: 8px;
}

.provider-models {
  font-size: 0.85rem;
  color: var(--gray);
}

.provider-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.provider-badge.default {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
}

.provider-badge.local {
  background: rgba(16, 185, 129, 0.2);
  color: var(--secondary);
}

/* ===== Installation Section ===== */
.installation {
  background: var(--dark);
}

.install-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--dark-light);
  border: 1px solid var(--dark-lighter);
  border-radius: var(--radius);
  color: var(--gray-light);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  border-color: var(--gray);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.tab-content {
  display: none;
  max-width: 700px;
  margin: 0 auto;
}

.tab-content.active {
  display: block;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h4 {
  color: var(--white);
  margin-bottom: 12px;
}

.code-block {
  display: flex;
  align-items: center;
  background: var(--dark-light);
  border: 1px solid var(--dark-lighter);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-block code {
  flex: 1;
  padding: 14px 20px;
  color: var(--secondary);
  font-size: 0.95rem;
}

.copy-btn {
  padding: 14px 16px;
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  color: var(--white);
  background: var(--dark-lighter);
}

.copy-btn.copied {
  color: var(--secondary);
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

/* ===== Documentation Section ===== */
.docs {
  background: var(--dark-light);
}

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

.doc-card {
  background: var(--dark);
  border-radius: var(--radius-lg);
  border: 1px solid var(--dark-lighter);
  overflow: hidden;
}

.doc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--dark-light);
  border-bottom: 1px solid var(--dark-lighter);
}

.doc-header i {
  color: var(--primary);
  font-size: 1.25rem;
}

.doc-header h3 {
  color: var(--white);
  font-size: 1.1rem;
}

.doc-code {
  padding: 20px;
  overflow-x: auto;
}

.doc-code pre {
  margin: 0;
}

.doc-code code {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--gray-light);
}

.doc-code .key {
  color: var(--primary-light);
}
.doc-code .bool {
  color: var(--accent);
}
.doc-code .item {
  color: var(--gray-lighter);
}
.doc-code .comment {
  color: var(--gray);
}
.doc-code .cmd {
  color: var(--secondary);
}
.doc-code .string {
  color: var(--accent);
}

.doc-caption {
  padding: 12px 20px;
  background: var(--dark-light);
  border-top: 1px solid var(--dark-lighter);
  font-size: 0.85rem;
  color: var(--gray);
}

.doc-caption code {
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.docs-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

/* ===== Commands Section ===== */
.commands {
  background: var(--dark);
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.command-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--dark-light);
  border-radius: var(--radius);
  border: 1px solid var(--dark-lighter);
}

.command-item code {
  color: var(--secondary);
  font-size: 0.95rem;
}

.command-item span {
  color: var(--gray);
  font-size: 0.9rem;
}

/* ===== CTA Section ===== */
.cta {
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(99, 102, 241, 0.15) 0%,
    transparent 50%
  );
}

.cta-content {
  position: relative;
  text-align: center;
}

.cta h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta p {
  color: var(--gray-light);
  font-size: 1.2rem;
  margin-bottom: 32px;
}

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

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  padding: 80px 0 40px;
  border-top: 1px solid var(--dark-lighter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-logo i {
  color: var(--primary);
}

.footer-brand p {
  color: var(--gray);
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-light);
  border-radius: 50%;
  color: var(--gray-light);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

.footer-links h4 {
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--gray);
  font-size: 0.95rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--dark-lighter);
}

.footer-bottom p {
  color: var(--gray);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--primary-light);
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 100px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-demo {
    max-width: 600px;
    margin: 0 auto;
  }

  .terminal {
    transform: none;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .providers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--dark-lighter);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .providers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .commands-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons,
  .cta-buttons,
  .docs-cta,
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .providers-grid {
    grid-template-columns: 1fr;
  }

  .install-tabs {
    flex-direction: column;
    align-items: center;
  }

  .tab-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card,
.provider-card,
.doc-card,
.command-item {
  animation: fadeInUp 0.5s ease forwards;
}

/* Typing animation */
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.typing::after {
  content: "|";
  animation: blink 1s infinite;
  color: var(--secondary);
}
