/* ==========================================================================
   运动防护穿戴用品 · 首页样式
   基线：03-ui/home-ui-desktop.png（1024×1536 → 归一 1440×2160，设计宽 1440）
   分区预算（1440 css px，量自视觉稿剖面 — 见 03-ui/compare-log.md）：
     header        0–60      高  60   深蓝通栏，左 logo 右导航
     hero         60–440     高 380  通幅深蓝实拍出血底 + 左侧文案
     categories  440–748     高 308  标题带 467–498 + 6 张白卡 510–665 + 卡外说明 678–740
     featured    748–996     高 248  标题 795–824 + 3 张图文卡 842–982
     spec        996–1300    高 304  标题 1031–1066 + 通栏表格 1074–1300
     steps      1300–1545    高 245  标题 1308–1341 + 3 列步骤卡 1355–1531
     scenes     1545–1890    高 345  长呼吸带 + 标题 1683–1716 + 5 列场景卡 1721–1866
     note       1890–2019    高 129  浅底居中标题 + 两段小字
     footer     2019–2160    高 141  深蓝三栏 + 版权行
   内容栏 1328（左右各 56，量自稿 x 56…1384）；变量见 tokens.css。
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; 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: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  padding: 9px 16px;
  font-size: var(--fs-sm);
  color: #fff;
  background: var(--navy-700);
  border-radius: var(--radius-sm);
  transition: top .18s ease;
}
.skip-link:focus { top: 10px; }

/* ---------------------------------------------------------------- header
   预算 60：一条紧凑深蓝条，内容左缘 56、右缘 1384（与正文同栏）。 */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: linear-gradient(94deg, #1b344e 0%, #1e3852 52%, #2c445c 100%);
  color: var(--on-dark);
}
.site-header.is-stuck { box-shadow: 0 10px 22px -18px rgba(8, 20, 34, .9); }

.header-inner {
  height: var(--header-h);
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.brand__mark { display: inline-flex; color: var(--accent); }
.brand__text { font-size: 14px; font-weight: 700; letter-spacing: .02em; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.site-nav a {
  font-size: var(--fs-sm);
  color: var(--on-dark-soft);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--on-dark); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; margin-left: auto;
  width: 34px; height: 34px; padding: 0;
  background: transparent; border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-sm); color: var(--on-dark); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 15px; height: 1.5px; background: currentColor;
  margin-inline: auto; content: "";
}
.nav-toggle__bars::before { margin-top: -5px; }
.nav-toggle__bars::after { margin-top: 4px; }

.mobile-nav {
  position: absolute; inset-inline: 0; top: var(--header-h);
  display: grid; gap: 1px;
  background: var(--navy-800);
  border-top: 1px solid var(--line-on-dark);
  padding: 6px var(--gutter) 12px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding-block: 10px; font-size: var(--fs-sm); color: var(--on-dark-soft); border-bottom: 1px solid var(--line-on-dark); }

/* ------------------------------------------------------------------ hero
   预算 380（60 → 440）：深蓝实拍通幅出血底（稿面 0–439 彩色覆盖率 0.78）+ 左侧文案栏。 */
