/* style.css — 首页布局（1440 设计宽，容器 1360 + 40 边距）
   分区高度按 03-ui/compare-log.md 的预算落位。 */

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-hero);
  padding: 14px 0 0;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  gap: 36px;
  align-items: stretch;
  min-height: 398px;
}
.hero-copy { padding: 34px 0 30px; position: relative; z-index: 2; }
.hero-copy h1 {
  margin: 0 0 16px;
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--ink);
}
.hero-lede {
  margin: 0;
  max-width: 30em;
  font-size: 15.5px;
  line-height: 1.9;
  color: #33445c;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 22px;
}
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px 9px 12px;
  background: var(--surface-white);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 20px rgba(20, 44, 78, 0.07);
}
.hero-stats .stat-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-tint);
  color: var(--accent);
}
.hero-stats .stat-icon svg { width: 17px; height: 17px; }
.hero-stats strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.hero-stats span { display: block; font-size: var(--fs-xs); color: var(--ink-muted); line-height: 1.4; }

.hero-media {
  position: relative;
  min-height: 380px;
  margin: 0 -26px 16px 0;
  border-radius: 18px;
  overflow: hidden;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-ribbon {
  position: absolute;
  inset: auto 0 0 0;
  height: 68px;
  background: var(--accent);
  clip-path: polygon(0 26%, 52% 5%, 100% 0, 100% 100%, 0 100%);
  display: flex;
  align-items: flex-end;
  padding: 0 0 12px var(--gutter);
  color: var(--ink-invert);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
  z-index: 1;
}

/* ---------- 按样式查找 ---------- */
.catalog { padding: 36px 0 6px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}
.cat-item {
  display: flex;
  flex-direction: column;
  background: var(--surface-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-strong);
}
.cat-thumb { aspect-ratio: 1.62 / 1; overflow: hidden; background: var(--surface); }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.cat-item:hover .cat-thumb img { transform: scale(1.05); }
.cat-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 10px 10px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.cat-name .num {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.cat-desc {
  display: block;
  padding: 0 10px 12px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------- 常见样式速览 ---------- */
.styles { padding: 30px 0 0; }
.style-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.style-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.style-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-strong);
}
.style-thumb { aspect-ratio: 1.7 / 1; overflow: hidden; background: var(--surface); }
.style-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.style-card:hover .style-thumb img { transform: scale(1.05); }
.style-body { padding: 10px 14px 13px; }
.style-body h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.35; }
.style-body p { margin: 0; font-size: var(--fs-sm); color: var(--ink-muted); line-height: 1.5; }

.browse-all {
  display: flex;
  margin-top: 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  margin: 14px 0 0;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent);
  font-size: var(--fs-body);
  font-weight: 600;
  transition: background 0.22s var(--ease), transform 0.22s var(--ease);
}
.browse-all:hover { background: #d6e5f8; transform: translateY(-2px); }
.browse-all svg { width: 16px; height: 16px; }

/* ---------- 四步选型 ---------- */
.path {
  margin-top: 12px;
  padding: 10px 0 26px;
  background: var(--surface-alt);
}
.path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
  counter-reset: step;
}
.path-step {
  position: relative;
  padding: 0 10px 0 54px;
  counter-increment: step;
}
.path-step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--surface-white);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.path-step + .path-step::after {
  content: "→";
  position: absolute;
  left: -26px;
  top: 3px;
  color: #b9c7d8;
  font-size: 19px;
  line-height: 1;
}
.path-step h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; line-height: 1.4; }
.path-step p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--ink-soft); }

/* ---------- 收录范围 + 选材要点 ---------- */
.scope { padding: 26px 0 22px; }
.scope-grid {
  display: grid;
  grid-template-columns: minmax(0, 47%) minmax(0, 53%);
  gap: 56px;
  align-items: start;
}
.scope-main h2,
.materials h2 {
  margin: 0 0 16px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.scope-main p { margin: 0 0 12px; font-size: 14px; line-height: 1.8; color: var(--ink-soft); }
.scope-main h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.material-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.material { }
.material-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-tint);
  color: var(--accent);
  margin-bottom: 12px;
}
.material-icon svg { width: 20px; height: 20px; }
.material h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.material p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--ink-muted); }

/* ---------- 分流条 ---------- */
.cta-wrap { padding: 56px 0 44px; }
.cta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 150px;
  padding: 26px 32px 26px 240px;
  border-radius: 18px;
  overflow: hidden;
  color: var(--ink-invert);
  background:
    linear-gradient(90deg, rgba(44, 80, 131, 0.06) 0%, rgba(44, 80, 131, 0.86) 26%, rgba(38, 70, 114, 0.97) 46%, rgba(36, 66, 108, 0.99) 100%),
    url("../images/cta-bg.jpg") left center / cover no-repeat,
    var(--accent);
}
.cta-copy { max-width: 40em; }
.cta-copy h2 { margin: 0 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.2px; }
.cta-copy p { margin: 0; font-size: 13.5px; line-height: 1.75; color: rgba(247, 250, 253, 0.86); }
.cta-actions { margin-left: auto; display: flex; gap: 12px; flex: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope-grid { gap: 36px; }
  .cta { padding-left: 180px; }
}

@media (max-width: 1024px) {
  .hero-inner { min-height: 0; }
  .hero-copy { padding: 26px 0 30px; }
  .hero-media { min-height: 320px; margin-bottom: 24px; }
  .hero-ribbon { height: 56px; clip-path: polygon(0 52%, 100% 0, 100% 100%, 0 100%); }
  .path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 8px; }
  .path-step + .path-step:nth-child(3)::after { display: none; }
  .scope-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta { flex-direction: column; align-items: flex-start; padding: 26px 28px 26px 200px; }
  .cta-actions { margin-left: 0; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-media { order: -1; min-height: 240px; margin: 8px 0 22px; border-radius: 14px; }
  .hero-media img { aspect-ratio: 16 / 10; }
  .hero-copy { padding: 0 0 40px; }
  .hero-ribbon { height: 48px; padding-bottom: 8px; font-size: 14px; }
  .catalog { padding-top: 26px; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta { padding: 24px 22px; }
  .cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/cta-bg.jpg") center / cover no-repeat;
    opacity: 0.16;
    z-index: -1;
  }
}

@media (max-width: 560px) {
  .hero-copy h1 { font-size: 30px; }
  .hero-lede { font-size: 14.5px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .style-grid { grid-template-columns: 1fr; }
  .path-grid { grid-template-columns: 1fr; gap: 22px; }
  .path-step + .path-step::after { display: none; }
  .material-grid { grid-template-columns: 1fr; gap: 14px; }
  .material { display: grid; grid-template-columns: 40px 1fr; gap: 0 12px; }
  .material-icon { margin-bottom: 0; grid-row: span 2; }
  .cta-copy h2 { font-size: 20px; }
  .cta-actions { width: 100%; flex-direction: column; }
  .cta-actions .btn { width: 100%; }
}
