/* ============================================================
   首页样式（六个板块）— home.css
   ------------------------------------------------------------
   只作用于 index.html，用 hp- 前缀，避免和其它内页的 class 冲突。
   颜色全部走 style.css 里的变量，切换 data-series 会自动跟随。

   板块：
   01 Hero          .hp-hero
   02 Product range .hp-range
   03 Custom OEM    .hp-custom
   04 Factory       .hp-factory（唯一深色带）
   05 Applications  .hp-apps
   06 Quote         .hp-quote

   改图片：搜 data-img= 或看 README「首页图片替换表」；
   在网址后加 ?dev=1 可以开「图片槽位」标注模式，直接看到文件名。
   ============================================================ */

/* ---------- 0. 通用：板块容器 + 板块头 ---------- */
.hp-sec { padding: clamp(56px, 6.6vw, 104px) 0; }
.hp-sec--alt { background: var(--bg-2); }

.sec-head {
  display: grid;
  grid-template-columns: 132px minmax(0, 1.02fr) minmax(0, .88fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: clamp(18px, 2vw, 26px);
  margin-bottom: clamp(28px, 3.6vw, 50px);
}
.sec-no { display: flex; align-items: baseline; gap: 12px; }
.sec-no b {
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 40px);
  line-height: .78;
  letter-spacing: -.02em;
  color: var(--ink);
  font-weight: 700;
}
.sec-no span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.sec-head .lead { padding-top: 4px; }

/* ---------- 1. Hero ---------- */
.hp-hero {
  padding-top: calc(var(--header-h) + clamp(30px, 4vw, 62px));
  padding-bottom: clamp(34px, 3.6vw, 54px);
  position: relative;
}
.hp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
.hp-hero__head .sec-no { margin-bottom: 12px; }
.hp-hero h1 {
  font-size: clamp(40px, 5.5vw, 84px);
  color: var(--ink);
  margin-top: 6px;
}
.hp-hero h1 em {
  font-style: normal;
  color: var(--accent);
  display: inline-block;
}
.hp-hero__side .lead { max-width: 46ch; }
.hp-hero__actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 28px;
}
.hp-facts {
  margin-top: 30px;
  border-top: 1px solid var(--line-2);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.hp-facts li {
  padding: 12px 14px 0 0;
  border-right: 1px solid var(--line-2);
}
.hp-facts li:last-child { border-right: 0; }
.hp-facts b {
  display: block;
  font-size: 10px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 4px;
}
.hp-facts span { font-size: 14px; color: var(--ink); font-weight: 500; }

/* 三图拼接 */
.hp-strip {
  display: grid;
  grid-template-columns: 1.72fr 1fr 1fr;
  gap: 8px;
  margin-top: clamp(28px, 3.4vw, 46px);
}
.hp-strip figure {
  position: relative; margin: 0; overflow: hidden;
  background: var(--bg-2);
  height: clamp(210px, 27vw, 372px);
}
.hp-strip img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.hp-strip figure:hover img { transform: scale(1.03); }
.hp-strip figcaption {
  position: absolute; left: 14px; bottom: 12px;
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: rgba(18, 14, 10, .48);
  backdrop-filter: blur(6px);
  padding: 5px 9px;
}

/* 数据条 */
.hp-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(24px, 3vw, 40px);
}
.hp-stats div {
  padding: clamp(16px, 1.8vw, 22px) 20px 0 20px;
  border-left: 1px solid var(--line-2);
}
.hp-stats div:first-child { border-left: 0; padding-left: 0; }
.hp-stats b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.7vw, 40px);
  line-height: 1; color: var(--ink); font-weight: 700;
}
.hp-stats b i { font-style: normal; font-size: .55em; color: var(--muted); margin-left: 2px; }
.hp-stats span {
  display: block; margin-top: 6px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- 2. 四个产品入口 ---------- */
.hp-range {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
}
.hp-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-2);
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.hp-card:hover {
  border-color: var(--line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
}
/* 四张卡统一 4:3，源图已按同一比例与尺寸预处理，渲染结果完全一致 */
.hp-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.hp-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .75s cubic-bezier(.2, .7, .2, 1);
}
.hp-card:hover .hp-card__media img { transform: scale(1.05); }

.hp-card__no {
  position: absolute; top: 11px; left: 11px;
  z-index: 2;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 8px;
}
.hp-card__body {
  padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 9px; flex: 1;
}
.hp-card h3 {
  font-size: clamp(19px, 1.5vw, 23px);
  letter-spacing: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.hp-card h3 svg { flex: none; color: var(--accent); transition: transform .3s; }
.hp-card:hover h3 svg { transform: translateX(4px); }
.hp-card p {
  font-size: 13.5px; line-height: 1.66; color: var(--muted);
}
.hp-card__tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: auto; padding-top: 8px;
}
.hp-card__tags span {
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-2);
  padding: 3px 6px;
}

