/* ==========================================================================
   小树之家科技 —— 首页样式（产品优先 · 清新浅色风）
   ========================================================================== */

/* --------------------------------------------------------------------------
   首屏：左文右产品
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: var(--header-height);
  padding: 92px 0 104px;
  overflow: hidden;
  background: var(--bg-base);
}

/* 背景：公司图片压到极淡当作纹理，再加一层柔和的青绿光晕 */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.07;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 22%, rgba(20, 184, 166, 0.12), transparent 52%),
    radial-gradient(circle at 8% 78%, rgba(125, 211, 252, 0.14), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, #ffffff 80%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  /* 淡青绿下划线，轻一点 */
  background: linear-gradient(180deg, transparent 62%, var(--accent-soft) 62%);
}

.hero__desc {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 540px;
  margin-bottom: 34px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
}

/* 数据条 */
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.hero__stats li {
  border-left: 2px solid var(--accent-line);
  padding-left: 16px;
}

.hero__stats strong {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.2;
}

.hero__stats span {
  font-size: 13.5px;
  color: var(--text-dim);
}

/* 右侧产品视觉：整块是一个链接，跳到当前显示产品的介绍页 */
.hero__visual {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* 离开时不淡出，直接消失。
     若两张图交叉淡化，它们各自带的标签会叠在一起糊成一片文字。
     产品图本身是白底的，从白色淡入看起来就像产品自己浮现，很干净。 */
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

/* 用 animation 而不是 transition 做淡入：
   transition 依赖「属性变化前后」的样式快照，在某些渲染时序下可能不触发；
   animation 是显式声明的，行为更确定。
   刻意不加 fill-mode：这样即使动画没跑起来（或被无障碍设置禁用），
   元素仍停在计算样式 opacity:1 上，图不会消失。 */
.hero__slide.is-active {
  opacity: 1;
  animation: heroSlideIn 0.6s ease;
}

@keyframes heroSlideIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__visual:hover .hero__slide.is-active img {
  transform: scale(1.03);
}

.hero__visual:hover .hero__slide.is-active {
  border-color: var(--accent-line);
}

/* 产品名标签 */
.hero__label {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  transition: border-color var(--transition), background var(--transition);
}

.hero__visual:hover .hero__label {
  border-color: var(--accent);
  background: #fff;
}

.hero__label .icon {
  color: var(--accent-bright);
  font-size: 16px;
}

/* 悬停时从标签里滑出的箭头——提示「这块可以点」 */
.hero__label-go {
  display: inline-flex;
  align-items: center;
  width: 0;
  height: 15px;
  overflow: hidden;
  color: var(--accent);
  opacity: 0;
  transition: width var(--transition), opacity var(--transition),
    margin-left var(--transition);
}

.hero__label-go svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__visual:hover .hero__label-go {
  width: 15px;
  opacity: 1;
  margin-left: 2px;
}

/* --------------------------------------------------------------------------
   产品展示：图文交替大区块
   -------------------------------------------------------------------------- */
.showcase-list {
  display: flex;
  flex-direction: column;
}

.showcase {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 68px;
  align-items: center;
  padding: 76px 0;
  border-top: 1px solid var(--border);
}

.showcase:first-child {
  padding-top: 0;
  border-top: none;
}

/* 偶数项图文互换 */
.showcase:nth-child(even) .showcase__media {
  order: 2;
}

/* 产品图：白底图片放在白页面上，必须靠边框和阴影划出边界。
   整块是 <a>，点图片即进产品介绍页。 */
.showcase__media {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.showcase:hover .showcase__media,
.showcase__media:hover {
  transform: translateY(-5px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-lg);
}

.showcase__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.showcase__media:hover img {
  transform: scale(1.04);
}

/* 悬停时浮出的提示。图片可点这件事必须让用户看得见，
   否则等于没做——只有光标变成手型是远远不够的。 */
.showcase__media::after {
  content: "了解详情";
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  padding: 9px 22px;
  border-radius: 40px;
  background: rgba(15, 118, 110, 0.94);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.showcase__media:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.showcase__body {
  position: relative;
}

.showcase__index {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-bright);
  margin-bottom: 14px;
}

.showcase__title {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.25;
  margin-bottom: 8px;
}

.showcase__sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.showcase__desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 28px;
}

/* 核心参数：两列标签值 */
.showcase__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 32px;
}

