/* ================================================================
   mcp.css — /mcp, the connector page
   Uses the site tokens from main.css; no page-specific palette.
   ================================================================ */

.mcp-page {
  padding-bottom: var(--sp-16);
}

.mcp-page section + section {
  border-top: 1px solid var(--color-border);
}

/* ---- Shared section furniture ---- */
.mcp-section__title {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-3);
  text-align: center;
}

.mcp-section__sub {
  max-width: 62ch;
  margin: 0 auto var(--sp-12);
  text-align: center;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ---- Hero ---- */
.mcp-hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}

/* A single soft light behind the title. Purely decorative, and cheap: one
   radial gradient rather than a stack of blurred layers. */
.mcp-hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto;
  height: 120%;
  background: radial-gradient(ellipse 60% 50% at 50% 0%,
              rgba(139, 92, 246, 0.16), transparent 70%);
  pointer-events: none;
}

.mcp-hero__inner {
  position: relative;
  max-width: 820px;
  text-align: center;
}

.mcp-hero__copy {
  min-width: 0;
}

/* The conversation the page promises, right under the words on narrow screens
   and beside them on wide ones. */
.mcp-hero__shot {
  max-width: 460px;
  margin: var(--sp-12) auto 0;
}

/* The grid steps aside so the opened photograph can sit over its corner, as
   on the repository's banner. Logical sides: the pair mirrors in RTL. */
.mcp-hero__stage {
  position: relative;
  padding-inline-start: 12%;
  padding-bottom: 7%;
}

.mcp-hero__grid {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.mcp-hero__deck {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 72%;
}

.mcp-hero__deck img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .mcp-hero__deck img {
  border-color: var(--color-border);
  box-shadow: 0 24px 60px rgba(15, 15, 30, 0.22);
}

/* What the deck's buttons do, floating on its top edge. */
.mcp-hero__deck-tag {
  position: absolute;
  top: 0;
  inset-inline-start: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  margin: 0;
  padding: 0.35rem 0.9rem;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #8b5cf6;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .mcp-hero__deck-tag {
    gap: var(--sp-2);
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
  }
}

.mcp-hero__shot figcaption {
  margin-top: var(--sp-4);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

@media (min-width: 980px) {
  .mcp-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    max-width: 1180px;
    text-align: left;
  }

  /* Scoped to the hero so they outrank the base rules further down the file. */
  .mcp-hero__inner .mcp-hero__lede,
  .mcp-hero__inner .mcp-endpoint {
    margin-inline: 0;
  }

  .mcp-hero__inner .mcp-hero__ctas,
  .mcp-hero__inner .mcp-badges {
    justify-content: flex-start;
  }

  .mcp-hero__shot {
    max-width: none;
    margin: 0;
  }
}

