/* MCP Gateway — marketing site */
:root {
  --bg: #0c0c0f;
  --bg-elevated: #141419;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --accent: #22d3ee;
  --accent-dim: #0891b2;
  --border: #27272a;
  --radius: 8px;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--border);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1rem 0;
  background: rgba(12, 12, 15, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-header nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.btn-ghost {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-github .icon-lock {
  opacity: 0.8;
  flex-shrink: 0;
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
}

.hero-tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
}

.hero-badge.off {
  color: #f87171;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 36em;
}

.hero-lead code {
  font-size: 0.85em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: none;
}

.btn-primary:hover {
  background: var(--accent-dim);
  color: var(--bg);
  text-decoration: none;
}

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

.btn-ghost.btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-dim);
  color: var(--accent);
  text-decoration: none;
}

/* Sections */
section {
  padding: 3rem 0;
}

section:nth-child(even) {
  background: var(--bg-elevated);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  color: var(--text);
}

.section-lead {
  color: var(--text-muted);
  margin: -0.5rem 0 1.5rem;
}

/* Flow */
.flow-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  counter-reset: step;
}

.flow-steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
  counter-increment: step;
}

.flow-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
}

.flow-steps li strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.flow-steps li p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.flow-one-liner {
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.flow-one-liner strong {
  color: var(--text);
}

/* Anatomy — visual card stack */
.anatomy-visual {
  margin: 2rem 0;
  padding: 2rem 0;
  position: relative;
}

.anatomy-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 0 auto;
  max-width: 640px;
}

.anatomy-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s, border-color 0.2s;
}

.anatomy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border);
}

.anatomy-card-inner {
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
  height: 100%;
}

.anatomy-card-1 .anatomy-card-inner { border-left: 3px solid var(--accent); }
.anatomy-card-2 .anatomy-card-inner { border-left: 3px solid var(--text-muted); }
.anatomy-card-3 .anatomy-card-inner { border-left: 3px solid #f87171; }
.anatomy-card-4 .anatomy-card-inner { border-left: 3px solid var(--accent); }

.anatomy-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.anatomy-required .anatomy-badge {
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent);
}

.anatomy-optional .anatomy-badge {
  background: rgba(161, 161, 170, 0.2);
  color: var(--text-muted);
}

.anatomy-fallback .anatomy-badge {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.anatomy-path {
  display: block;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.anatomy-path a {
  color: inherit;
  text-decoration: none;
}

.anatomy-path a:hover {
  text-decoration: underline;
}

.anatomy-muted {
  color: var(--text-muted);
  font-weight: 400;
}

.anatomy-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.anatomy-example {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  text-align: center;
}

/* Value grid */
.value-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.value-grid li {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.value-title {
  display: block;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.value-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Tools */
.tools-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

.tools-list code {
  color: var(--accent);
}

/* Setup */
.setup-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.setup-tabs .tab {
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

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

.setup-tabs .tab.active {
  color: var(--accent);
  background: var(--bg-elevated);
  border-color: var(--accent-dim);
}

.setup-panel {
  display: none;
}

.setup-panel.active {
  display: block;
}

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

.setup-panel h3:first-child {
  margin-top: 0;
}

.setup-panel p {
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.setup-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.setup-list li {
  margin-bottom: 0.35rem;
}

.setup-optional {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Code blocks */
.code {
  margin: 0.75rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: #0a0a0c;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.code code {
  padding: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* CTA */
.cta {
  text-align: center;
  padding: 4rem 0;
}

.cta h2 {
  margin-bottom: 0.5rem;
}

.cta p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
  .anatomy-cards {
    grid-template-columns: 1fr;
  }

  .site-header nav {
    gap: 1rem;
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .setup-tabs {
    flex-direction: column;
  }

  .setup-tabs .tab {
    text-align: left;
  }
}
