:root {
  --bg: #ffffff;
  --bg-raised: #f9fafb;
  --text: #111827;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --accent: #f48120;
  --accent-dim: rgba(244, 129, 32, 0.08);
  --accent-hover: #e06b0a;
  --border: #e5e7eb;
  --border-hover: #d1d5db;
  --terminal-bg: #1f2937;
  --terminal-text: #f3f4f6;
  --terminal-muted: #9ca3af;
  --terminal-faint: #6b7280;
  --ok: #16a34a;
  --no: #dc2626;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-dim);
  color: var(--accent-hover);
}

a { color: var(--accent); }

/* Navigation */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  letter-spacing: -0.01em;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2.5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  max-width: 860px;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

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

/* Quick-answer block (GEO above-the-fold) */
.quick-answer {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-top: 2.5rem;
  max-width: 720px;
}

.quick-answer p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.quick-answer p + p { margin-top: 0.85rem; }

.quick-answer strong { color: var(--text); font-weight: 600; }

/* Terminal */
.terminal-wrap {
  width: 100%;
  max-width: 900px;
  margin-top: 4rem;
}

.terminal {
  background: var(--terminal-bg);
  border: 1px solid #374151;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid #374151;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }

.terminal-title {
  margin-left: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--terminal-faint);
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  min-height: 240px;
  color: var(--terminal-text);
}

.term-line { display: flex; gap: 0.5rem; margin-bottom: 0.2rem; }
.term-prompt {
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
.term-input { color: var(--terminal-text); }
.term-output { color: var(--terminal-muted); padding-left: 0; margin: 0.4rem 0 0.8rem; }
.term-tool { color: #a78bfa; }
.term-ok { color: #4ade80; }
.term-dim { color: var(--terminal-faint); }
.term-cursor {
  display: inline-block;
  width: 7px; height: 1.1em;
  background: var(--accent);
  animation: blink 1.1s step-end infinite;
  vertical-align: text-bottom;
}
.perm-box {
  border: 1px solid #f48120;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin: 0.4rem 0 0.6rem;
  display: inline-block;
}
.perm-border {
  border: 1px solid #f48120;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin: 0.4rem 0 0.6rem;
}
.task-active { color: #f48120; font-weight: 600; }
.task-done { color: #6b7280; text-decoration: line-through; }
.task-pending { color: #6b7280; }
.queue-item { color: #6b7280; }
.separator { color: #4b5563; letter-spacing: -0.05em; }
.mode-badge { color: #22d3ee; font-weight: 600; }
.spinner { color: #9ca3af; }
.tool-title { color: #9ca3af; }
.reasoning-text { color: #6b7280; font-style: italic; }

/* Sections */
section {
  position: relative;
  padding: 6rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: block;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
  line-height: 1.6;
}

/* Features */
.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.feature-item {
  padding: 2rem 2rem 2rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-item:nth-child(odd) {
  border-right: 1px solid var(--border);
  padding-right: 2rem;
}

.feature-item:nth-child(even) {
  padding-left: 2rem;
}

.feature-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.feature-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
  display: block;
}

/* Architecture */
.arch-section {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  margin-top: 3rem;
}

.arch-flow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 2.2;
  color: var(--text-muted);
}

.arch-flow strong {
  color: var(--text);
  font-weight: 500;
}

.arch-flow .arrow {
  color: var(--text-faint);
  padding: 0 0.5rem;
}

.arch-flow .accent {
  color: var(--accent);
}

/* Code blocks */
.code-block {
  background: var(--terminal-bg);
  border: 1px solid #374151;
  border-radius: 10px;
  overflow: hidden;
  margin: 1.5rem 0;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid #374151;
}

.code-lang {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--terminal-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--terminal-text);
}

.code-body .c { color: var(--terminal-faint); }
.code-body .k { color: #a78bfa; }
.code-body .s { color: #7dd3fc; }
.code-body .v { color: var(--accent); }

/* Tools table */
.tools-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 1.5rem;
}

.tools-table th,
.tools-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.tools-table th {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.tools-table td:first-child {
  color: var(--accent);
  font-weight: 500;
}

.tools-table tr:hover td {
  background: var(--accent-dim);
}

/* Comparison / scorecard table */
.compare-wrap {
  margin-top: 3rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 720px;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  font-weight: 600;
  background: var(--bg-raised);
}

.compare-table thead th.col-self {
  color: var(--accent);
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.compare-table td.col-self {
  background: var(--accent-dim);
  color: var(--text);
  font-weight: 500;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }

.yes { color: var(--ok); font-weight: 600; }
.no { color: var(--no); font-weight: 600; }

/* FAQ */
.faq-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
}

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

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  position: relative;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  top: 1.1rem;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item .faq-answer {
  padding: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 760px;
}

.faq-item .faq-answer p + p { margin-top: 0.75rem; }

/* Email Capture */
.email-capture {
  margin-top: 3rem;
  max-width: 480px;
}

.email-capture-inner {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.email-capture-inner h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.email-capture-inner p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.email-form {
  display: flex;
  gap: 0.5rem;
}

.email-form input[type="email"] {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.email-form input[type="email"]:focus {
  border-color: var(--accent);
}

.email-form .btn {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.email-helper {
  font-size: 0.75rem !important;
  color: var(--text-faint) !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
}

.subscribe-message {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2rem;
}

.subscribe-message.success { color: #16a34a; }
.subscribe-message.error { color: #dc2626; }

/* Changelog */
.changelog-section {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
}

.changelog-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.changelog-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.changelog-list h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
}

.changelog-list ul {
  list-style: none;
  padding: 0;
}

.changelog-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.changelog-list li:last-child {
  border-bottom: none;
}

.changelog-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.changelog-link:hover {
  color: var(--accent-hover);
}

/* Content article (comparison + blog pages) */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding: 9rem 2.5rem 4rem;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

.article h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: var(--text);
}

.article .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 2.5rem;
}

.article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.75rem 0 1rem;
  color: var(--text);
}

.article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.article p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
}

.article ul, .article ol {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 1.25rem 1.25rem;
}

.article li { margin-bottom: 0.5rem; }

.article strong { color: var(--text); font-weight: 600; }

.article code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-raised);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--text);
}

.article blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Blog index list */
.post-list { list-style: none; margin-top: 2.5rem; }

.post-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover { color: var(--accent); }

.post-list .post-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
}

.post-list .post-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.4rem;
  line-height: 1.6;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.8rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Mobile */
@media (max-width: 640px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .hero { padding: 6rem 1.25rem 3rem; }
  .terminal-body { font-size: 0.7rem; padding: 1rem; }
  .features-list { grid-template-columns: 1fr; }
  .feature-item { border-right: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  section { padding: 4rem 1.25rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .arch-section { padding: 1.5rem; }
  .email-form { flex-direction: column; }
  .changelog-lists { grid-template-columns: 1fr; gap: 1.5rem; }
  .article { padding: 7rem 1.25rem 3rem; }
}
