:root {
  --green: #05966f;
  --green-light: #e9fff8;
  --blue: #075fe0;
  --blue-light: #eaf5ff;
  --text-deep: #07366f;
  --text-muted: #4b6685;
  --white-glass: rgba(255, 255, 255, 0.78);
  --card-border: rgba(255, 255, 255, 0.86);
  --shadow-card: 0 28px 80px rgba(17, 88, 165, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-deep);
  background: #edf7ff;
  margin: 0;
  /* 勿在 body 上使用 overflow-x:hidden：在部分移动浏览器里会把 overflow-y 算成 auto，
     body 变成滚动容器后可能影响 position:fixed 等布局。横向溢出由 .lab-home 承担。 */
}

.lab-home {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: visible;
  isolation: isolate;
}

.background-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  transform: scale(1.01);
}

.background-layer .background-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.soft-mask {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.58) 28%, rgba(255, 255, 255, 0.2) 58%, rgba(255, 255, 255, 0) 78%),
    linear-gradient(90deg, rgba(14, 153, 103, 0.12) 0%, rgba(255, 255, 255, 0.12) 44%, rgba(0, 111, 255, 0.14) 100%);
}

.hero {
  width: min(1180px, calc(100vw - max(32px, env(safe-area-inset-left) + env(safe-area-inset-right))));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(34px, 5vh, 72px) max(16px, env(safe-area-inset-right)) clamp(28px, 4vh, 52px) max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vh, 44px);
}

.hero-header {
  text-align: center;
  animation: fadeUp 700ms ease both;
}

.eyebrow {
  margin: 0 auto 12px;
  max-width: 100%;
  padding: 0 12px;
  font-size: clamp(10px, 1.05vw, 13px);
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-align: center;
  color: rgba(6, 69, 137, 0.66);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 6.2vw, 76px);
  line-height: 1.05;
  letter-spacing: 0.05em;
  font-weight: 900;
  color: #073c91;
  text-shadow: 0 12px 30px rgba(2, 56, 130, 0.16);
}

/* 桌面端单行标题；手机端在「工艺 / 创新」处分行 */
.hero-title-br {
  display: none;
}

.subtitle {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
  max-width: 100%;
  margin: 20px 0 0;
  padding: 0 8px;
  color: #173f78;
  font-size: clamp(18px, 2vw, 27px);
  letter-spacing: 0.16em;
  font-weight: 500;
  text-align: center;
}

.subtitle::before,
.subtitle::after {
  content: "";
  width: clamp(34px, 4vw, 66px);
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(5, 95, 224, 0.7));
}

.subtitle::after {
  background: linear-gradient(90deg, rgba(5, 95, 224, 0.7), transparent);
}

/* 与下方 feature-strip 同宽，保证上下对齐 */
.system-grid {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  animation: fadeUp 800ms 120ms ease both;
}

.system-card {
  position: relative;
  min-height: clamp(430px, 49vh, 500px);
  padding: 26px 30px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 28px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border: 1px solid rgba(125, 180, 224, 0.48);
  background: var(--white-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.system-card:focus-visible {
  outline: none;
  box-shadow: var(--shadow-card), 0 0 0 3px rgba(7, 95, 224, 0.35);
}

.system-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.78;
}

.card-pelleting::before {
  background:
    radial-gradient(circle at 24% 12%, rgba(21, 181, 133, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(238, 255, 249, 0.92), rgba(255, 255, 255, 0.72));
}

.card-extrusion::before {
  background:
    radial-gradient(circle at 24% 12%, rgba(24, 117, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(237, 247, 255, 0.94), rgba(255, 255, 255, 0.74));
}

.card-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  top: -95px;
  right: -80px;
  filter: blur(20px);
  opacity: 0.54;
}

.card-pelleting .card-glow {
  background: rgba(6, 166, 120, 0.36);
}

.card-extrusion .card-glow {
  background: rgba(8, 112, 238, 0.32);
}

.card-top {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  height: 66px;
}

.system-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(12, 90, 150, 0.18));
}

.machine-wrap {
  width: 100%;
  height: clamp(144px, 19vh, 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 12px;
}

.machine-wrap img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 24px rgba(23, 87, 140, 0.15));
}

.pelleting-machine img {
  width: 84%;
}

.extrusion-machine img {
  width: 92%;
}

