/* style.css — 首页分区（M0–M9）
   高度预算来自 03-ui/home-ui-desktop.png 的量稿（见 03-ui/compare-log.md）：
   1440 设计宽，hero 457 / M2 231 / M3 295 / M4 255 / M5+M6 274 / M7 123 / M8 228 / footer 222。 */

/* ── M1 hero-split ──────────────────────────────────────── */
.hero {
  position: relative;
  min-height: var(--h-hero);
  padding: 92px 0 44px;
  background: linear-gradient(90deg, #f2f8fe 0%, #e7f2fe 24%, #d6ebfb 46%, #b7dcf7 70%, #9fccf4 100%);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 44%;
  opacity: .34;
  filter: brightness(1.85) saturate(.85) contrast(.92);
}
.hero::after {
  /* 左半区压成近白，让标题区的渐变与稿一致；右半区保留水面纹理 */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(242, 248, 254, .96) 0%, rgba(240, 247, 254, .9) 26%, rgba(226, 241, 253, .62) 44%, rgba(190, 220, 246, .28) 64%, rgba(159, 204, 244, .1) 100%);
}
.hero-inner { position: relative; z-index: 2; }
.hero-copy { max-width: 690px; }
.hero h1 {
  font-size: var(--fs-h1);
  line-height: 1.1;
  letter-spacing: .01em;
  margin-bottom: 20px;
}
.hero-lead {
  max-width: 640px;
  font-size: 17.5px;
  line-height: 1.86;
  color: #23405f;
}
.hero-actions {
  display: flex; align-items: center; gap: 10px;
  margin-top: 30px;
}
.hero-actions .btn { height: 48px; padding: 0 30px; font-size: 15px; }
.hero-dot { color: #6f8bab; }
.hero-stats {
  display: flex; align-items: center; gap: 12px;
  margin-top: 24px; font-size: var(--fs-small); color: #33526f;
}
.hero-stats .sep { color: #8fa9c4; }

/* ── M2 category-index ─────────────────────────────────── */
.m2 {
  min-height: var(--h-m2);
  padding: 8px 0 2px;
  background: var(--c-band-a);
}
.cat-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 26px;
  margin-top: 8px;
}
.cat-tile { display: block; color: var(--c-ink); }
.cat-frame {
  display: block;
  aspect-ratio: 2.4 / 1;
  border-radius: var(--r-md);
  box-shadow: var(--sh-soft);
}
.cat-frame img { filter: brightness(1.14) saturate(.92); }
.cat-name {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  margin-top: 6px; font-size: 15.5px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.cat-name .idx {
  font-style: normal; font-size: 11px; font-weight: 600;
  color: #7c9cbc; letter-spacing: .08em;
}
.cat-tile .dash, .fish-card .dash, .step-card .dash, .hab-row .dash, .signal-list .dash {
  display: inline; color: #a3bdd6; margin: 0 4px 0 2px;
}
.cat-desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 2px;
  font-size: 11.5px; line-height: 1.44; color: #3d5b79; text-align: center;
}
.cat-tile:hover .cat-name { color: var(--c-accent); }

/* ── M3 item-grid ──────────────────────────────────────── */
.m3 {
  min-height: var(--h-m3);
  padding: 10px 0 8px;
  background: var(--c-band-b);
}
.fish-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 17px;
  margin-top: 10px;
}
.fish-card a { display: block; color: var(--c-ink); }
.fish-frame {
  display: block;
  aspect-ratio: 156 / 104;
  border-radius: var(--r-md);
}
.fish-card h3 {
  margin-top: 6px; font-size: 15.5px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fish-card p {
  margin-top: 3px;
  font-size: 12.2px; line-height: 1.58; color: #4a6482;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}
.fish-card:hover h3 { color: var(--c-accent); }

/* ── M4 identify-path ──────────────────────────────────── */
.m4 {
  min-height: var(--h-m4);
  padding: 6px 0 6px;
  background: linear-gradient(180deg, var(--c-band-c) 0%, var(--c-band-d) 46%, var(--c-band-d) 100%);
}
.step-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 78px;
  margin-top: 14px;
}
.step-card { position: relative; }
.step-card + .step-card::before {
  /* 卡间箭头（稿上是细浅蓝箭头） */
  content: "→";
  position: absolute; left: -58px; top: 30px;
  width: 38px; text-align: center;
  font-size: 18px; color: #86b2dd; line-height: 1;
}
.step-no {
  display: block;
  font-size: 27px; font-weight: 700; line-height: 1;
  color: #8fb9e4; letter-spacing: .02em;
}
.step-card h3 { margin-top: 10px; font-size: 16.5px; }
.step-card p {
  margin-top: 5px;
  font-size: 12.4px; line-height: 1.62; color: #3f5b78;
}

/* ── M5 habitat-chain + M6 health-signal ───────────────── */
.m56 {
  min-height: var(--h-m5);
  padding: 22px 0 16px;
  background: linear-gradient(180deg, var(--c-band-e) 0%, #e0edfa 100%);
}
.m56 .sec-head-left h2 { line-height: 1.16; }
.m56-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 411px;
  justify-content: space-between;
  gap: 0;
}
.habitat h2, .signal h2 { font-size: 26px; }
.hab-row {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
  margin-top: 14px;
}
.hab-frame {
  display: block; aspect-ratio: 166 / 104; border-radius: var(--r-md);
}
.hab-row h3 { margin-top: 8px; font-size: 14.5px; font-weight: 700; }
.hab-row p { margin-top: 5px; font-size: 12px; line-height: 1.66; color: #3f5b78; }

.signal-list { margin-top: 8px; }
.signal-list li {
  display: grid; grid-template-columns: 30px 1fr; gap: 11px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(11, 101, 192, .1);
}
.signal-list li:last-child { border-bottom: 0; }
.signal-ico {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: #2b7fbd;
  box-shadow: 0 2px 8px rgba(11, 36, 70, .06);
}
.signal-ico svg { width: 18px; height: 18px; }
.signal-list h3 { font-size: 13px; font-weight: 700; line-height: 1.5; }
.signal-list p { margin-top: 1px; font-size: 11.6px; line-height: 1.55; color: #3f5b78; }

/* ── M7 scope-note ─────────────────────────────────────── */
.m7 { padding: 18px 0; }
.m7-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  padding: 22px 110px 24px;
  border-radius: var(--r-lg);
  background: #dfecfa;
}
.m7-main h2 { font-size: 21px; }
.m7-main p {
  margin-top: 9px; max-width: 760px;
  font-size: 13px; line-height: 1.74; color: #35526f;
}
.m7-note p {
  font-size: 12.4px; line-height: 1.76; color: #3f5b78;
  padding-left: 16px; border-left: 2px solid #b6d3ef;
}

/* ── M8 site-cta ───────────────────────────────────────── */
.m8 { padding: 10px 0; }
.m8-inner {
  position: relative;
  min-height: 204px;
  padding: 30px 52px;
  border-radius: var(--r-lg);
  overflow: hidden;
  color: #eef6ff;
  background-color: #0b5f88;
  background-image:
    linear-gradient(96deg, rgba(6, 66, 104, .94) 0%, rgba(9, 82, 122, .8) 42%, rgba(10, 105, 140, .46) 72%, rgba(12, 119, 152, .26) 100%),
    url("../images/cta-water.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.m8 h2 { color: #f4faff; font-size: 28px; }
.m8 p {
  margin-top: 9px; max-width: 620px;
  font-size: 13.5px; line-height: 1.72; color: #dcecf8;
}
.m8-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.m8-actions .btn { height: 44px; padding: 0 26px; font-size: 14px; }

/* ── 响应式 ────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .cat-row { gap: 18px; }
  .fish-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
  .step-row { grid-template-columns: repeat(2, 1fr); gap: 26px 40px; }
  .step-card + .step-card::before { display: none; }
  .m56-grid { grid-template-columns: 1fr; gap: 30px; }
  .hab-row { grid-template-columns: repeat(3, 1fr); }
  .m7-grid { grid-template-columns: 1fr; gap: 18px; padding: 26px 40px; }
}

@media (max-width: 900px) {
  .hero { padding: 84px 0 40px; min-height: 0; }
  .hero-copy { max-width: none; }
  .hero h1 { font-size: 38px; }
  .hero-lead { font-size: 16px; }
  .m2, .m3, .m4, .m56 { min-height: 0; }
  .cat-row { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .fish-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .step-row { grid-template-columns: 1fr; gap: 22px; }
  .hab-row { grid-template-columns: repeat(2, 1fr); }
  .m7-grid { padding: 22px; }
  .m8-inner { padding: 30px 24px; min-height: 0; }
  .m8 h2 { font-size: 24px; }
  .section-title, .sec-head-center h2, .sec-head-left h2 { font-size: 22px; }
  .habitat h2, .signal h2 { font-size: 21px; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 31px; }
  .hero-actions { flex-wrap: wrap; }
  .cat-row, .fish-row, .hab-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m7-main p, .m7-note p { font-size: 13px; }
}
