/* ============================================================
   MCP Landing — Premium Dark Theme
   Скоуп: только .mcp-page (чтобы не ломать остальной сайт)
   ============================================================ */

.mcp-page {
  --mcp-bg:        #0A0A0F;
  --mcp-bg-2:      #11111A;
  --mcp-surface:   #15151F;
  --mcp-surface-2: #1C1C28;
  --mcp-border:    rgba(255, 255, 255, 0.08);
  --mcp-border-strong: rgba(255, 255, 255, 0.14);
  --mcp-text:      #F5F5F7;
  --mcp-text-muted: #9494A5;
  --mcp-text-dim:  #6B6B7B;
  --mcp-tangerine: #FF6B1A;
  --mcp-tangerine-glow: rgba(255, 107, 26, 0.35);
  --mcp-accent:    #7C7CFF;
  --mcp-success:   #10B981;
  --mcp-error:     #F87171;

  background: var(--mcp-bg);
  color: var(--mcp-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.mcp-page main { background: var(--mcp-bg); }

.mcp-page a { color: var(--mcp-tangerine); }
.mcp-page a:hover { color: #ff8c4a; }

/* Override site header on this page — make it dark */
.mcp-page .header {
  background: rgba(10, 10, 15, 0.85) !important;
  border-bottom: 1px solid var(--mcp-border) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mcp-page .site-nav a { color: var(--mcp-text-muted); }
.mcp-page .site-nav a:hover { color: var(--mcp-text); }
.mcp-page .header__logo span { color: var(--mcp-text); }
.mcp-page .site-header__score {
  background: var(--mcp-tangerine);
  color: #fff;
  border: 1px solid transparent;
}
.mcp-page .site-header__channel,
.mcp-page .btn--outline {
  border-color: var(--mcp-border-strong);
  color: var(--mcp-text);
  background: transparent;
}
.mcp-page .site-header__channel:hover,
.mcp-page .btn--outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}
.mcp-page .header__burger { color: var(--mcp-text); }

.mcp-page .footer {
  background: var(--mcp-bg-2) !important;
  border-top: 1px solid var(--mcp-border) !important;
}
.mcp-page .footer h4 { color: var(--mcp-text); }
.mcp-page .footer a { color: var(--mcp-text-muted) !important; }
.mcp-page .footer a:hover { color: var(--mcp-text) !important; }

/* ============================================================
   HERO
   ============================================================ */

.mcp-hero {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 107, 26, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(124, 124, 255, 0.10), transparent 60%),
    var(--mcp-bg);
}

.mcp-hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
  animation: mcp-grid-drift 30s linear infinite;
}

@keyframes mcp-grid-drift {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 48px 48px, 48px 48px; }
}

.mcp-hero__inner {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto;
  text-align: center;
}

.mcp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 107, 26, 0.10);
  border: 1px solid rgba(255, 107, 26, 0.25);
  color: var(--mcp-tangerine);
  font-size: 0.8125rem; font-weight: 600;
  margin-bottom: 24px;
}
.mcp-badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mcp-tangerine);
  box-shadow: 0 0 0 0 var(--mcp-tangerine-glow);
  animation: mcp-pulse 1.8s infinite;
}
@keyframes mcp-pulse {
  0%   { box-shadow: 0 0 0 0 var(--mcp-tangerine-glow); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 107, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 26, 0); }
}

.mcp-hero__title {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.05; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 0 20px;
  color: var(--mcp-text);
}
.mcp-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #FF6B1A 0%, #FF8C4A 50%, #FFB07A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mcp-hero__lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55; color: var(--mcp-text-muted);
  max-width: 640px; margin: 0 auto 36px;
}

.mcp-hero__cta-row {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  margin-bottom: 24px;
}

