/* ============================================================
 * emerald 主题 - 首页样式
 * 区块：Hero / 产品服务 / 使用场景 / 云控制台 / 服务保障 / 合作伙伴 / CTA
 * ============================================================ */

/* ============ 渐入动画（JS 进入视口后加 .in） ============ */
/* 仅当 JS 正常加载（index.js 会给 <html> 加 .em-js）才启用入场隐藏，JS 失败时内容默认可见 */
.em-js .em-reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.em-js .em-reveal.in { opacity: 1; transform: none; }

/* ============ 首屏 Hero ============ */
.em-hero { position: relative; background: var(--em-hero-bg); color: #fff; overflow: hidden; }
/* 网格纹理 */
.em-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 48px 48px;
}
/* 顶部主色光晕 */
.em-hero::after {
  content: ""; position: absolute; left: 50%; top: -220px;
  width: 900px; height: 620px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(15, 123, 108, .45), transparent);
  pointer-events: none;
}
.em-hero-inner { position: relative; z-index: 1; text-align: center; padding-top: 160px; }
.em-hero-badge {
  display: inline-flex; padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
  font-size: 13px; color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .05);
}
.em-hero-title { margin-top: 24px; font-size: 48px; font-weight: 600; line-height: 1.3; letter-spacing: 1px; }
.em-hero-desc { margin-top: 20px; font-size: 16px; line-height: 1.9; color: rgba(255, 255, 255, .65); }
.em-hero-actions { margin-top: 36px; display: flex; justify-content: center; gap: 16px; }
/* 底部数据带 */
.em-hero-stats { margin-top: 96px; display: flex; border-top: 1px solid rgba(255, 255, 255, .1); }
.em-stat { flex: 1; padding: 36px 0 40px; }
.em-stat + .em-stat { border-left: 1px solid rgba(255, 255, 255, .1); }
.em-stat-num { font-size: 36px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.em-stat-num .unit { margin-left: 2px; font-size: 16px; font-weight: 400; color: rgba(255, 255, 255, .7); }
.em-stat-label { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .55); }

/* ============ 通用区块头 ============ */
.em-section { padding: 96px 0; }
.em-section-gray { background: var(--em-bg); }
.em-section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.em-eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 4px 12px;
  font-size: 13px; color: var(--em-primary);
  background: var(--em-primary-bg); border-radius: 999px;
}
.em-section-title { font-size: 32px; font-weight: 600; line-height: 1.35; }
.em-section-desc { margin-top: 12px; font-size: 15px; color: var(--em-ink-2); }

/* ============ 产品服务 ============ */
.em-product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.em-product-card {
  display: flex; flex-direction: column;
  padding: 26px 24px 22px;
  background: var(--em-card); border: 1px solid var(--em-line); border-radius: var(--em-radius);
  transition: opacity .6s, transform .25s, box-shadow .25s, border-color .25s;
}
.em-product-card:hover { transform: translateY(-4px); box-shadow: var(--em-shadow-hover); border-color: rgba(15, 123, 108, .35); }
.em-product-icon {
  width: 40px; height: 40px; border-radius: var(--em-radius);
  background: var(--em-primary-bg); color: var(--em-primary);
  display: flex; align-items: center; justify-content: center;
}
.em-product-icon svg { width: 22px; height: 22px; }
.em-product-title { margin-top: 16px; font-size: 16px; font-weight: 600; }
.em-product-desc { flex: 1; margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--em-ink-2); }
.em-product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.em-product-tags span {
  padding: 2px 8px; font-size: 12px; color: var(--em-ink-2);
  background: var(--em-bg); border: 1px solid var(--em-line); border-radius: 3px;
}
/* 购买按钮区：无价格，按钮占满整行 */
.em-product-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--em-line); }
/* 起售价：默认隐藏，JS 拉到价格后加 .has-price 显示 */
.em-product-price { display: none; margin-bottom: 12px; }
.em-product-price.has-price { display: block; }
.em-product-price .num { font-size: 22px; font-weight: 700; color: var(--em-primary); }
.em-product-price .cycle { margin-left: 2px; font-size: 12px; color: var(--em-ink-3); }

/* ============ 使用场景 ============ */
.em-scenario-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.em-scenario-card {
  padding: 28px;
  background: #fff; border: 1px solid var(--em-line); border-radius: var(--em-radius);
  transition: opacity .6s, transform .25s, box-shadow .25s, border-color .25s;
}
.em-scenario-card:hover { transform: translateY(-4px); box-shadow: var(--em-shadow-hover); border-color: rgba(15, 123, 108, .35); }
.em-scenario-icon { color: var(--em-primary); }
.em-scenario-icon svg { width: 26px; height: 26px; }
.em-scenario-title { margin-top: 16px; font-size: 16px; font-weight: 600; }
.em-scenario-desc { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--em-ink-2); }

