/* ==========================================================================
   首页专属样式 · home.css
   仅 index.html 引入。
   公共组件（wrap / card / grid / bento / news-row / faq / cta）继续复用 theme.css，
   本文件只承载首页特有的组合与 Hero 视觉母题，避免污染其它模板。
   ========================================================================== */

/* ---------------------------------------------------------------- Hero ---- */
/* 布局参照三卡错位视觉：左文案（徽章/标题/标签组/双按钮）+ 右侧两图表卡一数字卡，
   数据带以白色大卡下沉叠压到下一节顶部。注意：不用 overflow:hidden，否则会裁掉下沉的数据带。 */
.hp-hero {
  position: relative;
  padding: 104px 0 0;
  background: var(--bg);
}
/* 双层背景：柔和色晕 + 细网格纹理（同 --brand 色系，不用中性灰） */
.hp-hero::before,
.hp-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
}
.hp-hero::before {
  background:
    radial-gradient(820px 460px at 78% -12%, rgba(37, 99, 235, 0.15), transparent 62%),
    radial-gradient(700px 420px at 0% 8%, rgba(6, 182, 212, 0.09), transparent 58%),
    linear-gradient(180deg, #eef4ff 0%, var(--bg) 58%);
}
.hp-hero::after {
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(110% 80% at 50% 0%, #000 10%, transparent 80%);
  mask-image: radial-gradient(110% 80% at 50% 0%, #000 10%, transparent 80%);
}

.hp-hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 72px; align-items: center;
}

/* 文本区：徽章 → H1 → lead → 标签组 → 双按钮 */
.hp-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 7px; margin-bottom: 26px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.03em; color: var(--t-muted);
  background: #fff; border: 1px solid var(--brand-line);
  border-radius: var(--r-pill); box-shadow: var(--sh-sm);
}
/* 徽标块：经验年限，品牌渐变底白字 */
.hp-eyebrow b {
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: #fff;
  background: var(--grad-primary);
}
@keyframes hp-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
  50%      { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.04); }
}

.hp-title {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.16; letter-spacing: -0.035em; color: var(--t-strong);
}
.hp-title em {
  font-style: normal;
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hp-lead { margin-top: 22px; max-width: 34em; font-size: 16.5px; line-height: 1.95; color: var(--t-muted); }

/* 业务标签胶囊组：快速传达服务范围 */
.hp-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hp-tags a {
  padding: 8px 16px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; color: var(--t-muted);
  background: #fff; border: 1px solid var(--line-strong);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.hp-tags a:hover {
  color: var(--brand-ink); border-color: var(--brand);
  background: var(--brand-soft); transform: translateY(-1px);
}

.hp-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hp-actions .btn-ghost { background: #fff; color: var(--t-strong); border-color: var(--line-strong); }
.hp-actions .btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); transform: translateY(-2px); }

/* --------------------- Hero 视觉：三张错位浮动卡（两图表 + 一数字） ------- */
/* min-height 为不支持 aspect-ratio 的老设备兜底（现代浏览器由 aspect-ratio 主导） */
.hp-stage { position: relative; aspect-ratio: 1.04; min-height: 440px; }
.hp-stage > .hp-stage-glow {
  position: absolute; inset: -12% -8% -14%; z-index: 0;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.18), transparent 70%);
  filter: blur(6px);
}

/* 图表卡：玻璃质感白卡 + 窗口三点 + CSS 柱状图 */
.hp-win {
  position: absolute; z-index: 1;
  padding: 15px 18px 13px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid #fff;
  box-shadow: 0 18px 50px -18px rgba(11, 23, 51, 0.28), var(--sh-lg);
  animation: hp-float 6s var(--ease) infinite;
}
.hp-win--app   { top: 0; left: 0; width: 57%; }
.hp-win--trend { bottom: 2%; left: 16%; width: 57%; animation-delay: -3s; }

