/* style.css — 布局骨架与首页分区（样式变量见 tokens.css，公共组件见 components.css） */

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink-soft);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-4);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--text-gutter);
}

/* ---------- 页头 + 首屏共用浅蓝顶区 ---------- */

.masthead {
  background: linear-gradient(180deg, #e9effb 0%, var(--band) 62%, var(--band-2) 100%);
  position: relative;
  overflow: hidden;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  height: var(--hero-h);
  min-height: 300px;
}

.hero-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 44%;
  z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 100%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 38px;
}

.hero-copy { max-width: none; }

.hero h1 {
  font-size: var(--fs-13);
  line-height: 1.12;
  letter-spacing: -.02em;
}

.hero-tagline {
  margin-top: 9px;
  color: var(--blue);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.hero-lead {
  margin-top: 20px;
  max-width: 610px;
  font-size: 24px;
  line-height: 34px;
  color: #33405a;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  margin-left: 28px;
  font-size: var(--fs-5);
  color: #2f3d55;
}

/* ---------- 通用分区 ---------- */

.section { padding: 0 var(--gutter); }
.section > .panel,
.section > .wrap {
  max-width: calc(var(--container) - var(--gutter) * 2);
  margin: 0 auto;
}

.section > .cta-inner { max-width: calc(var(--container) - var(--gutter) * 2); margin: 0 auto; }

.panel {
  background: var(--panel-2);
  border-radius: var(--r-panel);
}

.panel-inner { padding: 16px var(--inner) 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-10);
  line-height: 1.2;
}

.section-head h2::after {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
  transform: translateY(3px);
}

.section-head .more {
  font-size: var(--fs-3);
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.section-head .more:hover { color: var(--blue-deep); }

/* ---------- M2 品类索引 ---------- */

.cats { height: auto; margin-top: 21px; }
.cats .panel { height: auto; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 24px;
  margin-top: 18px;
}

.cat-card { display: block; text-align: center; }

.cat-thumb {
  display: block;
  aspect-ratio: 123 / 66;
  border-radius: var(--r-tile);
  overflow: hidden;
  background: var(--tile);
}

.cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.cat-card:hover .cat-thumb img { transform: scale(1.04); }

.cat-card h3 {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.4;
}

.cat-card p {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.42;
  color: #3b4a63;
  text-align: left;
}

/* ---------- M3 条目速览 ---------- */

.items { height: auto; margin-top: 15px; }
.items .panel { height: auto; }

.item-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.item-grid.list-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.item-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .3s ease, box-shadow .3s ease;
}

.item-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(31, 51, 81, .1); }

.item-link { display: flex; flex-direction: column; height: 100%; }

.item-thumb {
  display: block;
  aspect-ratio: 151 / 77;
  background: var(--tile);
  overflow: hidden;
}

.item-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }

.item-body { flex: 1; display: flex; flex-direction: column; padding: 10px 8px 12px; text-align: center; }

.item-body h3 { font-size: 17px; line-height: 1.45; }

.item-body p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- M4 四步 ---------- */

.steps { height: auto; margin-top: 14px; }
.steps .panel { height: auto; background: var(--panel); }

.step-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 42px;
  margin-top: 22px;
}

.step {
  position: relative;
  padding-left: 0;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -26px;
  top: 12px;
  width: 16px;
  height: 16px;
  border-top: 2px solid #b9cbe6;
  border-right: 2px solid #b9cbe6;
  transform: rotate(45deg);
}

.step-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: var(--fs-2);
  font-weight: 700;
  line-height: 1;
}

.step h3 { font-size: 19px; line-height: 1.4; }

.step p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: #47546b;
}

/* ---------- M5 收录范围 ---------- */

.scope { height: auto; margin-top: 17px; }
.scope .panel {
  position: relative;
  height: auto;
  background: var(--panel-2);
  overflow: hidden;
}

