/* ==========================================================================
   style.css — 车载露营首页布局（设计基准 1440，容器 1376）
   分区预算来自 03-ui/home-ui-desktop.png 的剖面测量，见 03-ui/compare-log.md
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  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.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: var(--fw-black); letter-spacing: -0.4px; }

p { margin: 0; }

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

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

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

button { font-family: inherit; }

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green-ink);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}

.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ M0 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: linear-gradient(90deg, #1b4534 0%, #31503f 6%, #445b4f 20%, #4a6154 62%, #48604f 100%);
  color: #fff;
  transition: box-shadow 0.2s ease;
}

.site-header.is-stuck { box-shadow: var(--shadow-header); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: #fff;
}

.brand-mark {
  width: 30px;
  height: 20px;
  color: var(--accent);
  flex: none;
}

.brand-name {
  font-size: 19px;
  font-weight: var(--fw-black);
  letter-spacing: 0.5px;
}

.brand-tag {
  padding-left: 10px;
  border-left: 1px solid var(--line-on-dark);
  font-size: var(--fs-caption);
  letter-spacing: 0.16em;
  color: var(--ink-on-dark);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.site-nav a {
  position: relative;
  padding: 6px 8px;
  font-size: 12.5px;
  color: var(--ink-on-dark);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.site-nav a:hover { color: #fff; }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.site-nav .dropdown { position: relative; display: flex; align-items: center; }

.site-nav .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 4px solid currentColor;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  vertical-align: middle;
  opacity: 0.7;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 168px;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-sm);
  background: var(--green-ink);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.site-nav .dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}

.dropdown-menu a::after { display: none; }
.dropdown-menu a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.header-cta {
  flex: none;
  margin-left: 14px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #fff;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.header-cta:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.6); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 34px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 1.6px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* ------------------------------------------------------------------ M1 hero */
.hero {
  position: relative;
  height: 425px;
  overflow: hidden;
  background: #14261f;
  isolation: isolate;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 50%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 27, 21, 0) 0%, rgba(9, 27, 21, 0.05) 20%, rgba(9, 27, 21, 0.4) 52%, rgba(9, 27, 21, 0.5) 78%, rgba(9, 27, 21, 0.44) 100%),
    linear-gradient(90deg, rgba(10, 30, 24, 0.74) 0%, rgba(10, 30, 24, 0.58) 34%, rgba(10, 30, 24, 0.22) 58%, rgba(10, 30, 24, 0.04) 78%, rgba(10, 30, 24, 0) 92%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  width: 648px;
  max-width: 56%;
  height: 100%;
  padding: 16px 0 22px;
  color: #fff;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.9);
}

.eyebrow svg { width: 26px; height: 16px; color: var(--accent); flex: none; }

.hero h1 {
  margin: 4px 0 0;
  font-size: 62px;
  line-height: 1.06;
  font-weight: var(--fw-black);
  letter-spacing: 0.08em;
  color: #fff;
}

.hero-lead {
  margin-top: 5px;
  font-size: 30px;
  line-height: 1.5;
  font-weight: var(--fw-bold);
  letter-spacing: 0.01em;
  color: #fff;
}

.hero-desc {
  margin-top: 15px;
  margin-bottom: auto;
  max-width: 566px;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.82);
}

.hero-desc span { display: block; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-stats li { display: flex; align-items: center; gap: 6px; }
.hero-stats svg { width: 15px; height: 15px; color: rgba(255, 255, 255, 0.72); flex: none; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.75); }

/* ------------------------------------------------------- 通用 section 头部 */
.section { padding: 24px 0; }

/* 分区上下留白按稿的分区预算落位（见 03-ui/compare-log.md） */
.section-cats { padding: 32px 0 2px; }
.section-cats .section-head { gap: 6px; margin-bottom: 19px; }

.section-loadout { padding: 6px 0 26px; }
.section-loadout .section-head-row { margin-bottom: 13px; }

