/**
 * 首页核心价值区 — 中英文共用（配合 xlei-route.css）
 */

.core-pitch {
  padding: 2rem 5% 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.core-pitch__card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.97), rgba(15, 23, 42, 0.99));
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: clamp(18px, 3vw, 24px);
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 80px rgba(37, 99, 235, 0.1);
}

.core-pitch__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 60%),
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  pointer-events: none;
}

.core-pitch__card > * {
  position: relative;
  z-index: 1;
}

.core-pitch__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(0.72rem, 1.6vw, 0.8rem);
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

html:lang(zh-CN) .core-pitch__label {
  letter-spacing: 0.08em;
  text-transform: none;
}

.core-pitch__label::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
}

.core-pitch h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.35;
  color: #f8fafc;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.core-pitch__lead {
  color: #94a3b8;
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  line-height: 1.75;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  max-width: 52rem;
}

html:lang(en) .core-pitch__lead {
  max-width: 54rem;
}

.core-pitch__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.core-pitch__item {
  position: relative;
  padding: 1.25rem 1.15rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(96, 165, 250, 0.18);
  text-align: left;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

.core-pitch__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.core-pitch__item:hover {
  border-color: rgba(96, 165, 250, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.core-pitch__item:hover::before {
  opacity: 1;
}

.core-pitch__item-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(145deg, rgba(29, 78, 216, 0.5), rgba(124, 58, 237, 0.4));
  border: 1px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.core-pitch__item h3 {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: #f1f5f9;
  margin-bottom: 0.45rem;
}

.core-pitch__item p {
  font-size: clamp(0.82rem, 1.8vw, 0.9rem);
  color: #94a3b8;
  line-height: 1.65;
  margin: 0;
}

/* 嵌入首页卡片内的流程图 */
.core-pitch__route {
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
}

.xlei-route--embedded {
  padding: 0;
  overflow: visible;
}

.xlei-route--embedded::before {
  display: none;
}

.xlei-route--embedded .xlei-route__diagram {
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(0.65rem, 2vw, 1rem);
}

/* 第三列：模型出口（紧凑） */
.xlei-route__out {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.15rem 0.85rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(96, 165, 250, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  min-width: 0;
  text-align: center;
}

.xlei-route__out-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.25), rgba(59, 130, 246, 0.35));
  border: 1px solid rgba(74, 222, 128, 0.35);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

.xlei-route__out-title {
  font-size: clamp(0.78rem, 1.8vw, 0.85rem);
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.35;
}

.xlei-route__out-sub {
  font-size: clamp(0.68rem, 1.6vw, 0.75rem);
  font-weight: 600;
  color: #67e8f9;
}

.xlei-route__out-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  max-width: min(100%, 15rem);
}

.xlei-route__out-pill {
  font-size: clamp(0.56rem, 1.4vw, 0.65rem);
  font-weight: 600;
  color: #cbd5e1;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xlei-route--embedded .xlei-route__out-pills {
  max-width: 100%;
}

html:lang(en) .xlei-route__out-pills {
  max-width: min(100%, 17rem);
}

html:lang(en) .xlei-route__out-pill {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* 代码示例 */
.core-pitch__code {
  margin-top: 0;
  text-align: left;
  background: linear-gradient(180deg, #0c1222 0%, #0f172a 100%);
  border-radius: 14px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.core-pitch__code-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(30, 41, 59, 0.8);
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
}

.core-pitch__code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.core-pitch__code-dot:nth-child(1) { background: #f87171; }
.core-pitch__code-dot:nth-child(2) { background: #fbbf24; }
.core-pitch__code-dot:nth-child(3) { background: #4ade80; }

.core-pitch__code-title {
  margin-left: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
}

.core-pitch__code pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: clamp(0.72rem, 1.8vw, 0.82rem);
  line-height: 1.65;
  color: #94a3b8;
}

.core-pitch__code .tok-key { color: #c4b5fd; }
.core-pitch__code .tok-str { color: #86efac; }
.core-pitch__code .tok-auto { color: #67e8f9; font-weight: 600; }

@media (max-width: 900px) {
  .core-pitch__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mkt-page .core-pitch,
  .core-pitch {
    padding: 0 var(--mkt-gutter, 4%) var(--mkt-section-y, 3rem);
  }

  .core-pitch h2 {
    font-size: clamp(1.15rem, 4.8vw, 1.35rem);
    line-height: 1.45;
  }

  .core-pitch__lead {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .core-pitch__item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem;
  }

  .core-pitch__item > div {
    min-width: 0;
    flex: 1;
  }

  .core-pitch__item-icon {
    flex-shrink: 0;
    margin-bottom: 0;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.15rem;
  }

  .core-pitch__card {
    overflow: visible;
  }

  .xlei-route--embedded .xlei-route__diagram {
    padding: 1rem 0.65rem;
    overflow: visible;
  }

  .xlei-route--embedded .xlei-route__out {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.85rem;
    row-gap: 0.25rem;
    width: 100%;
    max-width: none;
    text-align: left;
    align-items: start;
    padding: 0.95rem 1rem;
  }

  .xlei-route--embedded .xlei-route__out-icon {
    grid-row: 1 / span 2;
    align-self: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
  }

  .xlei-route--embedded .xlei-route__out-title,
  .xlei-route--embedded .xlei-route__out-sub {
    text-align: left;
  }

  .xlei-route--embedded .xlei-route__out-pills {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: visible;
    mask-image: none;
    max-width: 100%;
  }

  .xlei-route--embedded .xlei-route__out-pill {
    flex-shrink: 1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .core-pitch__code pre {
    padding: 0.85rem 0.75rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 480px) {
  .core-pitch__card {
    padding: 1.15rem 0.85rem;
    border-radius: 16px;
  }

  .core-pitch__item {
    gap: 0.75rem;
    padding: 0.9rem 0.85rem;
  }

  .xlei-route--embedded .xlei-route__hub-core {
    width: 4rem;
    height: 4rem;
  }

  .xlei-route--embedded .xlei-route__chips {
    gap: 0.3rem;
  }

  .xlei-route--embedded .xlei-route__chip {
    font-size: 0.62rem;
    padding: 0.24rem 0.4rem;
  }
}