.mcp-cta {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 12px; font-weight: 600; font-size: 0.9375rem;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer; font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.mcp-cta--primary {
  background: linear-gradient(135deg, #B8410A 0%, #E85A0F 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 24px -8px rgba(255, 107, 26, 0.45), 0 0 0 1px rgba(255, 107, 26, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.mcp-cta--primary::before {
  content: ''; position: absolute; inset: -2px;
  background: linear-gradient(135deg, #FF6B1A, #FF8C4A, #FF6B1A);
  border-radius: 14px; z-index: -1;
  filter: blur(16px); opacity: 0.18;
  transition: opacity 0.2s;
}
.mcp-cta--primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #C84A0E 0%, #FF6B1A 100%);
  box-shadow: 0 10px 32px -8px rgba(255, 107, 26, 0.6), 0 0 0 1px rgba(255, 107, 26, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.mcp-cta--primary:hover::before { opacity: 0.32; }
.mcp-cta--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--mcp-border-strong);
  color: var(--mcp-text);
}
.mcp-cta--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.mcp-cta__icon { font-size: 1rem; }

.mcp-hero__meta {
  display: inline-flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  font-size: 0.8125rem; color: var(--mcp-text-dim);
}
.mcp-hero__meta-item {
  display: inline-flex; align-items: center; gap: 6px;
}
.mcp-hero__meta-item::before {
  content: '✓'; color: var(--mcp-success); font-weight: 700;
}

/* ============================================================
   SECTION SCAFFOLDING
   ============================================================ */

.mcp-section { padding: 80px 0; position: relative; }
.mcp-section--alt { background: var(--mcp-bg-2); }

.mcp-section__head {
  text-align: center; max-width: 720px;
  margin: 0 auto 56px;
}
.mcp-section__kicker {
  display: inline-block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mcp-tangerine);
  margin-bottom: 12px;
}
.mcp-section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15; letter-spacing: -0.015em;
  font-weight: 700; margin: 0 0 16px;
  color: var(--mcp-text);
}
.mcp-section__lede {
  font-size: 1.0625rem; line-height: 1.55;
  color: var(--mcp-text-muted); margin: 0;
}

/* ============================================================
   TERMINAL
   ============================================================ */

.mcp-terminal {
  max-width: 820px; margin: 0 auto;
  background: var(--mcp-surface);
  border: 1px solid var(--mcp-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.mcp-terminal__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--mcp-surface-2);
  border-bottom: 1px solid var(--mcp-border);
}
.mcp-terminal__dots { display: inline-flex; gap: 6px; }
.mcp-terminal__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #3a3a48;
}
.mcp-terminal__dot:nth-child(1) { background: #FF5F57; }
.mcp-terminal__dot:nth-child(2) { background: #FEBC2E; }
.mcp-terminal__dot:nth-child(3) { background: #28C840; }
.mcp-terminal__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; color: var(--mcp-text-dim);
  margin-left: auto;
}

.mcp-terminal__body {
  padding: 24px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875rem; line-height: 1.7;
  min-height: 380px;
  max-height: 480px;
  overflow-y: auto;
}
.mcp-terminal__body::-webkit-scrollbar { width: 8px; }
.mcp-terminal__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1); border-radius: 4px;
}

.mcp-term-line {
  display: block; opacity: 0;
  animation: mcp-line-in 0.3s forwards;
  white-space: pre-wrap; word-break: break-word;
}
@keyframes mcp-line-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mcp-term-line__role {
  display: inline-block; min-width: 110px;
  font-weight: 600;
  margin-right: 8px;
}
.mcp-term-line--user .mcp-term-line__role   { color: var(--mcp-accent); }
.mcp-term-line--ai .mcp-term-line__role     { color: var(--mcp-tangerine); }
.mcp-term-line--server .mcp-term-line__role { color: var(--mcp-success); }
.mcp-term-line--sys .mcp-term-line__role    { color: var(--mcp-text-dim); }

.mcp-term-line__text { color: var(--mcp-text); }
.mcp-term-line--sys .mcp-term-line__text { color: var(--mcp-text-muted); }

