/* ==========================================================================
   docs.merciful.ai - Developer Documentation Portal
   Theme: Sleek Dark Glassmorphism with Indigo / Violet Accents
   ========================================================================== */

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

:root {
  --bg: #0b0f19;
  --bg-subtle: #0f172a;
  --surface: #131d35;
  --surface-hover: #1e293b;
  --surface-glass: rgba(19, 29, 53, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --accent: #38bdf8;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --sidebar-width: 280px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  font-size: 20px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.btn-cta {
  background: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-cta:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

/* Layout */
.docs-container {
  display: flex;
  margin-top: var(--header-height);
  flex: 1;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 16px 48px;
}

.sidebar-group {
  margin-bottom: 24px;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.sidebar-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-item.active {
  color: #ffffff;
  background: rgba(99, 102, 241, 0.15);
  font-weight: 600;
}

/* Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  max-width: 960px;
  padding: 48px 64px 96px;
}

/* Typography */
h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

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

.lead-text {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

strong {
  color: var(--text);
}

ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
  color: var(--text-secondary);
}

li {
  margin-bottom: 8px;
}

/* Callout Alerts */
.callout {
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  margin: 24px 0;
  display: flex;
  gap: 14px;
}

.callout.info {
  border-left: 4px solid var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.callout.tip {
  border-left: 4px solid var(--success);
  background: rgba(16, 185, 129, 0.08);
}

.callout.warning {
  border-left: 4px solid var(--warning);
  background: rgba(245, 158, 11, 0.08);
}

.callout-icon {
  font-size: 20px;
  line-height: 1;
}

.callout-content {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* Code Blocks & Tabs */
.code-box {
  background: #080c14;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0 28px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.code-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-tabs {
  display: flex;
  gap: 8px;
}

.code-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.code-tab.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

pre {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Endpoint Badge */
.endpoint-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.method-post { color: #38bdf8; }
.method-get { color: #10b981; }
.method-delete { color: #ef4444; }

/* Interactive Demo Card */
.interactive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 32px 0;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13px;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

td {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    padding: 32px 24px 64px;
  }
}

/* Path Comparison Cards */
.path-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0 32px;
}

@media (max-width: 768px) {
  .path-cards {
    grid-template-columns: 1fr;
  }
}

.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.path-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.path-card.agent-path {
  border-top: 3px solid #8b5cf6;
}

.path-card.api-path {
  border-top: 3px solid #38bdf8;
}

.path-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 12px;
  width: fit-content;
}

.path-badge.agent {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.path-badge.api {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.path-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 17px;
  color: var(--text);
}

.path-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.path-card ul {
  margin-bottom: 0;
  padding-left: 20px;
  font-size: 13px;
}

.path-card li {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

/* Getting started */
.start-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.start-option {
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.start-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 16px;
  color: var(--accent);
}

.start-option h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.start-option p {
  flex: 1;
  font-size: 14px;
}

.main-content a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.main-content a:hover {
  color: var(--text);
}

.main-content a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.start-option a {
  font-size: 13px;
}

.start-link {
  margin: 4px 0 10px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .start-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .top-nav {
    padding: 0 16px;
    gap: 12px;
  }

  .brand-badge,
  .github-link {
    display: none;
  }

  .nav-links {
    gap: 12px;
  }
}

/* Feature status tag */
.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 8px;
}

.status-pill.current {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.planned {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