/* ---------- 3. 定制 / OEM ---------- */
.hp-custom {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(28px, 4vw, 68px);
  align-items: start;
}
.hp-steps { border-top: 1px solid var(--line); }
.hp-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--line-2);
}
.hp-steps li:hover { background: var(--accent-tint); }
.hp-steps__no {
  font-family: var(--font-display);
  font-size: 15px; letter-spacing: .1em;
  color: var(--accent);
  padding-top: 2px;
}
.hp-steps h4 {
  font-size: 15px; letter-spacing: .04em; color: var(--ink);
  font-weight: 600;
}
.hp-steps p {
  grid-column: 2;
  font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.6;
}
.hp-steps__time {
  grid-row: 1; grid-column: 3;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--ink); white-space: nowrap;
  background: var(--accent-tint);
  border: 1px solid var(--line-2);
  padding: 3px 8px;
}

/* 能力参数表 */
.hp-spec { background: var(--surface); border: 1px solid var(--line-2); padding: clamp(20px, 2.2vw, 30px); }
.hp-spec__title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.hp-spec__title h3 { font-size: 16px; letter-spacing: .06em; }
.hp-spec__title span { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hp-spec .spec-table { font-size: 13.5px; }
.hp-spec .spec-table th, .hp-spec .spec-table td { padding: 10px 0; }
.hp-spec .spec-table td:last-child { text-align: right; color: var(--ink); font-weight: 500; }
.hp-spec__cta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 4. 工厂（深色带） ---------- */
.hp-factory {
  background: var(--deep);
  color: var(--on-deep);
}
.hp-factory h2, .hp-factory h3, .hp-factory h4 { color: var(--on-deep); }
.hp-factory .lead { color: var(--on-deep-muted); }
.hp-factory .sec-head { border-color: rgba(255, 255, 255, .16); }
.hp-factory .sec-no b { color: var(--on-deep); }
.hp-factory .sec-no span { color: var(--on-deep); opacity: .62; }
.hp-factory .btn--ghost { border-color: rgba(255, 255, 255, .32); color: var(--on-deep); }
.hp-factory .btn--ghost:hover { border-color: var(--accent); background: rgba(255, 255, 255, .06); }

.hp-factory__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(26px, 3.4vw, 54px);
  align-items: center;
}
.hp-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.hp-mosaic figure {
  margin: 0; overflow: hidden; background: rgba(255, 255, 255, .05);
  aspect-ratio: 1 / 1;
}
.hp-mosaic figure:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 7.2; }
.hp-mosaic img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.55) contrast(1.02);
  transition: filter .45s, transform .7s;
}
.hp-mosaic figure:hover img { filter: none; transform: scale(1.03); }

.hp-metrics {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255, 255, 255, .18);
  margin-top: 6px;
}
.hp-metrics div {
  padding: 18px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.hp-metrics div:nth-child(even) { padding-left: 20px; border-left: 1px solid rgba(255, 255, 255, .12); }
.hp-metrics b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1; color: var(--on-deep); font-weight: 700;
}
.hp-metrics b i { font-style: normal; font-size: .5em; opacity: .7; margin-left: 3px; }
.hp-metrics span {
  display: block; margin-top: 6px;
  font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--on-deep-muted);
}
.hp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.hp-chips span {
  font-size: 11.5px;
  color: var(--on-deep-muted);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 5px 9px;
}
.hp-chips span b { color: var(--on-deep); font-weight: 600; }

/* ---------- 5. 应用场景 ---------- */
.hp-apps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(9px, 1.1vw, 14px);
}
.hp-app {
  position: relative;
  display: block;
  grid-column: span 2;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.hp-app img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .75s cubic-bezier(.2, .7, .2, 1);
}
.hp-app:hover img { transform: scale(1.04); }
/* 只有 5 项时，最后两项各占半行，高度与上面一行齐平 */
.hp-app:nth-child(4):nth-last-child(2),
.hp-app:nth-child(5):last-child { grid-column: span 3; aspect-ratio: 2 / 1; }
.hp-app::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16, 12, 8, .82) 0%, rgba(16, 12, 8, .34) 42%, rgba(16, 12, 8, 0) 72%);
  transition: opacity .3s;
}
.hp-app:hover::after { opacity: .82; }
.hp-app__txt {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  z-index: 2; color: #fff;
}
.hp-app__txt b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 22px);
  letter-spacing: .01em; line-height: 1.1;
  text-transform: uppercase;
}
.hp-app__txt span {
  display: block; margin-top: 5px;
  font-size: 12px; line-height: 1.55;
  color: rgba(255, 255, 255, .74);
  max-width: 34ch;
}
.hp-app__no {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: .16em;
  color: rgba(255, 255, 255, .8);
  border-top: 1px solid rgba(255, 255, 255, .45);
  padding-top: 4px;
}

