/* Agent Identity Fabric — Marketing Site */
/* Light + Dark theme, Inter + JetBrains Mono */

:root {
  --bg: #ffffff;
  --bg-2: #f8f8fa;
  --bg-3: #f0f0f4;
  --border: #e2e2ea;
  --text: #111118;
  --text-2: #52525b;
  --text-3: #9494a0;
  --accent: #6c5ce7;
  --accent-2: #7c6cf7;
  --accent-dim: rgba(108, 92, 231, 0.09);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --max: 1100px;
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --code-keyword: #cba6f7;
  --code-string: #a6e3a1;
  --code-fn: #89b4fa;
  --code-num: #fab387;
  --code-comment: #6c7086;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}

[data-theme="dark"] {
  --bg: #08080f;
  --bg-2: #10101a;
  --bg-3: #18182a;
  --border: #2a2a3e;
  --text: #e4e4ed;
  --text-2: #a0a0b4;
  --text-3: #6a6a80;
  --accent: #8b7cf8;
  --accent-2: #a09cf8;
  --accent-dim: rgba(139, 124, 248, 0.1);
  --code-bg: #0c0c16;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 650; }
h1 { font-size: 2.8rem; letter-spacing: -0.03em; }
h2 { font-size: 1.9rem; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 0.95rem; }

code, pre { font-family: var(--mono); }
pre { font-size: 0.82rem; line-height: 1.6; overflow-x: auto; }

img { max-width: 100%; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4rem 0;
}

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-inner { max-width: var(--max); width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-weight: 700; font-size: 0.95rem; color: var(--text); letter-spacing: -0.02em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 0.85rem; color: var(--text-2); font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; color: var(--text-2); transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--text-3); }
.theme-toggle svg { width: 18px; height: 18px; }

@media (max-width: 700px) {
  .nav-links { display: none; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* Section */
.section { padding: 5rem 0; }
.section-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.75rem;
}
.lead { font-size: 1.1rem; color: var(--text-2); max-width: 600px; margin-top: 0.75rem; }

/* Buttons */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 0.88rem; font-weight: 600;
  padding: 10px 22px; border-radius: var(--radius); cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent); color: #fff; border: none;
}
.btn-primary:hover { background: var(--accent-2); text-decoration: none; }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-3); text-decoration: none; }

/* Cards */
.card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}
.card:hover { border-color: var(--text-3); }

.feature-card { text-align: left; }
.feature-card .icon {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border-radius: var(--radius); margin-bottom: 16px;
  color: var(--accent);
}
.feature-card .icon svg { width: 20px; height: 20px; }
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { font-size: 0.88rem; color: var(--text-2); }

.code-card {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.code-card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-card-header .badge {
  background: var(--accent); color: #fff; font-size: 0.72rem;
  font-weight: 700; padding: 2px 8px; border-radius: 4px;
}
.code-card-header .label { color: var(--code-text); font-size: 0.82rem; font-weight: 500; }
.code-card pre {
  padding: 20px; margin: 0; color: var(--code-text); background: transparent;
}

.stat-card { text-align: center; }
.stat-card .number { font-size: 2.4rem; font-weight: 700; color: var(--accent); }
.stat-card .label { font-size: 0.82rem; color: var(--text-3); margin-top: 4px; }
.stat-card .sub { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }

/* Terminal */
.terminal-wrap {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.r { background: #ff5f57; }
.terminal-dot.y { background: #ffbd2e; }
.terminal-dot.g { background: #28ca41; }
.terminal-bar .title { font-size: 0.75rem; color: #6c7086; margin-left: 8px; }
.terminal-body { padding: 20px; }
.terminal-body pre { margin: 0; color: var(--code-text); background: transparent; }

/* Comparison Table */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.compare-table th, .compare-table td {
  text-align: left; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.compare-table th { font-weight: 600; color: var(--text-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.compare-table td:last-child, .compare-table th:last-child {
  background: var(--accent-dim);
}
.compare-table .yes { color: var(--success); font-weight: 600; }
.compare-table .no { color: var(--text-3); }
.compare-table .partial { color: var(--warning); font-weight: 500; }
.table-wrap { overflow-x: auto; }

/* Compat Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.compat-chip {
  font-size: 0.78rem; font-weight: 500; padding: 4px 14px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 100px; color: var(--text-2);
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
}

/* CTA Box */
.cta-box {
  text-align: center; padding: 4rem 2rem; border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at center, var(--accent-dim) 0%, transparent 70%);
  border: 1px solid var(--border);
}
.cta-box h2 { margin-bottom: 0.75rem; }
.cta-box p { color: var(--text-2); max-width: 500px; margin: 0 auto 1.5rem; font-size: 1rem; }
.cta-box .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-box .meta { font-size: 0.75rem; color: var(--text-3); margin-top: 1rem; }

/* Footer */
.footer {
  padding: 2.5rem 0; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--text-3);
}
.footer a { color: var(--text-3); }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 20px; }

/* Hero */
.hero { padding: 6rem 0 4rem; }
.hero .eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  color: var(--accent); background: var(--accent-dim);
  padding: 4px 14px; border-radius: 100px; margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero h1 .accent { color: var(--accent); }
.hero .sub { font-size: 1.15rem; color: var(--text-2); max-width: 620px; margin-bottom: 2rem; line-height: 1.7; }
.hero .btns { display: flex; gap: 12px; margin-bottom: 3rem; flex-wrap: wrap; }

/* Problem cards */
.problem-card { position: relative; padding-left: 0; }
.problem-card .num { font-size: 3rem; font-weight: 800; color: var(--accent-dim); line-height: 1; margin-bottom: 8px; }
[data-theme="dark"] .problem-card .num { color: rgba(139,124,248,0.2); }
.problem-card h3 { margin-bottom: 6px; }
.problem-card p { font-size: 0.88rem; color: var(--text-2); }

/* Docs layout */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.docs-sidebar {
  position: sticky; top: 72px; max-height: calc(100vh - 80px);
  overflow-y: auto; padding-right: 16px;
}
.docs-sidebar a {
  display: block; font-size: 0.82rem; color: var(--text-3);
  padding: 6px 0; font-weight: 500;
}
.docs-sidebar a:hover { color: var(--text); text-decoration: none; }
.docs-sidebar .sidebar-section { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-top: 20px; margin-bottom: 6px; }
.docs-sidebar .sidebar-section:first-child { margin-top: 0; }

@media (max-width: 700px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
}

.docs-content h2 { margin-top: 3rem; margin-bottom: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.docs-content h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.docs-content table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin: 1rem 0; }
.docs-content th, .docs-content td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.docs-content th { font-weight: 600; color: var(--text-2); }
.docs-content pre { background: var(--code-bg); color: var(--code-text); padding: 16px; border-radius: var(--radius); margin: 1rem 0; }

/* Syntax colors inside code */
.kw { color: var(--code-keyword); }
.str { color: var(--code-string); }
.fn { color: var(--code-fn); }
.num { color: var(--code-num); }
.cm { color: var(--code-comment); }
.op { color: var(--code-text); opacity: 0.7; }