.card-content {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.card-content h2 {
  margin: 0;
  font-size: clamp(31px, 3.4vw, 43px);
  line-height: 1.15;
  letter-spacing: 0.04em;
  font-weight: 900;
}

.card-pelleting h2 {
  color: #057653;
}

.card-extrusion h2 {
  color: #0757c7;
}

.card-content p {
  width: min(330px, 100%);
  margin: 14px auto 24px;
  color: #344e6e;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.75;
  font-weight: 500;
}

.enter-button {
  width: min(240px, 82%);
  min-height: 48px;
  height: 58px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 999px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 26px rgba(7, 80, 143, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card-pelleting .enter-button {
  background: linear-gradient(135deg, #28c99a, #058c68);
}

.card-extrusion .enter-button {
  background: linear-gradient(135deg, #208dff, #075bd6);
}

/* 仅按钮区域：轻微 2D 上浮与阴影（不带动整张卡片） */
.enter-button:hover,
.system-card:focus-visible .enter-button {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px rgba(7, 80, 143, 0.32);
}

.enter-button:active {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(7, 80, 143, 0.22);
}

.feature-strip {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 14px 18px;
  border: 1px solid rgba(125, 180, 224, 0.34);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(15, 91, 170, 0.11);
  animation: fadeUp 900ms 220ms ease both;
}

.feature-item {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 8px;
  color: #1d5590;
  font-size: 16px;
  font-weight: 700;
  border-right: 1px solid rgba(37, 111, 180, 0.16);
}

.feature-item:last-child {
  border-right: none;
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(125, 180, 224, 0.35);
}

.feature-icon svg {
  display: block;
}

.feature-item:nth-child(1) .feature-icon {
  color: #05966f;
}

.feature-item:nth-child(2) .feature-icon {
  color: #075fe0;
}

.feature-item:nth-child(3) .feature-icon {
  color: #0a7a6a;
}

.feature-item:nth-child(4) .feature-icon {
  color: #1a56b8;
}

.feature-label {
  letter-spacing: 0.04em;
}

/* 备案：文档流末尾一行，与页面背景一致，不固定底栏 */
.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  padding: 20px max(16px, env(safe-area-inset-right)) max(28px, calc(16px + env(safe-area-inset-bottom))) max(16px, env(safe-area-inset-left));
  text-align: center;
  background: transparent;
}

.site-footer-inner {
  width: 100%;
  max-width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.site-footer-line {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(23, 63, 120, 0.62);
  text-align: center;
}

.site-footer-inner a {
  display: inline;
  color: rgba(7, 95, 224, 0.82);
  text-decoration: none;
}

.site-footer-inner a:hover,
.site-footer-inner a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.footer-license {
  font-size: 12px;
  color: rgba(23, 63, 120, 0.62);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1600px) {
  .hero {
    width: min(1260px, calc(100vw - 80px));
  }

  .system-grid,
  .feature-strip {
    width: min(980px, 100%);
  }

  .site-footer-inner {
    max-width: min(980px, 100%);
  }
}

@media (max-width: 900px) {
  .lab-home {
    min-height: 100svh;
  }

  .background-layer .background-img {
    object-position: center top;
  }

  .hero {
    justify-content: flex-start;
    width: min(640px, calc(100vw - max(24px, env(safe-area-inset-left) + env(safe-area-inset-right))));
    padding-top: max(42px, env(safe-area-inset-top));
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .subtitle {
    gap: 12px;
    letter-spacing: 0.08em;
  }

  .hero-title-br {
    display: block;
  }

  .system-grid {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 22px;
  }

  .system-card {
    min-height: 430px;
  }

  .feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-item:nth-child(2) {
    border-right: none;
  }

  .feature-item:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(37, 111, 180, 0.16);
  }
}

@media (max-width: 560px) {
  .hero {
    width: min(100%, calc(100vw - max(20px, env(safe-area-inset-left) + env(safe-area-inset-right))));
    gap: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .eyebrow {
    letter-spacing: 0.06em;
    font-size: 9px;
    line-height: 1.4;
  }

  h1 {
    font-size: clamp(28px, 8.5vw, 42px);
    line-height: 1.12;
  }

  .subtitle {
    font-size: clamp(13px, 3.8vw, 16px);
    letter-spacing: 0.06em;
    line-height: 1.5;
  }

  .subtitle::before,
  .subtitle::after {
    display: none;
  }

  .system-card {
    min-height: 0;
    padding: 20px 18px 22px;
    border-radius: 22px;
  }

  .machine-wrap {
    height: clamp(120px, 28vw, 168px);
  }

  .card-content h2 {
    font-size: clamp(24px, 6.5vw, 30px);
  }

  .card-content p {
    margin: 10px auto 18px;
    font-size: 14px;
    line-height: 1.65;
  }

  .enter-button {
    width: 100%;
    max-width: 280px;
    min-height: 48px;
    height: auto;
    padding: 14px 20px;
    font-size: 17px;
  }

  .feature-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .feature-item {
    min-height: 48px;
    justify-content: flex-start;
    padding: 10px 12px;
    font-size: 15px;
    border-right: none;
    border-bottom: 1px solid rgba(37, 111, 180, 0.14);
  }

  .feature-item:last-child {
    border-bottom: none;
  }

  .feature-icon {
    width: 36px;
    height: 36px;
  }

  .feature-icon svg {
    width: 20px;
    height: 20px;
  }

  .site-footer-line {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .enter-button {
    transition: none;
  }

  .enter-button:hover,
  .system-card:focus-visible .enter-button,
  .enter-button:active {
    transform: none;
  }
}