.hp-win-head { display: flex; align-items: center; gap: 5px; }
.hp-win-head i { width: 7px; height: 7px; border-radius: 50%; }
.hp-win-head i:nth-child(1) { background: #fca5a5; }
.hp-win-head i:nth-child(2) { background: #fcd34d; }
.hp-win-head i:nth-child(3) { background: #6ee7b7; }
.hp-win-head b { margin-left: 7px; font-size: 12.5px; font-weight: 600; color: var(--t-muted); }

.hp-bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; margin-top: 14px; }
.hp-bars i {
  flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  opacity: 0.42;
  /* 数据动效：入场逐根生长 + 相位错开的波浪起伏（合成层 transform，性能友好）。
     --i 由 nth-child 注入，HTML 保持零改动。 */
  transform-origin: bottom;
  animation:
    hp-bar-grow 0.8s var(--ease) backwards,
    hp-bar-wave 3.4s ease-in-out infinite;
  animation-delay:
    calc(var(--i, 0) * 80ms),
    calc(0.9s + var(--i, 0) * -420ms);
}
/* 波浪相位：相邻柱错开 ~420ms，形成数据起伏的推进感 */
.hp-bars i:nth-child(2) { --i: 1; }
.hp-bars i:nth-child(3) { --i: 2; }
.hp-bars i:nth-child(4) { --i: 3; }
.hp-bars i:nth-child(5) { --i: 4; }
.hp-bars i:nth-child(6) { --i: 5; }
.hp-bars i:nth-child(7) { --i: 6; }
.hp-bars i:nth-child(8) { --i: 7; }
@keyframes hp-bar-grow { from { transform: scaleY(0); } }
@keyframes hp-bar-wave {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.8); }
}
.hp-bars i:nth-child(3n) { opacity: 0.68; }
.hp-bars i:last-child {
  opacity: 1;
  background: linear-gradient(180deg, #93c5fd, #1d4ed8);
  box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.55);
}
.hp-bars--tall { height: 82px; margin-top: 13px; }
.hp-win-cap { margin-top: 10px; font-size: 11px; color: var(--t-faint); }

/* 数字卡：大数字 + 标签 + 一行说明 */
.hp-numcard {
  position: absolute; top: 15%; right: 0; z-index: 2;
  width: 38%; padding: 20px 20px 17px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 22px 55px -20px rgba(11, 23, 51, 0.32);
  animation: hp-float 6s var(--ease) infinite;
  animation-delay: -1.8s;
}
.hp-numcard b {
  display: flex; align-items: baseline; gap: 1px;
  font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hp-numcard b span { font-size: 0.62em; }
.hp-numcard-label { display: block; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--t-body); }
.hp-numcard p { margin-top: 10px; font-size: 11.5px; line-height: 1.7; color: var(--t-faint); }

