/* ========================================
   GitHub Copilot API Gateway - Design System
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  /* Colors */
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-secondary: #22d3ee;
  --color-secondary-light: #67e8f9;
  --color-accent: #f472b6;

  /* Backgrounds */
  --bg-dark: #0a0a0f;
  --bg-surface: #1a1a2e;
  --bg-surface-light: #252542;
  --bg-glass: rgba(26, 26, 46, 0.7);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-hero: linear-gradient(180deg, var(--bg-dark) 0%, #0f0f1a 100%);
  --gradient-card: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-surface-light) 100%);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  --shadow-glow-cyan: 0 0 40px rgba(34, 211, 238, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-tooltip: 400;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

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

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

.text-muted {
  color: var(--text-muted);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

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

/* Grid */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

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

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

/* Flex */
.flex {
  display: flex;
}

.flex-center {
  align-items: center;
  justify-content: center;
}

.flex-between {
  justify-content: space-between;
}

.flex-col {
  flex-direction: column;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

/* ---------- Components ---------- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

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

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

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

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

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

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-lg);
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-lg);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  font-size: var(--text-xl);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-md) 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-base);
}

.nav.scrolled {
  padding: var(--space-sm) 0;
  background: rgba(10, 10, 15, 0.95);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) 0;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-primary-light);
  margin-bottom: var(--space-xl);
}

.hero h1 {
  font-size: var(--text-6xl);
  margin-bottom: var(--space-lg);
  max-width: 900px;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-code {
  margin-top: var(--space-3xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Code blocks */
.code-block {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dots span:nth-child(1) {
  background: #ff5f57;
}

.code-dots span:nth-child(2) {
  background: #febc2e;
}

.code-dots span:nth-child(3) {
  background: #28c840;
}

.code-lang {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.code-copy {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.code-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.code-content {
  padding: var(--space-lg);
  overflow-x: auto;
}

.code-content pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Syntax highlighting */
.code-keyword {
  color: #c792ea;
}

.code-string {
  color: #c3e88d;
}

.code-function {
  color: #82aaff;
}

.code-comment {
  color: #546e7a;
}

.code-number {
  color: #f78c6c;
}

.code-variable {
  color: #89ddff;
}

/* Features Grid */
.features {
  background: var(--bg-dark);
}

/* Personas */
.personas {
  background: linear-gradient(180deg, var(--bg-dark) 0%, #0f0f1a 100%);
}

.persona-card {
  text-align: center;
  padding: var(--space-2xl);
}

.persona-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table th {
  background: rgba(0, 0, 0, 0.3);
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-highlight {
  background: rgba(99, 102, 241, 0.1);
}

.comparison-highlight td:nth-child(2) {
  color: var(--color-secondary);
  font-weight: 600;
}

/* Integrations */
.integrations-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
}

.integration-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  font-weight: 500;
  transition: all var(--transition-base);
}

.integration-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  background: var(--bg-surface);
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

/* ---------- Documentation Styles ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-2xl);
  padding-top: 80px;
  min-height: 100vh;
}

/* Sidebar toggle button - only visible on mobile */
.docs-sidebar-toggle {
  display: none;
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: var(--space-md);
  transition: all var(--transition-fast);
}

.docs-sidebar-toggle:hover {
  background: var(--bg-surface-light);
}

.docs-sidebar-toggle svg {
  margin-right: var(--space-sm);
  transition: transform var(--transition-fast);
}

.docs-sidebar-toggle.active svg {
  transform: rotate(180deg);
}

.docs-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  padding: var(--space-xl);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.docs-nav-section {
  margin-bottom: var(--space-xl);
}

.docs-nav-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.docs-nav-links a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  margin-left: calc(-1 * var(--space-sm));
  color: var(--text-secondary);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.docs-nav-links a:hover,
.docs-nav-links a.active {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.1);
}

.docs-content {
  padding: var(--space-xl) 0;
  max-width: 800px;
}

.docs-content h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

.docs-content h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.docs-content h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.docs-content p {
  margin-bottom: var(--space-md);
}

.docs-content ul,
.docs-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

.docs-content li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.docs-content ul li {
  list-style: disc;
}

.docs-content ol li {
  list-style: decimal;
}

/* API Endpoint Cards */
.endpoint-card {
  margin-bottom: var(--space-xl);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  cursor: pointer;
}

.endpoint-method {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.endpoint-method.get {
  background: #22c55e33;
  color: #22c55e;
}

.endpoint-method.post {
  background: #3b82f633;
  color: #3b82f6;
}

.endpoint-method.put {
  background: #f59e0b33;
  color: #f59e0b;
}

.endpoint-method.delete {
  background: #ef444433;
  color: #ef4444;
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.endpoint-desc {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.endpoint-body {
  padding: var(--space-lg);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* FAQ Accordion */
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-surface-light);
}

.faq-icon {
  font-size: var(--text-xl);
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: var(--space-lg);
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Tabs */
.tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tab:hover {
  color: var(--text-secondary);
}

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

.tab-content {
  display: none;
}

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

/* ---------- Responsive ---------- */

/* Tablet Landscape */
@media (max-width: 1024px) {
  :root {
    --space-4xl: 4rem;
    --space-3xl: 3rem;
  }

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

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

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

  .docs-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .docs-sidebar {
    position: relative;
    top: 0;
  }

  .hero h1 {
    font-size: var(--text-5xl);
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }
}

/* Tablet Portrait */
@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-6xl: 2.75rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
    --text-2xl: 1.25rem;
    --space-4xl: 3rem;
    --space-3xl: 2rem;
    --space-2xl: 1.5rem;
  }

  /* Container padding */
  .container {
    padding: 0 var(--space-md);
  }

  /* Section spacing */
  .section {
    padding: var(--space-3xl) 0;
  }

  .section-header {
    margin-bottom: var(--space-2xl);
  }

  .section-header p {
    font-size: var(--text-base);
    padding: 0 var(--space-sm);
  }

  /* Navigation */
  .nav {
    padding: var(--space-sm) 0;
  }

  .nav-logo span {
    font-size: var(--text-base);
  }

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

  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-xl);
    gap: var(--space-sm);
    background: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(10px);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: var(--space-md);
    font-size: var(--text-lg);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
  }

  .nav-link::after {
    display: none;
  }

  .nav-links .btn {
    width: 100%;
    margin-top: var(--space-md);
    padding: var(--space-md);
    text-align: center;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1001;
  }

  .nav-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: left;
  }

  .nav-toggle.active span:first-child {
    transform: rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:last-child {
    transform: rotate(-45deg);
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: calc(80px + var(--space-2xl)) var(--space-sm) var(--space-2xl);
  }

  .hero-content {
    padding: 0 var(--space-sm);
  }

  .hero-badge {
    font-size: var(--text-xs);
    margin-bottom: var(--space-lg);
  }

  .hero h1 {
    font-size: var(--text-4xl);
    line-height: 1.15;
    margin-bottom: var(--space-md);
  }

  .hero-subtitle {
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: var(--space-xl);
    padding: 0 var(--space-sm);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
  }

  .hero-code {
    margin-top: var(--space-2xl);
  }

  /* Grids */
  .grid {
    gap: var(--space-md);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card {
    padding: var(--space-lg);
  }

  .card h3 {
    font-size: var(--text-lg);
  }

  .card p {
    font-size: var(--text-sm);
  }

  .card-icon {
    width: 40px;
    height: 40px;
    font-size: var(--text-lg);
  }

  /* Persona cards */
  .persona-card {
    padding: var(--space-xl) var(--space-lg);
  }

  .persona-icon {
    width: 64px;
    height: 64px;
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
  }

  /* Comparison table */
  .comparison-table {
    font-size: var(--text-xs);
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-sm);
    white-space: nowrap;
  }

  .comparison-table th:first-child,
  .comparison-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--bg-surface);
    z-index: 1;
  }

  /* Integrations */
  .integrations-grid {
    gap: var(--space-sm);
    justify-content: flex-start;
  }

  .integration-item {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    flex: 0 0 auto;
  }

  /* Code blocks */
  .code-block {
    border-radius: var(--radius-md);
  }

  .code-header {
    padding: var(--space-xs) var(--space-sm);
  }

  .code-dots span {
    width: 10px;
    height: 10px;
  }

  .code-content {
    padding: var(--space-md);
  }

  .code-content pre {
    font-size: var(--text-xs);
    line-height: 1.5;
  }

  /* Footer */
  .footer {
    padding: var(--space-2xl) 0 var(--space-lg);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .footer-brand {
    order: -1;
  }

  .footer-brand p {
    max-width: none;
    margin: var(--space-md) auto 0;
  }

  .footer-brand .nav-logo {
    justify-content: center;
  }

  .footer-title {
    margin-top: var(--space-lg);
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
  }

  .footer-links li {
    margin: 0;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
    padding-top: var(--space-lg);
  }

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

  /* Docs layout */
  .docs-layout {
    padding-top: 70px;
  }

  /* Mobile sidebar toggle button */
  .docs-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Hide sidebar by default on mobile */
  .docs-sidebar {
    display: none;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    position: relative;
    top: 0;
  }

  /* Show sidebar when toggle is active */
  .docs-sidebar.active {
    display: block;
  }

  .docs-nav-section {
    margin-bottom: var(--space-md);
  }

  .docs-content {
    padding: var(--space-md) 0;
  }

  .docs-content h1 {
    font-size: var(--text-3xl);
  }

  .docs-content h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
  }

  .docs-content h3 {
    font-size: var(--text-lg);
  }

  /* API endpoints */
  .endpoint-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md);
  }

  .endpoint-desc {
    width: 100%;
    margin-left: 0;
    margin-top: var(--space-xs);
  }

  .endpoint-body {
    padding: var(--space-md);
  }

  /* FAQ */
  .faq-question {
    padding: var(--space-md);
    font-size: var(--text-base);
    line-height: 1.4;
  }

  .faq-answer-content {
    padding: var(--space-md);
    font-size: var(--text-sm);
  }

  /* Buttons on mobile */
  .btn {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
  }

  .btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  :root {
    --text-4xl: 1.75rem;
    --text-3xl: 1.375rem;
    --text-2xl: 1.125rem;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .hero {
    padding-top: calc(60px + var(--space-xl));
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  .hero-buttons {
    max-width: 100%;
  }

  .card {
    padding: var(--space-md);
  }

  .persona-icon {
    width: 56px;
    height: 56px;
  }

  .section-header h2 {
    font-size: var(--text-2xl);
  }

  /* Make integrations scrollable */
  .integrations-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-md);
    margin: 0 calc(-1 * var(--space-sm));
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
    justify-content: flex-start;
  }

  .integration-item {
    flex-shrink: 0;
  }
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: var(--shadow-glow);
  }

  50% {
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
  }
}

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease infinite;
}

.animate-glow {
  animation: glow 2s ease infinite;
}

/* Stagger animations */
.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

.stagger-3 {
  animation-delay: 0.3s;
}

.stagger-4 {
  animation-delay: 0.4s;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}