/* ==========================================================================
   瓜类水果大全 · 首页样式
   基准：03-ui/home-ui-desktop.png（1024×1536 → 1440×2160，×1.40625）
   分区高度预算与量稿数值见 03-ui/compare-log.md
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg-gap);
  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-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: .01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  padding: 10px 18px; background: var(--deep); color: var(--ink-invert);
}
.skip-link:focus { left: 16px; top: 16px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ------------------------------------------------------------- 通用小件 */
.eyebrow {
  display: block;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-xs);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--accent-deep);
  text-transform: uppercase;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 22px; border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s;
}
.btn-primary { background: var(--ink); color: var(--ink-invert); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--deep); }
.btn-ghost { border-color: rgba(36, 76, 27, .35); color: var(--ink); background: transparent; }
.btn-ghost:hover, .btn-ghost:focus-visible { background: rgba(36, 76, 27, .07); }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

/* 左侧标题栏 + 右侧内容：M2–M5 的统一骨架（稿面 290 + 1070） */
.section-split {
  display: grid;
  grid-template-columns: var(--side-col) 1fr;
  column-gap: 30px;
  align-items: start;
}
.col-head h2 {
  margin-top: 10px;
  font-size: var(--fs-h2);
  line-height: 1.32;
  letter-spacing: -.005em;
}
.section { position: relative; }