.showcase__specs li {
  background: #fff;
  padding: 14px 18px;
}

.showcase__specs .k {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.showcase__specs .v {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-base);
  line-height: 1.5;
}

.showcase__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

/* --------------------------------------------------------------------------
   关于我们
   -------------------------------------------------------------------------- */
/* 左图右文：插图一侧是「设计→生产」的示意图 */
.about__layout {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 64px;
}

.about__art {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #f8fcfc, #eaf5f5);
  border: 1px solid var(--border);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.about__art svg {
  width: 100%;
  height: auto;
  display: block;
}

.about__intro {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 2.05;
  margin-bottom: 0;
}

/* min-width:0 —— 防止网格项被长文本撑破 */
.about__text {
  min-width: 0;
}

.capabilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* 能力卡片：结构与服务流程卡片保持一致（图在上、文在下） */
.capability {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.capability:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

.capability__art {
  background: linear-gradient(160deg, #f8fcfc, #eaf5f5);
  border-bottom: 1px solid var(--border);
}

.capability__art svg {
  width: 100%;
  height: auto;
  display: block;
}

.capability__body {
  flex: 1;
  padding: 26px 26px 28px;
}

.capability__title {
  font-size: 16.5px;
  margin-bottom: 11px;
}

.capability__text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.88;
  text-align: justify;
}

/* --------------------------------------------------------------------------
   服务流程
   -------------------------------------------------------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}

.process-step:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

/* 卡片顶部插图 */
.process-step__art {
  background: linear-gradient(160deg, #f8fcfc, #eaf5f5);
  border-bottom: 1px solid var(--border);
}

.process-step__art svg {
  width: 100%;
  height: auto;
  display: block;
}

.process-step__body {
  position: relative;
  flex: 1;
  padding: 26px 26px 28px;
}

/* 步骤序号：贴在插图左上角的圆形徽标。
   原来用浅色大号数字放在白底上，几乎看不见，像一块污渍——改成徽标才读得出来。 */
.process-step__num {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--accent-line);
  box-shadow: var(--shadow-xs);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.process-step__title {
  font-size: 16.5px;
  margin-bottom: 9px;
}

.process-step__text {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.88;
  text-align: justify;
}

/* --------------------------------------------------------------------------
   联系区
   -------------------------------------------------------------------------- */
.contact-band {
  position: relative;
  padding: 84px 0;
  overflow: hidden;
  background: var(--bg-tint);
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-band__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact-band__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
}

.contact-band__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(20, 184, 166, 0.13), transparent 58%),
    linear-gradient(180deg, rgba(238, 247, 247, 0.7), var(--bg-tint));
}

.contact-band .container {
  position: relative;
  z-index: 1;
}

.contact-band h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin-bottom: 14px;
}

.contact-band p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.contact-band__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* 关于我们：单列时插图在上，文字在下 */
  .about__layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about__art {
    max-width: 560px;
    margin: 0 auto;
  }

  .hero__visual {
    max-width: 560px;
  }

  .showcase {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 56px 0;
  }

  /* 单列时统一图片在上 */
  .showcase:nth-child(even) .showcase__media {
    order: 0;
  }

  .capabilities,
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 52px 0 64px;
  }

  .hero__desc {
    font-size: 15.5px;
  }

  .hero__actions {
    margin-bottom: 34px;
  }

  .hero__actions .btn {
    flex: 1;
  }

  .hero__stats {
    gap: 22px;
  }

  .hero__stats li {
    padding-left: 13px;
  }

  .hero__stats strong {
    font-size: 20px;
  }

  .showcase {
    padding: 44px 0;
  }

  .showcase__specs {
    grid-template-columns: 1fr;
  }

  .showcase__actions .btn {
    flex: 1;
  }

  .about__intro {
    font-size: 15px;
    margin-bottom: 36px;
  }

  .capabilities,
  .process-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .capability__body,
  .process-step__body {
    padding: 22px 20px 24px;
  }

  .contact-band {
    padding: 56px 0;
  }

  .contact-band__actions {
    flex-direction: column;
  }
}
