/* ============================================================================
   首页 v5 · 全新设计（仅在 index.html 加载，位于 site.css 之后）

   定位：面向企业客户的 AI 交付团队。视觉目标是"精密、可信、有工程感"，
        不再是单屏留白式的一页纸。
   依据：CRO 首页框架（5 秒读懂定位 / 主 CTA 不滚动可见 / 信任要素贴近 CTA /
        信息密度与留白平衡）＋ 设计系统规则（8px 间距节奏、对比度 ≥4.5:1、
        统一缓动令牌、reduced-motion 降级、焦点态可见）。
   结构：首屏主张 → 三大业务 → 交付流程 + 在线案例 → 合作方式 + CTA → 全站页脚
   ========================================================================== */

body.page-home {
  /* 深色令牌（同时供页头/页脚/按钮等全站组件复用） */
  --bg: #05070d;
  --surface: #0b1220;
  --surface-2: #0e1626;
  --card: #0b1220;
  --heading: #eef4ff;
  --text: #c2d0e2;
  --muted: #93a7c0;
  --muted-2: #7b8ea6;
  --border: rgba(148, 197, 255, .14);
  --border-strong: rgba(148, 197, 255, .26);
  --ring: #7dd3fc;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(59, 130, 246, .16);
  --accent-ink: #8ec2ff;
  --brand-1: #3b82f6;
  --brand-2: #22d3ee;
  --cta-bg: #22d3ee;
  --cta-ink: #04121a;
  --radius-lg: 20px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 26px 60px -32px rgba(0, 0, 0, .95);

  --h-ink: #eef4ff;
  --h-ink-2: #b9c9dd;
  --h-ink-3: #8ea2bb;
  --h-line: rgba(148, 197, 255, .14);
  --h-line-2: rgba(148, 197, 255, .24);
  --h-cyan: #22d3ee;
  --h-blue: #3b82f6;
  --h-glass: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  --h-radius: 20px;
  --h-radius-sm: 14px;
  --h-ease: cubic-bezier(.22, 1, .36, 1);
  /* 8px 节奏 */
  --h-1: 8px; --h-2: 16px; --h-3: 24px; --h-4: 32px; --h-6: 48px; --h-8: 64px;

  display: block;
  height: auto;
  min-height: 100%;
  overflow: visible;
  color-scheme: dark;
  background-color: var(--bg);
  color: var(--h-ink-2);
}

/* 首页主区回到常规文档流：内容自然撑高、整页可滚动（不再是旧的单屏 100vh 布局） */
body.page-home main { display: block; }

/* ---------- 背景：基色渐变 + 细网格 + 噪点（下），极光 + 暗角（上） ---------- */
body.page-home::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-color: #05070d;
  /* 图层顺序（上→下）：噪点 · 极光 · 网格 · 压暗层 · 底纹照片 · 底色 */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"),
    radial-gradient(1200px 700px at 50% -20%, rgba(37, 99, 235, .24), transparent 70%),
    radial-gradient(900px 600px at 90% 10%, rgba(34, 211, 238, .12), transparent 72%),
    repeating-linear-gradient(0deg, rgba(148, 197, 255, .045) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(90deg, rgba(148, 197, 255, .045) 0 1px, transparent 1px 88px),
    linear-gradient(180deg, rgba(5, 7, 13, .90) 0%, rgba(5, 7, 13, .94) 55%, rgba(5, 7, 13, .97) 100%),
    url("/assets/img/background.jpg"),
    linear-gradient(180deg, #06090f 0%, #05070d 100%);
  background-size: 160px 160px, auto, auto, auto, auto, auto, cover, auto;
  background-position: center, center, center, center, center, center, center, center;
  background-repeat: repeat, no-repeat, no-repeat, repeat, repeat, no-repeat, no-repeat, no-repeat;
}
body.page-home::after {
  content: "";
  position: fixed; inset: -8vmax; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(48vmax 30vmax at 12% 4%, rgba(59, 130, 246, .20), transparent 62%),
    radial-gradient(42vmax 26vmax at 92% 0%, rgba(34, 211, 238, .13), transparent 60%),
    radial-gradient(52vmax 34vmax at 60% 108%, rgba(37, 99, 235, .16), transparent 64%);
  filter: blur(6px);
  animation: h-aurora 36s ease-in-out infinite alternate;
}
@keyframes h-aurora {
  from { transform: translate3d(-.6%, -.4%, 0) scale(1.02); }
  to { transform: translate3d(1%, .8%, 0) scale(1.06); }
}

/* ---------- 页头：半透明吸顶 + 毛玻璃 ---------- */
.page-home .site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(5, 7, 13, .72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--h-line);
}

