/* ============================================================
   积木软件 · 官网共享样式
   设计原则：浅灰页面背景、白色卡片、轻阴影、清晰留白
   ============================================================ */

:root {
  /* 基础色 */
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --text-main: #1f2329;
  --text-sub: #646a73;
  --text-light: #8f959e;
  --border: #e8eaed;
  --divider: #f0f1f3;

  /* 产品主题色 */
  --time-color: #2196f3;      /* 积木时间块 · 蓝 */
  --time-deep: #1976d2;
  --time-bg: #e8f1fd;
  --table-color: #4caf50;     /* 积木表格 · 绿 */
  --table-deep: #2e7d32;
  --table-bg: #e9f5ea;
  --collect-color: #33691e;   /* 积木剪藏箱 · 深橄榄绿 */
  --collect-deep: #274b16;
  --collect-bg: #ecf2e7;

  /* 布局 */
  --maxw: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(31, 35, 41, 0.06);

  --nav-h: 64px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--time-color), var(--table-deep) 60%, var(--collect-deep));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-sub);
  transition: all 0.2s ease;
}

.nav-links a:hover { color: var(--text-main); background: var(--bg); }
.nav-links a.active { color: var(--text-main); font-weight: 600; background: var(--bg); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 语言切换 */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-sub);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.lang-switch:hover {
  color: var(--text-main);
  border-color: #c9ccd1;
  background: var(--bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--text-main);
  line-height: 1;
  padding: 6px;
}

/* 移动端抽屉导航 */
.mobile-menu {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 18px;
}

.mobile-menu a {
  display: block;
  padding: 12px 4px;
  font-size: 16px;
  color: var(--text-main);
  border-bottom: 1px solid var(--divider);
}

.mobile-menu a:last-child { border-bottom: none; }

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .kicker {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--time-deep);
  background: var(--time-bg);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.section-head h2 { font-size: 32px; font-weight: 700; margin-bottom: 14px; }
.section-head p { color: var(--text-sub); font-size: 16px; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 72px;
  text-align: center;
  background:
    radial-gradient(800px 300px at 20% 0%, rgba(33, 150, 243, 0.08), transparent 60%),
    radial-gradient(800px 300px at 80% 0%, rgba(76, 175, 80, 0.08), transparent 60%),
    radial-gradient(600px 260px at 50% 100%, rgba(51, 105, 30, 0.06), transparent 60%);
}

.hero h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--time-deep), var(--table-deep) 55%, var(--collect-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-sub);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--time-deep); color: #fff; }
.btn-primary:hover { background: #1565c0; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(33, 150, 243, 0.3); }

.btn-ghost { background: #fff; color: var(--text-main); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-light); transform: translateY(-1px); }

/* ---------- 首页产品卡片 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.product-card .p-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(31, 35, 41, 0.08);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .p-icon img { width: 100%; height: 100%; object-fit: cover; }

.product-card .p-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.product-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.product-card .p-desc { color: var(--text-sub); font-size: 15px; margin-bottom: 18px; flex: 1; }

.product-card ul.p-points { margin-bottom: 22px; }
.product-card ul.p-points li {
  font-size: 14px;
  color: var(--text-sub);
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-card ul.p-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.product-card .p-foot { display: flex; gap: 10px; }

.btn-download {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  transition: all 0.2s ease;
  border: none;
}
.btn-download:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 35, 41, 0.18); }

.btn-detail {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text-main);
  transition: all 0.2s ease;
}
.btn-detail:hover { border-color: var(--text-light); }

/* 各产品配色 */
.tag-time { color: var(--time-deep); background: var(--time-bg); }
.tag-table { color: var(--table-deep); background: var(--table-bg); }
.tag-collect { color: var(--collect-deep); background: var(--collect-bg); }

.card-time .btn-download { background: var(--time-color); }
.card-time ul.p-points li::before { background: var(--time-color); }

.card-table .btn-download { background: var(--table-deep); }
.card-table ul.p-points li::before { background: var(--table-deep); }

.card-collect .btn-download { background: var(--collect-deep); }
.card-collect ul.p-points li::before { background: var(--collect-deep); }

/* ---------- 首页特色条 ---------- */
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.feature-item .f-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--bg);
}

.feature-item h4 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.feature-item p { font-size: 14px; color: var(--text-sub); }

/* ---------- 详情页 Hero ---------- */
.app-hero {
  padding: 72px 0 56px;
  background: var(--bg);
}

.app-hero .container {
  display: flex;
  align-items: center;
  gap: 48px;
}

.app-hero .hero-icon {
  width: 132px;
  height: 132px;
  border-radius: 30px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(31, 35, 41, 0.12);
}

