/* ===========================================================================
   货运船只综合网 · 首页样式
   视觉基线：03-ui/home-ui-desktop.png（1024×1536 → 1440 设计宽 ×1.40625）
   分区预算与逐轮 compare 见 03-ui/compare-log.md
   =========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 16px;
  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, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }

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

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

/* ------------------------------------------------------------------ 页头 0–68 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 67px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}
.brand svg { width: 29px; height: 29px; fill: none; stroke: var(--ink-strong); stroke-width: 1.5; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink-strong);
  white-space: nowrap;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 27px;
  margin-left: auto;
  font-size: 15px;
  color: var(--ink);
}
.main-nav a {
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.nav-item { position: relative; }
.nav-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 200px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  box-shadow: 0 14px 34px rgba(11, 37, 69, .12);
}
.nav-item.has-dropdown:hover .nav-drop { display: block; }
.nav-drop li a {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 0;
}
.nav-drop li a:hover { color: var(--accent); background: var(--bg-band); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  background: transparent;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; margin: 0 auto; stroke: var(--ink); stroke-width: 1.7; fill: none; }

/* ------------------------------------------------------------------ 首屏 69–474 */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 406px;
  overflow: hidden;
  background: #bcd8f5;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 52%;
  filter: saturate(.94) brightness(.98);
}
/* 稿面左半是明亮的天空，文字压在天空上，故只用极浅的白纱保证对比度，不做深色蒙版 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(96deg, var(--hero-scrim-start) 0%, var(--hero-scrim-mid) 34%, rgba(216, 232, 248, .14) 58%, var(--hero-scrim-end) 74%);
}
.hero-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 59px var(--gutter) 23px;
}
.hero-copy { max-width: 640px; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-23);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink-strong);
}
.hero-lead {
  margin-top: 22px;
  max-width: 620px;
  font-size: 19px;
  line-height: 1.68;
  color: var(--hero-ink);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 21px;
  font-size: 13.5px;
  color: var(--hero-ink-soft);
}
.hero-stats li { display: flex; align-items: baseline; gap: 6px; }
.hero-stats b {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-invert);
}

/* ---------------------------------------------------------- 通用区块标题 */
.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-18);
  line-height: 1.12;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: .02em;
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-link {
  font-size: 14.5px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
  white-space: nowrap;
}
.section-link:hover { color: var(--accent-strong); border-bottom-color: var(--accent-strong); }
.grid-foot { margin-top: 14px; }
.grid-foot.right { text-align: right; }

/* 三个纸白内容区块自己承担横向留白：section 与容器同宽，避免宽屏下内容比区块多缩进 */
.categories,
.featured,
.latest,
.glossary,
.topic-band,
.cta-band,
.site-footer {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.categories > .container,
.featured > .container,
.latest > .container,
.glossary > .container,
.topic-band > .container,
.cta-band > .container,
.site-footer > .container { max-width: none; padding-left: 0; padding-right: 0; }

/* ------------------------------------------------ 按船型查找 475–799 */
.categories { padding-top: 32px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  margin-top: 6px;
}
.cat-card { display: block; counter-increment: cat; }
.cat-grid { counter-reset: cat; }
.cat-thumb {
  aspect-ratio: 181 / 109;
  overflow: hidden;
  background: var(--bg-band);
}
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-card:hover .cat-thumb img { transform: scale(1.04); }
.cat-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 11px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink-strong);
}
.cat-name::before {
  content: counter(cat, decimal-leading-zero);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: .06em;
}
.cat-desc {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.62;
  color: var(--ink-muted);
}

/* ------------------------------------------------------ 船型精选 799–1165 */
.featured { padding-top: 24px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 17px;
  margin-top: 9px;
}
.article-card { display: flex; flex-direction: column; }
.card-thumb {
  aspect-ratio: 212 / 104;
  overflow: hidden;
  background: var(--bg-band);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.article-card:hover .card-thumb img { transform: scale(1.04); }
.card-title {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink-strong);
}
.card-body {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-muted);
}
.card-spec { display: none; }

/* ------------------------------------------------------ 最新收录 1165–1442 */
.latest { padding-top: 42px; }
.latest-list { margin-top: 8px; border-top: 1px solid var(--line); counter-reset: row; }
.latest-list li { border-bottom: 1px solid var(--line); position: relative; }
.latest-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 44px;
  align-items: baseline;
  gap: 14px;
  padding: 4px 0;
}
.latest-list li { counter-increment: row; }
.latest-list li::before {
  content: counter(row, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 11.5px;
  line-height: 35px;
  color: var(--ink-faint);
  letter-spacing: .06em;
}
.latest-list .row-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.latest-list .row-title {
  flex: 0 0 auto;
  min-width: 0;
  word-break: break-word;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
  color: var(--ink-strong);
}
.latest-list .row-desc {
  font-size: 13.5px;
  line-height: 22px;
  color: var(--ink-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.latest-list a:hover .row-title { color: var(--accent); }

/* ------------------------------------------ 三个口径（浅蓝带）1457–1620 */
.topic-band {
  margin-top: 15px;
  padding-top: 16px;
  padding-bottom: 8px;
  background: var(--bg-band);
}
.topic-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 35px;
  padding-left: 21px;
  padding-right: 21px;
}
.topic-item svg { width: 26px; height: 26px; fill: none; stroke: var(--ink-strong); stroke-width: 1.4; }
.topic-item h3,
.topic-copy h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--ink-strong);
}
.topic-item h3 { font-size: 21px; }
.topic-item h3 em {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 12px;
  font-style: normal;
  letter-spacing: .08em;
  color: var(--band-ink-soft);
  margin-left: 7px;
}
.topic-copy p,
.topic-item p {
  margin-top: 9px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--band-ink);
}
.topic-copy p { margin-top: 11px; }
.topic-link { margin-top: 4px; }
.topic-link .section-link { color: var(--accent); border-bottom-color: var(--accent-line); }

