/* style.css — 露营装备大全 页面骨架与首页模块样式 */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.28; }
p { margin: 0; }
button { font: inherit; color: inherit; }

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

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

:where(a, button, select, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: var(--forest);
  color: var(--paper);
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.site-logo-text {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-footer .site-logo-text { color: var(--ink-invert); font-size: 17px; white-space: normal; }
.main-nav { margin-left: auto; }
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: nowrap;
}
.main-nav a {
  display: inline-block;
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 6px 0;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover { color: var(--forest); border-bottom-color: var(--accent); }
.main-nav a[aria-current="page"] {
  color: var(--forest);
  border-bottom-color: var(--forest);
  font-weight: 600;
}
/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  isolation: isolate;
  color: var(--ink-invert);
  background: var(--forest-deep);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 46%;
  filter: brightness(1.12) saturate(1.04);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(96deg, rgba(20, 33, 25, 0.93) 0%, rgba(23, 37, 28, 0.86) 34%, rgba(26, 42, 32, 0.42) 62%, rgba(30, 47, 36, 0.12) 100%);
}
.hero-inner {
  padding-top: 94px;
  padding-bottom: 85px;
}
.hero-copy { max-width: 780px; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent-soft);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-h1);
  line-height: 1.26;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
  overflow-wrap: break-word;
}
.hero-lead {
  font-size: 15px;
  line-height: 1.9;
  color: #dee4d8;
  max-width: 600px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  margin-top: 30px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 3px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: var(--accent);
  color: #26301a;
}
.btn-primary:hover { background: #c2a83a; }
.btn-ghost {
  border-color: rgba(246, 241, 232, 0.45);
  color: var(--ink-invert);
}
.btn-ghost:hover { border-color: var(--ink-invert); background: rgba(246, 241, 232, 0.1); }
.hero-stats {
  display: flex;
  align-items: baseline;
  gap: 26px;
  margin-left: 6px;
  font-size: 12.5px;
  color: #cdd5c8;
}
.hero-stats li { display: flex; align-items: baseline; gap: 6px; }
.stat-no {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent-soft);
  line-height: 1;
}

/* ------------------------------------------------------------ section base */
.section { padding: 0; }
.categories { padding: 3px 0; }
.featured { padding: 16px 0 0; }
.featured .entry-grid { padding-bottom: 0; }
.featured .section-head { margin-bottom: 4px; }
.spec { padding: 0; }
.section-head { margin-bottom: 8px; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.section-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
}
.section-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  letter-spacing: 0.01em;
}
.section-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
}