/* ---------- 6. 询盘 + FAQ ---------- */
.hp-quote {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.hp-form {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: clamp(22px, 2.6vw, 36px);
  box-shadow: var(--shadow-1);
}
.hp-form .form-grid { margin-top: 4px; }
.field input[type="file"] {
  height: auto;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--bg);
}
.field input[type="file"]::file-selector-button {
  font-family: var(--font-body);
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 7px 11px;
  margin-right: 12px;
  cursor: pointer;
}
.hp-quote__aside .faq { border-top: 1px solid var(--line); }
.hp-contact {
  margin-top: 26px;
  border-top: 1px solid var(--line-2);
}
.hp-contact a, .hp-contact span {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  color: var(--muted);
}
.hp-contact b { color: var(--ink); font-weight: 600; }
.hp-contact a:hover b { color: var(--accent); }

/* ---------- 7. 图片槽位标注（?dev=1） ---------- */
.imgslot {
  outline: 2px dashed rgba(255, 0, 128, .9);
  outline-offset: -2px;
}
.imgslot-label {
  position: absolute; z-index: 9; left: 0; bottom: 0;
  font: 600 10px/1 ui-monospace, Menlo, Consolas, monospace;
  background: rgba(255, 0, 128, .92); color: #fff;
  padding: 3px 5px; pointer-events: none;
}
.hp-sec--dev [data-img] { position: relative; }

.dev-note {
  position: fixed; left: 12px; bottom: 12px; z-index: 999;
  font: 500 11px/1.4 ui-monospace, Menlo, Consolas, monospace;
  background: rgba(255, 0, 128, .95); color: #fff;
  padding: 8px 10px; max-width: 260px;
}

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1180px) {
  /* 100px 的编号列容不下 APPLICATIONS，会压到标题上 */
  .sec-head { grid-template-columns: 132px minmax(0, 1fr) minmax(0, .9fr); gap: 22px; }
  .hp-range { grid-template-columns: repeat(2, 1fr); }
  .hp-apps { grid-template-columns: repeat(2, 1fr); }
  .hp-app,
  .hp-app:nth-child(4):nth-last-child(2) { grid-column: auto; aspect-ratio: 4 / 3; }
  .hp-app:nth-child(5):last-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
}

@media (max-width: 1024px) {
  .hp-hero__grid { grid-template-columns: 1fr; gap: 30px; align-items: start; }
  .hp-hero__side .lead { max-width: 58ch; }
  .hp-facts { max-width: 480px; }
  .hp-strip { grid-template-columns: 1fr 1fr; }
  .hp-strip figure:first-child { grid-column: 1 / -1; height: clamp(200px, 40vw, 300px); }
  .hp-strip figure { height: clamp(150px, 24vw, 220px); }
  .hp-custom { grid-template-columns: 1fr; }
  .hp-factory__grid { grid-template-columns: 1fr; }
  .hp-mosaic { order: 2; }
  .hp-quote { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sec-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .sec-no { gap: 10px; }
  .hp-stats { grid-template-columns: 1fr 1fr; }
  .hp-stats div { padding: 16px 0 10px; border-left: 0; }
  .hp-stats div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line-2); }
  .hp-stats div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .hp-apps { grid-template-columns: 1fr; }
  .hp-app,
  .hp-app:nth-child(4):nth-last-child(2),
  .hp-app:nth-child(5):last-child { grid-column: auto; aspect-ratio: 16 / 10; }
}

@media (max-width: 560px) {
  .hp-hero h1 { font-size: clamp(32px, 9.4vw, 44px); }
  .hp-hero__actions .btn { width: 100%; }
  .hp-range { grid-template-columns: 1fr; }
  .hp-facts { grid-template-columns: 1fr; }
  .hp-facts li { border-right: 0; border-bottom: 1px solid var(--line-2); padding: 10px 0; }
  .hp-metrics { grid-template-columns: 1fr; }
  .hp-metrics div:nth-child(even) { padding-left: 0; border-left: 0; }
  .hp-steps li { grid-template-columns: 30px minmax(0, 1fr); }
  .hp-steps__time { grid-column: 2; grid-row: auto; justify-self: start; margin-top: 6px; }
  .hp-spec .spec-table td:last-child { text-align: left; }
  .hp-spec .spec-table { font-size: 12.5px; }
  .hp-spec .spec-table th, .hp-spec .spec-table td { padding: 9px 0; }
}
