/* ============================================================
   CLAUDEX 品牌样式
   原则：只作用于 .cx-home（首页落地页）与 .prose（内容排版），
   不覆盖 body/header/卡片等全局元素，避免破坏原版布局与主题切换。
   ============================================================ */

/* ---------- 首页落地页变量 ---------- */
.cx-home {
  --h-ink: #0b1220;
  --h-ink2: #5b6b82;
  --h-ink3: #8494ab;
  --h-line: #e8eef7;
  --h-card: #ffffff;
  --h-chip: #f2f7ff;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 8px 72px;
  animation: cx-fade 0.45s ease both;
}

html.dark .cx-home {
  --h-ink: #e6edf7;
  --h-ink2: #9fb0c8;
  --h-ink3: #7c8ba3;
  --h-line: #1e293b;
  --h-card: #111827;
  --h-chip: #16213a;
}

@keyframes cx-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.cx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}
@media (max-width: 940px) {
  .cx-hero { grid-template-columns: 1fr; gap: 32px; }
}

.cx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2563eb;
  background: var(--h-chip);
  border: 1px solid var(--h-line);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
html.dark .cx-eyebrow { color: #8cc6ff; }
.cx-eyebrow::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.cx-hero h1 {
  margin: 0 0 16px;
  font-size: 46px;
  line-height: 1.14;
  letter-spacing: -1.4px;
  font-weight: 700;
  color: var(--h-ink);
}
.cx-hero h1 em {
  font-style: normal;
  background: linear-gradient(115deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 640px) {
  .cx-hero h1 { font-size: 34px; letter-spacing: -0.8px; }
}

.cx-sub {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--h-ink2);
  max-width: 30em;
}

.cx-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cx-btn-primary {
  color: #fff;
  background: linear-gradient(115deg, #3b82f6, #7c5cf6);
  box-shadow: 0 8px 20px -10px rgba(59, 130, 246, 0.85);
}
.cx-btn-primary:hover { transform: translateY(-2px); text-decoration: none; color: #fff; }
.cx-btn-ghost {
  color: var(--h-ink);
  background: var(--h-card);
  border-color: var(--h-line);
}
.cx-btn-ghost:hover { transform: translateY(-2px); border-color: #b9cff5; color: #2563eb; text-decoration: none; }

.cx-meta { font-size: 13px; color: var(--h-ink3); }

/* ---------- 代码卡 ---------- */
.cx-code {
  background: linear-gradient(180deg, #0e1526, #0a1020);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -34px rgba(11, 18, 32, 0.75), 0 2px 6px rgba(11, 18, 32, 0.12);
  transition: transform 0.4s ease;
}
.cx-code:hover { transform: translateY(-3px); }

.cx-code-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.cx-code-bar i { width: 9px; height: 9px; border-radius: 50%; }
.cx-code-bar i:nth-child(1) { background: #ff5f57; }
.cx-code-bar i:nth-child(2) { background: #febc2e; }
.cx-code-bar i:nth-child(3) { background: #28c840; }
.cx-code-bar span { margin-left: 8px; font-size: 11.5px; color: #64748b; }

.cx-code pre { margin: 0; padding: 20px 22px; font-size: 13px; line-height: 2; overflow-x: auto; }
.cx-code code { background: none; border: 0; padding: 0; color: #cbd5e1; font-size: 13px; font-family: Consolas, monospace; }
.cx-code .c-k { color: #7dd3fc; }
.cx-code .c-s { color: #a5f3c4; }

.cx-code-foot {
  padding: 13px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
  color: #64748b;
}

/* ---------- 特性卡 ---------- */
.cx-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}
@media (max-width: 860px) { .cx-features { grid-template-columns: 1fr; } }

.cx-feature {
  background: var(--h-card);
  border: 1px solid var(--h-line);
  border-radius: 16px;
  padding: 22px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}
.cx-feature:hover {
  transform: translateY(-3px);
  border-color: #cfe0fa;
  box-shadow: 0 20px 40px -26px rgba(37, 99, 235, 0.5);
}
.cx-ico {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--h-chip);
  border: 1px solid var(--h-line);
  margin-bottom: 14px;
}
.cx-ico svg { width: 20px; height: 20px; stroke: #3b6df6; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.dark .cx-ico svg { stroke: #7cc0ff; }
.cx-feature h3 { margin: 0 0 6px; font-size: 15px; font-weight: 650; color: var(--h-ink); }
.cx-feature p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--h-ink2); }

/* ---------- 价格区 ---------- */
.cx-price { margin-top: 56px; }
.cx-price-head { text-align: center; margin-bottom: 24px; }
.cx-price-head h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: var(--h-ink);
}
.cx-price-head p { margin: 0; font-size: 14px; color: var(--h-ink2); }
.cx-price-head b { color: #2563eb; }
html.dark .cx-price-head b { color: #7cc0ff; }

.cx-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 860px) { .cx-price-grid { grid-template-columns: 1fr; } }

.cx-price-card {
  background: var(--h-card);
  border: 1px solid var(--h-line);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cx-price-card:hover { border-color: #cfe0fa; transform: translateY(-2px); }
.cx-price-card .m { font-size: 13px; color: var(--h-ink2); font-family: Consolas, monospace; }
.cx-price-card .v { font-size: 15px; font-weight: 700; color: #2563eb; white-space: nowrap; }
html.dark .cx-price-card .v { color: #7cc0ff; }
.cx-price-card .v small { font-weight: 500; color: var(--h-ink3); font-size: 11.5px; }

/* ---------- 内容排版（仅 .prose，跟随主题）---------- */
.prose {
  max-width: 800px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.prose h1 {
  font-size: 34px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.6px;
  margin: 2px 0 10px !important;
}

.prose h1 + p {
  font-size: 16px !important;
  opacity: 0.75;
}

.prose h2 {
  font-size: 19px !important;
  margin: 34px 0 12px !important;
  padding-left: 11px;
  border-left: 3px solid #5b8def;
}

.prose a { color: #2563eb; }
html.dark .prose a { color: #7cc0ff; }

.prose > * {
  animation: cx-fade 0.45s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .cx-home, .prose > * { animation: none !important; }
}