@keyframes hp-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ------------------ 数据带：白色大卡四项，下沉叠压到下一节顶部 ------------ */
.hp-stats-band {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 72px; margin-bottom: -68px;
  padding: 32px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -24px rgba(11, 23, 51, 0.3);
}
.hp-stat { padding: 4px 26px; text-align: center; }
.hp-stat + .hp-stat { border-left: 1px solid var(--line); }
.hp-stat-num {
  display: flex; justify-content: center; align-items: baseline; gap: 2px;
  font-size: clamp(28px, 2.8vw, 38px); font-weight: 800; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -0.035em;
  background: var(--grad-title);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hp-stat-num .unit { font-size: 0.62em; font-weight: 700; }
.hp-stat-label { margin-top: 7px; font-size: 14px; font-weight: 600; color: var(--t-body); }

/* ---------------------------- 统一区块节奏 ---------------------------- */
/* 相邻 section 视觉间距统一 96px（原 104+104=208px 过大，各断点 72/56）。
   渐变背景块（.section--surface）需自身内呼吸：上一节留 96 空白后背景顶边再向内收。 */
.section { padding-top: 0; padding-bottom: 96px; }
.section--surface { padding-top: 48px; }
/* hero 数据带下沉 68/56/48px 占用了 #services 顶部，需补偿至统一视觉间距 */
#services { padding-top: 164px; }
@media (max-width: 1080px) { #services { padding-top: 152px; } }
@media (max-width: 992px) {
  .section { padding-top: 0; padding-bottom: 72px; }
  .section--surface { padding-top: 40px; }
  #services { padding-top: 128px; }
}
@media (max-width: 768px) {
  .section { padding-top: 0; padding-bottom: 56px; }
  .section--surface { padding-top: 32px; }
  #services { padding-top: 104px; }
}

/* ------------------------------------------------------------ 核心服务 ---- */
.hp-svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.hp-svc-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px 26px 24px; border-radius: var(--r);
  background: #fff; border: 1px solid var(--line);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* hover 时顶部渐变细线自中心向两侧展开 */
.hp-svc-card::after {
  content: ""; position: absolute; top: 0; left: 50%; height: 3px; width: 0;
  background: var(--grad-accent); transform: translateX(-50%);
  transition: width 0.42s var(--ease-out);
}
.hp-svc-card:hover { transform: translateY(-5px); border-color: var(--brand-line); box-shadow: var(--sh-lg); }
.hp-svc-card:hover::after { width: 100%; }

.hp-svc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hp-svc-no {
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums; color: var(--brand-line);
  transition: color var(--dur) var(--ease);
}
.hp-svc-card:hover .hp-svc-no { color: var(--brand); }
.hp-svc-card .svc-icon { margin-bottom: 0; transition: transform var(--dur) var(--ease); }
.hp-svc-card:hover .svc-icon { transform: translateY(-2px) scale(1.04); }
.hp-svc-card .svc-title { font-size: 19px; }
/* 单段描述：取代原来的 svc-desc + svc-detail 两段重复文案 */
.hp-svc-card .svc-detail { margin-top: -4px; font-size: 14.5px; line-height: 1.85; color: var(--t-muted); }
.hp-svc-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }

/* --------------------------------------------------- 精选案例（动态） ---- */
/* 结构：缩略图 → 分类 pill → 两行标题 → 三行摘要 → 日期/阅读量 meta（对照参考图） */
.hp-works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.hp-works .work-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg);
  background: #fff; border: 1px solid var(--line);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.hp-works .work-card:hover {
  transform: translateY(-4px); border-color: var(--brand-line);
  box-shadow: var(--sh-lg);
}
/* 缩略图：链接容器块级化，图片撑满比例框；淡入沿用全局契约 .js .thumb img → .is-loaded */
.hp-works .work-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--grad-soft); }
.hp-works .work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.hp-works .work-card:hover .work-thumb img { transform: scale(1.045); }
.hp-works .work-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 18px 20px 16px; }
.hp-works .work-cat {
  align-self: flex-start;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--brand); background: var(--brand-soft);
}
.hp-works .work-title { margin: 0; font-size: 16.5px; line-height: 1.55; font-weight: 700; }
.hp-works .work-title a {
  color: var(--t-strong); transition: color var(--dur) var(--ease);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hp-works .work-title a:hover { color: var(--brand); }
.hp-works .work-desc {
  margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--t-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* meta 行吸底：卡片高度不一致时日期/阅读量始终对齐到卡片底部 */
.hp-works .work-meta {
  margin-top: auto; padding-top: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--t-faint); font-variant-numeric: tabular-nums;
}
/* 无图占位（.work-thumb-ph 的网格纹理与图标见 theme.css 公共定义） */

/* -------------------------------------------------- 资讯：无图占位 ---- */
.news-row .thumb .news-thumb-ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background-image: var(--grad-soft);
}
.news-row .thumb .news-thumb-ph .ico { width: 26px; height: 26px; color: var(--brand-700); opacity: 0.45; stroke-width: 1.3; }

/* ---------------------------------------------------------- FAQ 两栏 ---- */
.hp-faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.hp-faq-side { position: sticky; top: calc(var(--hdr-h) + 32px); }
.hp-faq-side .sec-sub { margin-top: 16px; font-size: 15.5px; line-height: 1.85; color: var(--t-muted); }
.hp-faq-ask {
  margin-top: 24px; padding: 20px 22px; border-radius: var(--r);
  background: var(--grad-soft); border: 1px solid var(--brand-line);
}
.hp-faq-ask p { font-size: 14.5px; line-height: 1.8; color: var(--t-body); }
.hp-faq-ask .btn { margin-top: 14px; }