/* ---------- 通用：章节、标题组、按钮 ---------- */
.home-shell { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.home-section { padding: clamp(48px, 8vh, 104px) 0; position: relative; }
.home-section + .home-section { border-top: 1px solid var(--h-line); }
.home-section--panel { background: linear-gradient(180deg, rgba(148, 197, 255, .035), rgba(148, 197, 255, 0) 40%); }

.home-head { max-width: 780px; margin-bottom: clamp(26px, 4vh, 46px); }
.home-eyebrow {
  display: inline-flex; align-items: center; gap: var(--h-1);
  margin: 0 0 var(--h-2);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: #8fd8f5;
}
.home-eyebrow::before { content: ""; width: 18px; height: 1px; background: linear-gradient(90deg, var(--h-cyan), transparent); }
.home-head h2 { margin: 0 0 10px; font-size: clamp(24px, 2.5vw, 36px); line-height: 1.2; letter-spacing: -.015em; color: var(--h-ink); }
.home-head p { margin: 0; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.7; color: var(--h-ink-3); max-width: 60ch; }

.page-home .btn { display: inline-flex; align-items: center; justify-content: center; }
/* 首页桌面端保留导航里的「联系我们」按钮（内页默认隐藏该按钮，只留右侧「业务咨询」）：
   这条把显示状态写明确，避免依赖 .page-home .btn 与 .nav .nav-cta 的先后顺序 */
.page-home .nav .nav-cta { display: inline-flex; }
.page-home .btn-lg { min-height: 52px; padding: 0 28px; font-size: 15.5px; border-radius: 999px; }
.page-home .btn-primary {
  background: linear-gradient(180deg, #67e8f9, #22d3ee); color: var(--cta-ink);
  border: 0; font-weight: 700;
  box-shadow: 0 14px 34px -14px rgba(34, 211, 238, .7);
  transition: transform .26s var(--h-ease), box-shadow .26s ease, filter .26s ease;
}
.page-home .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 20px 44px -16px rgba(34, 211, 238, .78); }
.home-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: #d3e6fa; font-size: 14.5px; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid transparent; transition: color .24s ease, border-color .24s ease;
}
.home-link span { transition: transform .26s var(--h-ease); }
.home-link:hover { color: #7dd3fc; border-color: rgba(125, 211, 252, .5); }
.home-link:hover span { transform: translateX(4px); }

/* ---------- 1. 首屏 ---------- */
.home-hero { padding: clamp(36px, 7vh, 92px) 0 clamp(28px, 5vh, 72px); }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(300px, .98fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.home-hero-copy { min-width: 0; }

.home-chip {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 var(--h-3);
  padding: 6px 14px 6px 11px; border-radius: 999px;
  border: 1px solid var(--h-line-2); background: var(--h-glass);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .16em;
  color: #a8dcf7; white-space: nowrap;
}
.home-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--h-cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .16); animation: h-pulse 2.8s ease-in-out infinite; }
@keyframes h-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(34, 211, 238, .16); } 50% { box-shadow: 0 0 0 7px rgba(34, 211, 238, .05); } }

