/* =========================================================
   食安前哨 · 食品安全检测设备
   A technical, field-lab identity within the Guorou system.
   ========================================================= */

.page-testing {
  background: var(--paper);
}

.page-testing main {
  overflow: hidden;
}

/* ---------- Hero ---------- */
.testing-hero {
  position: relative;
  isolation: isolate;
  background: var(--forest);
  color: var(--cream);
}

.testing-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.testing-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 54% 52%;
  opacity: 0.48;
  filter: saturate(0.42) sepia(0.14) contrast(1.08) brightness(0.8);
}

.testing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 43, 33, 0.97) 0%, rgba(11, 43, 33, 0.88) 44%, rgba(11, 43, 33, 0.44) 74%, rgba(11, 43, 33, 0.3) 100%),
    linear-gradient(0deg, rgba(11, 43, 33, 0.7), transparent 44%);
}

.testing-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: clamp(40px, 7vw, 110px);
  align-items: end;
  min-height: 660px;
  padding-block: clamp(44px, 6vw, 84px) clamp(48px, 5vw, 70px);
}

.testing-hero__copy .breadcrumb {
  margin-bottom: clamp(36px, 5vw, 66px);
}

.testing-hero__copy .eyebrow {
  margin-bottom: 18px;
}

.testing-hero h1 {
  margin: 0;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(72px, 8.8vw, 126px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.testing-hero h1 em {
  color: var(--orange-soft);
  font-style: normal;
}

.testing-hero__deck {
  margin-top: 26px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(25px, 2.4vw, 35px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.testing-hero .lead {
  max-width: 570px;
  margin-top: 16px;
  color: rgba(244, 238, 225, 0.67);
  font-size: 13.5px;
  line-height: 2;
}

.testing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.testing-hero__actions .btn {
  height: 48px;
}

.testing-hero__panel {
  background: var(--cream);
  color: var(--forest);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.testing-hero__panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(11, 43, 33, 0.17);
  color: var(--orange-deep);
  font-family: var(--latin);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.testing-hero__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.testing-hero__list li {
  min-height: 92px;
  padding: 14px 18px 15px;
  border-right: 1px solid rgba(11, 43, 33, 0.1);
  border-bottom: 1px solid rgba(11, 43, 33, 0.1);
}

.testing-hero__list li:nth-child(2n) {
  border-right: 0;
}

.testing-hero__list small {
  display: block;
  color: var(--orange-deep);
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.testing-hero__list strong {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.testing-hero__list span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.testing-hero__panel-foot {
  padding: 13px 20px;
  background: var(--forest);
  color: rgba(244, 238, 225, 0.62);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.testing-hero__foot {
  border-top: 1px solid rgba(244, 238, 225, 0.2);
}

.testing-hero__foot .container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 15px;
  color: rgba(244, 238, 225, 0.55);
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

/* ---------- Intro ---------- */
.testing-intro {
  padding-block: clamp(72px, 8vw, 118px);
  background: var(--cream);
}

.testing-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: start;
}

.testing-intro h2 {
  margin-top: 16px;
  color: var(--forest);
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.2;
}

.testing-intro__body > p {
  max-width: 590px;
  color: var(--body);
  font-size: 14px;
  line-height: 2.05;
}

.testing-intro__body > p + p {
  margin-top: 18px;
}

.testing-intro__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.testing-intro__meta > div {
  padding: 20px 20px 18px 0;
  border-right: 1px solid var(--line);
}

.testing-intro__meta > div + div {
  padding-left: 20px;
}

.testing-intro__meta > div:last-child {
  border-right: 0;
}

.testing-intro__meta strong {
  display: block;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.testing-intro__meta strong small {
  color: var(--orange-deep);
  font-size: 0.48em;
}

.testing-intro__meta span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

/* ---------- Shared section head ---------- */
.testing-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 36px;
  align-items: end;
  margin-bottom: clamp(36px, 4.5vw, 58px);
}

.testing-section-head h2 {
  margin-top: 15px;
  color: var(--forest);
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.18;
}

.testing-section-head > p {
  color: var(--body);
  font-size: 12.5px;
  line-height: 1.9;
}

/* ---------- Device grid ---------- */
.testing-devices {
  padding-block: clamp(70px, 8vw, 116px);
  background: var(--paper);
}

.testing-device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.device-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fffdf8;
  border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.device-card:hover {
  border-color: rgba(236, 138, 28, 0.55);
  transform: translateY(-3px);
}

.device-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  padding: 0;
  background: var(--forest);
  border-bottom: 1px solid var(--line);
}

.device-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: normal;
  filter: saturate(0.9) contrast(1.03);
}

.device-card__media span {
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11, 43, 33, 0.62);
  color: rgba(244, 238, 225, 0.92);
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(4px);
}

.device-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.device-card__en {
  color: var(--orange-deep);
  font-family: var(--latin);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.device-card h3 {
  margin-top: 8px;
  color: var(--forest);
  font-family: var(--serif);
  font-size: clamp(22px, 2.1vw, 27px);
  font-weight: 500;
  line-height: 1.27;
}

.device-card__body > p:not(.device-card__en) {
  margin-top: 10px;
  color: var(--body);
  font-size: 11.5px;
  line-height: 1.85;
}

.device-card__body ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: auto 0 0;
  padding: 18px 0 0;
  list-style: none;
}

.device-card__body li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.device-card--cta {
  justify-content: flex-start;
  padding: 24px 24px 22px;
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

.device-card--cta:hover {
  border-color: var(--orange);
}

.device-card__cta-num {
  color: var(--orange);
  font-family: var(--latin);
  font-size: 15px;
  letter-spacing: 0.14em;
}

.device-card--cta .device-card__en {
  margin-top: 24px;
  color: var(--orange-soft);
}

.device-card--cta h3 {
  color: var(--cream);
  font-size: clamp(25px, 2.3vw, 31px);
}

.device-card--cta > p:not(.device-card__en) {
  margin-top: 14px;
  color: rgba(244, 238, 225, 0.62);
  font-size: 11.5px;
  line-height: 1.9;
}

.device-card--cta .link-arrow {
  margin-top: auto;
  padding-top: 26px;
  color: var(--orange-soft);
}

.device-card--cta .link-arrow svg {
  width: 16px;
  height: 16px;
}

.testing-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

/* ---------- Scenarios ---------- */
.testing-scenarios {
  padding-block: clamp(68px, 7.5vw, 106px);
  background: var(--sand);
}

.testing-scenario-list {
  border-top: 1px solid rgba(11, 43, 33, 0.18);
}

.testing-scenario {
  display: grid;
  grid-template-columns: 58px minmax(150px, 1fr) minmax(180px, 1.1fr) minmax(180px, 0.9fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(11, 43, 33, 0.14);
}

.testing-scenario small {
  color: var(--orange-deep);
  font-family: var(--latin);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.testing-scenario h3 {
  color: var(--forest);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.testing-scenario p {
  color: var(--body);
  font-size: 11.5px;
}

.testing-scenario > span {
  color: var(--orange-deep);
  font-family: var(--latin);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: right;
}

/* ---------- Service ---------- */
.testing-service {
  padding-block: clamp(70px, 8vw, 112px);
  background: var(--paper);
}

.testing-service__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.testing-service__grid article {
  padding: 22px 22px 4px 0;
  border-right: 1px solid var(--line);
}

.testing-service__grid article + article {
  padding-left: 22px;
}

.testing-service__grid article:last-child {
  border-right: 0;
}

.testing-service__grid span {
  color: var(--orange-deep);
  font-family: var(--latin);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.testing-service__grid h3 {
  margin-top: 16px;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.testing-service__grid p {
  margin-top: 10px;
  color: var(--body);
  font-size: 11.5px;
  line-height: 1.9;
}

/* ---------- CTA ---------- */
.testing-cta {
  position: relative;
  overflow: hidden;
  padding-block: clamp(58px, 7vw, 96px);
  background: var(--forest);
  color: var(--cream);
}

.testing-cta::before {
  content: "TEST";
  position: absolute;
  right: 4vw;
  bottom: -0.23em;
  color: rgba(244, 238, 225, 0.045);
  font-family: var(--latin);
  font-size: clamp(140px, 26vw, 340px);
  line-height: 0.7;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.testing-cta__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 46px;
  align-items: end;
}

.testing-cta h2 {
  margin-top: 15px;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(36px, 4.3vw, 58px);
  font-weight: 500;
  line-height: 1.2;
}

.testing-cta__aside p {
  max-width: 370px;
  color: rgba(244, 238, 225, 0.62);
  font-size: 12.5px;
  line-height: 1.9;
}

.testing-cta__aside .btn {
  margin-top: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .testing-hero__inner {
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 48px;
    min-height: 610px;
  }

  .testing-device-grid {
    gap: 14px;
  }

  .testing-scenario {
    grid-template-columns: 46px minmax(130px, 1fr) minmax(150px, 1.1fr) minmax(150px, 0.9fr);
    gap: 14px;
  }
}

@media (max-width: 960px) {
  .testing-hero__inner {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-block: 42px 44px;
    min-height: auto;
  }

  .testing-hero__copy .breadcrumb {
    margin-bottom: 34px;
  }

  .testing-hero__panel {
    max-width: 520px;
  }

  .testing-intro__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .testing-section-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .testing-section-head > p {
    max-width: 600px;
  }

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

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

  .testing-service__grid article:nth-child(2n) {
    border-right: 0;
  }

  .testing-service__grid article:nth-child(n + 3) {
    margin-top: 26px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
  }

  .testing-cta__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .testing-hero__inner {
    padding-block: 30px 34px;
  }

  .testing-hero h1 {
    font-size: clamp(58px, 19vw, 84px);
  }

  .testing-hero__deck {
    margin-top: 18px;
    font-size: 24px;
  }

  .testing-hero .lead {
    font-size: 12.5px;
    line-height: 1.9;
  }

  .testing-hero__actions {
    gap: 8px;
  }

  .testing-hero__actions .btn {
    height: 44px;
    padding-inline: 16px;
    font-size: 12px;
  }

  .testing-hero__list li {
    min-height: 84px;
    padding: 12px 13px;
  }

  .testing-hero__list strong {
    font-size: 17px;
  }

  .testing-hero__list span {
    font-size: 8.5px;
  }

  .testing-hero__panel-head,
  .testing-hero__panel-foot {
    padding-inline: 13px;
  }

  .testing-hero__foot .container {
    flex-direction: column;
    gap: 5px;
    font-size: 8px;
  }

  .testing-intro,
  .testing-devices,
  .testing-scenarios,
  .testing-service {
    padding-block: 58px;
  }

  .testing-intro__meta > div {
    padding: 15px 10px 14px 0;
  }

  .testing-intro__meta > div + div {
    padding-left: 10px;
  }

  .testing-intro__meta strong {
    font-size: 27px;
  }

  .testing-intro__meta span {
    font-size: 8.5px;
    line-height: 1.5;
  }

  .testing-device-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .device-card__body {
    padding: 17px 17px 19px;
  }

  .device-card h3 {
    font-size: 24px;
  }

  .testing-scenario {
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    padding: 16px 0;
  }

  .testing-scenario h3 {
    font-size: 20px;
  }

  .testing-scenario p {
    grid-column: 2;
    font-size: 10.5px;
  }

  .testing-scenario > span {
    grid-column: 3;
    grid-row: 1 / span 2;
    max-width: 110px;
    font-size: 8.5px;
    text-align: right;
  }

  .testing-service__grid {
    grid-template-columns: 1fr;
  }

  .testing-service__grid article {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .testing-service__grid article + article {
    padding-left: 0;
  }

  .testing-service__grid article:nth-child(n + 3) {
    margin-top: 0;
    padding-top: 18px;
    border-top: 0;
  }

  .testing-service__grid article:last-child {
    border-bottom: 0;
  }

  .testing-cta {
    padding-block: 54px;
  }

  .testing-cta h2 {
    font-size: 38px;
  }
}
