/* ==========================================================================
   首页专用：深色极光 Hero + 亮色渐变强调 + 玻璃质感卡片
   只被 templates/site/index.html 引用，不影响产品页与后台。
   ========================================================================== */

body.home { background: #f4f7f6; }

/* 顶栏跟着 Hero 一起变深，避免一条白带压住深色头图 */
body.home .topbar {
  background: rgba(5, 18, 13, .78);
  border-bottom-color: rgba(255, 255, 255, .08);
}
body.home .topbar .brand,
body.home .brand-text b { color: #f2f8f5; }
body.home .brand-text i { color: #8fa79c; }
body.home .brand-mark {
  background: linear-gradient(145deg, #1d6b52, #0c3b2c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 6px 16px rgba(0, 0, 0, .28);
  color: #eafff5;
}
body.home .nav a { color: #a4bab0; }
body.home .nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
body.home .nav a.on { color: #fff; }
body.home .nav a.on::after { background: linear-gradient(90deg, #10b981, #22d3ee); }
body.home .topbar-actions .qq { color: #96aca3; }
body.home .topbar-actions .btn-ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .20);
  color: #eaf4ef;
}
body.home .topbar-actions .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.home {
  --h-ink: #05120d;
  --h-ink-2: #0a2118;
  --h-em: #10b981;
  --h-cyan: #22d3ee;
  --h-violet: #7c5cff;
  --h-line: #e2eae5;
  --h-text: #0c1a14;
  --h-mut: #5c6f67;
  --h-grad: linear-gradient(112deg, #10b981 0%, #22d3ee 46%, #7c5cff 100%);
}

/* ---------------------------------------------------------------- Hero */
.h-hero {
  position: relative;
  overflow: hidden;
  background: var(--h-ink);
  color: #eaf4ef;
  padding: 78px 0 112px;
}
.h-hero::before {
  content: "";
  position: absolute;
  inset: -35% -12%;
  background:
    radial-gradient(46% 42% at 78% 14%, rgba(34, 211, 238, .30), transparent 70%),
    radial-gradient(42% 40% at 64% 88%, rgba(16, 185, 129, .26), transparent 72%),
    radial-gradient(34% 34% at 10% 16%, rgba(124, 92, 255, .26), transparent 74%);
  filter: blur(4px);
  pointer-events: none;
}
.h-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(76% 70% at 52% 28%, #000 28%, transparent 78%);
  mask-image: radial-gradient(76% 70% at 52% 28%, #000 28%, transparent 78%);
  pointer-events: none;
}
.h-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: 54px;
  align-items: center;
}

.h-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #cfe6db;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.h-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--h-em);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .18);
}

.h-title {
  font-family: var(--sans);
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.028em;
  margin: 18px 0 20px;
  color: #fff;
}
.h-title em {
  font-style: normal;
  background: var(--h-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h-lead {
  font-size: 16px;
  line-height: 1.85;
  color: #a9bdb4;
  max-width: 540px;
  margin: 0;
}
.h-lead b { color: #eaf6f0; font-weight: 600; }

.h-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.h-btn {
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .01em;
}
.h-btn-primary {
  background: var(--h-grad);
  color: #04120c;
  border: 0;
  box-shadow: 0 12px 32px rgba(34, 211, 238, .26), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.h-btn-primary:hover {
  color: #04120c;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(34, 211, 238, .34), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.h-btn-ghost {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #eaf4ef;
}
.h-btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.h-trust {
  display: flex;
  gap: 10px 22px;
  flex-wrap: wrap;
  margin-top: 30px;
  color: #96aca3;
  font-size: 12.5px;
}
.h-trust span { display: inline-flex; align-items: center; gap: 7px; }
.h-trust svg { color: var(--h-em); flex: none; }

/* 右侧截图 */
.h-visual { position: relative; }
.h-shot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  background: #0c1b15;
  box-shadow: 0 44px 90px rgba(0, 0, 0, .55);
  transform: perspective(1600px) rotateY(-5deg) rotateX(2deg);
}
.h-shot img { width: 100%; display: block; }
.h-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}

.h-float {
  position: absolute;
  z-index: 2;
  padding: 11px 15px;
  border-radius: 13px;
  background: rgba(8, 24, 18, .88);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .42);
  font-size: 12px;
  color: #dcebe3;
  line-height: 1.4;
}
.h-float b { display: block; color: #fff; font-size: 13.5px; font-weight: 700; }
.h-float small { color: #8fa79c; font-size: 11px; }
.h-float-a { left: -26px; bottom: 40px; }
.h-float-b { right: -16px; top: -20px; }

/* ---------------------------------------------------------------- 数据条 */
.h-stats {
  position: relative;
  z-index: 3;
  margin-top: -66px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.h-stat {
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 20px 44px rgba(8, 32, 24, .10);
}
.h-stat b {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--h-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h-stat span { font-size: 12.5px; color: var(--h-mut); }

/* ---------------------------------------------------------------- 区块 */
.h-band { padding: 74px 0; background: #fff; }
.h-band.muted { background: #f4f7f6; }
.h-band.dark {
  background: var(--h-ink);
  color: #dfeee7;
  position: relative;
  overflow: hidden;
}
.h-band.dark::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle at center, rgba(16, 185, 129, .16), transparent 66%);
  pointer-events: none;
}
.h-band > .wrap { position: relative; z-index: 1; }

.h-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.h-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #0f9c73;
}
.h-eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.h-title-2 {
  font-family: var(--sans);
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 800;
  letter-spacing: -.022em;
  color: #0b1a14;
  margin-top: 10px;
}
.h-sub { color: var(--h-mut); font-size: 14px; margin: 8px 0 0; }
.h-band.dark .h-title-2 { color: #fff; }
.h-band.dark .h-sub { color: #93a8a0; }
.h-band.dark .h-eyebrow { color: #34d399; }

/* 搜索 + 分类 */
.h-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: 12px;
  padding: 4px 4px 4px 14px;
  box-shadow: 0 2px 12px rgba(8, 32, 24, .05);
}
.h-search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 190px;
  font: 14px var(--sans);
  color: var(--h-text);
}
.h-search .btn { border-radius: 9px; }

.h-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 26px; }
.home .chip {
  padding: 7px 14px;
  background: #eef3f0;
  border: 1px solid transparent;
  color: #31463c;
  font-size: 13px;
}
.home .chip:hover { background: #fff; border-color: #cfded7; color: #133024; }
.home .chip.on { background: #0b1a14; color: #eaf6f0; border-color: #0b1a14; }

/* 产品卡：顶部渐变条 + 更重的悬停 */
.home .product-grid { gap: 22px; }
.home .product-card {
  border-radius: 18px;
  border-color: var(--h-line);
  box-shadow: 0 1px 2px rgba(8, 32, 24, .04);
}
.home .product-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--h-grad);
  opacity: 0;
  transition: opacity .24s ease;
  z-index: 1;
}
.home .product-card:hover {
  transform: translateY(-5px);
  border-color: #cfe0d8;
  box-shadow: 0 26px 50px rgba(8, 32, 24, .14);
}
.home .product-card:hover::before { opacity: 1; }
.home .product-body { padding: 22px 22px 20px; }
.home .product-body h3 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.012em;
}
.home .product-body .sub { color: #7b8d84; }
.home .price-from { font-family: var(--sans); font-size: 23px; font-weight: 800; }
.home .cover .tag {
  background: rgba(4, 18, 12, .74);
  color: #eaf6f0;
  font-weight: 600;
  border-radius: 8px;
  backdrop-filter: blur(6px);
}
.home .cover .cat {
  background: rgba(255, 255, 255, .9);
  color: #0b1a14;
  font-weight: 600;
}
/* 没截图的产品：按位置换一套深色渐变，整排看过去不呆板 */
.home .product-card:nth-child(4n+2) .cover-empty {
  background: linear-gradient(140deg, #0d1a2b 0%, #123a52 58%, #0f5a5f 100%);
}
.home .product-card:nth-child(4n+3) .cover-empty {
  background: linear-gradient(140deg, #16122a 0%, #2a1f4a 58%, #123a52 100%);
}
.home .product-card:nth-child(4n+4) .cover-empty {
  background: linear-gradient(140deg, #1b1409 0%, #3a2a10 56%, #1c3d2b 100%);
}

/* ---------------------------------------------------------------- 三点特性 */
.h-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.h-feature {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--h-line);
  border-radius: 16px;
  padding: 26px 24px;
}
.h-feature::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, .12), transparent 68%);
}
.h-fi {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #05352a;
  background: linear-gradient(135deg, #a7f3d0, #67e8f9);
  box-shadow: 0 10px 22px rgba(16, 185, 129, .18);
  margin-bottom: 16px;
}
.h-feature h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 8px;
}
.h-feature p { font-size: 13.5px; line-height: 1.8; color: var(--h-mut); margin: 0; }

/* ---------------------------------------------------------------- 开源区 */
.h-oss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.h-oss-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  transition: .2s ease;
}
.h-oss-item:hover {
  background: rgba(255, 255, 255, .085);
  border-color: rgba(16, 185, 129, .45);
  transform: translateY(-2px);
}
.h-oss-logo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  color: #04120c;
  background: linear-gradient(135deg, #67e8f9, #a7f3d0);
}
.h-oss-item h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.h-oss-item p { font-size: 12.8px; line-height: 1.7; color: #93a8a0; margin: 4px 0 10px; }
.h-oss-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9fb8ad; }
.h-oss-meta a { color: #6ee7b7; font-weight: 600; }
.h-oss-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, .16);
  border: 1px solid rgba(16, 185, 129, .30);
}
.h-band.dark .btn-ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .20);
  color: #eaf4ef;
}
.h-band.dark .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------------------------------------------------------- 三步 */
.h-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.h-step { position: relative; }
.h-step-no {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #05352a;
  background: linear-gradient(135deg, #a7f3d0, #67e8f9);
  margin-bottom: 14px;
}
.h-step h3 {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.h-step p { font-size: 13.5px; line-height: 1.8; color: var(--h-mut); margin: 0; }
.h-step::after {
  content: "";
  position: absolute;
  left: 52px;
  top: 27px;
  right: -6px;
  height: 1px;
  background: repeating-linear-gradient(90deg, #cfe0d8 0 6px, transparent 6px 12px);
}
.h-step:last-child::after { display: none; }

/* ---------------------------------------------------------------- 收尾 CTA */
.h-cta { padding: 0 0 80px; background: #f4f7f6; }
.h-cta-inner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  padding: 44px 46px;
  border-radius: 22px;
  background: linear-gradient(118deg, #07150f 0%, #0b2a1f 56%, #102a3a 100%);
  color: #e8f5ee;
  box-shadow: 0 30px 62px rgba(6, 24, 18, .32);
}
.h-cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 80% at 86% 18%, rgba(34, 211, 238, .22), transparent 70%),
    radial-gradient(42% 72% at 8% 92%, rgba(16, 185, 129, .20), transparent 72%);
  pointer-events: none;
}
.h-cta-inner > * { position: relative; z-index: 1; }
.h-cta-inner h2 {
  font-family: var(--sans);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -.022em;
  color: #fff;
}
.h-cta-inner p { margin: 8px 0 0; color: #9fb8ad; font-size: 13.5px; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
  .h-hero { padding: 60px 0 100px; }
  .h-grid { grid-template-columns: 1fr; gap: 44px; }
  .h-visual { max-width: 700px; margin: 0 auto; width: 100%; }
  .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-features, .h-steps, .h-oss { grid-template-columns: 1fr; }
  .h-step::after { display: none; }
  .h-float-a { left: 8px; bottom: 14px; }
  .h-float-b { right: 8px; top: 8px; }
}

@media (max-width: 640px) {
  .h-hero { padding: 46px 0 92px; }
  .h-title { font-size: 32px; }
  .h-lead { font-size: 14.5px; }
  .h-btn { padding: 12px 20px; font-size: 13.5px; }
  .h-float { display: none; }
  .h-shot { transform: none; }
  .h-stats { margin-top: -54px; gap: 10px; }
  .h-stat { padding: 15px 16px; }
  .h-stat b { font-size: 22px; }
  .h-band { padding: 52px 0; }
  .h-search input { width: 120px; }
  .h-cta-inner { padding: 30px 24px; }
}