.mcp-term-json {
  display: block; margin: 8px 0 8px 24px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--mcp-tangerine);
  border-radius: 4px;
  color: #c4c4d4;
  font-size: 0.8125rem;
  white-space: pre;
  overflow-x: auto;
}
.mcp-term-json .k { color: #88aaff; }
.mcp-term-json .s { color: #b5e8a7; }
.mcp-term-json .n { color: #ffd28a; }

.mcp-term-cursor {
  display: inline-block; width: 8px; height: 1.1em;
  background: var(--mcp-tangerine);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: mcp-blink 1s steps(1) infinite;
}
@keyframes mcp-blink {
  50% { opacity: 0; }
}

.mcp-terminal__controls {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 20px;
}
.mcp-terminal__btn {
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
  padding: 8px 14px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--mcp-border-strong);
  color: var(--mcp-text-muted); cursor: pointer;
  transition: all 0.15s;
}
.mcp-terminal__btn:hover {
  color: var(--mcp-text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================================
   AGENT TABS
   ============================================================ */

.mcp-agents { max-width: 860px; margin: 0 auto; }

.mcp-agents__tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px;
  background: var(--mcp-surface);
  border: 1px solid var(--mcp-border);
  border-radius: 14px;
  margin-bottom: 24px;
}
.mcp-agent-tab {
  flex: 1; min-width: 140px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 14px;
  font-size: 0.875rem; font-weight: 600;
  color: var(--mcp-text-muted);
  background: transparent; border: none; border-radius: 10px;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.mcp-agent-tab:hover { color: var(--mcp-text); }
.mcp-agent-tab[aria-selected="true"] {
  background: rgba(255, 107, 26, 0.12);
  color: var(--mcp-tangerine);
  box-shadow: 0 0 0 1px rgba(255, 107, 26, 0.3);
}
.mcp-agent-tab__icon { font-size: 1.125rem; }

.mcp-agent-panel {
  background: var(--mcp-surface);
  border: 1px solid var(--mcp-border);
  border-radius: 16px;
  padding: 28px;
}
.mcp-agent-panel[hidden] { display: none; }
.mcp-agent-panel__head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px;
  margin-bottom: 16px;
}
.mcp-agent-panel__title {
  font-size: 1.25rem; font-weight: 700; margin: 0;
  color: var(--mcp-text);
}
.mcp-agent-panel__status {
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--mcp-success);
}
.mcp-agent-panel__status--beta {
  background: rgba(124, 124, 255, 0.12); color: var(--mcp-accent);
}
.mcp-agent-panel__desc {
  color: var(--mcp-text-muted); margin: 0 0 18px;
  line-height: 1.55; font-size: 0.9375rem;
}
.mcp-agent-panel__steps {
  margin: 0 0 18px; padding-left: 22px;
  color: var(--mcp-text-muted); font-size: 0.9375rem;
}
.mcp-agent-panel__steps li { margin-bottom: 8px; line-height: 1.55; }
.mcp-agent-panel__steps strong { color: var(--mcp-text); font-weight: 600; }

.mcp-code-block {
  position: relative;
  background: #08080C;
  border: 1px solid var(--mcp-border);
  border-radius: 10px;
  padding: 16px 16px 16px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem; line-height: 1.6;
  color: var(--mcp-text);
  overflow-x: auto;
  margin-top: 12px;
}
.mcp-code-block pre { margin: 0; padding: 0; }
.mcp-code-block .k { color: #88aaff; }
.mcp-code-block .s { color: #b5e8a7; }
.mcp-code-block .c { color: var(--mcp-text-dim); font-style: italic; }

.mcp-code-block__copy {
  position: absolute; top: 10px; right: 10px;
  padding: 6px 10px; font-size: 0.7rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--mcp-border-strong);
  color: var(--mcp-text-muted); border-radius: 6px;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.mcp-code-block__copy:hover { color: var(--mcp-text); background: rgba(255, 255, 255, 0.12); }
.mcp-code-block__copy.is-copied {
  color: #fff;
  background: var(--mcp-success);
  border-color: var(--mcp-success);
}

/* ============================================================
   SECURITY / ARCHITECTURE
   ============================================================ */

.mcp-security {
  max-width: 980px; margin: 0 auto;
}

.mcp-arch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding: 32px 24px;
  background: var(--mcp-surface);
  border: 1px solid var(--mcp-border);
  border-radius: 20px;
  margin-bottom: 40px;
}

@media (max-width: 760px) {
  .mcp-arch {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px 16px;
  }
}

.mcp-arch__node {
  text-align: center;
  padding: 20px 14px;
  border-radius: 14px;
  background: var(--mcp-surface-2);
  border: 1px solid var(--mcp-border);
  min-height: 130px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.mcp-arch__node--hub {
  background: linear-gradient(180deg, rgba(255, 107, 26, 0.12), rgba(255, 107, 26, 0.04));
  border-color: rgba(255, 107, 26, 0.35);
  box-shadow: 0 0 30px -5px rgba(255, 107, 26, 0.25);
}
.mcp-arch__icon {
  font-size: 1.75rem; margin-bottom: 8px;
}
.mcp-arch__label {
  font-weight: 700; font-size: 0.9375rem; margin-bottom: 4px;
  color: var(--mcp-text);
}
.mcp-arch__sub {
  font-family: 'JetBrains Mono', monospace; font-size: 0.6875rem;
  color: var(--mcp-text-dim);
}
.mcp-arch__node--hub .mcp-arch__label { color: var(--mcp-tangerine); }

.mcp-arch__edge {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mcp-border-strong) 20%, var(--mcp-border-strong) 80%, transparent);
  min-width: 40px;
  margin: 0 4px;
}
.mcp-arch__edge::before {
  content: '';
  position: absolute; top: 50%; left: -4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mcp-tangerine);
  transform: translateY(-50%);
  box-shadow: 0 0 10px var(--mcp-tangerine);
  animation: mcp-flow 2.4s ease-in-out infinite;
}
.mcp-arch__edge--right::before { animation-delay: 1.2s; }

@keyframes mcp-flow {
  0%   { left: -4px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 4px); opacity: 0; }
}