.mcp-eyebrow {
  margin: 0 0 var(--sp-4);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.mcp-hero__title {
  margin: 0 0 var(--sp-6);
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.mcp-accent {
  background: linear-gradient(135deg, #a78bfa 0%, #818cf8 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mcp-hero__lede {
  max-width: 60ch;
  margin: 0 auto var(--sp-8);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ---- Badge row: the five claims, as plain facts ---- */
.mcp-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2) var(--sp-3);
  margin: 0 0 var(--sp-8);
  padding: 0;
  list-style: none;
}

.mcp-badges li {
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ---- The endpoint, copyable ---- */
.mcp-endpoint {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: 560px;
  margin: 0 auto var(--sp-8);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-glow);
}

.mcp-endpoint__label {
  flex: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.mcp-endpoint__url {
  flex: 1 1 auto;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  color: var(--color-text);
  text-align: left;
  white-space: nowrap;
}

.mcp-endpoint__copy {
  flex: none;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-hover);
  color: var(--color-text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.mcp-endpoint__copy:hover {
  background: var(--color-primary);
  color: #fff;
}

.mcp-endpoint__copy.is-copied {
  background: var(--color-success);
  color: #05231a;
  border-color: transparent;
}

/* Icon + label in a button. The GitHub mark is the same path the sign-in button
   uses, so the two stay identical if either is ever redrawn. */
.mcp-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.mcp-btn-icon svg {
  flex: none;
}

.mcp-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

/* ChatGPT's mark is drawn black; on the violet button it reads white. */
.mcp-btn-logo {
  flex: none;
  filter: invert(1);
}

/* ---- Connect ---- */
.mcp-flow,
.mcp-modes,
.mcp-oneclick,
.mcp-connect,
.mcp-tools,
.mcp-plan,
.mcp-trust {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.mcp-clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
}

.mcp-client {
  padding: var(--sp-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.mcp-client h3 {
  margin: 0 0 var(--sp-4);
  font-size: 1.1rem;
  font-weight: 700;
}

.mcp-steps {
  margin: 0;
  padding-inline-start: 1.2em;
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.mcp-steps li + li {
  margin-top: var(--sp-2);
}

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

.mcp-client__note {
  margin: 0 0 var(--sp-4);
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.mcp-client__note + .mcp-client__note {
  margin-bottom: 0;
}

.mcp-code {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-4);
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--color-text);
}

.mcp-client__note code {
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
}

/* ---- How it goes: ask, choose together, put them to work ---- */
.mcp-flow__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-6);
  max-width: 1100px;
  margin: var(--sp-8) auto 0;
}

.mcp-flow__card {
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.mcp-flow__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-4);
  border-radius: 14px;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
  color: #fff;
}

.mcp-flow__icon svg {
  width: 24px;
  height: 24px;
}

.mcp-flow__card h3,
.mcp-mode h3 {
  margin: 0 0 var(--sp-3);
  font-size: 1.12rem;
  font-weight: 700;
}

.mcp-flow__card p,
.mcp-mode p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.mcp-flow__card em,
.mcp-flow__card strong,
.mcp-mode strong {
  color: var(--color-text);
}

/* ---- With the grid, or without it ---- */
.mcp-modes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--sp-6);
  max-width: 1100px;
  margin: var(--sp-8) auto 0;
}

.mcp-mode {
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.mcp-mode__visual {
  display: grid;
  place-items: center;
  min-height: 210px;
  margin-bottom: var(--sp-6);
  overflow: hidden;
  border-radius: var(--radius-md);
}

/* The capture's own background, so the strip sits in it without a seam. */
.mcp-mode__visual--shot {
  background: #fcfcfb;
}

.mcp-mode__visual--shot img {
  display: block;
  width: 100%;
  max-width: 342px;
  height: auto;
}

.mcp-mode__visual--term {
  place-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0b0b10;
}

.mcp-term {
  margin: 0;
  padding: var(--sp-4);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.8;
  color: #d4d4d8;
  text-align: left;
}

/* One line each; a long one wraps under itself, indented, as a terminal would. */
.mcp-term__line {
  display: block;
  padding-left: 2ch;
  text-indent: -2ch;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .mcp-term {
    font-size: 0.72rem;
  }
}

.mcp-term__prompt { color: #a78bfa; }
.mcp-term__ok { color: #34d399; }
.mcp-term__edit { color: #38bdf8; }
.mcp-term__dim { color: #71717a; }

/* ---- One click: one card per assistant ----
   The ready one carries the button; the others are listed, muted, with a
   "preview" pill, so the page says where Pexafy is going without a dead link. */
.mcp-apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-4);
  max-width: 980px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.mcp-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-align: center;
}

.mcp-app__logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--color-surface-hover);
}

.mcp-app__logo img {
  width: 36px;
  height: 36px;
}

.mcp-app__name {
  font-weight: 700;
}

.mcp-app__cta {
  width: 100%;
  margin-top: auto;
}

.mcp-app__badge {
  margin-top: auto;
  padding: var(--sp-1) var(--sp-3);
  border: 1px dashed var(--color-border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.mcp-app--ready {
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.2), var(--shadow-glow);
}

.mcp-app:not(.mcp-app--ready) {
  opacity: 0.6;
}

.mcp-app:not(.mcp-app--ready) .mcp-app__logo img:not(.is-mono) {
  filter: grayscale(1);
}

/* Black marks (ChatGPT, Cursor) turn white on the dark theme. */
html:not([data-theme="light"]) .mcp-app .is-mono {
  filter: invert(1);
}

/* Phones: one compact row per assistant instead of four tall cards. */
@media (max-width: 560px) {
  .mcp-apps {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .mcp-app {
    flex-direction: row;
    flex-wrap: wrap;
    padding: var(--sp-4);
    text-align: left;
  }

  .mcp-app__logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .mcp-app__logo img {
    width: 26px;
    height: 26px;
  }

  .mcp-app__name {
    flex: 1;
  }

  .mcp-app__badge {
    margin-top: 0;
  }

  .mcp-app__cta {
    flex-basis: 100%;
    margin-top: 0;
  }
}

.mcp-apps__more {
  margin: var(--sp-8) 0 0;
  text-align: center;
}

.mcp-apps__more a {
  font-weight: 600;
  color: var(--color-primary);
}

.mcp-apps__more a:hover {
  color: var(--color-primary-hover);
}

.mcp-apps__legal {
  margin: var(--sp-3) 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ---- Tools ---- */
.mcp-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-6);
}

/* Five cards: three over two on wide screens, never four and an orphan. */
@media (min-width: 900px) {
  .mcp-tool-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mcp-tool {
    grid-column: span 2;
  }

  .mcp-tool:nth-child(n + 4) {
    grid-column: span 3;
  }
}

.mcp-tool {
  padding: var(--sp-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color var(--transition), transform var(--transition);
}

.mcp-tool:hover {
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
}

.mcp-tool__name {
  display: inline-block;
  margin-bottom: var(--sp-3);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
}

[data-theme="light"] .mcp-tool__name {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

.mcp-tool p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.mcp-tools__foot {
  margin: var(--sp-8) auto 0;
  max-width: 60ch;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---- Plan ---- */
.mcp-plan__inner {
  max-width: 720px;
  text-align: center;
}

.mcp-plan__text p {
  margin: 0 auto var(--sp-8);
  max-width: 60ch;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.mcp-plan__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
}

/* ---- Trust ---- */
.mcp-trust__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-8);
}

.mcp-trust__item h3 {
  margin: 0 0 var(--sp-3);
  font-size: 1rem;
  font-weight: 700;
}

.mcp-trust__item p {
  margin: 0 0 var(--sp-3);
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.93rem;
}

.mcp-trust__item a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
}

.mcp-trust__item a:hover {
  color: var(--color-primary-hover);
}

/* ---- Narrow screens ---- */
@media (max-width: 560px) {
  .mcp-endpoint {
    flex-wrap: wrap;
    justify-content: center;
    padding: var(--sp-4);
  }

  .mcp-endpoint__url {
    flex-basis: 100%;
    text-align: center;
  }

  .mcp-hero__ctas .btn,
  .mcp-plan__ctas .btn {
    width: 100%;
  }
}

/* ---- The follow-up: "more like the second one", answered ---- */
.mcp-followup {
  max-width: 640px;
  margin: var(--sp-16) auto 0;
}

.mcp-followup img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
