/* gogogo landing page — static, zero JS, system fonts only. */

:root {
  --ink: #16181d;
  --ink-soft: #4a4f5a;
  --ink-faint: #6b7280;
  --line: #e4e6eb;
  --bg: #ffffff;
  --bg-tint: #f7f8fa;
  --accent: #b93d20;
  --accent-ink: #9c3418;
  --code-bg: #f2f3f6;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2 { letter-spacing: -0.02em; }

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

code {
  font: 0.875em ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  margin: 0;
  background: #16181d;
  color: #f0f2f5;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font: 14px/1.6 ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

pre code { background: none; padding: 0; color: inherit; font-size: 14px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.links > a { color: var(--ink-soft); text-decoration: none; }
.links > a:hover { color: var(--ink); }

.icon-link { display: inline-flex; align-items: center; }
.icon-link:hover { color: var(--ink); }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: border-color .15s, background .15s;
}

.btn:hover { border-color: var(--ink-faint); background: var(--bg-tint); }

.btn.small { padding: 6px 13px; font-size: 14px; }

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

.btn.primary:hover { background: #000; border-color: #000; }

/* ---------- hero ---------- */

/* Grid tracks use minmax(0,1fr), NOT 1fr: a bare `1fr` means
   minmax(auto,1fr), whose `auto` floor is the item's min-content size — so a
   long unbreakable line (a heading, a code path) refuses to shrink and the
   track stays desktop-wide on a 390px screen, causing horizontal scroll. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 24px 72px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 700;
}

.hero-sub {
  margin: -8px 0 18px;
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 26px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* A short, punchy counterweight after a lede — deliberately NOT part of the
   lede, so the lede stays one readable sentence instead of a comma pile-up.
   Currently the "no Docker, no Redis…" line under In the box. */
.lede-sub {
  margin: -14px 0 26px;
  font-size: 16px;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.cta-row.center { justify-content: center; }

.fine { margin: 0; font-size: 14px; color: var(--ink-faint); }
.fine.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.hero-art img { width: 100%; max-width: 520px; height: auto; display: block; }

.install-block {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-tint);
}

.install-block.wide { margin: 0 auto 26px; max-width: 620px; }

.install-label {
  margin: 0;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
}

.install-block pre { border-radius: 0; position: relative; }

.copy-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 12px;
  line-height: 1;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink-faint);
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:hover { color: var(--ink); border-color: #d3d6dd; }

.copy-btn.copied { color: var(--accent); border-color: var(--accent); }

.install-note {
  margin: 0;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

/* ---------- client tabs (MCP install, one client at a time) ---------- */

.tabs {
  margin: 0 auto 18px;
  max-width: 620px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-tint);
}

.tabs input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-labels {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.tab-labels label {
  flex: 1 1 auto;
  text-align: center;
  padding: 10px 8px;
  margin-bottom: -1px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-faint);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab-labels label:hover { color: var(--ink); }

#tab-claude:checked ~ .tab-labels label[for="tab-claude"],
#tab-codex:checked ~ .tab-labels label[for="tab-codex"],
#tab-opencode:checked ~ .tab-labels label[for="tab-opencode"],
#tab-pi:checked ~ .tab-labels label[for="tab-pi"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.tabs .panel { display: none; }

#tab-claude:checked ~ .panels .panel-claude,
#tab-codex:checked ~ .panels .panel-codex,
#tab-opencode:checked ~ .panels .panel-opencode,
#tab-pi:checked ~ .panels .panel-pi { display: block; }

.tabs .panel pre {
  border: 0;
  border-radius: 0;
  margin: 0;
}

/* ---------- docs link cards (whole-card affordance, no paragraph soup) ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.docs-links {
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
}

a.doc-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--bg-tint);
  text-decoration: none;
}

a.doc-card:hover { border-color: var(--accent); }

.doc-card-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.doc-card-desc {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-faint);
}

/* ---------- sections ---------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.2;
}

.section h2 em { font-style: normal; color: var(--accent); }

.section-lede {
  margin: 0 0 34px;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 68ch;
}

/* ---------- stack + layers cards ---------- */
/* Both sections reuse the shared .card component (.grid-2): benefit title,
   lib subtitle, one-line reasoning — one eye-path across the whole page. */

.exception-band { text-align: center; }

.subhead {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 34px 0 16px;
}

.card.slim { padding: 16px 18px 15px; }

.card.slim .step { font-size: 16px; margin-bottom: 6px; }

.card.slim .picto { width: 26px; height: 26px; color: var(--accent); margin: 0 0 8px; }
.card.slim .picto svg { width: 100%; height: 100%; display: block; }

.card.slim p:last-child {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cmd-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-soft);
}

.exception-rule {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.exception-sub {
  margin: 0 auto 12px;
  max-width: 620px;
  color: var(--ink-soft);
}

.exception-band .fine { margin: 0; }

/* ---------- table (kept for other sections) ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 18px;
}

table { border-collapse: collapse; width: 100%; font-size: 14.5px; }

th, td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--bg-tint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

tbody tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 500; white-space: nowrap; }
td:nth-child(2) { color: var(--ink-soft); }

/* ---------- cards ---------- */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 20px;
  background: var(--bg);
  position: relative;
  cursor: default;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #d3d6dd;
  box-shadow: 0 12px 28px rgba(22, 24, 29, .08);
}

/* Light-catching top edge: charm without click affordance. */
.card::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  top: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(185, 61, 32, 0));
  opacity: 0;
  transition: opacity .25s ease;
}

.card:hover::after { opacity: 1; }

.card .step {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card .tech {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 11px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .25s ease, border-color .25s ease, background-color .25s ease;
}

.card:hover .tech {
  color: var(--accent-ink);
  border-color: rgba(185, 61, 32, .28);
  background: rgba(185, 61, 32, .06);
}

.card .tech + p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .card, .card::after, .card .tech { transition: none; }
  .card:hover { transform: none; }
}

.group-label {
  margin: 28px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.group-label::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 9px;
}

.group-label.core::before { background: var(--accent); }

.group-label.plugin::before { background: #c9962c; }

.group-label.feature::before { background: #5a9e6f; }

.group-label span { font-size: 13.5px; font-weight: 400; color: var(--ink-faint); }

.card p.off:last-child {
  margin: 10px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.card p.off:last-child code { font-size: 12px; }

/* ---------- scope ---------- */

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.scope-card {
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 10px;
  padding: 20px;
}

.scope-card.core { border-left-color: var(--accent); }
.scope-card.plugin { border-left-color: #c9962c; }
.scope-card.feature { border-left-color: #5a9e6f; }

.scope-badge {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.scope-card.core .scope-badge { color: var(--accent); }
.scope-card.plugin .scope-badge { color: #a97a17; }
.scope-card.feature .scope-badge { color: #3f7a54; }

.scope-desc { margin: 0 0 12px; font-size: 14.5px; color: var(--ink); }
.scope-card .fine { margin-bottom: 12px; line-height: 1.8; }
.scope-act { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); }

/* ---------- cta + footer ---------- */

.cta-section { text-align: center; }
.cta-section .section-lede { margin-left: auto; margin-right: auto; }

.meta { text-align: center; color: var(--ink-faint); font-size: 14px; }
.meta p { margin: 0 0 8px; }

.foot {
  padding: 30px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-faint);
}

.foot p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 56px; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 320px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .links > a:not(.btn):not(.icon-link) { display: none; }
  .links { gap: 14px; }
  .section { padding: 52px 20px; }
  .nav { padding: 12px 20px; }
  td:first-child { white-space: normal; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}