@media (max-width: 760px) {
  .mcp-arch__edge {
    width: 2px; height: 32px; min-width: 0;
    margin: 0 auto;
    background: linear-gradient(180deg, transparent, var(--mcp-border-strong) 20%, var(--mcp-border-strong) 80%, transparent);
  }
  .mcp-arch__edge::before {
    left: 50%; top: -4px;
    transform: translateX(-50%);
    animation: mcp-flow-v 2.4s ease-in-out infinite;
  }
  .mcp-arch__edge--right::before { animation-delay: 1.2s; }
  @keyframes mcp-flow-v {
    0%   { top: -4px; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { top: calc(100% - 4px); opacity: 0; }
  }
}

.mcp-security__claims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.mcp-claim {
  background: var(--mcp-surface);
  border: 1px solid var(--mcp-border);
  border-radius: 14px;
  padding: 20px;
}
.mcp-claim__icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 107, 26, 0.12);
  color: var(--mcp-tangerine);
  font-size: 1.125rem;
  margin-bottom: 12px;
}
.mcp-claim__title {
  font-size: 0.9375rem; font-weight: 700; margin: 0 0 6px;
  color: var(--mcp-text);
}
.mcp-claim__text {
  font-size: 0.875rem; line-height: 1.55;
  color: var(--mcp-text-muted); margin: 0;
}

/* ============================================================
   OPEN SOURCE
   ============================================================ */

.mcp-oss {
  max-width: 820px; margin: 0 auto;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(124, 124, 255, 0.10), transparent 70%),
    var(--mcp-surface);
  border: 1px solid var(--mcp-border);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
}
@media (max-width: 600px) { .mcp-oss { padding: 28px 20px; } }
.mcp-oss__title {
  font-size: 1.5rem; font-weight: 700; margin: 0 0 12px;
  color: var(--mcp-text);
}
.mcp-oss__text {
  color: var(--mcp-text-muted); line-height: 1.6;
  max-width: 560px; margin: 0 auto 24px;
}
.mcp-oss__split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin: 24px 0;
  text-align: left;
}
@media (max-width: 600px) { .mcp-oss__split { grid-template-columns: 1fr; } }
.mcp-oss__col {
  padding: 16px;
  background: var(--mcp-surface-2);
  border: 1px solid var(--mcp-border);
  border-radius: 12px;
}
.mcp-oss__col h4 {
  font-size: 0.8125rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 8px;
}
.mcp-oss__col--open h4 { color: var(--mcp-success); }
.mcp-oss__col--closed h4 { color: var(--mcp-tangerine); }
.mcp-oss__col p {
  font-size: 0.8125rem; line-height: 1.5;
  color: var(--mcp-text-muted); margin: 0;
}

/* ============================================================
   FOOTER CTA / FINAL
   ============================================================ */

.mcp-final {
  text-align: center; padding: 96px 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255, 107, 26, 0.10), transparent 70%),
    var(--mcp-bg);
}
.mcp-final__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700; margin: 0 0 12px;
  color: var(--mcp-text);
}
.mcp-final__lede {
  color: var(--mcp-text-muted); margin: 0 0 32px;
  font-size: 1.0625rem;
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */

@media (max-width: 600px) {
  .mcp-hero { padding: 96px 0 56px; }
  .mcp-section { padding: 56px 0; }
  .mcp-terminal__body { padding: 16px; font-size: 0.8125rem; min-height: 320px; }
  .mcp-agent-panel { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .mcp-hero__grid,
  .mcp-badge__dot,
  .mcp-arch__edge::before,
  .mcp-term-cursor,
  .mcp-term-line {
    animation: none;
  }
  .mcp-term-line { opacity: 1; }
}