.hero {
  position: relative;
  height: 380px;
  overflow: hidden;
  background: var(--navy-800);
  color: var(--on-dark);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; filter: brightness(1.34) saturate(1.02); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(96deg, rgba(26, 47, 68, .90) 0%, rgba(30, 53, 76, .74) 30%, rgba(42, 66, 90, .16) 62%, rgba(42, 66, 90, .04) 100%),
    linear-gradient(180deg, rgba(18, 34, 50, .12), rgba(18, 34, 50, 0) 50%, rgba(18, 34, 50, .10));
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
}
.hero-copy {
  position: relative; z-index: 2;
  padding-top: 36px;
  max-width: 700px;
}
.hero-eyebrow {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-size: 46px; line-height: 1.18; font-weight: 800;
  color: #fff; letter-spacing: -.01em;
}
.hero-eyebrow__num { color: var(--accent); font-weight: 800; letter-spacing: -.01em; }
.hero-eyebrow__dot { color: rgba(255, 255, 255, .38); }
.hero-title {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .92);
}
.hero-lede {
  margin-top: 16px;
  font-size: var(--fs-lede);
  line-height: 1.85;
  color: rgba(255, 255, 255, .82);
}
.hero-claims {
  margin-top: 22px;
  display: flex; align-items: center; gap: 14px;
  font-size: var(--fs-sm); color: rgba(255, 255, 255, .64);
}
.hero-claims li { display: inline-flex; align-items: center; gap: 7px; }
.hero-claims li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ------------------------------------------------------------- 通用区块头
   稿上每个区块标题左侧带 5px 橙色竖条，标题 cap 高约 27（fs 26）。 */
