/* 由 php/tools/build-assets.cjs 生成，请勿手改。
   改动样式请改 client/src 下对应的 .vue / .css 源文件后重新执行生成脚本。
   注意：这里按组件作用域重建了选择器（等价于 Vue 的 <style scoped>），
   对应 class 已经写在各模板的根元素上，挪动模板时不要漏掉。 */

/* ---- views/Home.vue  →  作用域 .home-page ---- */
/* Intro */
.home-page .intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.home-page .intro-copy {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.9;
  margin: 18px 0 28px;
}
.home-page .intro-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 32px;
}
.home-page .stat { text-align: left; }
.home-page .stat strong {
  display: block;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.home-page .stat span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--gray);
}
.home-page .stat-divider {
  width: 1px;
  height: 36px;
  background: var(--line);
}
.home-page .intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.home-page .intro-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Series */
.home-page .series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.home-page .series-card { display: block; }
.home-page .thumb-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.home-page .series-body { padding: 22px 24px 26px; }
.home-page .series-body h3 { font-size: 19px; margin-bottom: 10px; }
.home-page .series-body p {
  color: var(--gray);
  font-size: 14px;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-page .series-link { color: var(--brand); font-weight: 600; font-size: 14px; }

/* Series 视觉增强：图标区反白 + 品牌红上边线 + 悬停上浮 */
.home-page .series-card .thumb {
  aspect-ratio: 16 / 9;
}
.home-page .series-card .thumb .glyph {
  width: 44%;
  height: 44%;
  color: rgba(255, 255, 255, 0.9);
}
.home-page .series-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.home-page .series-body h3 { font-size: 19px; margin-bottom: 10px; display: block; }
.home-page .series-en {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-light);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Why */
.home-page .why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.home-page .why-item {
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.home-page .why-num {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.home-page .why-item h3 { font-size: 18px; margin-bottom: 10px; }
.home-page .why-item p { color: var(--gray); font-size: 14px; line-height: 1.7; }

/* Service preview */
.home-page .service-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.home-page .service-preview .section-title { margin-bottom: 8px; }
.home-page .service-preview .section-label { color: var(--brand); }

/* CTA */
.home-page .cta { padding: 96px 0; background: var(--brand); color: #fff; }
.home-page .cta-inner { text-align: center; max-width: 640px; }
.home-page .cta-inner h2 { font-size: 32px; margin-bottom: 14px; }
.home-page .cta-inner p { color: rgba(255, 255, 255, 0.9); margin-bottom: 28px; }
.home-page .cta .btn-primary { background: #fff; color: var(--brand); box-shadow: none; }
.home-page .cta .btn-primary:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

@media (max-width: 900px) {
  .home-page .intro { grid-template-columns: 1fr; gap: 32px; }
  .home-page .series-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .home-page .why-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .home-page .why-item { padding: 26px 20px; }
  .home-page .service-preview { flex-direction: column; text-align: center; gap: 24px; }
  .home-page .cta { padding: 72px 0; }
  .home-page .cta-inner h2 { font-size: 26px; }
}
@media (max-width: 560px) {
  .home-page .section { padding: 56px 0; }
  .home-page .intro { grid-template-columns: 1fr; gap: 28px; }
  .home-page .intro-text .section-title { font-size: 24px; word-break: break-word; }
  .home-page .intro-text p { font-size: 15px; overflow-wrap: break-word; }
  .home-page .intro-visual { border-radius: 10px; }
  .home-page .intro-stats { gap: 18px; }
  .home-page .intro-stats .stat strong { font-size: 24px; }
  .home-page .series-grid { grid-template-columns: 1fr; }
  .home-page .why-grid { grid-template-columns: 1fr; }
  .home-page .series-body { padding: 18px 20px 22px; }
}

/* ---- components/HeroCarousel.vue  →  作用域 .hero-wrap ---- */
.hero-carousel.hero-wrap {
  position: relative;
  width: 100%;
  /* 成品轮播图为 1920x720（8:3），容器按此比例自适应，保证桌面端文案不被裁切 */
  aspect-ratio: 8 / 3;
  width: 100%;
  max-height: calc(100vh - 64px);
  min-height: 380px;
  overflow: hidden;
  background: #0b0e14;
}
.hero-wrap .track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-wrap .slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: block;
  overflow: hidden;
}
.hero-wrap .slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* 纯图 slide：桌面不加遮罩、不叠文字（成品图自带完整文案） */
.hero-wrap .slide.plain .overlay { background: none; }
.hero-wrap .slide-content.plain-fallback { display: none; }
.hero-wrap .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(8, 17, 31, 0.92) 0%,
    rgba(8, 17, 31, 0.62) 38%,
    rgba(8, 17, 31, 0.12) 66%,
    rgba(8, 17, 31, 0) 82%
  );
  pointer-events: none;
}
.hero-wrap .slide-content {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  max-width: 560px;
  padding: 0 32px 0 max(32px, calc((100vw - 1200px) / 2));
  z-index: 2;
}
.hero-wrap .slide-content .eyebrow {
  display: inline-block;
  color: #fff;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 18px;
  padding-left: 14px;
  border-left: 3px solid var(--brand);
}
.hero-wrap .slide-title {
  font-size: 48px;
  line-height: 1.15;
  margin-bottom: 24px;
  font-weight: 700;
}
.hero-wrap .slide-title em {
  display: block;
  font-style: normal;
  color: var(--brand);
}
.hero-wrap .slide-product {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
}
.hero-wrap .slide-product .model {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}
.hero-wrap .slide-product .pname {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}
.hero-wrap .slide-content .cta {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  padding: 12px 26px;
  border-radius: 4px;
  box-shadow: none;
  transition: transform 0.25s ease;
}
.hero-wrap .slide:hover .cta { transform: translateX(5px); }

.hero-wrap .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(8, 17, 31, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
}
.hero-wrap .nav:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.hero-wrap .nav.prev { left: 28px; }
.hero-wrap .nav.next { right: 28px; }

/* 纯图模式：白底深灰箭头更贴合浅色成品图。
   位置沿用 .nav 的「垂直居中」——早先贴图片底部两角是为了避开图内文案，
   但右下角那只正好压在右侧「在线咨询」悬浮条（.cf-float，固定在视口 top:68%，
   高度约 110px → 覆盖视口 63%~73%）上，两者重叠。故按需求上移到画面垂直中间。 */
.hero-wrap .nav.nav-corner {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(20, 20, 20, 0.12);
  color: #2b2b2b;
  box-shadow: 0 2px 10px rgba(10, 14, 22, 0.14);
}
/* 成品图的文案块整块压在画面左侧（实测文案左边缘恒在 77px 处），
   箭头留在 28px 只剩 3px 空隙，像贴着字；纯图模式再往画面边收 10px，留出呼吸空间。 */
.hero-wrap .nav.prev.nav-corner { left: 18px; }
.hero-wrap .nav.next.nav-corner { right: 18px; }
.hero-wrap .nav.nav-corner:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.hero-wrap .dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
  z-index: 3;
}
.hero-wrap .dot {
  width: 26px;
  height: 5px;
  border-radius: 3px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease;
}
.hero-wrap .dot.active { background: var(--brand); width: 36px; }

/* 手机端：纯图 slide 的图内文字过小，恢复遮罩 + 叠加文字 */
@media (max-width: 900px) {
  .hero-wrap .slide.plain .overlay {
    background: linear-gradient(
      to right,
      rgba(8, 17, 31, 0.9) 0%,
      rgba(8, 17, 31, 0.55) 48%,
      rgba(8, 17, 31, 0.2) 100%
    );
  }
  .hero-wrap .slide-content.plain-fallback { display: block; max-width: 86%; }
}
@media (max-width: 560px) {
  .hero-wrap .slide.plain .overlay {
    background:
      linear-gradient(to top, rgba(8, 17, 31, 0.55), transparent 45%),
      linear-gradient(to right, rgba(8, 17, 31, 0.9) 0%, rgba(8, 17, 31, 0.55) 48%, rgba(8, 17, 31, 0.2) 100%);
  }
  .hero-wrap .slide-content.plain-fallback { padding: 0 22px; max-width: 90%; }
}

@media (max-width: 900px) {
  .hero-carousel.hero-wrap { height: 70vh; min-height: 460px; }
  .hero-wrap .slide-content { max-width: 86%; }
  .hero-wrap .slide-title { font-size: 34px; margin-bottom: 18px; }
  .hero-wrap .slide-product .model { font-size: 30px; }
  .hero-wrap .slide-product { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 18px; }
  .hero-wrap .slide-content .cta { padding: 11px 22px; }
}
@media (max-width: 560px) {
  /* 原 76vh 时首屏几乎被轮播占满，用户看不到任何页面内容；压到 62vh 露出下一屏 */
.hero-carousel.hero-wrap { height: 62vh; min-height: 400px; }
  .hero-wrap .overlay {
    background:
      linear-gradient(to top, rgba(8, 17, 31, 0.55), transparent 45%),
      linear-gradient(to right, rgba(8, 17, 31, 0.9) 0%, rgba(8, 17, 31, 0.55) 48%, rgba(8, 17, 31, 0.2) 100%);
  }
  .hero-wrap .slide-content { padding: 0 20px; max-width: 92%; }
  .hero-wrap .slide-content .eyebrow { font-size: 12px; margin-bottom: 12px; letter-spacing: 1.5px; padding-left: 10px; }
  .hero-wrap .slide-title { font-size: 24px; margin-bottom: 14px; }
  .hero-wrap .slide-product .model { font-size: 22px; }
  /* 桌面限宽 380px 在 375px 屏上必然溢出，改为跟随容器 */
.hero-wrap .slide-product .pname { font-size: 13.5px; max-width: 100%; }
  .hero-wrap .slide-content .cta { font-size: 14px; padding: 11px 22px; }
  /* 箭头垂直居中（与桌面一致，右下角不再压在线咨询条上），尺寸保持 40px 以保证可点 */
.hero-wrap .nav { width: 40px; height: 40px; font-size: 20px; }
  .hero-wrap .nav.prev { left: 12px; }
  .hero-wrap .nav.next { right: 12px; }
  /* 圆点视觉只有 5px 高，手指点不中；用伪元素把可点区扩到约 40px */
.hero-wrap .dots { bottom: 16px; gap: 8px; }
  .hero-wrap .dot { position: relative; }
  .hero-wrap .dot::after { content: ""; position: absolute; left: 0; right: 0; top: -18px; bottom: -18px; }
}