/* --------------------------------------------------------------- M0 页头 */
.site-header {
  height: var(--h-header);
  background: var(--bg-header);
  border-bottom: 1px solid var(--line-soft);
  position: relative; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; gap: 34px;
  height: 100%;
}
.brand { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.brand-mark { width: 26px; height: 26px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 16.5px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.brand-sub {
  font-size: 10px; letter-spacing: .24em; color: var(--ink-mute);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; text-transform: uppercase;
}
.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.site-nav > a, .nav-parent {
  font-size: 13.5px; color: var(--ink-soft); white-space: nowrap;
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.site-nav > a:hover, .nav-parent:hover { color: var(--ink); border-bottom-color: var(--accent); }
.nav-parent { display: inline-flex; align-items: center; gap: 4px; }
.caret { width: 9px; height: 6px; }
.nav-item { position: relative; }
.nav-sub {
  position: absolute; left: -14px; top: 100%;
  display: none; min-width: 116px; padding: 8px 0;
  max-height: 360px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 10px 26px rgba(20, 51, 13, .12);
}
.nav-sub a { display: block; padding: 6px 14px; font-size: 13px; color: var(--ink-soft); }
.nav-sub a:hover { background: var(--bg-cat); color: var(--ink); }
.nav-item:hover .nav-sub { display: block; }
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 34px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; padding: 0 9px;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--ink); margin: 4px 0; }

/* --------------------------------------------------------------- M1 首屏 */
.hero {
  background: linear-gradient(180deg, var(--bg-hero) 0%, var(--bg-hero-deep) 100%);
  height: var(--h-hero);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 610px 1fr;
  height: 100%;
  padding: 0 0 0 var(--pad);
  max-width: var(--wrap);
}
.hero-copy { padding-top: 26px; max-width: 604px; }
.hero h1 {
  margin-top: 12px;
  font-size: 40px; line-height: 1.18; letter-spacing: -.012em;
  color: var(--ink-strong);
}
.hero-lead {
  margin-top: 14px; max-width: 560px;
  font-size: 13px; line-height: 1.72; color: var(--ink-soft);
}
.hero-actions { display: flex; gap: 12px; margin-top: 16px; }
.hero-stats {
  display: flex; gap: 28px; margin-top: 18px;
  border-top: 1px solid var(--line); padding-top: 11px; max-width: 560px;
}
.hero-stats li { display: flex; align-items: baseline; gap: 5px; }
.hero-stats b {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 19px; font-weight: 700; color: var(--ink);
}
.hero-stats span { font-size: 11.5px; color: var(--ink-mute); }
.hero-media { position: relative; margin: 0; height: 100%; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 26px 0 0 0;
}

/* ------------------------------------------------------------- M2 时令 */
/* 分区高度按稿的预算落位（见 03-ui/compare-log.md）：487→748 = 261 */
.season { background: var(--bg); padding: 33px 0 0; height: 261px; }
.season-head { max-width: 640px; }
.season-head h2 { margin-top: 8px; font-size: 26px; line-height: 1.3; }
.season-cols { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 15px; }
.season-cols li { padding: 9px 15px 0 0; border-top: 1px solid var(--line); }
.season-cols li + li { padding-left: 15px; }
.season-month { font-size: 12.5px; font-weight: 700; color: var(--ink); display: block; }
.season-cols p { margin-top: 4px; font-size: 11.5px; line-height: 1.55; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.season-note { margin-top: 10px; font-size: 11.5px; color: var(--ink-mute); }

/* ------------------------------------------------------------- M3 分类 */
/* 748→1007：27 间隔 + 232 面板 */
.categories { margin-top: 27px; background: var(--bg-cat); padding: 20px 0 0; height: 232px; }
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-card {
  position: relative;
  background: rgba(251, 251, 242, .62);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 13px 13px 14px;
  min-height: 148px;
  transition: background .18s, border-color .18s, transform .18s;
}
.cat-card:hover { background: var(--surface); border-color: var(--line); transform: translateY(-2px); }
.cat-num { font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--accent-deep); }
.cat-card h3 { margin-top: 6px; font-size: 15px; line-height: 1.3; }
.cat-card h3 a::after { content: ""; position: absolute; inset: 0; }
.cat-card p { margin-top: 5px; font-size: 11px; line-height: 1.55; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card::after { content: "→"; position: absolute; right: 13px; top: 11px; font-size: 12px; color: var(--accent-deep); }
.cat-note { margin-top: 10px; font-size: 11px; color: var(--ink-mute); }

/* ------------------------------------------------------------- M4 谱系 */
/* 1007→1240：29 间隔 + 204 面板 */
.atlas { margin-top: 29px; background: var(--bg-atlas); padding: 18px 0 0; height: 204px; }
.atlas-cols { display: grid; grid-template-columns: repeat(4, 1fr); }
.atlas-cols li { border-top: 1px solid var(--line); padding: 9px 18px 0 0; }
.atlas-cols li + li { padding-left: 18px; border-left: 1px solid var(--line-soft); }
.atlas-num { font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 10.5px; font-weight: 700; color: var(--accent-deep); letter-spacing: .12em; }
.atlas-cols h3 { margin-top: 5px; font-size: 14px; line-height: 1.3; }
.atlas-members { display: block; margin-top: 3px; font-size: 10.5px; color: var(--accent-deep); }
.atlas-cols p { margin-top: 4px; font-size: 11px; line-height: 1.55; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.atlas-note { margin-top: 8px; font-size: 11px; color: var(--ink-mute); }

/* ------------------------------------------------------------- M5 品种 */
/* 1240→1454：30 间隔 + 184 面板 */
.featured { margin-top: 30px; background: var(--bg-feature); padding: 14px 0 0; height: 184px; }
.feat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.feat-card { min-width: 0; }
.feat-media {
  display: block; position: relative; overflow: hidden;
  border-radius: var(--radius); aspect-ratio: 1.9 / 1; background: var(--surface-2);
}
.feat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.feat-card:hover .feat-media img { transform: scale(1.04); }
.feat-card h3 { margin-top: 5px; font-size: 12px; line-height: 1.3; }
.feat-card h3 a:hover { color: var(--accent-deep); }
.feat-card p { margin-top: 2px; font-size: 10.5px; line-height: 1.4; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feat-note { margin-top: 7px; font-size: 10.5px; color: var(--ink-mute); }

/* --------------------------------------------------- M6 挑瓜 + M7 产区 */
/* 1454→1673：23 间隔 + 196 面板 */
.duo { margin-top: 23px; background: var(--bg-pick); padding: 11px 0 0; height: 196px; }
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; }
.duo .col-head h2 { font-size: 21px; line-height: 1.25; margin-top: 5px; }
.pick-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-top: 8px; }
.pick-steps li { border-top: 1px solid var(--line); padding-top: 4px; line-height: 1.4; }
.pick-num { display: block; font-size: 10.5px; line-height: 1.25; letter-spacing: .08em; color: var(--accent-deep); font-weight: 700; }
.pick-steps h3 { margin-top: 0; font-size: 12px; line-height: 1.3; }
.pick-steps p { margin-top: 2px; font-size: 10px; line-height: 1.4; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pick-note { margin-top: 5px; font-size: 10px; line-height: 1.4; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.origin-rows { margin-top: 7px; }
.origin-rows li {
  display: grid; grid-template-columns: 112px 1fr; gap: 8px; align-items: baseline;
  border-top: 1px solid var(--line); padding: 2px 0; line-height: 1.4;
}
.origin-name { font-size: 11px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.origin-rows p { font-size: 10px; line-height: 1.4; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.origin-note { margin-top: 5px; font-size: 10px; color: var(--ink-mute); }

/* -------------------------------------------------- M8 营养 + M9 FAQ */
/* 1673→1896：27 间隔 + 196 面板 */
.duo-nutri { margin-top: 27px; background: var(--bg-nutri); padding: 11px 0 0; height: 196px; }
.duo-nutri .col-head h2 { font-size: 21px; line-height: 1.25; margin-top: 5px; }
.nutri-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-top: 8px; }
.nutri-list li { border-top: 1px solid var(--line); padding-top: 4px; line-height: 1.4; }
.nutri-list h3 { font-size: 12px; line-height: 1.25; }
.nutri-list p { margin-top: 2px; font-size: 10px; line-height: 1.4; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.faq-list { margin-top: 5px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 3px 24px 3px 0; font-size: 11px; font-weight: 600; line-height: 1.45; color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 2px; top: 3px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 13px; color: var(--accent-deep);
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: 0 22px 4px 0; font-size: 10px; line-height: 1.4; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------------ M10 说明 */
/* 1896→2053：24 间隔 + 133 面板 */
.notes { margin-top: 24px; background: var(--bg-note); padding: 14px 0 0; height: 133px; }
.notes-grid { display: grid; grid-template-columns: var(--side-col) 1fr; column-gap: 30px; }
.notes-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.note-item h3 { font-size: 12.5px; line-height: 1.3; }
.note-item p { margin-top: 4px; font-size: 10.5px; line-height: 1.5; color: var(--ink-mute);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------------- M11 页脚 */
/* 2053→2160 = 107 */
.site-footer { background: var(--deep); color: var(--ink-invert); padding: 13px 0 0; height: 107px; }
.footer-inner { display: flex; flex-direction: column; }
.footer-cols {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 8px 30px;
}
.footer-col { flex: 1 1 180px; min-width: 170px; }
.footer-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.footer-tag { margin-left: 10px; font-size: 10px; letter-spacing: .2em; color: var(--ink-invert-soft); }
.footer-lead { margin-top: 3px; font-size: 10.5px; color: var(--ink-invert-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.footer-nav, .footer-hot, .footer-about { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 10.5px; }
.footer-about { gap: 4px 12px; }
.footer-label { flex: 0 0 auto; font-size: 10.5px; letter-spacing: .16em; color: var(--ink-invert-soft); margin-right: 2px; }
.footer-nav a, .footer-hot a, .footer-about a { color: var(--ink-invert); border-bottom: 1px solid transparent; white-space: nowrap; }
.footer-nav a:hover, .footer-hot a:hover, .footer-about a:hover { border-bottom-color: var(--ink-invert-soft); }
.footer-disclaimer {
  margin-top: 6px; padding-top: 5px;
  border-top: 1px solid var(--line-invert);
  font-size: 10px; line-height: 1.45; color: var(--ink-invert-soft);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.footer-copy { margin-top: 3px; font-size: 10.5px; color: var(--ink-invert-soft); }

/* --------------------------------------------------- 宽屏：贴内容栏而非视口 */
@media (min-width: 1441px) {
  .hero-inner { padding-right: max(0px, calc((100vw - var(--wrap)) / 2)); }
}

/* ------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .section-split, .notes-grid { grid-template-columns: 1fr; row-gap: 16px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .atlas-cols { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  .atlas-cols li:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero { height: auto; }
  .hero-inner { grid-template-columns: 1fr; padding: 0 var(--pad); row-gap: 20px; }
  .hero-copy { padding-top: 30px; }
  .hero-media { height: 300px; border-radius: var(--radius-lg); overflow: hidden; }
  .hero-media img { border-radius: var(--radius-lg); }
  .duo-grid { grid-template-columns: 1fr; row-gap: 22px; }
  .site-footer { height: auto; min-height: 107px; padding-bottom: 18px; }
  .footer-cols { gap: 14px 24px; }
  .footer-col { flex: 1 1 240px; }
}

@media (max-width: 860px) {
  :root { --pad: 22px; }
  .site-header { height: auto; min-height: var(--h-header); }
  .header-inner { flex-wrap: wrap; row-gap: 4px; padding-top: 8px; padding-bottom: 8px; }
  .site-nav {
    flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center;
    gap: 0 16px; margin-left: 0; padding-top: 2px;
    border-top: 1px solid var(--line-soft);
  }
  .site-nav > a, .nav-parent { padding: 8px 0; font-size: 13px; border-bottom: 0; }
  .nav-sub { display: none; }
  .season-cols { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .pick-steps, .nutri-list { grid-template-columns: 1fr; }
  .notes-cols { grid-template-columns: 1fr; gap: 14px; }
  .hero h1 { font-size: 30px; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .origin-rows li { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 560px) {
  .cat-grid, .feat-grid { grid-template-columns: 1fr; }
  .season-cols { grid-template-columns: 1fr; }
  .hero-actions { flex-wrap: wrap; }
  .footer-col { flex: 1 1 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
