@import url("tokens.css");

/* ============================================================
   农机设备大全 — 全站样式
   tokens → base → layout → components → sections → responsive
   ============================================================ */



* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--green-700);
  color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--green-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  padding: 12px 22px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(34, 130, 63, .22);
}
.btn-primary:hover { background: var(--green-700); }
.btn-ghost {
  background: #fff;
  color: var(--green-700);
  border: 1.5px solid var(--green-700);
}
.btn-ghost:hover { background: var(--green-050); }

/* ---------- M0 header ---------- */
.site-header {
  position: relative;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--green-700);
}
.brand-mark { width: 36px; height: 36px; }
.brand-name {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--green-800);
}
.nav {
  display: flex;
  align-items: center;
  gap: 38px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  position: relative;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 0;
  white-space: nowrap;
}
.nav-link:hover { color: var(--green-700); }
.nav-link.is-active { color: var(--green-700); font-weight: 700; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 2px;
  background: var(--green-600);
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--green-700);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- M1 hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 323px;
  background: var(--cream);
}
.hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 58%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 45%;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--cream) 0%, var(--cream) 30%, rgba(247, 243, 233, .92) 42%, rgba(247, 243, 233, .45) 56%, rgba(247, 243, 233, .06) 72%, rgba(247, 243, 233, 0) 82%),
    linear-gradient(0deg, rgba(247, 243, 233, .55) 0%, rgba(247, 243, 233, 0) 22%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 24px 0 18px;
}
.hero h1 {
  font-size: 68px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--green-800);
}
.hero-sub {
  margin-top: 12px;
  max-width: 640px;
  font-size: 17.5px;
  line-height: 1.65;
  color: #33403a;
}
.hero .btn { margin-top: 14px; }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 15px;
  font-size: 15px;
  color: var(--ink-soft);
}
.hero-stats i { font-style: normal; color: #b9b2a0; }

/* ---------- shared section ---------- */
.section { padding: 8px 0 2px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.section-head h2 {
  position: relative;
  padding-left: 16px;
  font-size: 31px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--green-800);
  letter-spacing: .01em;
}
.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .12em;
  bottom: .12em;
  width: 5px;
  border-radius: 3px;
  background: var(--green-600);
}
.section-head .rule {
  flex: 1;
  height: 1px;
  background: rgba(23, 96, 58, .16);
}

/* ---------- M2 category index ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.cat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 9px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-thumb {
  height: 98px;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f2ec;
}
.cat-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cat-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 24px;
  margin-top: -12px;
  position: relative;
  z-index: 2;
  border-radius: 999px;
  background: var(--green-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}
.cat-card h3 {
  margin-top: 5px;
  font-size: 19px;
  font-weight: 800;
  color: var(--green-800);
}
.cat-card p {
  margin-top: 5px;
  min-height: 54px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: left;
}

/* ---------- M3 item grid ---------- */
.item-track {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.item-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 9px 12px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.item-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.item-thumb {
  display: block;
  height: 88px;
  border-radius: 7px;
  overflow: hidden;
  background: #f4f2ec;
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-name {
  display: block;
  margin-top: 8px;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--green-800);
}
.item-tag {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* ---------- M4 select path ---------- */
.section-steps .steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.step {
  position: relative;
  background: #fbf9f2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px 14px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--green-600);
  border-radius: 50%;
  background: #fff;
  color: var(--green-600);
  font-size: 16px;
  font-weight: 700;
}
.step h3 {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--green-800);
}
.step p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- M5 crop match ---------- */
.crop-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.crop-card img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  border-radius: 10px;
  background: #f4f2ec;
}
.crop-card h3 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 800;
  color: var(--green-800);
}
.crop-card p {
  margin-top: 4px;
  font-size: 12.4px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- M6 maintenance ---------- */
.section-care { padding: 51px 0 49px; }
.care-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.care { display: grid; grid-template-columns: 50px 1fr; column-gap: 12px; }
.care-icon { width: 50px; height: 50px; grid-row: span 2; }
.care h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--green-800);
}
.care p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- M7 scope ---------- */
.section-scope { padding-top: 16px; padding-bottom: 20px; }
.scope-band {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 18px;
}
.scope-main,
.scope-note {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fbf9f2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 20px;
}
.scope-note { background: #fdf4f0; border-color: #efdcd4; }
.scope-icon { width: 44px; height: 44px; flex: none; }
.scope-main h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--green-800);
}
.scope-main p,
.scope-note p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.scope-note p { margin-top: 2px; }