.scope-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 40px;
  padding: 22px var(--inner) 0;
  max-width: 1180px;
}

.scope-icon { flex: none; width: 44px; height: 44px; }

.scope h2 { font-size: var(--fs-10); line-height: 1.4; }

.scope p {
  margin-top: 6px;
  font-size: 15.5px;
  line-height: 1.55;
  color: #3c4a61;
}

.scope-media {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: 27%;
  max-width: 400px;
  opacity: .96;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
}

.scope-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 100%; }

.scope-media img { width: 100%; height: auto; }

/* ---------- M6 参数提示 ---------- */

.tips { height: auto; margin-top: 15px; }
.tips .panel { height: auto; background: var(--panel); }

.tip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 24px -25px 0;
  padding: 0 26px;
}

.tip {
  display: flex;
  gap: 16px;
  padding: 0 26px;
  border-left: 1px solid var(--line);
}

.tip:first-child { padding-left: 0; border-left: 0; }

.tip-icon { flex: none; width: 40px; height: 40px; margin-top: 0; }

.tip h3 { font-size: 19px; line-height: 1.4; }

.tip p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: #47546b;
}

/* ---------- M7 CTA ---------- */

.cta { height: auto; margin-top: 21px; }

.cta-inner {
  position: relative;
  height: auto;
  min-height: 148px;
  border-radius: var(--r-panel);
  background: linear-gradient(100deg, #24508c 0%, #2a5c9e 46%, #2f63a8 100%);
  box-shadow: var(--shadow-cta);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 44px 0 275px;
}

.cta-art {
  position: absolute;
  left: 44px;
  bottom: -8px;
  width: 168px;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(10, 30, 60, .28));
}

.cta h2 { color: var(--white); font-size: 28px; line-height: 1.3; }

.cta p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: #d7e4f5;
  max-width: 760px;
}

.cta-copy { flex: 1 1 auto; min-width: 0; }

.cta .btn { height: 44px; padding: 0 24px; font-size: 16px; }

.cta-actions { display: flex; gap: 14px; flex: none; }

/* ---------- M8 页脚 ---------- */

.site-footer {
  margin-top: 41px;
  height: var(--footer-h);
  display: flex;
  flex-direction: column;
  padding: 44px 0 26px;
  background: var(--navy);
  color: #c8d6e8;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand { max-width: 420px; }

.footer-brand .brand { color: var(--white); font-size: 20px; }

.footer-brand p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.8;
  color: #b9c9dd;
}

.footer-cols {
  display: flex;
  align-items: flex-start;
  gap: 34px;
  flex: 1;
  justify-content: flex-end;
}

.footer-nav { display: flex; align-items: baseline; gap: 24px; flex-wrap: wrap; }

.footer-nav > span,
.footer-about > span {
  font-size: 15px;
  color: #93a8c2;
}

.footer-nav a,
.footer-about a {
  font-size: 15px;
  color: #d6e3f2;
  white-space: nowrap;
}

.footer-nav a:hover,
.footer-about a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

.footer-about {
  padding-left: 46px;
  border-left: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 112px;
}

.footer-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  max-width: 1140px;
  font-size: 15px;
  color: #a8bcd4;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1200px) {
  :root { --gutter: 22px; }
  .hero-media { width: 48%; }
  .cat-grid { gap: 16px; }
  .tip { padding: 0 18px; }
  .step-list { gap: 30px; }
  .step:not(:last-child)::after { right: -20px; }
}