/* ----------------------------------------------------------- 无障碍 ---- */
@media (prefers-reduced-motion: reduce) {
  .hp-win, .hp-numcard, .hp-bars i { animation: none; }
}

/* ----------------------------------------------------------- 响应式 ---- */
@media (max-width: 1080px) {
  .hp-hero-inner { grid-template-columns: 1fr; gap: 48px; }
  /* width:100% 必须：stage 内全是绝对定位元素，auto margin 会让 fit-content 塌为 0 宽 */
  .hp-stage { width: 100%; max-width: 520px; margin-inline: auto; }
  /* 数据带 4 列转 2×2，分隔线随行列重排 */
  .hp-stats-band { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; margin-bottom: -56px; }
  .hp-stat + .hp-stat { border-left: 0; }
  .hp-stat:nth-child(even) { border-left: 1px solid var(--line); }
  .hp-stat:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 18px; }
  .hp-svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-faq { grid-template-columns: 1fr; gap: 36px; }
  .hp-faq-side { position: static; }
}
/* 手机端：文案居中 + 三卡重叠堆叠（对照移动端参考图），HTML 零改动 */
@media (max-width: 768px) {
  .hp-hero { padding: 64px 0 0; }
  .hp-hero-copy { text-align: center; }
  .hp-title { font-size: clamp(28px, 7.6vw, 38px); }
  .hp-lead { margin-inline: auto; }
  .hp-tags { justify-content: center; gap: 8px; }
  .hp-tags a { padding: 7px 13px; font-size: 12.5px; }
  /* 双按钮等宽胶囊，并排铺满（收窄内边距防止长文案撑破 basis 换行） */
  .hp-actions { justify-content: center; }
  .hp-actions .btn { flex: 1 1 calc(50% - 7px); min-width: 0; padding-inline: 12px; border-radius: var(--r-pill); white-space: nowrap; }

  /* 视觉区：固定高度三卡重叠（趋势卡叠上看板卡下缘，数字卡右侧错层）
     width:100% 同上——防止 auto margin + 纯绝对定位内容导致宽度塌陷 */
  .hp-stage {
    width: 100%; aspect-ratio: auto; min-height: 0;
    max-width: 400px; height: 296px; margin: 12px auto 0;
  }
  .hp-win--app   { width: 60%; z-index: 1; }
  .hp-numcard    { top: 128px; right: 0; width: 40%; z-index: 2; }
  .hp-win--trend { top: 132px; bottom: auto; left: 5%; width: 54%; z-index: 3; }

  /* 移动端关闭 backdrop-filter（低端机性能开销大），改实色玻璃 */
  .hp-win {
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .hp-win--app .hp-win-head b, .hp-win--trend .hp-win-head b { white-space: nowrap; }

  .hp-stats-band { padding: 24px 10px; margin-bottom: -48px; }
  .hp-svc, .hp-works { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* 图表卡内柱状图与文字同步收敛 */
  .hp-bars { height: 60px; gap: 5px; }
  .hp-bars--tall { height: 52px; }
  .hp-win { padding: 12px 13px 10px; }
  .hp-win-head b { font-size: 11.5px; }
  .hp-win-cap { display: none; }
  .hp-numcard { padding: 13px 13px 11px; }
  .hp-numcard p { display: none; }
  /* 重叠布局的三卡在小屏进一步收紧：趋势卡上移叠上看板卡下缘，且与数字卡留出间隙 */
  .hp-stage { height: 230px; }
  .hp-win--app { width: 62%; }
  .hp-numcard { top: 112px; width: 42%; }
  .hp-win--trend { top: 102px; width: 52%; }
  .hp-stat { padding: 4px 10px; }
  .hp-stat-num { font-size: 26px; }
  .hp-stat-label { font-size: 12.5px; }
}
