/* ==========================================================================
   home-desktop.css — 首页 index.html · 桌面端（≥790px）细节
   --------------------------------------------------------------------------
   加载顺序：styles.css → home.css → home-fullpage.css → home-desktop.css
   作用：
   1. 页头与内页完全一致：同一套 .site-header 结构，放在 1920 设计稿里
      （left 92 / top 30 / width 1728 / height 45），整块随画布按
      clientWidth / 1920 等比缩放，缩放系数由 js/home.js 写入 --home-scale；
   2. 浅色屏（白底板块）把页头文字切成深色，首页首屏保持白色；
   3. 页脚沿用内页 1920 × 669 的 .footer-html 设计稿，按同一比例缩放，
      高度等于缩放后的色带高度，色带直接贴在页面底部；
   4. 790–1279px 平板区间收紧字号与栅格，保证不横向溢出。
   ========================================================================== */

/* ------------------------------------------------------------------ 导航 */
/* 内页（pages/service-products.html 等）把页头放在 1920 宽的设计稿里：
   .design-canvas 按 clientWidth/1920 缩放，页头是其中 left 92 / top 30 /
   width 1728 / height 45 的一行。首页用同一层画布包裹 .site-header，
   缩放方式与内页逐像素一致（缩放系数写入 --home-scale）。 */
.home-header-stage {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 50%;
  width: 1920px;
  height: 130px;
  transform: translateX(-50%) scale(var(--home-scale, 1));
  transform-origin: top center;
  pointer-events: none;
}

/* 首页首屏顶部是深色大图，加一层极淡的压暗衬底保证白字清晰；
   浅色屏隐藏该衬底（内页对应的是深色 banner 图，视觉角色相同）。 */
.home-header-stage::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 130px;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 22%) 0%, rgb(0 0 0 / 0%) 100%);
}

.home-header-stage.is-light::before {
  display: none;
}

.site-header {
  position: absolute;
  top: 30px;
  left: 92px;
  width: 1728px;
  height: 45px;
  pointer-events: auto;
}

/* 首页通用样式给所有元素设了 Microsoft YaHei，内页页头用 Noto Sans SC:Medium，
   这里按内页字体还原，保证首页与内页字形完全一致。 */
.home-header-stage,
.home-header-stage * {
  font-family: "Noto Sans SC:Medium", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* 浅色屏：导航与右侧操作区同步变深（与内页浅色导航图 19256.png 同为深字） */
.home-header-stage.is-light .site-header,
.home-header-stage.is-light .site-header .header-actions {
  color: #464646;
}

.site-header .header-links a:focus-visible,
.site-header .header-actions a:focus-visible,
.site-header .header-actions button:focus-visible {
  outline: 2px solid #f4b53f;
  outline-offset: 4px;
}

/* ------------------------------------------------- 二级下拉菜单（与内页一致） */
/* 结构由 js/script.js 依据 navigationMenus 自动生成，
   样式与 pages/service-products.html 的 .header-links .nav-dropdown 保持一致。
   .nav-item 已由 js/script.js 设为 position: relative，
   下拉菜单以「对应的一级菜单项」为定位基准，水平居中对齐。 */
.site-header .header-links .nav-dropdown {
  top: 45px;
}

/* ------------------------------------------------------------------ 页脚 */
/* 页脚复用内页 .footer-html（1920 × 669 设计稿），外层负责等比缩放。
   缩放公式与内页 .design-canvas 完全一致：scale = min(clientWidth / 1920, 1)，
   因此色带宽度刚好等于内容区宽度、高度为 669 × scale，与内页逐像素一致。
   定位：色带贴着最后一屏的底部，色带上方用同一块 #464646 铺满，
   色带与页面底边的关系与内页（页脚位于页面最底部）完全相同。 */
.home-footer-section {
  position: relative;
  min-height: 100vh;
  background: #464646;
  overflow: hidden;
  justify-content: flex-end;
  align-items: center;
}

/* FullPage 会给每屏套一层 .fp-tableCell，这里让它撑满整屏，
   这样色带才能贴在视口底边。 */
.home-footer-section.fp-table > .fp-tableCell {
  height: 100% !important;
  vertical-align: middle;
}

.home-footer-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #464646;
}