.section-featured { padding: 19px 0 10px; }
.section-featured .section-head-row { margin-bottom: 10px; }

.section-order { padding: 6px 0 6px; }
.section-order .section-head { gap: 9px; margin-bottom: 42px; }

.section-safety { padding: 12px 0 34px; }
.section-safety .section-head-safety { margin-bottom: 20px; }

.section-note { padding: 10px 0 28px; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.section-head-row {
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.section h2 {
  font-size: var(--fs-h2);
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.section-sub {
  font-size: 13px;
  color: var(--ink-muted);
  max-width: 780px;
}

/* --------------------------------------------------------- M2 分类索引 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 20px;
}

.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 132px;
  padding: 14px 20px 12px;
  background: var(--bg-card);
  border: 1px solid rgba(25, 64, 50, 0.07);
  border-radius: var(--radius);
  box-shadow: 0 3px 10px rgba(25, 64, 50, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(25, 64, 50, 0.16);
}

.cat-icon {
  position: absolute;
  top: 15px;
  left: 20px;
  width: 36px;
  height: 36px;
  color: var(--green-soft);
}

.cat-num {
  padding-left: 50px;
  font-size: 10.5px;
  line-height: 1.35;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.cat-title {
  margin-top: 1px;
  padding-left: 50px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.2px;
}

.cat-desc {
  margin-top: 6px;
  padding-left: 50px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.cat-meta {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 6px;
  margin-left: 50px;
  font-size: 10.5px;
  color: var(--green-chip-ink);
}

.cat-meta::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

/* --------------------------------------------------------- M3 场景清单 */
.section-loadout { background: linear-gradient(180deg, rgba(25, 64, 50, 0.018), rgba(25, 64, 50, 0)); }

.table-wrap {
  overflow-x: auto;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.table-wrap:focus-visible { outline-offset: 2px; }

.loadout {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: fixed;
}

.loadout thead th {
  padding: 7px 16px;
  background: var(--green-table);
  color: #fff;
  font-size: 12px;
  font-weight: var(--fw-bold);
  text-align: left;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.loadout thead th:first-child { width: 176px; }

.loadout tbody th {
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: var(--fw-bold);
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}

.loadout tbody td {
  padding: 6px 16px;
  color: var(--ink-body);
  vertical-align: middle;
}

.loadout tbody tr:nth-child(odd) { background: var(--bg-alt); }
.loadout tbody tr:nth-child(even) { background: var(--bg-alt-2); }
.loadout tbody tr:hover { background: rgba(207, 148, 34, 0.09); }
.loadout tbody tr + tr th,
.loadout tbody tr + tr td { border-top: 1px solid rgba(25, 64, 50, 0.07); }

/* --------------------------------------------------------- M4 精选条目 */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 21px;
}

.feat-card {
  background: var(--bg-card);
  border: 1px solid rgba(25, 64, 50, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }

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

.feat-thumb {
  display: block;
  aspect-ratio: 326 / 96;
  overflow: hidden;
  background: #e7e6df;
}

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

.feat-card:hover .feat-thumb img { transform: scale(1.03); }

.feat-body { display: block; padding: 11px 16px 13px; }

.feat-title { font-size: 16.5px; line-height: 1.35; letter-spacing: -0.2px; }

.feat-desc {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.feat-spec {
  display: block;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--green-chip-ink);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------- M5 配置顺序 */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 2px;
}

.step { position: relative; padding-right: 8px; }

.step::after {
  content: "";
  position: absolute;
  top: 15px;
  right: -10px;
  width: 20px;
  height: 1px;
  background: var(--line-strong);
}

.step:last-child::after { display: none; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--green-soft);
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: var(--fw-bold);
  color: var(--green-soft);
  font-variant-numeric: tabular-nums;
  background: rgba(34, 108, 75, 0.05);
}

.step-title { margin-top: 9px; font-size: 15px; line-height: 1.35; }

.step-text {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* --------------------------------------------------------- M6 安全底线 */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.safety-card {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 10px;
  padding: 10px 14px 10px;
  background: var(--bg-card);
  border: 1px solid rgba(25, 64, 50, 0.07);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.safety-icon { width: 24px; height: 24px; color: var(--green-soft); grid-row: span 2; margin-top: 2px; }

.safety-title { font-size: 13.5px; line-height: 1.3; }

.safety-text {
  grid-column: 2;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* --------------------------------------------------------- M7 收录说明 */
.note-panel {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px 20px 12px;
  background: var(--bg-note);
  border-radius: var(--radius);
}

.note-icon { width: 26px; height: 26px; flex: none; margin-top: 3px; color: var(--ink-muted); }

.note-title { font-size: 14px; line-height: 1.4; }

.note-text {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #4f504e;
  max-width: 1180px;
}

/* ------------------------------------------------------------------ M8 页脚 */
.site-footer {
  background: var(--green-deep);
  color: var(--ink-on-dark);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 32px;
  padding-top: 42px;
  padding-bottom: 26px;
}

.footer-brand {
  flex: 1 1 260px;
  min-width: 240px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #fff;
}

.footer-desc {
  flex: 1 1 100%;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
}

.footer-brand .brand-mark { color: var(--accent); }

.footer-name { font-size: 17px; font-weight: var(--fw-black); letter-spacing: 0.5px; }

.footer-tag {
  padding-left: 10px;
  border-left: 1px solid var(--line-on-dark);
  font-size: var(--fs-caption);
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.66);
  white-space: nowrap;
}

.footer-nav {
  flex: 1 1 180px;
  min-width: 160px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-label { flex: 1 1 100%; font-size: 11.5px; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.5); }

.footer-nav a {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-nav a:hover { color: #fff; border-bottom-color: var(--accent); }

.footer-icp { font-size: 12px; color: rgba(255, 255, 255, 0.6); white-space: nowrap; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 30px;
  border-top: 1px solid var(--line-on-dark);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1180px) {
  .site-nav { gap: 0; }
  .site-nav a { padding: 6px 6px; font-size: 12px; }
  .brand-tag { display: none; }
  .hero-copy { max-width: 66%; width: 620px; }
}

@media (max-width: 980px) {
  :root { --fs-h1: 54px; --fs-h2: 24px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .safety-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 22px 20px; }
  .step:nth-child(2n)::after { display: none; }
  .footer-inner { flex-direction: column; align-items: stretch; }
  .hero { height: auto; min-height: 420px; }
  .hero-copy { max-width: 100%; width: 100%; padding: 40px 0; }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .header-cta { display: none; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 14px;
    background: var(--green-ink);
    border-top: 1px solid var(--line-on-dark);
    box-shadow: var(--shadow-header);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 4px; font-size: 13.5px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .site-nav a::after { display: none; }
  .site-nav .dropdown { display: block; }
  .site-nav .caret { display: none; }
  .dropdown-menu {
    display: block;
    position: static;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 0 0 4px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .dropdown-menu a { padding: 7px 4px 7px 16px; font-size: 12.5px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
  .section { padding: 26px 0; }
}

@media (max-width: 640px) {
  :root { --fs-h1: 40px; --fs-h2: 21px; --gutter: 18px; --card-pad: 18px; }
  .cat-grid { grid-template-columns: 1fr; gap: 14px; }
  .feat-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .step::after { display: none; }
  .section-head-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero h1 { letter-spacing: 2px; }
  .hero-lead { font-size: 16px; }
  .hero-stats { flex-wrap: wrap; gap: 8px 16px; }
  .hero-actions { flex-wrap: wrap; }
  .loadout { min-width: 720px; }
  .note-panel { flex-direction: column; gap: 10px; }
  .footer-inner { padding-top: 26px; padding-bottom: 32px; }
}

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