.app-hero .hero-icon img { width: 100%; height: 100%; object-fit: cover; }

.app-hero h1 { font-size: 38px; font-weight: 800; margin-bottom: 10px; }
.app-hero .tagline { font-size: 17px; color: var(--text-sub); margin-bottom: 22px; max-width: 560px; }

.app-hero .hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.app-hero .version-line {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.app-hero .version-line b { color: var(--text-sub); font-weight: 600; }

.dl-note { font-size: 13px; color: var(--text-light); margin-top: 12px; }

/* 详情页功能网格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 少量卡片时收窄并居中（如剪藏箱「推荐使用方法」两卡） */
.feature-grid--center {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin: 0 auto;
}

.feature-cell {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.feature-cell .fc-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.feature-cell h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-cell p { font-size: 14px; color: var(--text-sub); }

/* ---------- 详情页功能亮点（图文交替） ---------- */
.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 40px 0;
}

/* 锚点定位时避开吸顶导航栏（详情页亮点区、首页共同特点区与产品区） */
#highlights,
#features {
  scroll-margin-top: 72px;
}

/* 产品区块自带 84px 上内边距，偏移取小值避免上方空白过多 */
#products {
  scroll-margin-top: 28px;
}

.spotlight.reverse .spot-text { order: 2; }
.spotlight.reverse .spot-visual { order: 1; }

.spot-text .kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: inline-block;
}
.spot-text h3 { font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.spot-text p { color: var(--text-sub); font-size: 15px; margin-bottom: 12px; }
.spot-text ul li {
  font-size: 14px;
  color: var(--text-sub);
  padding: 4px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.spot-text ul li::before {
  content: "✓";
  color: var(--time-deep);
  font-weight: 700;
  flex-shrink: 0;
}

.spot-visual {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.spot-visual .sv-icon { font-size: 64px; line-height: 1; }
.spot-visual .sv-title { font-size: 18px; font-weight: 700; }
.spot-visual .sv-sub { font-size: 14px; color: var(--text-light); }

/* 下载区 */
.download-section { text-align: center; padding: 80px 0; }
.download-section h2 { font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.download-section > p { color: var(--text-sub); margin-bottom: 36px; }

/* 首页「开始使用」卡片：与其他卡片一致的静态阴影（浮现过渡由 .reveal 提供） */
#download .download-section {
  box-shadow: var(--shadow);
}

.dl-card {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 36px;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.dl-card .dl-icon { font-size: 46px; }
.dl-card .dl-info { text-align: left; }
.dl-card .dl-name { font-size: 20px; font-weight: 700; }
.dl-card .dl-meta { font-size: 13px; color: var(--text-light); margin-top: 4px; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  border: none;
  transition: all 0.2s ease;
}
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(31, 35, 41, 0.2); }
.dl-btn .arrow { font-size: 20px; }

.dl-tips { margin-top: 26px; font-size: 13px; color: var(--text-light); max-width: 560px; margin-left: auto; margin-right: auto; }
.dl-tips b { color: var(--text-sub); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 44px 0 36px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: var(--text-sub); max-width: 300px; }

.footer-col h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-sub);
  padding: 5px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--time-deep); }

.footer-bottom {
  border-top: 1px solid var(--divider);
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

.icp-beian {
  display: inline-block;
  margin-top: 8px;
  color: var(--text-sub);
  text-decoration: none;
}
.icp-beian:hover { color: var(--time-deep); text-decoration: underline; }

/* ---------- 动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .spotlight { grid-template-columns: 1fr; gap: 32px; }
  .spotlight.reverse .spot-text { order: 1; }
  .spotlight.reverse .spot-visual { order: 2; }
  .app-hero .container { flex-direction: column; text-align: center; gap: 24px; }
  .app-hero .hero-actions { justify-content: center; }
  .app-hero .version-line { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu.open { display: block; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 26px; }
  .hero { padding: 64px 0 48px; }
  .dl-card { flex-direction: column; text-align: center; padding: 24px; }
  .dl-card .dl-info { text-align: center; }
  .product-card .p-foot { flex-direction: column; }
  .btn-detail { text-align: center; }
}

/* ===== 临时隐藏下载入口（恢复时删除本段即可） ===== */
a[href*="download/"] { display: none !important; }
section.download-section { display: none !important; }
#download { display: none !important; }
.footer-col:has(a[href*="download/"]) { display: none !important; }
.version-line span:last-child { display: none !important; }
#products .section-head p { display: none !important; }

@media (min-width: 901px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
/* ===== 临时隐藏下载入口结束 ===== */