/* ============ 云控制台展示 ============ */
.em-showcase { display: flex; align-items: center; gap: 72px; }
.em-showcase-text { flex: 0 0 380px; }
.em-showcase-text .em-section-title { font-size: 30px; }
.em-showcase-list { margin: 24px 0 32px; }
.em-showcase-list li { position: relative; padding-left: 26px; font-size: 14px; line-height: 2.4; color: var(--em-ink-2); }
.em-showcase-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F7B6C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6L9 17l-5-5'/></svg>") no-repeat center / contain;
}
/* 纯 CSS 控制台界面 */
.em-console {
  flex: 1; background: #fff;
  border: 1px solid var(--em-line); border-radius: var(--em-radius);
  box-shadow: var(--em-shadow-hover); overflow: hidden;
  transition: opacity .6s, transform .25s;
}
.em-console-topbar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--em-line); }
.em-console-topbar i { width: 9px; height: 9px; border-radius: 50%; background: var(--em-line); }
.em-console-url { margin-left: 10px; padding: 3px 10px; font-size: 11px; color: var(--em-ink-3); background: var(--em-bg); border-radius: 3px; }
.em-console-body { display: flex; height: 340px; }
.em-console-side { width: 120px; flex-shrink: 0; background: var(--em-primary-deep); padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.em-console-side-logo { width: 56px; height: 12px; margin-bottom: 8px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.em-console-side-item { height: 8px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.em-console-side-item.active { background: var(--em-primary); }
.em-console-main { flex: 1; background: var(--em-bg); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.em-console-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.em-console-card { background: #fff; border: 1px solid var(--em-line); border-radius: 3px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.em-console-card .l1 { width: 60%; height: 7px; border-radius: 3px; background: var(--em-line); }
.em-console-card .l2 { width: 40%; height: 11px; border-radius: 3px; background: var(--em-primary); opacity: .85; }
.em-console-chart { flex: 1; background: #fff; border: 1px solid var(--em-line); border-radius: 3px; padding: 14px 16px; display: flex; align-items: flex-end; gap: 8px; }
.em-console-chart i {
  flex: 1; height: var(--h); border-radius: 2px 2px 0 0;
  background: linear-gradient(to top, var(--em-primary), #3AA393);
  transform-origin: bottom; transition: transform .6s ease;
}
/* 柱状图初始收起同样挂 .em-js，JS 失败时柱子保持完整高度 */
.em-js .em-console-chart i { transform: scaleY(0); }
.em-js .em-console.in .em-console-chart i { transform: scaleY(1); }
.em-console-table { background: #fff; border: 1px solid var(--em-line); border-radius: 3px; padding: 10px 12px; display: flex; flex-direction: column; gap: 9px; }
.em-console-row { height: 8px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--em-line) 0 18%, transparent 18% 20%); }

/* ============ 服务保障 ============ */
.em-guarantee { padding: 56px 0; background: var(--em-bg); border-top: 1px solid var(--em-line); border-bottom: 1px solid var(--em-line); }
.em-guarantee-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.em-guarantee-item { display: flex; align-items: flex-start; gap: 14px; }
.em-guarantee-icon { flex-shrink: 0; color: var(--em-primary); }
.em-guarantee-icon svg { width: 28px; height: 28px; }
.em-guarantee-text h4 { font-size: 15px; font-weight: 600; }
.em-guarantee-text p { margin-top: 4px; font-size: 13px; color: var(--em-ink-2); }

/* ============ 合作伙伴 ============ */
.em-partner-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.em-partner-item {
  height: 88px; padding: 16px;
  background: #fff; border: 1px solid var(--em-line); border-radius: var(--em-radius);
  display: flex; align-items: center; justify-content: center;
}
.em-partner-item img { max-height: 40px; filter: grayscale(100%); opacity: .7; transition: filter .25s, opacity .25s; }
.em-partner-item:hover img { filter: none; opacity: 1; }

/* ============ 页脚前 CTA ============ */
.em-cta { background: var(--em-primary-deep); padding: 80px 0; }
.em-cta-inner { text-align: center; }
.em-cta-title { font-size: 30px; font-weight: 600; color: #fff; }
.em-cta-desc { margin-top: 12px; font-size: 15px; color: rgba(255, 255, 255, .65); }
.em-cta .em-btn { margin-top: 32px; }

/* ============ 响应式 ============ */
@media (max-width: 992px) {
  .em-hero-title { font-size: 34px; }
  .em-hero-inner { padding-top: 120px; }
  .em-hero-stats { flex-wrap: wrap; margin-top: 64px; }
  .em-stat { flex: 0 0 50%; padding: 24px 0; }
  .em-stat:nth-child(3) { border-left: none; }
  .em-product-grid { grid-template-columns: repeat(2, 1fr); }
  .em-guarantee-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .em-showcase { flex-direction: column; gap: 40px; }
  .em-showcase-text { flex: none; width: 100%; }
  .em-console { width: 100%; }
  .em-partner-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .em-section { padding: 64px 0; }
  .em-hero-title { font-size: 28px; }
  .em-hero-actions { flex-direction: column; align-items: center; }
  .em-product-grid, .em-scenario-grid, .em-guarantee-grid { grid-template-columns: 1fr; }
  .em-partner-grid { grid-template-columns: repeat(2, 1fr); }
}
