/* MCP introduction page.
   Everything below runs on graywolf.css tokens, so light and dark both work
   without a per-theme override block. Poppins for display, Inter for body and
   JetBrains Mono for anything a shell or an agent reads literally. */

/* mainpage.css absolutely positions .body-with-header with no width, so it
   shrink-wraps to its content and every section lands flush left. This page
   opts that wrapper back into normal flow instead of forcing 100vw, which
   would add a horizontal scrollbar whenever a vertical one is present. */
.main-page .body-with-header.mcp-shell {
    position: static;
    width: 100%;
    padding-top: 70px;
}

.mcp-page {
    width: 100%;
    background-color: var(--gw-canvas);
    color: var(--gw-ink);
}

.mcp-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.mcp-page h1,
.mcp-page .mcp-h2 {
    font-family: var(--gw-display);
    letter-spacing: -0.028em;
}

/* Hero */
.mcp-hero {
    padding: 6rem 0 4.5rem;
    background-image:
        radial-gradient(48rem 30rem at 12% -6rem, var(--accent-glow), transparent 70%);
    background-repeat: no-repeat;
}

.mcp-hero h1 {
    font-size: clamp(2.3rem, 5.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.08;
    margin: 0;
}

.mcp-lede {
    margin: 1.4rem 0 0;
    max-width: 46ch;
    font-size: 1.1rem;
    color: var(--gw-ink-2);
}

.mcp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2.25rem;
}

.mcp-btn {
    display: inline-block;
    padding: 0.78rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--gw-r-md);
    transition:
        background-color var(--gw-t-fast) var(--gw-ease-out),
        border-color var(--gw-t-fast) var(--gw-ease-out),
        color var(--gw-t-fast) var(--gw-ease-out),
        transform var(--gw-t-press) var(--gw-ease-out);
}

.mcp-btn:active { transform: scale(0.98); }

.mcp-btn-primary {
    background: var(--gw-accent);
    color: var(--gw-accent-ink);
}

.mcp-btn-primary:hover {
    filter: brightness(1.08);
    color: var(--gw-accent-ink);
}

.mcp-btn-secondary {
    border-color: var(--gw-line-strong);
    color: var(--gw-ink);
}

.mcp-btn-secondary:hover {
    border-color: var(--gw-accent);
    color: var(--gw-accent);
}

/* The machine-facing band. Separated by surface and scale, not by a tinted box. */
.mcp-agents {
    padding: 3.25rem 0;
    background: var(--gw-surface);
    border-top: 1px solid var(--gw-line);
    border-bottom: 1px solid var(--gw-line);
}

.mcp-agents h2 {
    font-family: var(--gw-sans);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.mcp-url {
    display: block;
    margin-bottom: 0.9rem;
    font-family: var(--gw-mono);
    font-size: clamp(1rem, 2.8vw, 1.45rem);
    color: var(--gw-accent);
    overflow-wrap: anywhere;
}

.mcp-agents p {
    margin: 0;
    max-width: 62ch;
    color: var(--gw-ink-2);
}

/* Sections */
.mcp-connect,
.mcp-tools,
.mcp-trust {
    padding: 4.5rem 0;
}

.mcp-tools {
    background: var(--gw-surface-2);
    border-top: 1px solid var(--gw-line);
    border-bottom: 1px solid var(--gw-line);
}

.mcp-page .mcp-h2 {
    font-size: clamp(1.5rem, 3.2vw, 1.9rem);
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.mcp-body {
    margin: 0 0 2.5rem;
    max-width: 58ch;
    color: var(--gw-ink-2);
}

.mcp-endpoint,
.mcp-page pre {
    background: var(--gw-surface-3);
    border-radius: var(--gw-r-md);
}

.mcp-endpoint {
    display: block;
    margin-bottom: 3rem;
    padding: 1.1rem 1.25rem;
    font-family: var(--gw-mono);
    font-size: clamp(0.95rem, 2.4vw, 1.2rem);
    overflow-wrap: anywhere;
}

.mcp-page pre {
    margin: 0;
    padding: 0.85rem 1rem;
    overflow-x: auto;
}

.mcp-page pre code {
    font-family: var(--gw-mono);
    font-size: 0.85rem;
    color: var(--gw-ink);
}

.mcp-page :is(p, dd, li) > code {
    font-family: var(--gw-mono);
    font-size: 0.85em;
    color: var(--gw-accent);
    overflow-wrap: anywhere;
}

/* Label and value rows. A single hairline between rows, none top or bottom, so
   the group reads as one block rather than a spec table. */
.mcp-rows { display: grid; }

.mcp-row {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 1.5rem;
    align-items: start;
    padding: 1.4rem 0;
}

.mcp-row + .mcp-row { border-top: 1px solid var(--gw-line); }
.mcp-row dt { margin: 0; font-weight: 600; font-size: 0.95rem; }
.mcp-row dd { margin: 0; font-size: 0.95rem; color: var(--gw-ink-2); }

/* Tools: three named groups, not eight identical tiles. */
.mcp-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 3rem 2.5rem;
}

.mcp-group h3 {
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    font-family: var(--gw-sans);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--gw-line);
}