@media (max-width: 1080px) {
  .item-grid.list-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero h1 { font-size: 38px; }
  .hero-tagline { font-size: 31px; }
  .item-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .step-list { grid-template-columns: repeat(2, 1fr); gap: 26px 34px; }
  .step:nth-child(2)::after { display: none; }
  .tip-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 0; }
  .tip:nth-child(3) { padding-left: 0; border-left: 0; }
  .scope-media { width: 26%; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-cols { justify-content: flex-start; }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
    --hero-h: 0px;
    --cats-h: auto;
    --items-h: auto;
    --steps-h: auto;
    --scope-h: auto;
    --tips-h: auto;
    --cta-h: auto;
    --footer-h: auto;
  }
  .masthead { padding-bottom: 26px; }
  .hero { height: auto; min-height: 0; padding-top: 16px; }
  .hero-media { display: none; }
  .hero-copy { max-width: none; }
  .hero h1 { font-size: 32px; }
  .hero-tagline { font-size: 25px; }
  .hero-lead { font-size: 16px; line-height: 1.75; max-width: none; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 24px; }
  .hero-stats { margin-left: 0; justify-content: flex-start; gap: 10px 22px; font-size: 14px; }
  .hero-stats .stat { white-space: nowrap; }
  .section { padding: 0 16px; }
  .section > .panel { height: auto; }
  .panel-inner { padding: 18px 16px 20px; }
  .cats, .items, .steps, .scope, .tips, .cta { height: auto; margin-top: 16px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; }
  .cat-card p { font-size: var(--fs-2); }
  .item-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .step-list { grid-template-columns: 1fr; gap: 20px; }
  .step::after { display: none !important; }
  .tip-grid { grid-template-columns: 1fr; gap: 18px; }
  .tip { padding: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .tip:first-child { border-top: 0; padding-top: 0; }
  .scope-inner { padding: 18px 16px 0; flex-direction: column; max-width: none; }
  .scope-media { position: static; width: 60%; margin: 6px 0 -4px auto; }
  .cta-inner { flex-direction: column; align-items: flex-start; padding: 22px 20px; gap: 16px; }
  .cta-art { display: none; }
  .cta-actions { flex-wrap: wrap; }
  .site-footer { height: auto; margin-top: 24px; }
  .footer-inner { padding: 28px 16px; }
  .footer-cols { flex-direction: column; gap: 20px; }
  .footer-about { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.18); padding-top: 16px; }
  .footer-bottom { margin-top: 22px; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 28px; }
  .hero-tagline { font-size: 22px; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .hero-actions .btn { flex: 0 0 auto; height: 44px; padding: 0 20px; font-size: 15px; }
  .hero-stats { gap: 8px 18px; font-size: 13px; }
  .item-grid { grid-template-columns: 1fr; }
  .item-grid.list-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- M9 数据化补充：品类计数徽标 / 分类内容模块 ---------- */

.cat-card h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-count {
  font-style: normal;
  font-size: var(--fs-1);
  font-weight: 600;
  line-height: 1.7;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.section.mod { margin-top: 15px; }
.section.mod .panel { background: var(--panel-2); }
.section.mod .panel-inner { padding-bottom: 22px; }
.section.mod .item-body p { color: var(--muted); }

/* ---------- M10 页脚四栏（品牌 / 品类 / 专题 / 关于） ---------- */

.site-footer { height: auto; }

.footer-inner {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px 40px;
}

.footer-brand { flex: 1 1 300px; min-width: 240px; max-width: 420px; }

.footer-nav,
.footer-topics,
.footer-about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  flex: 0 1 auto;
  min-width: 108px;
}

.footer-topics { min-width: 140px; max-width: 200px; }

.footer-nav > span,
.footer-topics > span,
.footer-about > span {
  font-size: 15px;
  color: #93a8c2;
}

.footer-nav-links,
.footer-topic-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-links a,
.footer-topic-links a {
  font-size: 15px;
  color: var(--invert-link);
  white-space: nowrap;
}

.footer-nav-links a:hover,
.footer-topic-links a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-about { padding-left: 36px; border-left: 1px solid var(--invert-line); }
.footer-about .footer-icp { font-size: var(--fs-2); color: #93a8c2; margin-top: 2px; }

.footer-bottom { max-width: none; }

@media (max-width: 900px) {
  .footer-inner { flex-direction: column; gap: 22px; }
  .footer-brand { flex: 1 1 100%; max-width: none; }
  .footer-nav,
  .footer-topics,
  .footer-about { flex: 1 1 140px; min-width: 0; }
  .footer-nav-links,
  .footer-topic-links { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .footer-about { padding-left: 0; border-left: 0; border-top: 1px solid var(--invert-line); padding-top: 16px; flex: 1 1 100%; }
}

/* ---------- M11 站点文字 logo ---------- */

.site-logo-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
}

.site-footer .site-logo-text { color: var(--white); font-size: 20px; }

/* ---------- M12 移动端导航常显横排（已移除汉堡按钮） ---------- */

@media (max-width: 900px) {
  .site-nav {
    position: static;
    display: block;
    margin-left: auto;
    padding: 0;
    background: none;
    border-top: 0;
    box-shadow: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 16px; }
  .site-nav li { width: auto; }
  .site-nav a { display: inline-block; padding: 6px 0; font-size: var(--fs-3); border-bottom: 0; }
  .site-nav a[aria-current="page"]::after { display: block; bottom: -6px; }
}

@media (max-width: 560px) {
  .header-inner { gap: 12px; }
  .site-logo-text { font-size: 18px; }
  .brand-mark { width: 26px; height: 28px; }
  .site-nav ul { gap: 13px; }
  .site-nav a { font-size: var(--fs-2); }
}

/* ---------- M13 分页 ---------- */

.pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

.page-btn,
.page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  font-size: var(--fs-3);
  color: var(--ink-soft);
  transition: border-color .2s ease, color .2s ease;
}

.page-btn:hover,
.page-num:hover { border-color: #b6cbe8; color: var(--blue); }

.page-num.is-current {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
}

.page-gap { padding: 0 4px; color: var(--muted); }

.page-info { margin-left: auto; font-size: var(--fs-2); color: var(--muted); }

@media (max-width: 560px) {
  .page-info { margin-left: 0; flex: 1 1 100%; }
}

/* ---------- M14 正文配图 ---------- */

.article figure { margin: 26px 0 0; }

.article figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-card);
}

