/* apidcms landing — custom.css */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  background: #f9fafb;
  color: #111827;
  padding-top: 72px;
}

:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --accent: #8b5cf6;
  --accent2: #a78bfa;
  --glow: rgba(139, 92, 246, 0.12);
  --border: #e5e7eb;
  --radius: 16px;
  --radius-sm: 10px;
}

h1, h2, h3, .logo, .hero-badge, .btn, .arch-card h4, .term-icon {
  font-family: 'Space Grotesk', sans-serif;
}
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
section { padding: 120px 0; }
h2 { font-size: clamp(36px, 4.5vw, 56px); font-weight: 700; margin-bottom: 16px; letter-spacing: -0.03em; }
.subtitle { font-size: 20px; color: var(--muted); max-width: 640px; margin-bottom: 48px; line-height: 1.6; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px; font-weight: 600;
  font-size: 17px; cursor: pointer; transition: all .25s cubic-bezier(0.22, 1, 0.36, 1);
  border: none; outline: none; text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 4px 20px var(--glow); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px var(--glow); }
.btn-primary:active { transform: translateY(-1px) scale(0.98); }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }
.btn-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}
.header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
nav { display: flex; gap: 32px; }
nav a { color: var(--muted); text-decoration: none; font-size: 16px; transition: color .2s; }
nav a:hover { color: var(--fg); }
.header-cta .btn { padding: 8px 22px; font-size: 15px; }

/* SVG illustration */
.svg-illustration { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: var(--radius-sm); background: #f3f4f6; }
.svg-illustration svg { width: 100%; height: 100%; max-width: 100%; max-height: 100%; }

/* Hero */
#hero { min-height: calc(100vh - 72px); display: flex; align-items: center; padding-top: 0; background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 50%, #f0eaff 100%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(139,92,246,0.1); color: var(--accent);
  padding: 6px 14px; border-radius: 50px; font-size: 15px; font-weight: 500;
  margin-bottom: 24px; transition: transform 0.3s;
}
.hero-badge:hover { transform: scale(1.05); }
.hero-badge svg { width: 16px; height: 16px; fill: currentColor; }
.hero h1 { font-size: clamp(40px, 5.5vw, 72px); line-height: 1.1; margin-bottom: 24px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 520px; margin-bottom: 48px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.mockup-group { position: relative; display: flex; flex-direction: column; align-items: center; }
.mockup-group::before {
  content: '';
  position: absolute; inset: -20px;
  background: radial-gradient(ellipse at 50% 50%, rgba(139,92,246,0.2), transparent 70%);
  pointer-events: none;
}
.mockup-main { width: 100%; max-width: 500px; height: 300px; }
.mockup-overlay { width: 260px; align-self: flex-end; margin-top: -60px; margin-right: 20px; position: relative; z-index: 2; height: 200px; }

/* Comparison */
#comparison { background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card { border-radius: var(--radius); padding: 40px; transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.06); }
.card.bad { background: var(--surface); border: 1px solid var(--border); }
.card.good { background: var(--surface); border: 1px solid rgba(139,92,246,0.2); box-shadow: 0 0 30px rgba(139,92,246,0.05); }
.card.good:hover { box-shadow: 0 0 40px rgba(139,92,246,0.12); }
.card h3 { font-size: 24px; margin-bottom: 20px; }
.card ul { list-style: none; }
.card li { padding: 10px 0; display: flex; align-items: center; gap: 12px; font-size: 17px; }
.card.bad li::before { content: '\2715'; color: #ef4444; font-weight: 700; font-size: 18px; }
.card.good li::before { content: '\2713'; color: #22c55e; font-weight: 700; font-size: 18px; }

/* AI */
#ai { background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%); }
.ai-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.ai-text .subtitle { max-width: none; }
.tabs { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.tab-btn {
  padding: 12px 24px; border-radius: 50px; background: transparent; border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; transition: all .25s cubic-bezier(0.22, 1, 0.36, 1); font-size: 15px; font-weight: 500;
}
.tab-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; }
.tab-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.tab-btn:active { transform: translateY(0); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content .svg-illustration { height: 280px; }

/* Types */
#types { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #e0e7ff 100%); }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.type-card {
  background: var(--surface); border-radius: var(--radius); padding: 32px 24px;
  border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.06); position: relative;
  transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .3s;
}
.type-card:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(139,92,246,0.1); }
.type-card:active { transform: translateY(-2px); }
.type-card .type-icon { font-size: 40px; margin-bottom: 16px; }
.type-card h4 { font-size: 20px; margin-bottom: 8px; }
.type-card p { font-size: 16px; color: var(--muted); }
.badge-soon { display: inline-block; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; padding: 3px 12px; border-radius: 50px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 12px; }

/* Steps */
#steps { background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%); }
.timeline { display: flex; gap: 0; position: relative; padding: 60px 0 40px; }
.timeline::before { content: ''; position: absolute; top: 80px; left: 8%; right: 8%; height: 2px; border-top: 2px dashed var(--border); }
.step { flex: 1; text-align: center; position: relative; }
.step .step-placeholder {
  width: 72px; height: 72px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  font-size: 30px; box-shadow: 0 4px 12px rgba(139,92,246,0.1);
  transition: transform .3s, box-shadow .3s;
}
.step:hover .step-placeholder { transform: scale(1.1); box-shadow: 0 6px 20px rgba(139,92,246,0.2); }
.step h4 { font-size: 20px; margin-bottom: 8px; }
.step p { font-size: 16px; color: var(--muted); max-width: 180px; margin: 0 auto; }

/* Bento */
#bento { background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%); }
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.bento-item {
  background: var(--surface); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex; flex-direction: column;
  transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .3s;
}
.bento-item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(139,92,246,0.1); }
.bento-item:active { transform: translateY(-2px); }
.bento-item.wide { grid-column: span 2; }
.bento-item.tall { grid-row: span 2; }
.bento-item h4 { font-size: 20px; margin-bottom: 8px; }
.bento-item p { font-size: 16px; color: var(--muted); margin-bottom: 12px; }
.bento-image-wrapper { flex: 1; display: flex; align-items: stretch; min-height: 40px; }
.bento-image-wrapper .svg-illustration { height: 100%; min-height: 80px; }

