:root {
  --blue: #1455d9;
  --blue-dark: #0e3fa8;
  --blue-soft: #eaf1ff;
  --ink: #16181d;
  --ink-2: #4a5160;
  --ink-3: #8a93a3;
  --line: #e8ecf3;
  --bg-soft: #f6f8fc;
  --footer: #0b1a33;
  --radius: 12px;
  --wrap: 1200px;
  --shadow-sm: 0 2px 12px rgba(16, 34, 70, 0.06);
  --shadow-md: 0 10px 30px rgba(16, 34, 70, 0.1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-2);
  background: #fff;
  overflow-x: hidden;
}

/* height:auto 是关键：HTML 上的 width/height 属性会被当作固定尺寸，
   一旦被 max-width:100% 压窄，高度不跟着缩就会把图拉变形。
   需要固定尺寸的图（图标、资讯封面、装饰图）在各自规则里显式写 height 覆盖。 */
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- 通用标题 ---------- */
.sec { padding: 88px 0; }
.sec-sm { padding: 64px 0; }
.sec-head { text-align: center; margin-bottom: 48px; }
.sec-head h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 2px;
  line-height: 1.4;
}
.sec-head p {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-2);
}
.sec-head a { color: #33a1ff; }
.sec-head a:hover { text-decoration: underline; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-outline {
  border: 1px solid var(--blue);
  color: var(--blue);
  background: #fff;
}
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-solid { background: var(--blue); color: #fff; }
.btn-solid:hover { background: var(--blue-dark); }
.btn-login { background: var(--blue); color: #fff; }
.btn-login:hover { background: var(--blue-dark); }
.btn-register { border: 1px solid var(--line); color: var(--ink-2); background: #fff; }
.btn-register:hover { border-color: var(--blue); color: var(--blue); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  transition: gap 0.2s ease;
}
.link-more:hover { gap: 8px; }
.link-more svg { width: 14px; height: 14px; }

/* ---------- 顶部导航 ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: #fff;
  transition: box-shadow 0.3s ease;
}
.header.is-stuck { box-shadow: 0 4px 20px rgba(16, 34, 70, 0.08); }
.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo svg { width: 36px; height: 36px; flex: none; }
/* 选择器必须限定到 .logo-txt 内部：
   写成 `.logo span` 会把外层的 .logo-txt 本身也命中（它是 .logo 的后代 span），
   line-height 被压成 1 → 中文行盒只有 1em，装不下字形 → 与英文副标题重叠。 */
.logo-txt { display: flex; flex-direction: column; justify-content: center; }
.logo-txt b { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: 1px; line-height: 1.35; }
.logo-txt > span { display: block; font-size: 9px; color: var(--ink-3); letter-spacing: 1.4px; line-height: 1.2; margin-top: 1px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav a {
  position: relative;
  padding: 24px 14px;
  font-size: 15px;
  color: var(--ink);
  white-space: nowrap;   /* 品牌名变长后导航空间变小，禁止文字折行 */
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav a:hover { color: var(--blue); }
.nav a:hover::after,
.nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--blue); }

.header-act { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-act .welcome { font-size: 14px; color: var(--ink-2); }
.header-act .welcome a { color: var(--blue); }

.burger {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: background 0.2s;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease;
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger.on span { background: transparent; }
.burger.on span::before { transform: translateY(6px) rotate(45deg); }
.burger.on span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: 72px; background: #dce9f5; }
.hero img { width: 100%; height: auto; }

/* ---------- 服务介绍 ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
}
.intro-grid h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: 0.5px;
}
.ticks { margin: 26px 0 32px; }
.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--ink-2);
}
.ticks img { width: 22px; height: 22px; flex: none; margin-top: 3px; }
.intro-right p { font-size: 15px; color: var(--ink-2); margin-bottom: 26px; }
.intro-right img { border-radius: var(--radius); width: 100%; height: auto; }

/* ---------- 海外仓分布 ---------- */
.wh-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 76px;
}
.wh-row:last-child { margin-bottom: 0; }
.wh-row.flip .wh-text { order: 2; }
.wh-row.flip .wh-pic { order: 1; }
.wh-text h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 20px;
  transition: color 0.25s ease;
}
.wh-row:hover .wh-text h3 { color: var(--blue); }
.wh-text p { font-size: 15px; color: var(--ink-2); margin-bottom: 24px; }
.wh-pic img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  aspect-ratio: 3 / 2;   /* 三张图统一取景框，靠裁切对齐高度（原站是强行拉成同高，会变形） */
  object-fit: cover;
  height: auto;
}

/* ---------- 海外仓服务 ---------- */
.service-wrap { position: relative; padding-bottom: 88px; }
.svc-hero { position: relative; overflow: hidden; padding: 88px 0 76px; }
/* 这张屋顶照片是"通栏背景"，此处刻意拉满：
   原站同一个文件(bg_5.png)也用 .bg{width:100%;height:100%} 直接拉伸（实测拉伸比原站 157%、本站 119%，本站更轻）。
   若改成 object-fit:cover 保持比例，屋顶斜线会变陡而被裁断，5 个图标就无法"站"在屋脊线上。
   所以这里保持 fill，不要"优化"成 cover。 */
.svc-hero .deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.svc-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 82%);
  z-index: 0;
  pointer-events: none;
}
.svc-hero > .wrap { position: relative; z-index: 1; }
.svc-rest { padding-top: 8px; }

.svc-icons {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.svc-icons .item { text-align: center; width: 170px; }
.svc-icons img { width: 96px; height: 96px; margin: 0 auto 16px; object-fit: contain; }
.svc-icons p { font-size: 15px; color: var(--ink); transition: color 0.2s ease; }
.svc-icons .item:hover p { color: var(--blue); }

.line-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}
.line-top h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.line-top p { font-size: 15px; color: var(--ink-2); max-width: 560px; }

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 16px;
}
.card p { font-size: 14px; color: var(--ink-2); margin-bottom: 22px; min-height: 66px; }

/* ---------- 数据统计 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 76px 0 20px;
  text-align: center;
}
.stats b {
  display: block;
  font-size: 46px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 1px;
  line-height: 1.2;
}
.stats span { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-2); }

/* ---------- 最新资讯 ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.news-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-card .pic { overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-soft); }
.news-card .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover .pic img { transform: scale(1.06); }
.news-card .text { padding: 22px 0 18px; display: flex; flex-direction: column; flex: 1; }
.news-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card:hover h3 { color: var(--blue); }
.news-card p {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card .date {
  margin-top: 16px;
  text-align: right;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- 热门回答 ---------- */
.faq-wrap { position: relative; overflow: hidden; background: var(--bg-soft); }
.faq-wrap .deco {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 2600px;
  height: auto;      /* 只给宽，高度按原比例 —— 波浪装饰不能被压扁 */
  max-width: none;
  opacity: 0.26;
  pointer-events: none;
}
.faq-wrap > .wrap { position: relative; z-index: 1; }

.faq-grid { display: grid; grid-template-columns: 30% 1fr; gap: 32px; }
.faq-nav {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 8px;
  align-self: start;
}
.faq-nav li {
  padding: 12px 22px;
  font-size: 15px;
  color: var(--ink-2);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.faq-nav li:hover { color: var(--blue); }
.faq-nav li.on {
  color: var(--blue);
  font-weight: 500;
  background: var(--blue-soft);
  border-left-color: var(--blue);
}
.faq-body {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 40px;
  min-height: 300px;
}
.faq-item { display: none; }
.faq-item.on { display: block; }
.faq-q { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.faq-q .tag {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
}
.tag-q { background: var(--blue-soft); color: var(--blue); }
.tag-a { background: var(--blue); color: #fff; }
.faq-q span { font-size: 17px; font-weight: 500; color: var(--ink); }
.faq-a { display: flex; gap: 14px; align-items: flex-start; }
.faq-a span, .faq-a p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.9;
  white-space: pre-line;
}

/* ---------- 页脚 ---------- */
.footer {
  background: var(--footer);
  color: #fff;
  padding: 68px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.2fr;
  gap: 32px;
  padding-bottom: 48px;
}
/* 页脚栏目标签：原来写成 h6，会让标题层级从 h3 直接跳到 h6（无障碍工具报层级断裂），
   空占位的 h6 还会被读屏念成空标题。改用 h4 + 非标题的 div 占位。 */
.footer .foot-h {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 20px;
}
.footer li { margin-bottom: 12px; }
.footer li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s ease;
}
.footer li a:hover { color: #fff; }
.footer .contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 16px;
}
.footer .contact img { width: 18px; height: 18px; flex: none; margin-top: 4px; opacity: 0.9; }
.footer .contact li span { min-width: 0; overflow-wrap: anywhere; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 22px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 13px; color: rgba(255, 255, 255, 0.66); }
.footer-bottom p a { color: rgba(255, 255, 255, 0.66); }
.footer-bottom p a:hover { color: #fff; }
.lang {
  position: relative;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding-right: 16px;
}
.lang::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.lang-menu {
  position: absolute;
  bottom: 26px;
  right: 0;
  min-width: 128px;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  box-shadow: var(--shadow-md);
  display: none;
}
.lang.open .lang-menu { display: block; }
.lang-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
}
.lang-menu a:hover { background: var(--blue-soft); color: var(--blue); }

/* ---------- 滚动动画 ---------- */
/* 默认（无 JS）保持可见：只有 <html> 带上 .js 时才隐藏等待入场。
   <head> 里的内联脚本会尽早加这个类；JS 被禁用/加载失败时不加，
   内容照常显示，不会出现"整页空白"。 */
[data-anim] { transition: opacity 0.7s ease, transform 0.7s ease; }
html.js [data-anim] { opacity: 0; transform: translateY(26px); }
html.js [data-anim="left"] { transform: translateX(-30px); }
html.js [data-anim="right"] { transform: translateX(30px); }
html.js [data-anim].in { opacity: 1; transform: none; }

/* 只给读屏和搜索引擎看的文本（如首页的 h1） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .intro-grid { gap: 48px; }
  .wh-row { gap: 44px; }
}

/* 顶部导航的汉堡断点比内容断点更早（1080 vs 992）：
   完整导航需要约 580px 宽，而品牌名"辰链供应链 / CHENLIAN SUPPLY CHAIN"
   比原名宽约 50px，993~1079px 区间已放不下，会把导航文字挤成两行。 */
@media (max-width: 1080px) {
  .nav { display: none; }
  .header-act { display: none; }
  .burger { display: flex; }

  .header.open .nav,
  .header.open .header-act {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    top: 72px;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    box-shadow: 0 16px 30px rgba(16, 34, 70, 0.12);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  .header.open .nav { margin-left: 0; padding-bottom: 0; }
  .header.open .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .header.open .nav a::after { display: none; }
  .header.open .header-act {
    top: auto;
    position: static;
    flex-direction: row;
    box-shadow: none;
    padding: 16px 24px 24px;
  }
}

@media (max-width: 992px) {
  .sec { padding: 64px 0; }
  .sec-head h2 { font-size: 25px; }
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .wh-row { grid-template-columns: 1fr; gap: 28px; margin-bottom: 56px; }
  .wh-row.flip .wh-text { order: 0; }
  .wh-row.flip .wh-pic { order: 0; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .card p { min-height: 0; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 36px 24px; padding-top: 56px; }
  .faq-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .svc-hero { padding: 64px 0 56px; }
  .svc-icons .item { width: 140px; }
  .svc-icons img { width: 78px; height: 78px; }
  .line-top { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .sec { padding: 48px 0; }
  .sec-head { margin-bottom: 32px; }
  .sec-head h2 { font-size: 21px; letter-spacing: 1px; }
  .sec-head p { font-size: 14px; }
  .intro-grid h2 { font-size: 21px; }
  .wh-text h3 { font-size: 20px; }
  .cards-3 { grid-template-columns: 1fr; gap: 20px; }
  .news-grid { grid-template-columns: 1fr; }
  .stats b { font-size: 32px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .faq-body { padding: 24px 20px; }
  .faq-q span { font-size: 15px; }
  .faq-a span, .faq-a p { font-size: 14px; }
  .svc-hero { padding: 48px 0 40px; }
  /* 窄屏区块变成"高瘦"形状，fill 会把屋顶纵向拉得比原图还陡（实测 -54%）。
     这里改成等比裁切：只取屋顶中段，太阳能板维持原形；图标仍浮在屋脊线一带。 */
  .svc-hero .deco { object-fit: cover; object-position: 50% 50%; }
  .service-wrap { padding-bottom: 48px; }
  .svc-icons { gap: 12px; margin-top: 8px; }
  .svc-icons .item { width: calc(50% - 12px); }
  .svc-icons img { width: 68px; height: 68px; }
  .svc-rest { padding-top: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; padding-bottom: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .line-top h2 { font-size: 21px; }
  .logo-txt b { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-anim] { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