.home-title {
  margin: 0 0 var(--h-2);
  font-size: clamp(30px, 4.2vw, 56px);
  line-height: 1.1; letter-spacing: -.025em; font-weight: 800; color: var(--h-ink);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .home-title {
    background-image: linear-gradient(94deg, #ffffff 0%, #eaf4ff 44%, #8fd8ff 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
}
.home-lead { margin: 0 0 var(--h-4); font-size: clamp(15px, 1.2vw, 17.5px); line-height: 1.78; color: var(--h-ink-2); max-width: 44ch; }

.home-cta-row { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); flex-wrap: wrap; }
.home-stats { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.6vw, 40px); margin: var(--h-4) 0 0; padding: var(--h-3) 0 0; list-style: none; border-top: 1px solid var(--h-line); }
.home-stats li { display: flex; flex-direction: column; gap: 2px; }
.home-stats b { font-family: var(--font-mono); font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; color: var(--h-ink); letter-spacing: -.01em; }
.home-stats span { font-size: 12.5px; color: var(--h-ink-3); }

/* 首屏视觉：一块"运行面板"，把 index.png 放进有工程感的容器里 */
.home-visual { position: relative; }
.home-visual::before {
  content: ""; position: absolute; inset: 8% 6% -14% 6%; z-index: -1;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .22), transparent 72%);
  filter: blur(28px);
}
.home-console {
  border: 1px solid var(--h-line-2); border-radius: var(--h-radius);
  background: linear-gradient(180deg, rgba(12, 20, 34, .9), rgba(8, 13, 24, .92));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 40px 80px -46px rgba(0, 0, 0, 1);
  overflow: hidden;
}
.home-console-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--h-line); }
.home-console-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(148, 197, 255, .28); }
.home-console-bar span:first-child { background: rgba(34, 211, 238, .6); }
.home-console-bar em { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; font-style: normal; letter-spacing: .16em; color: var(--h-ink-3); }
.home-console-screen { padding: 14px; }
.home-console-screen img { display: block; width: 100%; height: auto; border-radius: var(--h-radius-sm); border: 1px solid var(--h-line); }
.home-console-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 14px 16px; }
.home-console-chips span {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--h-line);
  background: rgba(148, 197, 255, .05);
  font-size: 12.5px; font-weight: 600; color: #cfe2f6; text-align: center; white-space: nowrap;
}

/* ---------- 2. 三大业务 ---------- */
.home-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 24px); }
.pillar {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  border: 1px solid var(--h-line); border-radius: var(--h-radius);
  background: var(--h-glass);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 54px -34px rgba(0, 0, 0, .95);
  transition: transform .3s var(--h-ease), border-color .3s ease, box-shadow .3s ease;
}
.pillar:hover, .pillar:focus-visible { transform: translateY(-4px); border-color: var(--h-line-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .07) inset, 0 34px 64px -34px rgba(0, 0, 0, 1), 0 0 0 1px rgba(34, 211, 238, .18); }
.pillar-media { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #0f172a, #0c4a6e); }
.pillar-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--h-ease); }
.pillar:hover .pillar-media img { transform: scale(1.05); }
.pillar-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 7, 13, .1) 0%, rgba(5, 7, 13, .78) 100%); }
.pillar-index {
  position: absolute; left: 14px; bottom: 12px; z-index: 1; margin: 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; color: #bde9ff;
}
.pillar-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; }
.pillar-body h3 { margin: 0; font-size: 19px; letter-spacing: -.01em; color: var(--h-ink); }
.pillar-desc { margin: 0; font-size: 13.5px; color: var(--h-ink-3); }
.pillar-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pillar-tags li { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--h-line); background: rgba(148, 197, 255, .05); font-size: 11.5px; color: #b6cbe0; }
.pillar-more { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: #8ed7f7; }
.pillar-more span { transition: transform .26s var(--h-ease); }
.pillar:hover .pillar-more span { transform: translateX(4px); }

/* ---------- 3. 交付流程 + 在线案例 ---------- */
.home-flow-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); margin: 0; padding: 0; list-style: none; counter-reset: flow; }
.flow li {
  position: relative; padding: 20px 20px 22px; border-radius: var(--h-radius-sm);
  border: 1px solid var(--h-line); background: var(--h-glass);
}
.flow li::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, rgba(34, 211, 238, .5), transparent 70%); opacity: .7; }
.flow-num { display: block; margin-bottom: 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; color: #7dd3fc; }
.flow h3 { margin: 0 0 6px; font-size: 16.5px; color: var(--h-ink); }
.flow p { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--h-ink-3); }