.article figcaption {
  margin-top: 8px;
  font-size: var(--fs-2);
  color: var(--muted);
}

/* ---------- M15 页头底色与导航（18 品类：桌面收窄 + 可横滚，移动端常显横排） ---------- */

/* 页头与首屏同浅蓝顶区，保持 demo 的连续底色 */
.site-header {
  background: linear-gradient(180deg, #e9effb 0%, var(--band) 100%);
}

.site-header .header-inner {
  gap: 24px;
}

.site-header .header-inner .site-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-header .header-inner .site-nav::-webkit-scrollbar { display: none; }

.site-header .header-inner .site-nav ul {
  flex-wrap: nowrap;
  gap: 16px;
}

.site-header .header-inner .site-nav a {
  font-size: var(--fs-4);
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .site-header .header-inner .site-nav ul { gap: 12px; }
  .site-header .header-inner .site-nav a { font-size: var(--fs-3); }
}

/* 移动端：常显横排 + 内部横滚（覆盖 components.css 的抽屉式隐藏） */
@media (max-width: 900px) {
  .site-header .header-inner .site-nav {
    position: static;
    display: block;
    margin-left: auto;
    padding: 0;
    background: none;
    border-top: 0;
    box-shadow: none;
  }
  .site-header .header-inner .site-nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
  }
  .site-header .header-inner .site-nav li { width: auto; }
  .site-header .header-inner .site-nav a {
    display: inline-block;
    padding: 6px 0;
    font-size: var(--fs-3);
    border-bottom: 0;
  }
  .site-header .header-inner .site-nav a[aria-current="page"]::after {
    display: block;
    bottom: -6px;
  }
}

@media (max-width: 560px) {
  .site-header .header-inner .site-nav ul { gap: 13px; }
  .site-header .header-inner .site-nav a { font-size: var(--fs-2); }
}
