/* 
   Codestral by Vyapari - Design System 
   Theme: Modern Developer Dark Mode
*/

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

:root {
  /* Colors */
  --bg-page: #0b0c15;
  --bg-surface: #13141f;
  --bg-surface-hover: #1a1c2a;

  --accent-primary: #9333ea; /* Electric Purple */
  --accent-secondary: #06b6d4; /* Teal */
  --accent-glow: rgba(147, 51, 234, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  /* Syntax Highlighting Colors */
  --code-bg: #111118;
  --syntax-keyword: #c678dd;
  --syntax-func: #61afef;
  --syntax-string: #98c379;
  --syntax-comment: #5c6370;
  --syntax-var: #e06c75;

  /* Spacing & Layout */
  --container-width: 1200px;
  --header-height: 72px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.text-gradient {
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-accent {
  background: linear-gradient(
    135deg,
    var(--accent-secondary),
    var(--accent-primary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-page);
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

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

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(11, 12, 21, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
}

header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.brand-icon {
  width: 24px;
  height: 24px;
  background: linear-gradient(
    135deg,
    var(--accent-secondary),
    var(--accent-primary)
  );
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: white;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  font-size: 3.5rem;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-visual {
  margin-top: 4rem;
  perspective: 1000px;
}

.editor-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  text-align: left;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: rotateX(1deg);
  transition: transform 0.5s ease;
}

.editor-window:hover {
  transform: rotateX(0);
}

.editor-header {
  background: #181926;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red {
  background: #ff5f56;
}
.dot.yellow {
  background: #ffbd2e;
}
.dot.green {
  background: #27c93f;
}

.editor-content {
  display: flex;
  min-height: 400px;
}

.sidebar {
  width: 200px;
  border-right: 1px solid var(--border-light);
  padding: 1rem;
  display: none; /* Hidden on mobile */
}

@media (min-width: 768px) {
  .sidebar {
    display: block;
  }
}

.file-tree div {
  padding: 4px 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 4px;
}

.file-tree div.active {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.code-area {
  flex: 1;
  padding: 1.5rem;
  background: var(--code-bg);
  overflow-x: auto;
}

/* Typing Animation Cursor */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--accent-secondary);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* Social Proof */
.social-proof {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.proof-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  opacity: 0.7;
}

.proof-content span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Capabilites Grid */
.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 2rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  background: var(--bg-surface-hover);
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Live Editor Interactive */
.live-editor-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

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

/* Integrations 'Map' */
.integration-map {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 3rem 0;
}

.node {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.node.center {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.1);
}

/* Benchmarks */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-secondary);
  font-family: "JetBrains Mono", monospace;
}

/* FAQ Accordion */
.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion-item {
  border-bottom: 1px solid var(--border-light);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.5rem 0;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: max-height 0.3s ease;
}

.accordion-content.open {
  max-height: 200px;
  padding-bottom: 1.5rem;
}

/* Pricing */
.pricing-panel {
  background: linear-gradient(
    180deg,
    var(--bg-surface) 0%,
    rgba(147, 51, 234, 0.05) 100%
  );
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2rem;
  background: var(--bg-surface);
  color: var(--text-tertiary);
  text-align: center;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

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

/* Utility Animations */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .nav-actions {
    display: none;
  }
  .container {
    padding: 0 1.25rem;
  }
}
