/* 首页专用：全屏图片轮播 + 下方文案、通栏案例、能力轨、最新动态 */
.hero-carousel {
  position: relative;
  width: 100%;
  height: clamp(540px, 78vh, 900px);
  background: var(--ink);
  overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .8s ease, transform 6s linear;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); pointer-events: auto; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.hero-carousel::after {
  content: ;
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(20, 16, 13, 0), rgba(20, 16, 13, .55));
  pointer-events: none;
}
.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
  background: rgba(20, 16, 13, .28);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.hero-nav::before {
  content: ;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.hero-nav--prev { left: 22px; }
.hero-nav--prev::before { transform: rotate(-135deg); margin-left: 3px; }
.hero-nav--next { right: 22px; }
.hero-nav--next::before { transform: rotate(45deg); margin-right: 3px; }
.hero-nav:hover { background: var(--brand); border-color: var(--brand); transform: scale(1.06); }
.hero-nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.hero-dot:hover { background: rgba(255, 255, 255, .6); }
.hero-dot.is-active { background: var(--brand); border-color: var(--brand); transform: scale(1.25); }
.hero-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.hero-intro {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}
.hero-intro h1 { margin-bottom: 22px; max-width: 26ch; }
.hero-intro h1 .soft { color: var(--muted); }
.hero-lead {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 26px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-facts li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  vertical-align: 2px;
  background: var(--brand);
}

/* 通栏案例 */
.case-band {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: var(--ink);
}
.case-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 13, .1) 0%, rgba(20, 16, 13, .62) 58%, rgba(20, 16, 13, .88) 100%);
}
.case-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 48px;
  align-items: end;
  padding-top: 200px;
  padding-bottom: 56px;
}
.case-inner h2 { color: #fff; max-width: 18ch; margin-bottom: 18px; }
.case-inner p { color: rgba(255, 255, 255, .8); max-width: 54ch; }
.case-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, .28);
  padding-top: 20px;
}
.case-meta dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 6px;
}
.case-meta dd { margin: 0; color: #fff; font-size: 14.5px; }

/* 能力轨 */
.rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.rail-item {
  background: var(--bg);
  padding: 26px 24px 24px;
  transition: background .2s ease;
}
.rail-item:hover { background: var(--brand-soft); }
.rail-item .rail-no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--brand-strong);
}
.rail-item h3 { font-size: 1.02rem; margin: 12px 0 8px; }
.rail-item p { font-size: 13px; color: var(--muted); }

/* 最新动态 */
.news-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.news-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.news-mini:hover { border-color: #d7cfc8; box-shadow: var(--shadow); transform: translateY(-2px); }
.news-mini time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}
.news-mini h3 { margin: 0; font-size: 1.02rem; line-height: 1.4; }
.news-mini p { font-size: 13.5px; color: var(--muted); margin: 0; }
.news-mini .arrow-link { margin-top: auto; font-size: 13px; }

@media (max-width: 1080px) {
  .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-strip { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .hero-carousel { height: clamp(300px, 46vh, 460px); }
  .hero-intro { padding: 42px 0 36px; }
  .hero-nav { width: 40px; height: 40px; margin-top: -20px; }
  .case-band { min-height: 0; }
  .case-inner { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 150px; padding-bottom: 40px; }
  .case-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 560px) {
  .rail { grid-template-columns: minmax(0, 1fr); }
  .case-meta { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero-carousel { height: 58vw; min-height: 260px; }
  .hero-nav--prev { left: 10px; }
  .hero-nav--next { right: 10px; }
  .hero-dots { bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity .2s ease; transform: none; }
  .hero-slide.is-active { transform: none; }
}

/* 首屏满图：导航叠加在图片上 */
@media (min-width: 901px) {
  body.has-hero .hero-carousel { margin-top: -74px; }
  body.has-hero .site-header {
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, .18);
    backdrop-filter: none;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
  }
  body.has-hero .brand-logo {
    background: rgba(255, 255, 255, .5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 4px 8px;
    border-radius: var(--radius);
  }
  body.has-hero .brand-note { color: rgba(255, 255, 255, .8); border-left-color: rgba(255, 255, 255, .3); }
  body.has-hero .nav-list > li > a { color: #fff; }
  body.has-hero .nav-list > li > a:hover { color: #fff; }
  body.has-hero .nav-list > li > a[aria-current="page"] { color: #fff; }
  /* 下拉面板保持在白底上可读 */
  body.has-hero .nav-sub a,
  body.has-hero .nav-sub .sub-cat-name { color: var(--ink); }
  body.has-hero .nav-sub a:hover { color: var(--brand-strong); }
  body.has-hero .nav-sub .nav-sub-all { color: var(--brand-strong); }
  body.has-hero .sub-caret { border-color: rgba(255, 255, 255, .8); }
  body.has-hero .lang-switch-group { border-left-color: rgba(255, 255, 255, .35); padding-left: 20px; }
  body.has-hero .lang-switch a { color: rgba(255, 255, 255, .78); }
  body.has-hero .lang-switch a[aria-current="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--brand); }
  body.has-hero .lang-switch a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
  body.has-hero .hero-carousel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 190px;
    background: linear-gradient(180deg, rgba(18, 14, 11, .55), rgba(18, 14, 11, 0));
    z-index: 2;
    pointer-events: none;
  }
  /* 滚动后导航变回白底深字 */
  body.has-hero .site-header.is-solid {
    background: rgba(255, 255, 255, .97);
    border-bottom-color: var(--line);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(43, 35, 29, .07);
  }
  body.has-hero .site-header.is-solid .brand-logo { background: none; padding: 0; }
  body.has-hero .site-header.is-solid .brand-note { color: var(--muted); border-left-color: var(--line); }
  body.has-hero .site-header.is-solid .nav-list a { color: var(--ink); }
  body.has-hero .site-header.is-solid .sub-caret { border-color: var(--muted); }
  body.has-hero .site-header.is-solid .lang-switch-group { border-left-color: var(--line); }
  body.has-hero .site-header.is-solid .lang-switch a { color: var(--muted); }
  body.has-hero .site-header.is-solid .lang-switch a[aria-current="true"] { color: var(--ink); }
}

/* 首页：大图下直接上产品分类（一排四个，紧凑） */
.home-products { padding-top: 44px; }
.home-intro { max-width: 820px; }
.home-intro h1 { margin: 6px 0 16px; }
.home-intro .hero-lead { max-width: 60ch; margin-bottom: 20px; }
.home-intro .hero-facts { margin-top: 22px; }

.product-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px 16px 20px;
  text-align: center;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.product-card:hover { border-color: var(--brand); background: #fff; transform: translateY(-2px); }
.product-card-media { display: block; background: #fff; border: 1px solid var(--line); }
.product-card-media img {
  width: 100%;
  height: 172px;
  object-fit: contain;
  display: block;
}
.product-card h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 14px 0 8px;
  color: var(--ink);
}
.product-card p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 14px;
}
.product-card-link {
  margin-top: auto;
  align-self: center;
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--ink);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--ink);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.product-card-link:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.product-card-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 860px) {
  .product-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card-media img { height: 140px; }
}
@media (max-width: 480px) {
  .product-cards { grid-template-columns: minmax(0, 1fr); }
  .home-products { padding-top: 30px; }
}

/* 设备区块右侧：厂房 / 车间 / 机器组合图 */
.equip-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}
.equip-gallery figure { margin: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.equip-gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.equip-gallery figure:hover img { transform: scale(1.04); }
@media (max-width: 560px) { .equip-gallery { gap: 8px; margin-top: 22px; } }
