/* ============ PackyCode 首页样式 ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-sub: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --chip: #eef2ff;
  --chip-ico: #4f46e5;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: background .2s, box-shadow .2s;
}
.btn-sm { padding: 8px 20px; font-size: 14px; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .28);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-soft); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 19px;
  font-style: italic;
  letter-spacing: -.02em;
}
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 15px;
  font-style: normal;
}
.main-nav {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  color: #475569;
}
.main-nav a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(700px 420px at 8% 0%, rgba(37, 99, 235, .08), transparent 65%),
    radial-gradient(700px 460px at 95% 90%, rgba(16, 185, 129, .08), transparent 65%),
    var(--bg);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 56px;
  padding-top: 80px;
  padding-bottom: 90px;
}
.hero-badge {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-sub {
  margin-top: 20px;
  max-width: 520px;
  color: var(--text-sub);
  font-size: 16.5px;
}

/* 接口地址盒 */
.endpoint-box {
  margin-top: 30px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
  max-width: 520px;
}
.endpoint-label {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
}
.endpoint-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 13.5px;
}
.endpoint-host { color: #334155; white-space: nowrap; }
.endpoint-carousel {
  flex: 1;
  height: 1.6em;
  overflow: hidden;
  position: relative;
}
.endpoint-list {
  display: flex;
  flex-direction: column;
  color: var(--primary);
  animation: endpoints 16s steps(8) infinite;
}
.endpoint-list span { height: 1.6em; line-height: 1.6em; white-space: nowrap; }
@keyframes endpoints {
  from { transform: translateY(0); }
  to   { transform: translateY(-12.8em); }
}
.copy-ico { color: #94a3b8; flex: none; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-stats {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  list-style: none;
}
.hero-stats li {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 22px;
  min-width: 120px;
}
.hero-stats .num {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.hero-stats .label { font-size: 12.5px; color: var(--text-sub); }

/* Hero 右侧面板 */
.hero-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.panel-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
}
.panel-ico {
  width: 40px; height: 40px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--chip);
  font-size: 18px;
}
.panel-item h2 { font-size: 15.5px; font-weight: 700; }
.panel-item p { font-size: 13.5px; color: var(--text-sub); margin-top: 4px; }

/* ---------- 通用 Section ---------- */
.section { padding: 90px 0; }
.section-head { max-width: 680px; margin-bottom: 46px; }
.eyebrow {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}
.section-head h2, .cta-inner h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.01em;
}
.section-sub {
  margin-top: 14px;
  color: var(--text-sub);
  font-size: 16px;
}

.card-ico {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--chip);
  font-size: 19px;
  margin-bottom: 18px;
}

/* ---------- 核心价值 ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.value-card {
  position: relative;
  background: linear-gradient(135deg, rgba(37, 99, 235, .04), rgba(255, 255, 255, 0) 45%), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s, box-shadow .2s;
}
.value-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}
.value-card h3 { font-size: 18px; }
.value-card p { margin-top: 8px; font-size: 14.5px; color: var(--text-sub); }

/* ---------- 工作流 ---------- */
.workflow { background: var(--bg-soft); }
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  overflow: hidden;
}
.step-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #2563eb, #8b5cf6);
}
.step-num {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 4px;
}
.step-card h3 { font-size: 18px; }
.step-card p { margin-top: 8px; font-size: 14.5px; color: var(--text-sub); }

/* ---------- 生态伙伴 ---------- */
.partners-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.partners-inner .section-head { margin-bottom: 0; }
.partners-badge {
  justify-self: center;
  width: 220px; height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(37, 99, 235, .16), rgba(37, 99, 235, .04) 70%);
  border: 1px dashed rgba(37, 99, 235, .4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.big-num {
  font-size: 46px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
}
.big-label { font-size: 14px; color: var(--text-sub); }

/* ---------- CTA ---------- */
.cta {
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(37, 99, 235, .07), transparent 70%),
    var(--bg);
  text-align: center;
}
.cta-inner { max-width: 720px; }
.cta-inner .section-sub { margin-top: 18px; }
.cta-center { justify-content: center; margin-top: 32px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 36px 0 28px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  font-size: 14px;
  color: #475569;
}
.footer-links a:hover { color: var(--primary); }
.footer-links .divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-sub);
}
.footer-bottom .ver {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 8px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 60px; }
  .value-grid { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .partners-inner { grid-template-columns: 1fr; }
  .partners-badge { justify-self: start; }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .hero-stats { flex-direction: column; }
  .hero-cta .btn { flex: 1; justify-content: center; }
  .endpoint-input { font-size: 12px; }
  .footer-bottom { justify-content: center; text-align: center; }
}
