/* The AI connector page — public, no login.
 *
 * A marketing page that has to stay a Gymdooh page: every colour is one of the ten source tokens
 * from css/styles.css, so it follows the theme rather than freezing a palette of its own. Same
 * rule as the portal (see CLAUDE.md) and for the same reason — a literal survives a theme change
 * and then means something nobody chose.
 */

/* The browser's own `display: none` for [hidden] comes from the user-agent stylesheet, so ANY
   author rule that sets display beats it — and `.mcp-endpoint` sets inline-flex. Without this the
   connector box would sit there empty until the address arrived, which is exactly the half-built
   look the hidden attribute exists to prevent. */
[hidden] {
    display: none !important;
}

/* ── This page is a sequence, not one centred box ──
   `.page-section` in protected-pages.css is `min-height: 100vh` with its content flex-centred,
   which is right for the pages it was written for: a login box, a form, one panel per screen. On
   a page with seven sections it made every one of them exactly one screen tall, so the fold
   always landed in empty space and nothing ever peeked above it — the reader had no way to know
   the page continued. Sections size to their content here, and the next heading shows.

   Scoped through a body class rather than by changing the shared rule: every other page in the
   portal wants the full-screen behaviour. */
.mcp-page .page-section {
    min-height: 0;
    display: block;
    padding: 4.5rem 0;
}

.mcp-page .mcp-hero {
    padding: 3rem 0 2.5rem;
}

.mcp-page .mcp-cta {
    padding: 4rem 0 5rem;
}

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

.mcp-narrow {
    max-width: 720px;
}

/* A band of slightly raised surface, to separate the sections without drawing lines. */
.mcp-band {
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* ── Hero ─────────────────────────────────────────── */

.mcp-hero {
    text-align: center;
}

.mcp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mcp-eyebrow-icon {
    display: inline-flex;
    font-size: 1rem;
}

.mcp-title {
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 6vw, 4rem);
    line-height: 1.05;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.mcp-accent {
    color: var(--accent);
}

.mcp-lede {
    max-width: 42rem;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.mcp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

/* The connector address. Monospace and selectable as a unit: it exists to be copied. */
.mcp-endpoint {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: var(--dark-bg-tertiary);
}

.mcp-endpoint-inline {
    margin: 0.5rem 0 1.5rem;
}

.mcp-endpoint-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mcp-endpoint-url {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
    user-select: all;
}

.mcp-endpoint-note {
    margin: 1rem auto 0;
    max-width: 34rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Section furniture ────────────────────────────── */

.mcp-h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    color: var(--text-primary);
    text-align: center;
}

.mcp-h2-icon {
    display: inline-flex;
    color: var(--accent);
    font-size: 1.5rem;
}

.mcp-sub {
    max-width: 40rem;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

.mcp-body {
    margin: 0 0 1.25rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.mcp-body strong,
.mcp-list strong {
    color: var(--text-primary);
}

.mcp-fine {
    margin: 1rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ── Example prompts ─────────────────────────────── */

.mcp-prompts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.mcp-prompt {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    background: var(--background-color);
}

.mcp-prompt p {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.02rem;
    line-height: 1.5;
}

.mcp-prompt-tag {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── The three-step explainer ────────────────────── */

.mcp-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.mcp-step {
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-background);
}

.mcp-step h3 {
    margin: 0.75rem 0 0.4rem;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.mcp-step p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
}

.mcp-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    flex: 0 0 auto;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* ── Connect ─────────────────────────────────────── */

.mcp-connect {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.25rem;
}

.mcp-connect-step {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--background-color);
}

.mcp-connect-step h3 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.mcp-connect-step > p {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.mcp-inner-list {
    margin: 0;
    padding-left: 1.35rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.mcp-inner-list li + li {
    margin-top: 0.4rem;
}

/* Tabs. Buttons rather than links: nothing about the page's address changes. */
.mcp-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.mcp-tab {
    padding: 0.6rem 1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.mcp-tab:hover {
    color: var(--text-primary);
}

.mcp-tab.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.mcp-code {
    margin: 0 0 1rem;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--dark-bg-tertiary);
}

.mcp-code code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre;
}

/* ── What it can do ──────────────────────────────── */

.mcp-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.mcp-col {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-background);
}

.mcp-h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.mcp-h3-icon {
    display: inline-flex;
    color: var(--accent);
}

.mcp-count {
    margin-left: auto;
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.mcp-list {
    margin: 0;
    padding-left: 1.35rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.mcp-list li + li {
    margin-top: 0.5rem;
}

.mcp-list-checked {
    list-style: none;
    padding-left: 0;
}

.mcp-list-checked li {
    position: relative;
    padding-left: 1.6rem;
}

.mcp-list-checked li::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 0.72em;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent);
}

/* ── CTA ─────────────────────────────────────────── */

.mcp-cta {
    text-align: center;
}

.mcp-cta .mcp-body {
    margin-bottom: 1.75rem;
}

.mcp-cta .mcp-fine {
    margin-top: 1.5rem;
}

/* Only the prose links. This used to be `.mcp-cta a`, which also hit the two buttons above and
   painted accent text onto the accent fill of .btn-primary — invisible. A link rule must never be
   broad enough to reach a button. */
.mcp-cta .mcp-fine a,
.mcp-endpoint-note a {
    color: var(--accent);
}

@media (max-width: 640px) {
    .mcp-page .page-section {
        padding: 3rem 0;
    }

    .mcp-endpoint {
        width: 100%;
    }

    .mcp-h2 {
        text-align: left;
        justify-content: flex-start;
    }

    .mcp-sub {
        text-align: left;
    }
}

/* ── Saying that the page continues ────────────────
   The hero is a full screen on most displays and the next section opens with a centred heading,
   so nothing pokes above the fold to suggest there is more. These two do: a cue that scrolls on
   and removes itself, and a way back up once there is one. */

.mcp-scroll-cue {
    /* A centred block of its own, not an inline box: inline-flex put it on the same line as the
       connector address beside it, which pushed the address off centre and made the cue read as
       part of it. */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    margin: 2.25rem auto 0;
    padding: 0.5rem 1rem;
    border: 0;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    /* Fades rather than disappears: it is removed while the reader is looking at it. */
    transition: opacity 0.25s ease-in-out;
}

.mcp-scroll-cue:hover {
    color: var(--accent);
}

.mcp-scroll-cue.is-gone {
    opacity: 0;
    pointer-events: none;
}

.mcp-scroll-cue-icon {
    display: inline-flex;
    font-size: 1.4rem;
    animation: mcp-nudge 1.8s ease-in-out infinite;
}

@keyframes mcp-nudge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

/* Somebody who has asked for less motion gets the arrow without the bounce. The cue still
   works — it is a button, and the arrow still points down. */
@media (prefers-reduced-motion: reduce) {
    .mcp-scroll-cue-icon {
        animation: none;
    }
}

.mcp-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: var(--card-background);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.mcp-to-top:hover {
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 640px) {
    .mcp-to-top {
        right: 1rem;
        bottom: 1rem;
    }
}