.sec-head {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 10px;
}
.sec-title {
  position: relative;
  padding-left: 12px;
  font-size: var(--fs-h2);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.sec-title::before {
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 22px; border-radius: 2px;
  background: var(--accent);
}

/* -------------------------------------------------------------- categories
   预算 308（440 → 748）：标题带 467–498；6 张白卡 510–665（卡内「编号 + 缩略图 + 名称」）；
   说明文字落在白卡下方的页面底 678–740。 */
.categories { padding: 27px 0 9px; }
.cat-grid {
  max-width: var(--wrap);
  margin: 12px auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.cat-card { display: block; }
.cat-card__box {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-areas:
    "num  num"
    "thumb name";
  align-content: start;
  align-items: center;
  column-gap: 10px;
  row-gap: 10px;
  min-height: 155px;
  padding: 14px 13px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease;
}
.cat-card:hover .cat-card__box, .cat-card:focus-visible .cat-card__box { transform: translateY(-2px); border-color: var(--accent); }
.cat-card__num {
  grid-area: num;
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--accent);
}
.cat-card__thumb { grid-area: thumb; display: block; width: 62px; height: 62px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.cat-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-card__name { grid-area: name; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.cat-card__desc { display: block; margin-top: 13px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

/* ---------------------------------------------------------------- featured
   预算 248（748 → 996）：标题 795–824，三列图文卡 842–982（左侧方图 80×80）。 */
.featured { padding: 45px 0 14px; }
.feat-grid {
  max-width: var(--wrap);
  margin: 16px auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.feat-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  min-height: 140px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feat-card__media { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }
.feat-card__media img { width: 100%; height: 100%; object-fit: cover; }
.feat-card__title { font-size: 13.5px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.feat-card__desc { margin-top: 5px; font-size: 10.5px; line-height: 1.55; color: var(--muted); }

/* -------------------------------------------------------------------- spec
   预算 304（996 → 1300）：标题 1031–1066，通栏表格 1074–1300（深色表头 + 5 行，行高约 38）。 */
.spec {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 35px var(--gutter) 0;
}
.spec-panel { padding: 0 0 8px; }
.spec-title {
  position: relative;
  padding-left: 12px;
  font-size: var(--fs-h2);
  line-height: 1.35;
  font-weight: 700;
}
.spec-title::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 5px; height: 22px; border-radius: 2px; background: var(--accent);
}
.spec-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.spec-row {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1fr;
  min-height: 37px;
  border-bottom: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row:nth-child(even) { background: #fafbfc; }
.spec-cell {
  padding: 7px 16px;
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--ink-soft);
  border-left: 1px solid var(--line);
}
.spec-cell:first-child { border-left: 0; }
.spec-cell--scene { font-weight: 700; color: var(--ink); }

/* ------------------------------------------------------------------- steps
   预算 245（1300 → 1545）：标题带 1308–1341，三列步骤卡 1355–1531（卡高 176）。 */
.steps { padding: 8px 0 14px; }
.step-grid {
  max-width: var(--wrap);
  margin: 14px auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.step-card {
  min-height: 176px;
  padding: 22px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-card__num {
  display: block;
  font-size: 24px; font-weight: 800; letter-spacing: .08em;
  color: var(--accent);
}
.step-card__title { margin-top: 10px; font-size: 16.5px; font-weight: 700; line-height: 1.45; }
.step-card__desc { margin-top: 10px; font-size: 12px; line-height: 1.8; color: var(--muted); }

/* ------------------------------------------------------------------ scenes
   预算 345（1545 → 1890）：先留 138px 呼吸带，标题 1683–1716，5 列场景卡 1721–1866。 */
.scenes { padding: 142px 0 0; }
.scene-grid {
  max-width: var(--wrap);
  margin: 5px auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.scene-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.scene-card img { width: 100%; height: 101px; object-fit: cover; }
.scene-card__body { padding: 9px 10px 10px; }
.scene-card__name { font-size: 11px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.scene-card__desc { margin-top: 3px; font-size: 10px; line-height: 1.45; color: var(--muted); }

/* -------------------------------------------------------------------- note
   预算 129（1890 → 2019）：浅底通栏，居中标题 1908–1935 + 两段小字 1935–1974。 */
.note { background: #eceff3; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note-inner {
  max-width: 1010px;
  margin-inline: auto;
  padding: 17px var(--gutter) 21px;
  text-align: center;
}
.note-title {
  display: inline-block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.note-text { margin-top: 6px; font-size: 10.5px; line-height: 1.6; color: var(--muted); }

/* ------------------------------------------------------------------ footer
   预算 141（2019 → 2160）：深蓝三栏 + 底部版权行。 */
.site-footer { background: var(--navy-800); color: var(--on-dark); }
.footer-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 16px var(--gutter) 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 28px;
  position: relative;
}
.footer-inner > .footer-brand,
.footer-inner > .footer-col { flex: 1 1 190px; min-width: 170px; }
.footer-brand__name { font-size: 15px; font-weight: 700; }
.footer-brand__desc { margin-top: 6px; font-size: 11px; line-height: 1.6; color: var(--on-dark-soft); }
.footer-col__head { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: .06em; }
.footer-links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 3px 14px; }
.footer-links a { font-size: 11px; color: var(--on-dark-soft); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--on-dark); }
.footer-note { margin-top: 6px; font-size: 11px; line-height: 1.6; color: var(--on-dark-mute); }
.footer-copy {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 10.5px;
  color: var(--on-dark-mute);
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scene-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scenes { padding-top: 90px; }
}

@media (max-width: 1024px) {
  :root { --gutter: 32px; }
  .header-inner { gap: 16px; }
  .site-nav {
    display: flex; flex: 1 1 auto; min-width: 0;
    gap: 14px; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: none; white-space: nowrap; }
  .nav-toggle { display: none; }
  .hero { height: auto; }
  .hero-inner { padding-block: 40px 44px; }
  .hero-copy { max-width: 560px; }
  .cat-grid, .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { padding-inline: 0; max-width: none; }
  .spec-panel, .spec-table { margin-inline: var(--gutter); }
  .step-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 0; }
  .scenes { padding-top: 44px; }
  .footer-inner > .footer-brand,
  .footer-inner > .footer-col { flex: 1 1 260px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --fs-display: 34px; --fs-h2: 20px; }
  .hero-title { letter-spacing: -.01em; }
  .cat-grid, .feat-grid, .scene-grid { grid-template-columns: 1fr; }
  .cat-card__box { min-height: 0; }
  .scene-card img { height: 150px; }
  .scenes { padding-top: 32px; }
  .spec-row { grid-template-columns: 1fr 1fr; }
  .spec-cell:nth-child(4) { border-left: 0; }
  .spec-cell { border-top: 1px solid var(--line); }
  .spec-cell:nth-child(-n + 2) { border-top: 0; }
  .footer-inner { gap: 16px; }
  .note-inner { text-align: left; }
}

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