/* 首屏双列，左侧入口，右侧地图 */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(42px, 5.2vw, 76px) 48px;
}
.hero-copy h1 {
  margin: 0 0 17px;
  font-size: clamp(46px, 5vw, 72px);
  letter-spacing: -0.055em;
  line-height: 1.13;
  font-weight: 650;
}
.hero-intro {
  max-width: 28em;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-links {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.home-text-link,
.route-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  color: var(--blue-ink);
  font-size: 15px;
  font-weight: 500;
}
.home-text-link span {
  font-size: 1.35em;
  line-height: 1;
}
.home-text-link:hover,
.route-all:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* 地图裁切、方向标和叠层 */
.map-board {
  position: relative;
  overflow: hidden;
  border: 1px solid #e0e5ed;
  border-radius: var(--radius);
  background: #dce8d7;
}
.map-board > img {
  display: block;
  width: 100%;
}
.north {
  position: absolute;
  left: 5%;
  top: 5%;
  display: grid;
  justify-items: center;
  color: #284d46;
  font: 11px var(--mono);
  line-height: 1.2;
}
.north i {
  display: block;
  margin-top: 4px;
  width: 12px;
  height: 20px;
  background: linear-gradient(90deg, #325447 50%, #7d9888 50%);
  clip-path: polygon(50% 0, 100% 100%, 50% 76%, 0 100%);
}
/* 地标位置按首页裁切图的尺寸换算。 */
.map-landmark {
  position: absolute;
  padding: 3px 7px;
  transform: translate(-50%, -50%);
  border: 1px solid #a7afa0;
  border-radius: 5px;
  background: #fffdf2f5;
  color: #23493f;
  white-space: nowrap;
  font-size: clamp(11px, 1.05vw, 15px);
  font-weight: 650;
}
.library {
  left: 57.74%;
  top: 22.59%;
}
.pond {
  left: 48.28%;
  top: 68.97%;
}
.map-source {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #23493f;
}
.map-source span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #829384;
  border-radius: 50%;
  background: #fffdf2;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}
.map-source:hover span,
.map-source:focus-visible span {
  color: var(--blue-ink);
  border-color: var(--blue-ink);
}

/* 求助提示与速查入口 */
.home-alert {
  margin-bottom: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 18px;
  padding: 11px 20px;
  border: 1px solid #f8ded0;
  border-radius: var(--small-radius);
  background: var(--orange-light);
  font-size: 14px;
  color: #643c2b;
}
.home-alert strong {
  color: #8e2e0e;
}
.home-alert .home-text-link {
  font-size: 14px;
}
/* 四步行动卡与手册入口 */
.action-section {
  background: var(--soft);
  padding: 46px 0 55px;
}
.route-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.route-heading h2,
.home-resources h2 {
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.22;
  letter-spacing: -0.04em;
  font-weight: 650;
}
.route-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stage-card {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 14px;
  border: 1px solid #e8e8ed;
  border-radius: var(--radius);
  background: var(--paper);
}
.stage-card:hover {
  border-color: #adcaed;
  box-shadow: 0 3px 12px #213c5710;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.step-no {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding-inline: 4px;
  background: var(--blue-light);
  color: var(--blue-ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 650;
}
.card-top img {
  width: 58px;
  height: 44px;
  object-fit: contain;
}
.stage-card h3 {
  font-size: 21px;
  letter-spacing: -0.025em;
  font-weight: 650;
}
.stage-card p {
  margin: 6px 0 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.stage-open {
  align-self: flex-end;
  margin-top: auto;
  color: var(--blue-ink);
  font-size: 18px;
  line-height: 1;
}

/* 校园预防图文入口 */
.home-resources {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 66px);
  align-items: center;
  padding-block: 58px 64px;
}
.home-resources img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.home-resources h2 {
  margin-block: 8px 11px;
}
.home-resources p {
  color: var(--muted);
  margin-bottom: 7px;
}

/* 中屏收紧首屏列间距，行动卡转双列 */
@media (max-width: 950px) {
  .home-hero {
    gap: 26px;
  }
  .route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* 手机端图文上下排列 */
@media (max-width: 760px) {
  .home-hero,
  .home-resources {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-block: 34px;
  }
  .hero-copy h1 {
    font-size: clamp(42px, 8vw, 60px);
    margin-block: 9px 13px;
  }
  .hero-links {
    margin-top: 17px;
  }
  .hero-intro {
    max-width: 34em;
    font-size: 16px;
  }
  .home-alert {
    margin-bottom: 32px;
    padding-inline: 15px;
  }
  .action-section {
    padding: 30px 0 36px;
  }
}
/* 窄屏调整卡片间距与图片尺寸 */
@media (max-width: 450px) {
  .route-all {
    font-size: 12px;
    white-space: nowrap;
  }
  .route-grid {
    gap: 9px;
  }
  .stage-card {
    padding: 12px;
    border-radius: 15px;
  }
  .stage-card h3 {
    font-size: 18px;
  }
  .stage-card p {
    font-size: 13px;
  }
  .card-top {
    margin-bottom: 6px;
  }
  .card-top img {
    width: 50px;
    height: 38px;
  }
}