.home-case {
  padding: 22px; border-radius: var(--h-radius); border: 1px solid var(--h-line-2);
  background: linear-gradient(180deg, rgba(12, 20, 34, .86), rgba(8, 13, 24, .9));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 30px 60px -40px rgba(0, 0, 0, 1);
}
.home-case .home-eyebrow { margin-bottom: 14px; }
.case-list { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.case-list li { display: flex; align-items: baseline; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--h-line); font-size: 14px; color: #dbe8f7; }
.case-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.case-list b { font-family: var(--font-mono); font-size: 12px; color: #7dd3fc; }
.case-note { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--h-ink-3); }

/* ---------- 4. 合作方式 + CTA ---------- */
.home-why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 24px); }
.why-card { padding: 22px; border-radius: var(--h-radius-sm); border: 1px solid var(--h-line); background: var(--h-glass); }
.why-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--h-ink); }
.why-card p { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--h-ink-3); }

.home-cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--h-3);
  margin-top: clamp(32px, 5vh, 64px); padding: clamp(24px, 3vw, 40px);
  border-radius: var(--h-radius); border: 1px solid var(--h-line-2);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(34, 211, 238, .16), transparent 55%),
    linear-gradient(180deg, rgba(12, 20, 34, .9), rgba(8, 13, 24, .92));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 40px 80px -50px rgba(0, 0, 0, 1);
}
.home-cta-band h2 { margin: 0 0 8px; font-size: clamp(20px, 1.9vw, 26px); color: var(--h-ink); }
.home-cta-band p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--h-ink-3); max-width: 52ch; }

/* ---------- 页脚：沿用全站组件，只补深色下的细节 ---------- */
.page-home .site-footer { border-top: 1px solid var(--h-line); background: rgba(5, 7, 13, .7); }
.page-home .site-footer h2 { color: var(--h-ink); }
.page-home .site-footer a { color: var(--h-ink-3); }
.page-home .site-footer a:hover { color: #7dd3fc; }

/* ---------- 入场动效（滚动触发由 main.js 的 .is-visible 驱动） ---------- */
.page-home [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--h-ease), transform .7s var(--h-ease); }
.page-home [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 焦点与选区 ---------- */
.page-home :focus-visible { outline: 2px solid rgba(125, 211, 252, .8); outline-offset: 3px; border-radius: 6px; }
.page-home ::selection { background: rgba(34, 211, 238, .3); color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: var(--h-4); }
  .home-visual { order: 2; }
  .home-flow-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .home-pillars { grid-template-columns: 1fr; }
  .home-why { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .home-title { font-size: clamp(26px, 8.4vw, 34px); }
  .home-stats { gap: var(--h-2); }
  .home-console-chips { grid-template-columns: 1fr; }
  .home-cta-band { flex-direction: column; align-items: flex-start; }
  /* 眉标是等宽长串，窄屏必须收紧字距与字号，否则会把内容列撑宽导致横向滚动 */
  .home-chip { padding: 5px 11px 5px 9px; font-size: 9.5px; letter-spacing: .07em; gap: 7px; }
  .home-chip-dot { width: 6px; height: 6px; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  body.page-home::after { animation: none; }
  .home-chip-dot { animation: none; }
  .page-home [data-reveal] { opacity: 1; transform: none; transition: none; }
  .pillar-media img, .pillar, .page-home .btn-primary { transition: none; }
}