.mcp-group dl { margin: 0; }

.mcp-group dt {
    font-family: var(--gw-mono);
    font-size: 0.84rem;
    color: var(--gw-accent);
    overflow-wrap: anywhere;
}

.mcp-group dd {
    margin: 0.3rem 0 1.35rem;
    font-size: 0.92rem;
    color: var(--gw-ink-2);
}

.mcp-group dd:last-child { margin-bottom: 0; }

.mcp-caveat {
    max-width: 60ch;
    margin: 2.5rem 0 0;
    padding-left: 1.1rem;
    border-left: 2px solid var(--gw-risk);
    font-size: 0.95rem;
    color: var(--gw-ink-2);
}

.mcp-points {
    margin: 0;
    padding-left: 1.15rem;
    max-width: 64ch;
    color: var(--gw-ink-2);
}

.mcp-points li { margin-bottom: 0.75rem; }
.mcp-points li::marker { color: var(--gw-ink-3); }

@media screen and (max-width: 768px) {
    .mcp-hero { padding: 3.5rem 0 3rem; }
    .mcp-connect,
    .mcp-tools,
    .mcp-trust { padding: 3rem 0; }
    .mcp-row { grid-template-columns: 1fr; gap: 0.75rem; }
    .mcp-groups { gap: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .mcp-btn { transition-duration: 0.001ms; }
}

.mcp-requires {
    margin: 1.5rem 0 0;
    font-size: 0.95rem;
    color: var(--gw-ink-2);
}

.mcp-requires-inline {
    margin: -2rem 0 3rem;
    font-size: 0.95rem;
    color: var(--gw-ink-2);
}

/* Agent session panel. Always dark, the way a terminal is, in both themes.
   The typewriter that fills it lives in components/agent-session.js. */
.mcp-session { margin-bottom: 3rem; }

/* A depiction of an agent session. Always dark, the way a terminal is, in both
   page themes. Lines reveal in sequence once the panel is scrolled into view;
   under reduced motion they are simply present. */
.gw-term {
  --tm-bg: #0d1117;
  --tm-bar: #161b22;
  --tm-line: #222b36;
  --tm-ink: #d6dee7;
  --tm-mut: #7d8a97;
  --tm-accent: #36dbe7;
  border: 1px solid var(--tm-line);
  border-radius: 12px;
  background: var(--tm-bg);
  overflow: hidden;
  box-shadow: 0 18px 48px -20px rgba(0, 0, 0, 0.55);
}
.gw-term-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  background: var(--tm-bar);
  border-bottom: 1px solid var(--tm-line);
}
.gw-term-dot { width: 9px; height: 9px; border-radius: 50%; background: #303b47; }
.gw-term-name {
  margin-left: 0.5rem;
  font-family: var(--tm-mono, ui-monospace, monospace);
  font-size: 0.72rem;
  color: var(--tm-mut);
  letter-spacing: 0.04em;
}
.gw-term-body {
  padding: 1rem 1.15rem 1.2rem;
  font-family: var(--tm-mono, ui-monospace, monospace);
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--tm-ink);
}
.gw-ln { margin: 0; white-space: nowrap; }
.gw-ln .c { color: var(--tm-accent); }
.gw-ln .a { color: var(--tm-accent); }
.gw-ln-tool { color: var(--tm-mut); margin: 0.55rem 0; }
.gw-ln-h { color: var(--tm-ink); font-weight: 600; margin-top: 0.55rem; }
.gw-ln .k { display: inline-block; min-width: 7.5rem; padding-left: 1rem; color: var(--tm-mut); }
.gw-ln .v { color: var(--tm-ink); }
.gw-ln-note { margin-top: 0.75rem; color: var(--tm-mut); white-space: normal; }
.gw-caret {
  display: inline-block;
  width: 7px;
  height: 0.95em;
  margin-left: 0.35rem;
  vertical-align: -0.15em;
  background: var(--tm-accent);
}

/* Lines stay collapsed until the typewriter reaches them, so the panel does not
   jump as it fills. .is-static is the no-JS and reduced-motion state. */
.gw-term .gw-ln { visibility: hidden; }
.gw-term .gw-ln.is-on,
.gw-term.is-static .gw-ln { visibility: visible; }
.gw-caret { animation: gwCaret 1s steps(1) infinite; }
.gw-caret.is-idle { animation-duration: 1.1s; }
@keyframes gwCaret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .gw-term .gw-ln { visibility: visible; }
  .gw-caret { animation: none; }
}

@media (max-width: 40rem) {
  .gw-term-body { font-size: 0.68rem; padding: 0.85rem 0.9rem 1rem; }
  .gw-ln .k { min-width: 5.5rem; }
}

.gw-term { --tm-mono: var(--gw-mono); }