/* ------------------------------------------------------- category index */
.categories { background: var(--paper); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  padding: 12px 12px 11px;
  background: #f8f4ea;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.cat-card:hover {
  border-color: var(--forest);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cat-icon {
  width: 34px;
  height: 34px;
  color: var(--forest);
  display: grid;
  place-items: center;
}
.cat-icon svg { width: 30px; height: 30px; }
.cat-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--forest-deep);
  line-height: 1.4;
}
.cat-desc {
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* -------------------------------------------------------- setup sequence */
.setup {
  background: var(--forest);
  color: var(--ink-invert);
  padding: 26px 0 28px;
}
.setup .section-title { color: var(--ink-invert); }
.setup .section-eyebrow { color: #b9c6b4; }
.setup .section-sub { color: #cfd8c9; }
.step-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  background: transparent;
}
.step-row {
  background: var(--paper);
  border-radius: 4px;
  padding: 16px 16px 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step-row:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -24px rgba(8, 16, 11, 0.9); }
.step-no {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1;
  color: var(--forest-deep);
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 10px;
}
.step-name {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--forest-deep);
}
.step-text {
  font-size: 12px;
  line-height: 1.66;
  color: var(--ink-2);
}
.setup-note {
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 4px;
  background: rgba(16, 28, 20, 0.5);
  border-left: 2px solid var(--accent);
  font-size: 12.5px;
  line-height: 1.7;
  color: #d8e0d2;
}

/* ---------------------------------------------------------- spec matrix */
.spec { background: var(--paper); }
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f5ec;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  min-width: 720px;
}
.data-table thead th {
  background: var(--forest);
  color: var(--ink-invert);
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.data-table tbody th,
.data-table tbody td {
  padding: 11px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.52;
  text-align: left;
}
.data-table tbody th {
  font-weight: 700;
  color: var(--forest-deep);
  white-space: nowrap;
  width: 76px;
}
.data-table tbody td { color: var(--ink-2); }
.data-table tbody tr:nth-child(even) { background: rgba(233, 231, 217, 0.45); }
.data-table tbody tr:hover { background: rgba(46, 76, 46, 0.06); }
.table-note {
  margin-top: 9px;
  font-size: 11px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- featured */
.featured { background: var(--paper-2); }
.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
  align-items: start;
}
.entry-card {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}
.entry-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-3);
}
.entry-thumb img { width: 100%; height: 100%; object-fit: cover; }
.entry-body { min-width: 0; }
.entry-tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 3px;
}
.entry-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.42;
  margin-bottom: 5px;
  color: var(--forest-deep);
}
.entry-summary {
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.entry-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.entry-more:hover { color: var(--accent); }

/* ------------------------------------------------------------- editorial */
.editorial { background: var(--paper); padding: 43px 0 26px; }
.note-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 22px 30px;
  border-radius: var(--radius-lg);
  background: #dfe1cd;
}
.note-title {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--forest-deep);
  display: flex;
  align-items: center;
  gap: 10px;
}
.note-title svg { width: 20px; height: 20px; color: var(--forest); }
.note-body p {
  font-size: 12px;
  line-height: 1.78;
  color: var(--ink-2);
}
.note-body p + p { margin-top: 8px; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--forest-deep);
  color: #cdd5c8;
  padding: 27px 0 28px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px 40px;
  align-items: flex-start;
}
.footer-brand { flex: 1 1 240px; min-width: 200px; }
.footer-col { flex: 1 1 180px; min-width: 160px; }
.footer-brand .brand-name { color: var(--ink-invert); font-size: 17px; }
.footer-tagline {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #a9b6a4;
  max-width: 280px;
}
.footer-nav-title,
.footer-links-title {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: #8d9c88;
  margin-bottom: 12px;
}
.footer-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
}
.footer-nav-row a:hover { color: var(--ink-invert); border-bottom: 1px solid var(--accent); }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  align-items: flex-start;
}
.footer-icp {
  font-size: 11.5px;
  color: #8d9c88;
  word-break: break-all;
}
.footer-links a:hover { color: var(--ink-invert); }
.copyright {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(246, 241, 232, 0.14);
  font-size: 11.5px;
  color: #8d9c88;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  :root { --fs-h1: 40px; --fs-h2: 30px; --gutter: 28px; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-row:nth-child(4) { border-left: 0; padding-left: 0; }
}

@media (max-width: 900px) {
  .main-nav { margin-left: 0; flex: 1 1 auto; overflow-x: auto; }
  .main-nav ul { flex-wrap: nowrap; }
  .hero-inner { padding-top: 46px; padding-bottom: 40px; }
  .hero h1 { font-size: 34px; }
  .entry-card { grid-template-columns: 120px minmax(0, 1fr); }
  .note-card { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 720px) {
  :root { --fs-h1: 29px; --fs-h2: 24px; --gutter: 20px; }
  .section, .setup, .editorial { padding-top: 32px; padding-bottom: 32px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-grid { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
  .step-row { border-left: 0; padding-left: 0; border-top: 1px solid rgba(246, 241, 232, 0.18); }
  .step-row:first-child { border-top: 0; }
  .hero-actions { gap: 12px; }
  .hero-stats { width: 100%; margin-left: 0; gap: 18px; }
  .footer-top { flex-direction: column; gap: 24px; }
  .note-card { padding: 20px; }
}