/* ---------- M8 cta ---------- */
.cta {
  position: relative;
  overflow: hidden;
  background: #f0ecdf;
}
.cta-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 46%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}
.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f2eee1 0%, #f2eee1 46%, rgba(242, 238, 225, .72) 62%, rgba(242, 238, 225, .05) 100%);
}
.cta-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 212px;
  padding: 26px 0;
}
.cta-copy { max-width: 760px; }
.cta-copy h2 {
  font-size: 34px;
  font-weight: 800;
  color: var(--green-800);
}
.cta-copy p {
  margin-top: 10px;
  max-width: 700px;
  font-size: 16px;
  line-height: 1.75;
  color: #33403a;
}
.cta-actions { display: flex; gap: 12px; flex: none; }

/* ---------- M9 footer ---------- */
.site-footer {
  background: var(--green-900);
  color: #dfe9e0;
  padding: 14px 0 0;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px 40px;
  padding-bottom: 10px;
}
.footer-grid > * { flex: 1 1 190px; min-width: 170px; }
.footer-brand { flex: 1.6 1 260px; }
.brand-footer { color: #eaf3e6; }
.brand-footer .brand-name { color: #fff; font-size: 21px; }
.footer-brand p {
  margin-top: 12px;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.75;
  color: #b9cdbd;
}
.footer-col h2 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.footer-col ul {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 6px 22px;
  justify-content: start;
}
.footer-col a {
  font-size: 13px;
  color: #cfe0d2;
}
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-about p {
  font-size: 12.5px;
  line-height: 1.7;
  color: #b9cdbd;
}
.footer-about p + p { margin-top: 6px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 12px;
  color: #9fb8a5;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav { gap: 24px; }
  .nav-link { font-size: 16px; }
  .hero h1 { font-size: 56px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-card p { min-height: 0; }
  .item-track { grid-template-columns: repeat(4, 1fr); }
  .crop-grid { grid-template-columns: repeat(3, 1fr); }
  .care-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 1024px) {
  .header-inner { flex-wrap: wrap; gap: 10px 20px; padding: 10px 0; }
  .nav { flex: 1 1 100%; gap: 22px; padding-bottom: 4px; }
  .nav-link { font-size: 15.5px; padding: 6px 0; }
}

@media (max-width: 900px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { min-height: 62px; }
  .hero-media { width: 100%; opacity: .55; }
  .hero-veil { background: linear-gradient(90deg, var(--cream) 0%, rgba(247, 243, 233, .95) 55%, rgba(247, 243, 233, .72) 100%); }
  .hero h1 { font-size: 46px; }
  .hero-sub { font-size: 16px; max-width: 620px; }
  .section-head h2 { font-size: 25px; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .cta-media { width: 100%; opacity: .5; }
  .cta::after { background: linear-gradient(90deg, #f2eee1 0%, rgba(242, 238, 225, .94) 60%, rgba(242, 238, 225, .7) 100%); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .brand-name { font-size: 19px; }
  .brand-mark { width: 30px; height: 30px; }
  .hero { min-height: 0; }
  .hero-inner { padding: 30px 0 26px; }
  .hero h1 { font-size: 38px; }
  .hero-sub { font-size: 15.5px; line-height: 1.75; }
  .hero .btn { font-size: 16px; padding: 11px 18px; }
  .hero-stats { flex-wrap: wrap; gap: 8px 10px; font-size: 13px; margin-top: 18px; }
  .section { padding: 24px 0 26px; }
  .section-head { gap: 10px; margin-bottom: 16px; }
  .section-head h2 { font-size: 21px; padding-left: 12px; }
  .section-head .rule { display: none; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-thumb { height: 96px; }
  .cat-card { padding: 9px 9px 12px; }
  .cat-card h3 { font-size: 16px; }
  .cat-card p { font-size: 12px; }
  .item-track { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .item-thumb { height: 100px; }
  .steps { grid-template-columns: 1fr !important; gap: 10px; }
  .step { padding: 14px 16px; }
  .step-num { width: 34px; height: 34px; font-size: 14px; }
  .step h3 { margin-top: 6px; font-size: 16px; }
  .crop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .crop-card img { height: 110px; }
  .crop-card h3 { font-size: 15px; }
  .crop-card p { font-size: 12px; }
  .care-grid { grid-template-columns: 1fr; gap: 16px; }
  .care { grid-template-columns: 42px 1fr; }
  .care-icon { width: 42px; height: 42px; }
  .scope-band { grid-template-columns: 1fr; gap: 10px; }
  .scope-main, .scope-note { padding: 16px; }
  .scope-main h2 { font-size: 18px; }
  .cta-inner { min-height: 0; padding: 24px 0; }
  .cta-copy h2 { font-size: 24px; }
  .cta-copy p { font-size: 14px; }
  .cta-actions { flex-direction: column; width: 100%; gap: 10px; }
  .cta-actions .btn { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-col ul { grid-template-columns: repeat(2, auto); }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

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