/* 地形图风 · 等高线与数据山脉 · 知识探索导航 */
:root {
  --blue: #1565D8;
  --blue-dark: #0D47A1;
  --blue-light: #E3F2FD;
  --blue-border: #BBDEFB;
  --gray-bg: #F4F6F8;
  --gray-border: #E0E0E0;
  --text: #212121;
  --text-secondary: #757575;
  --white: #FFFFFF;
  --terra: #8D6E63;
  --terra-light: #EFEBE9;
  --peak: #2E7D32;
  --peak-light: #E8F5E9;
  --contour: rgba(141, 110, 99, 0.18);
  --radius: 14px;
  --shadow: 0 4px 12px rgba(21, 101, 216, 0.15);
  --shadow-hover: 0 8px 24px rgba(21, 101, 216, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 顶部 Logo + 主导航 ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--blue-border);
}
.brand-name {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.mainnav { display: flex; align-items: center; gap: 28px; }
.mainnav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.mainnav a:hover, .mainnav a.active { color: var(--blue); }
.mainnav a.active::after {
  content: '';
  position: absolute;
  bottom: -21px; left: 0; right: 0;
  height: 2px;
  background: var(--blue);
}
.btn-api {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  border: 1.5px solid var(--blue);
  color: var(--blue) !important;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  background: transparent;
}
.btn-api:hover { background: var(--blue); color: var(--white) !important; }
.btn-api::after { display: none !important; }

/* ===== 首屏：地形图 ===== */
.hero {
  background: var(--gray-bg);
  position: relative;
  overflow: hidden;
  padding: 72px 24px 88px;
}
/* 等高线背景 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%238D6E63' stroke-opacity='0.14' stroke-width='1.2'%3E%3Cellipse cx='480' cy='120' rx='60' ry='40'/%3E%3Cellipse cx='480' cy='120' rx='110' ry='75'/%3E%3Cellipse cx='480' cy='120' rx='165' ry='115'/%3E%3Cellipse cx='480' cy='120' rx='225' ry='160'/%3E%3Cellipse cx='120' cy='480' rx='70' ry='45'/%3E%3Cellipse cx='120' cy='480' rx='125' ry='85'/%3E%3Cellipse cx='120' cy='480' rx='185' ry='130'/%3E%3Cellipse cx='120' cy='480' rx='250' ry='180'/%3E%3C/g%3E%3Cg stroke='%231565D8' stroke-opacity='0.12' stroke-width='1' stroke-dasharray='4 6'%3E%3Cpath d='M0 300 Q 150 260 300 300 T 600 300'/%3E%3Cpath d='M0 340 Q 150 300 300 340 T 600 340'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 600px;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(21,101,216,0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.announce {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--blue-border);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.875rem;
  color: var(--blue);
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(21,101,216,0.06);
}
.announce-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--peak);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 5.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}
.hero-sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-weight: 400;
}
.hero-cards {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.card {
  width: 280px;
  padding: 32px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); }
.card-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow);
}
.card-primary:hover { box-shadow: var(--shadow-hover); }
.card-primary::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 0 18px rgba(255,255,255,0.06), 0 0 0 36px rgba(255,255,255,0.04);
  pointer-events: none;
}
.card-secondary {
  background: var(--white);
  border: 1px solid var(--gray-border);
  color: var(--text);
}
.card-secondary:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.card-primary .card-icon { background: rgba(255,255,255,0.15); }
.card-secondary .card-icon { background: var(--peak-light); }
.card-title { font-size: 1.25rem; font-weight: 700; }
.card-desc { font-size: 0.875rem; opacity: 0.85; line-height: 1.5; }
.card-arrow {
  position: absolute;
  bottom: 24px; right: 24px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
  transition: transform 0.2s;
}
.card-primary .card-arrow { background: rgba(255,255,255,0.2); color: var(--white); }
.card-secondary .card-arrow { background: var(--gray-bg); color: var(--text-secondary); }
.card:hover .card-arrow { transform: translateX(4px); }

/* ===== 两栏布局：左内容 + 右侧边栏 ===== */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.content-main { min-width: 0; }
.sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.side-box {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--white);
}
.side-box h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--peak-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-box ul { list-style: none; }
.side-box li { margin-bottom: 10px; }
.side-box a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.side-box a:hover { color: var(--blue); }
.side-elevation {
  background: var(--peak-light);
  border-color: #C8E6C9;
}
.elev-bar {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 8px;
}
.elev-track {
  height: 8px;
  background: var(--white);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #C8E6C9;
}
.elev-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--peak), var(--blue));
}

