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

:root {
  --bg:        #ffffff;
  --bg-alt:    #f7f8fc;
  --bg-card:   #ffffff;
  --bg-card2:  #f0f2f8;
  --border:    rgba(0,0,0,0.08);
  --border2:   rgba(0,0,0,0.13);
  --text:      #111827;
  --text-muted:#4b5563;
  --text-dim:  #9ca3af;
  --accent:    #6366f1;
  --accent2:   #4f46e5;
  --green:     #059669;
  --blue:      #2563eb;
  --orange:    #ea580c;
  --pink:      #db2777;
  --teal:      #0d9488;
  --red:       #dc2626;
  --yellow:    #d97706;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.07);
  --shadow-lg: 0 2px 8px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.1);
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
}

html { font-family: var(--font); background: var(--bg); color: var(--text); }

body { min-height: 100vh; overflow-x: hidden; }

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

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(99,102,241,0.1);
  color: var(--accent2);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ─────────────────────────────────────────────── */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { height: 44px; width: auto; display: block; }
.nav-logo:hover { text-decoration: none; opacity: 0.85; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: rgba(0,0,0,0.04); }
.nav-links a.active { color: var(--accent2); font-weight: 600; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px rgba(99,102,241,0.35);
}
.btn-primary:hover { background: #5355e8; transform: translateY(-1px); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border2);
}
.btn-outline:hover { color: var(--text); border-color: var(--border2); background: rgba(0,0,0,0.04); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); text-decoration: none; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(99,102,241,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(99,102,241,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--accent2);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent2) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 52px;
}

.hero-actions .btn { padding: 12px 28px; font-size: 1rem; }

/* ── Hero Code ──────────────────────────────────────────────── */
.hero-code {
  max-width: 560px;
  margin: 0 auto;
  background: #1e2030;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-lg);
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.red    { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #27c93f; }

.code-title {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.hero-code pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
}

.hero-code pre code {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
  background: transparent;
  padding: 0;
  color: #e2e8f0;
}

.hero-code .code-title { color: rgba(255,255,255,0.3); }

pre .c { color: #6b7fa3; }

/* ── Section Base ───────────────────────────────────────────── */
.section     { padding: 88px 0; }
.section-alt { padding: 88px 0; background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}

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

/* ── What Is It ─────────────────────────────────────────────── */
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.what-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 20px;
}

.what-text p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent2);
  font-weight: 600;
  font-size: 0.95rem;
}

.what-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent2);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  font-family: var(--mono);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.5;
}

.stat-label small { color: var(--text-dim); font-weight: 400; }

/* ── Features Grid ──────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: rgba(99,102,241,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(99,102,241,0.1);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 14px 0 10px;
}

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

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon.purple { background: rgba(99,102,241,0.1);  color: #4f46e5; }
.feature-icon.blue   { background: rgba(37,99,235,0.1);   color: var(--blue); }
.feature-icon.green  { background: rgba(5,150,105,0.1);   color: var(--green); }
.feature-icon.orange { background: rgba(234,88,12,0.1);   color: var(--orange); }
.feature-icon.pink   { background: rgba(219,39,119,0.1);  color: var(--pink); }
.feature-icon.teal   { background: rgba(13,148,136,0.1);  color: var(--teal); }
.feature-icon.indigo { background: rgba(99,102,241,0.1);  color: #4338ca; }
.feature-icon.red    { background: rgba(220,38,38,0.1);   color: var(--red); }
.feature-icon.yellow { background: rgba(217,119,6,0.1);   color: var(--yellow); }

/* ── Architecture ───────────────────────────────────────────── */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 48px;
}

.arch-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.arch-box {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  width: 220px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.arch-box:hover { border-color: rgba(99,102,241,0.4); box-shadow: 0 4px 20px rgba(99,102,241,0.1); }

.arch-box.browser { width: 280px; border-color: rgba(37,99,235,0.25); }
.arch-box.hub     { width: 320px; border-color: rgba(99,102,241,0.35); background: rgba(99,102,241,0.04); }
.arch-box.agent   { width: 220px; border-color: rgba(5,150,105,0.25); }

.arch-icon { font-size: 1.8rem; margin-bottom: 8px; }
.arch-label { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.arch-sub { color: var(--text-muted); font-size: 0.78rem; font-family: var(--mono); margin-bottom: 12px; }

.arch-details {
  list-style: none;
  text-align: left;
  display: inline-block;
}
.arch-details li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.arch-details li::before {
  content: '·';
  color: var(--accent2);
  font-weight: 700;
}

.arch-arrow-down {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  gap: 4px;
}

.arch-arrow-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border2);
}

.arrow-line {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--border2), transparent);
}

.arch-arrows-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 4px;
  gap: 4px;
}

.arrow-line-h {
  width: 400px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border2), transparent);
}

.arch-dots {
  color: var(--text-dim);
  font-size: 1.6rem;
  align-self: center;
  letter-spacing: 4px;
}

.arch-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.arch-note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  box-shadow: var(--shadow);
}

.arch-note strong { color: var(--text); }

/* ── Quick Start ─────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: var(--font);
  transition: color 0.15s;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab:hover:not(.active) { color: var(--text-muted); }

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

.steps { display: flex; flex-direction: column; gap: 24px; }

.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  width: 36px; height: 36px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body { flex: 1; }
.step-body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.step-desc { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

.code-block {
  background: #1e2030;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.code-block pre {
  padding: 16px 20px;
  margin: 0;
  overflow-x: auto;
}

.code-block pre code {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
  background: transparent;
  padding: 0;
  color: #e2e8f0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.service-url {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.service-url a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent2);
}

.info-box {
  margin-top: 28px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}
.info-box svg { flex-shrink: 0; color: var(--accent2); margin-top: 2px; }

/* ── Requirements ───────────────────────────────────────────── */
.reqs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.req-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.req-icon { font-size: 2rem; margin-bottom: 14px; }
.req-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.req-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* ── Security ───────────────────────────────────────────────── */
.security-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.security-item {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
  transition: background 0.15s;
}
.security-item:last-child { border-bottom: none; }
.security-item:hover { background: var(--bg-alt); }

.security-check {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  width: 20px;
  margin-top: 2px;
}

.security-item strong { color: var(--text); }

/* ── Community ──────────────────────────────────────────────── */
.community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}

.community-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  display: block;
}
.community-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-2px);
  text-decoration: none;
}

.community-icon { font-size: 2rem; margin-bottom: 14px; }
.community-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.community-card p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }

.contribute-note {
  background: var(--bg-card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
}
.contribute-note h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 14px 20px 0;
}
.contribute-note .code-block {
  border: none;
  border-radius: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex: 1;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-muted); }

.footer-copy {
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .what-grid { grid-template-columns: 1fr; gap: 40px; }
  .arch-notes { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .hero { padding: 64px 0 56px; }
  .section, .section-alt { padding: 64px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .reqs-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .services-grid { grid-template-columns: 1fr; }
  .arch-row { flex-direction: column; align-items: center; }
  .arch-box { width: 100% !important; max-width: 320px; }
  .arrow-line-h { width: 2px; height: 24px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { justify-content: center; }
}