/* ------------------------------------------------------ 术语速查 1631–1720 */
.glossary { padding-top: 38px; padding-bottom: 25px; }
.glossary-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 34px;
}
.glossary-inner h2 {
  flex: 0 0 auto;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink-strong);
  margin-right: 26px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  padding: 5px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--ink-invert); }
.glossary-note { flex: 1 1 320px; font-size: 13px; line-height: 1.6; color: var(--ink-muted); }
.glossary-detail {
  flex: 1 1 100%;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}
.glossary-detail[hidden] { display: none; }

/* ---------------------------------------------------------- 分流 CTA 1723–1893 */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--on-dark);
  isolation: isolate;
}
.cta-band > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .68;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(96deg, var(--shade-start) 0%, var(--shade-mid) 46%, var(--shade-end) 100%);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding-top: 51px;
  padding-bottom: 51px;
}
.cta-copy h2 {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--ink-invert);
}
.cta-copy p { margin-top: 12px; max-width: 700px; font-size: 15px; line-height: 1.7; color: #c5d6e9; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 27px; flex: 0 0 auto; }

/* ---------------------------------------------------------- 页脚 1905–2160 */
.site-footer {
  background: var(--dark);
  color: var(--on-dark-muted);
  padding-top: 57px;
  padding-bottom: 0;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 18px;
}
.footer-top > * { flex: 1 1 180px; min-width: 170px; }
.footer-brand { flex: 1.4 1 220px; }
.footer-brand .brand-name { color: var(--ink-invert); }
.footer-brand p { margin-top: 10px; font-size: var(--fs-6); line-height: 1.7; color: var(--on-dark-muted); max-width: 320px; }
.footer-col h3,
.footer-about h3 {
  font-size: var(--fs-3);
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--ink-invert);
  margin-bottom: 10px;
}
.footer-col ul { display: grid; gap: 4px; }
.footer-col a { font-size: var(--fs-6); line-height: 1.5; color: var(--on-dark-muted); }
.footer-col a:hover { color: var(--ink-invert); }
.footer-about p { font-size: var(--fs-4); line-height: 1.68; color: var(--on-dark-muted); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 26px;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-3);
  color: var(--on-dark-faint);
}

/* -------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .container { padding: 0 var(--gutter-sm); }
  .categories, .featured, .latest, .glossary, .topic-band, .cta-band, .site-footer { padding-left: var(--gutter-sm); padding-right: var(--gutter-sm); }
  .hero-inner { padding: 56px var(--gutter-sm) 44px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; row-gap: 26px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; row-gap: 28px; }
  .topic-inner { grid-template-columns: 1fr 1fr; gap: 30px; padding: 0; }
  .latest-list .row-desc { white-space: normal; }
}

@media (max-width: 900px) {
  .header-inner { height: 64px; }
  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 32px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { width: 100%; padding: 11px 0; border-bottom: 1px solid var(--line); }
  .main-nav .nav-item { width: 100%; }
  .main-nav .nav-drop {
    position: static;
    display: block;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 0 0 0 14px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .nav-toggle { display: block; }
  .hero { min-height: 460px; }
  .hero h1 { font-size: var(--fs-22); }
  .hero-lead { font-size: var(--fs-10); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-inner { grid-template-columns: 1fr; gap: 26px; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cta-actions { gap: 15px; }
  .glossary-inner h2 { margin-right: 0; }
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-top > *, .footer-brand { flex: 1 1 auto; min-width: 0; }
  .latest-list a { grid-template-columns: minmax(0, 1fr); padding-left: 36px; }
  .latest-list .row-main { flex-wrap: wrap; row-gap: 2px; }
  .latest-list .row-title { flex: 1 1 100%; min-width: 0; word-break: break-word; }
  .latest-list .row-desc { flex: 1 1 100%; white-space: normal; }
}

@media (max-width: 600px) {
  .container { padding: 0 var(--gutter-xs); }
  .categories, .featured, .latest, .glossary, .topic-band, .cta-band, .site-footer { padding-left: var(--gutter-xs); padding-right: var(--gutter-xs); }
  .hero-inner { padding: 40px var(--gutter-xs) 40px; }
  .brand-name { font-size: var(--fs-11); }
  .hero { min-height: 520px; }
  .hero h1 { font-size: var(--fs-19); }
  .hero-lead { font-size: var(--fs-9); }
  .hero-stats { gap: 20px; }
  .section-title { font-size: var(--fs-15); }
  .cat-grid { grid-template-columns: 1fr; gap: 20px; }
  .cat-thumb { aspect-ratio: 16 / 9; }
  .card-grid { grid-template-columns: 1fr; }
  .card-thumb { aspect-ratio: 16 / 9; }
  .main-nav { padding: 8px 20px 16px; }
  .pill-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .cta-copy h2 { font-size: var(--fs-15); }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-bottom { padding-bottom: 40px; }
  .topic-band { padding-top: 34px; padding-bottom: 30px; }
  .latest-list .row-title { font-size: 16px; }
}

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