/* Architecture */
#arch { background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%); }
.arch-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.arch-card {
  background: var(--surface); border-radius: var(--radius); padding: 36px;
  border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .3s;
}
.arch-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(139,92,246,0.1); }
.arch-card .term-icon { font-size: 32px; margin-bottom: 12px; background: #f3f4f6; display: inline-block; padding: 8px 12px; border-radius: 8px; }
.arch-card h4 { font-size: 22px; margin-bottom: 8px; }
.arch-card p { font-size: 16px; color: var(--muted); }

/* Usecases */
#usecases { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); }
.usecases-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.usecase-card {
  background: var(--surface); border-radius: var(--radius); padding: 32px;
  border: 1px solid var(--border); transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.usecase-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(139,92,246,0.12); }
.usecase-card:active { transform: translateY(-2px); }
.usecase-card h4 { font-size: 18px; margin-bottom: 8px; }
.usecase-card p { font-size: 16px; color: var(--muted); margin-bottom: 12px; }
.usecase-card .example-link { color: var(--accent); font-size: 15px; text-decoration: none; }
.usecase-card .example-link::after { content: ' \2197'; }

/* Final CTA */
#final-cta { text-align: center; background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%); padding: 120px 0; }
#final-cta h2 { font-size: clamp(36px,4.5vw,52px); }
#final-cta p { max-width: 560px; margin: 0 auto 40px; color: var(--muted); font-size: 19px; }
.small-note { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Footer */
footer { background: #111827; color: #d1d5db; padding: 60px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand .logo { font-size: 24px; margin-bottom: 12px; background: linear-gradient(135deg, #a78bfa, #c4b5fd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-brand p { font-size: 15px; max-width: 300px; color: #9ca3af; }
.footer-nav h5 { color: #f9fafb; font-size: 14px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-nav a { display: block; color: #9ca3af; text-decoration: none; padding: 4px 0; font-size: 15px; transition: color .2s; }
.footer-nav a:hover { color: #f9fafb; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #374151; font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom .footer-legal { display: inline-flex; gap: 16px; }
.footer-bottom a { color: #9ca3af; text-decoration: none; transition: color .2s; }
.footer-bottom a:hover { color: #f9fafb; text-decoration: none; }

/* Scroll reveal animation (Emil Kowalski style) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .comparison-grid { grid-template-columns: 1fr; }
  .ai-two-col { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bento-item.wide { grid-column: span 1; }
  .bento-item.tall { grid-row: span 1; }
  .arch-grid { grid-template-columns: 1fr; }
  .usecases-grid { grid-template-columns: 1fr 1fr; }
  .timeline { flex-direction: column; }
  .timeline::before { display: none; }
  .step { margin-bottom: 32px; }
  nav { display: none; }
  .header-inner { justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr; }
}


/* ===== Documentation Page Styles ===== */

:root {
  --code-bg: #1e1e2e;
  --code-fg: #cdd6f4;
}

/* Layout */
.layout {
  display: flex;
  min-height: calc(100vh - 72px);
}

/* Left sidebar */
.sidebar-left {
  width: 260px;
  min-width: 260px;
  padding: 24px 16px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  background: var(--surface);
}
.sidebar-left .nav-section { margin-bottom: 24px; }
.sidebar-left .nav-category {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 600; margin-bottom: 8px;
}
.sidebar-left .nav-item {
  display: block; padding: 6px 12px; border-radius: 6px;
  font-size: 14px; color: #374151; transition: all .15s;
  margin-bottom: 2px; border-left: 3px solid transparent;
}
.sidebar-left .nav-item:hover { background: #f3f4f6; color: var(--accent); }
.sidebar-left .nav-item.active {
  background: rgba(139,92,246,0.08);
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
}
.sidebar-left .nav-item.sub { padding-left: 24px; font-size: 13px; }

/* Center content */
.content-center {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}
.breadcrumbs {
  font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { color: var(--fg); }
.content-center h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; }
.content-center .lead { font-size: 18px; color: var(--muted); margin-bottom: 32px; max-width: 680px; }

/* Callout */
.callout {
  display: flex; gap: 12px; padding: 16px 20px;
  border-radius: 12px; background: #fef9c3; border: 1px solid #fde047;
  margin-bottom: 32px; font-size: 15px;
}
.callout .icon { font-size: 20px; flex-shrink: 0; }

.content-center h2 { font-size: 26px; font-weight: 700; margin: 32px 0 12px; }
.content-center h3 { font-size: 20px; font-weight: 600; margin: 24px 0 8px; }
.content-center p { margin-bottom: 16px; font-size: 16px; line-height: 1.8; }
.content-center ul { margin-bottom: 16px; padding-left: 20px; }

/* Code block */
.code-block {
  background: var(--code-bg); color: var(--code-fg);
  border-radius: 12px; padding: 20px 24px; margin: 20px 0 32px;
  position: relative; font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px; line-height: 1.6; overflow-x: auto;
}
.code-block .copy-btn {
  position: absolute; top: 12px; right: 16px;
  background: rgba(255,255,255,0.08); border: none; color: #a0a0b0;
  padding: 4px 10px; border-radius: 6px; cursor: pointer;
  font-size: 12px; transition: all .15s;
}
.code-block .copy-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.code-block pre {
  margin: 0; padding: 0; background: none; color: inherit;
  font-family: inherit; font-size: inherit; line-height: inherit;
  white-space: pre-wrap; word-break: break-word;
}

/* Page navigation */
.page-nav {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border);
}
.page-nav a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 24px; border-radius: 12px;
  border: 1px solid var(--border); transition: all .2s;
  flex: 1; max-width: 280px;
}
.page-nav a:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(139,92,246,0.06); text-decoration: none; }
.page-nav .label { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }
.page-nav .title { font-size: 16px; font-weight: 600; color: var(--fg); }
.page-nav a:hover .title { color: var(--accent); }

/* Right sidebar */
.sidebar-right {
  width: 220px;
  min-width: 220px;
  padding: 32px 20px;
  border-left: 1px solid var(--border);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}
.sidebar-right .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 600; margin-bottom: 16px;
}
.sidebar-right .toc-item {
  display: block; padding: 4px 0; font-size: 13px; color: var(--muted);
  border-left: 2px solid transparent; padding-left: 12px;
  transition: all .15s;
}
.sidebar-right .toc-item:hover { color: var(--fg); border-left-color: var(--border); }
.sidebar-right .toc-item.active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.sidebar-right .toc-item.sub { padding-left: 24px; font-size: 12px; }
.sidebar-right .help-links { margin-top: 40px; }
.sidebar-right .help-links a { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 0; }

/* Scrollbar styling for docs */
.sidebar-left::-webkit-scrollbar, .sidebar-right::-webkit-scrollbar, .code-block::-webkit-scrollbar { width: 6px; }
.sidebar-left::-webkit-scrollbar-track, .sidebar-right::-webkit-scrollbar-track { background: transparent; }
.sidebar-left::-webkit-scrollbar-thumb, .sidebar-right::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

/* Docs responsive */
@media (max-width: 1200px) {
  .sidebar-right { display: none; }
}
@media (max-width: 768px) {
  .sidebar-left { display: none; }
  .content-center { padding: 24px 16px; max-width: 100%; }
}

/* Header search bar */
.header-search input {
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}
.header-search input:focus {
  border-color: #8b5cf6 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1) !important;
}

/* Docs tables */
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 15px;
  line-height: 1.6;
}
.doc-content thead {
  border-bottom: 2px solid #e5e7eb;
}
.doc-content th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
  white-space: nowrap;
}
.doc-content td {
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
  vertical-align: top;
}
.doc-content td code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #8b5cf6;
}
.doc-content tr:hover td {
  background: #fafaff;
}