/* 地形风内容区块 */
.section-block { margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--terra-light);
  color: var(--terra);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.section-desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* 数据山脉卡片 */
.ridge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.ridge-card {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--white);
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
.ridge-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56 L40 28 L80 44 L130 12 L180 38 L230 20 L300 48 L300 56 Z' fill='%23E8F5E9'/%3E%3Cpath d='M0 56 L40 28 L80 44 L130 12 L180 38 L230 20 L300 48' fill='none' stroke='%232E7D32' stroke-opacity='0.35' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: cover;
  pointer-events: none;
}
.ridge-card:hover {
  border-color: var(--peak);
  box-shadow: 0 8px 24px rgba(46, 125, 50, 0.12);
  transform: translateY(-4px);
}
.ridge-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  background: var(--peak-light);
}
.ridge-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.ridge-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; padding-bottom: 40px; }

/* 海拔数据条 */
.altitude-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.altitude {
  text-align: center;
  padding: 24px 12px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-top: 3px solid var(--peak);
}
.altitude-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--peak);
  letter-spacing: -0.02em;
}
.altitude-label { font-size: 0.8125rem; color: var(--text-secondary); margin-top: 4px; }

/* 路线步骤 */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 0; bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--terra) 0 6px, transparent 6px 12px);
  opacity: 0.4;
}
.step {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  position: relative;
}
.step-num {
  width: 56px; height: 56px;
  border: 2px solid var(--terra);
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--terra);
  font-size: 1.0625rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.step-content h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 6px; }
.step-content p { font-size: 0.875rem; color: var(--text-secondary); }

/* 图片展示 */
.image-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.image-showcase img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  object-fit: cover;
  aspect-ratio: 16/10;
  transition: transform 0.3s;
}
.image-showcase img:hover { transform: scale(1.03); }

/* API 代码块 */
.api-block {
  background: #1B231C;
  border-radius: var(--radius);
  padding: 32px;
  color: #D7E8D4;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  overflow-x: auto;
  position: relative;
  border: 1px solid #2E3B2F;
}
.api-block::before {
  content: 'SUMMIT · POST /v1/chat/completions';
  position: absolute;
  top: -12px; left: 24px;
  background: var(--peak);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.api-block .comment { color: #81C784; }
.api-block .string { color: #A5D6A7; }
.api-block .keyword { color: #4FC3F7; }

/* 页脚 */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-border);
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--gray-border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.8;
}

/* 响应式 */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-box { flex: 1 1 260px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .mainnav a:not(.btn-api) { display: none; }
}
@media (max-width: 560px) {
  .hero-cards { flex-direction: column; align-items: stretch; }
  .card { width: 100%; }
  .topbar { padding: 0 16px; }
}

/* 帮助中心特有 */
.help-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.help-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--gray-border);
  transition: all 0.2s;
}
.help-nav a:hover, .help-nav a.active {
  background: var(--peak);
  color: var(--white);
  border-color: var(--peak);
}
.faq-item {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  transition: background 0.2s;
}
.faq-q:hover { background: var(--gray-bg); }
.faq-q::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-secondary);
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.faq-item.open .faq-a {
  padding: 0 24px 20px;
  max-height: 500px;
}

/* 网页版入口页特有 */
.web-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 64px;
}
.web-feature:nth-child(even) { direction: rtl; }
.web-feature:nth-child(even) > * { direction: ltr; }
.web-feature img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--gray-border);
}
.web-feature h3 { font-size: 1.375rem; font-weight: 700; margin-bottom: 12px; }
.web-feature p { color: var(--text-secondary); margin-bottom: 16px; }
.web-feature ul { list-style: none; }
.web-feature li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.9375rem;
}
.web-feature li::before {
  content: '▲';
  position: absolute;
  left: 0;
  color: var(--peak);
  font-size: 0.75rem;
  top: 12px;
}
@media (max-width: 768px) {
  .web-feature { grid-template-columns: 1fr; }
  .web-feature:nth-child(even) { direction: ltr; }
}
