:root{
  --bg:#ffffff;
  --fg:#111111;
  --muted:#444444;
  --primary:#c30d23;

  /* 基础图像尺寸控制：更大但不拉伸 */
  --img-h:380px;   /* 桌面端基础高度门槛 */
}

/* 基础重置：子页不滚动（滚动由父页 index.html 控制） */
*{box-sizing:border-box}
html,body{
  margin:0; padding:0; height:100%;
  overflow:hidden;
}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg);
  color:var(--fg);
}

/* 粒子背景固定底层 */
#bg3shape{
  position:fixed; inset:0;
  width:100vw; height:100vh;
  display:block; pointer-events:none;
  z-index:0;
}

/* 主体容器 */
.home{
  position:relative; z-index:2;
  min-height:100vh;
  width:100%;
  display:flex; flex-direction:column;
}

/* 分区 */
.section{ padding:0; margin:0; }
/* 原先是 .section:last-child{ margin-top:auto; }
   这会导致你新增任何“尾部模块”都会被推到底部。
   现在改成：仅公司愿景贴底。 */
.section.section--vision{ margin-top:auto; }

/* 卡片 */
.card{
  position:relative;
  width:100%;
  margin:0;
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:24px;
  align-items:center;

  background:rgba(255,255,255,0.45);
  backdrop-filter:blur(12px) saturate(130%);
  -webkit-backdrop-filter:blur(12px) saturate(130%);
  padding:40px min(8vw,60px);
  transition:background .3s;

  border:none !important;
  box-shadow:none !important;
  background-clip:padding-box;

  max-width:1200px;
  margin-inline:auto;
}
.card:hover{ background:rgba(255,255,255,0.6); }

/* —— 无缝连续玻璃过渡 —— */
.section:not(:first-of-type) .card::before,
.section:not(:last-of-type)  .card::after{
  content:"";
  position:absolute; left:0; right:0;
  height:24px;
  pointer-events:none;
}
.section:not(:first-of-type) .card::before{
  top:-12px;
  background:linear-gradient(to top, rgba(255,255,255,.20), rgba(255,255,255,0));
  mix-blend-mode:soft-light;
}
.section:not(:last-of-type)  .card::after{
  bottom:-12px;
  background:linear-gradient(to bottom, rgba(255,255,255,.20), rgba(255,255,255,0));
  mix-blend-mode:soft-light;
}

/* 交错布局 */
.card.card--flip{ grid-template-columns:1fr 1.1fr; }
.card.card--flip .card__media{ order:2; }
.card.card--flip .card__body{ order:1; }

/* =========================
   图片：等比例放大，不被拉伸
   ========================= */
.card__media{
  display:flex; align-items:center; justify-content:center;
  flex-direction:column;
  text-align:center;
  padding:12px;
  height:auto;
  min-height:var(--img-h);
}

.card__media img{
  max-width:98%;           /* 放大一点 */
  max-height:580px;        /* 桌面放大 */
  height:auto;
  width:auto;
  display:block;
  object-fit:contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.12));
}

/* 文案样式 */
.card__body{ padding:8px 2px; }
.card__title{
  margin:0 0 10px;
  font-size:clamp(22px,3vw,30px);
  line-height:1.25;
  color:var(--primary);
  font-weight:600;
}
.card__text{
  margin:0;
  font-size:clamp(14px,2.2vw,16px);
  color:var(--fg);
  line-height:1.75;
}

/* =========================
   新增：总产品手册下载模块
   ========================= */
.card.card--catalog{
  grid-template-columns:1fr;
  text-align:center;
  background:linear-gradient(
    135deg,
    rgba(195,13,35,0.10),
    rgba(255,255,255,0.55)
  );
}

.btn-download{
  display:inline-block;
  margin-top:18px;
  padding:10px 26px;
  border-radius:999px;
  background:var(--primary);
  color:#fff;
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  letter-spacing:.2px;
  transition:transform .2s, background .2s, box-shadow .2s;
  box-shadow:0 10px 20px rgba(195,13,35,.18);
}
.btn-download:hover{
  background:#a50b1c;
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(195,13,35,.22);
}
.btn-download:active{
  transform:translateY(0);
}

.card__hint{
  margin:12px 0 0;
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
}

/* —— 中等屏（竖屏平板/大手机）更早改为单列 —— */
@media (max-width:1024px){
  .card{
    grid-template-columns:1fr;
    gap:18px;
    padding:32px 22px;
  }
  .card.card--flip .card__media{ order:1; }
  .card.card--flip .card__body{ order:2; }

  .card__media img{
    max-height:420px;       /* 小屏放大 */
  }
}

/* 小屏响应式 */
@media (max-width:880px){
  :root{ --img-h:260px; }
  .card{
    grid-template-columns:1fr;
    gap:16px;
    padding:28px 18px;
  }
  .card.card--flip .card__media{ order:1; }
  .card.card--flip .card__body{ order:2; }

  .section:not(:first-of-type) .card::before,
  .section:not(:last-of-type)  .card::after{ height:18px; }
  .section:not(:first-of-type) .card::before{ top:-9px; }
  .section:not(:last-of-type)  .card::after{ bottom:-9px; }

  .card__media{ padding:10px; }
  .card__media img{
    max-width:98%;
    max-height:420px;
  }
}

/* 小屏图片单独成行（尤其是 HFCP 的 card--flip） */
@media (max-width:1024px){
  .card,
  .card.card--flip{
    grid-template-columns:1fr !important;
  }
  .card__media,
  .card__body{
    grid-column:1 / -1;
    width:100%;
  }
  .card.card--flip .card__media{ order:1; }
  .card.card--flip .card__body{ order:2; }
}

/* 桌面端压缩垂直间距 */
@media (min-width:1025px){
  .card{
    padding-block:28px;
    gap:20px;
  }

  .section:not(:first-of-type) .card::before,
  .section:not(:last-of-type)  .card::after{
    height:12px;
  }
  .section:not(:first-of-type) .card::before{ top:-6px; }
  .section:not(:last-of-type)  .card::after { bottom:-6px; }

  .card__media{
    min-height:320px;
  }
  .card__media img{
    max-height:580px;       /* 桌面放大 */
  }
}

/* =========================
   Ribbon 新品徽章（45° 斜角）
   ========================= */

.card__media--ribbon{
  position: relative;
  overflow: hidden; /* 保证 ribbon 不溢出 */
}

.ribbon{
  position: absolute;
  top: 18px;
  right: -48px;

  width: 160px;
  text-align: center;

  transform: rotate(45deg);
  transform-origin: center;

  padding: 6px 0;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;

  color: #fff;
  background: linear-gradient(
    90deg,
    #c30d23,
    #a50b1e
  );

  box-shadow:
    0 8px 20px rgba(0,0,0,.15);
}

/* 让图片角更有层次 */
.card__media--ribbon img{
  display:block;
  width:100%;
}