.home-footer-canvas {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1920px;
  height: 669px;
  padding: 0 !important;
  transform-origin: bottom center;
  transform: translateX(-50%) scale(var(--home-footer-scale, 1));
  background: transparent !important;
  text-align: left !important;
}

/* 首页通用样式给所有元素设了 Microsoft YaHei、给 .section 内的 p 设了灰色小字，
   这里逐项还原成内页 .footer-html 的排版，保证两边一模一样。 */
.home-footer-canvas .footer-html,
.home-footer-canvas .footer-html * {
  font-family: "Noto Sans SC:Light", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.home-footer-canvas .footer-html {
  color: #fff;
  font-weight: 300;
}

.home-footer-canvas .footer-contact p {
  font-size: 24px;
  font-weight: 300;
  line-height: 48px;
  color: #fff;
}

.home-footer-canvas .footer-links {
  font-size: 24px;
  font-weight: 300;
  color: #fff;
}

.home-footer-canvas .footer-copyright {
  font-size: 18px;
  font-weight: 300;
  color: #fff;
}

/* ---------------------------------------------------------- 滚动入场动效 */
.home-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .home-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------- 平板适配（790–1279px）
   桌面首页按 1920 设计稿排版，窄一点的桌面/平板上收紧字号与栅格，
   保证 790–1279px 区间不出现横向滚动或文字溢出。 */
@media (min-width: 790px) and (max-width: 1279px) {
  .section {
    height: auto;
    min-height: 100vh;
    padding: 72px 0 48px;
  }

  .s2l .wz .w1,
  .s2l .wz .w2,
  .s3t .s3l .s3lt .t1,
  .s3t .s3l .s3lt .t2,
  .s4t .s4tl .t1,
  .s4t .s4tl .t2,
  .s7 .s7l .t1,
  .s7 .s7l .t2 {
    font-size: 52px;
  }

  .s2 .s2r .sulist .item .t1,
  .s3t .s3l .s3lb .sulist .item .t1,
  #section6 .sulist .item .t1 {
    font-size: 32px;
  }

  .s2 .s2r .sulist .item .t1 sub,
  .s3t .s3l .s3lb .sulist .item .t1 sub,
  #section6 .sulist .item .t1 sub {
    font-size: 20px;
  }

  .s2 {
    padding: 0;
    gap: 40px;
  }

  .s2 .s2l {
    width: 42%;
  }

  .s2 .s2r {
    width: 55%;
  }

  .s2l .wz {
    position: static;
    margin-bottom: 20px;
  }

  .s3t .s3l,
  .s3t .s3r {
    width: 100%;
  }

  .s3t .s3l .s3lb {
    margin-top: 28px;
  }

  .s3t .s3l .s3lb .sulist {
    flex-wrap: wrap;
    row-gap: 18px;
  }

  .s3t .s3l .s3lb .sulist .item {
    width: 50%;
  }

  .s3t .s3r {
    margin-top: 28px;
    text-align: center;
  }

  .s3t .s3r img {
    max-width: 560px;
  }

  .s3b .item {
    width: 25%;
    margin-bottom: 28px;
  }

  .s4t .s4tl,
  .s4t .s4tr {
    width: 50%;
  }

  .s6b .s6bl {
    width: 30%;
  }

  .s6b .s6br {
    width: 66%;
  }

  .s7 .s7l {
    width: 32%;
  }

  .s7 .s7r {
    width: 64%;
  }

  .nnpp {
    margin-top: 8vh;
  }

  /* 合作伙伴屏的内容块在纵向 flex 中会收缩，这里撑满整行 */
  #section6 .s6b {
    width: 100%;
  }
}
