/* style.css — 四眼斑水龟日常养护 · 首页与全站基础样式 */
/* 变量定义在 tokens.css，此处 :root 与 tokens.css 保持一致，供环节 5 抽取 */
:root {
  --c-forest: #243c26;
  --c-forest-deep: #1b2e1d;
  --c-forest-soft: #2f4a31;
  --c-lime: #b4d45e;
  --c-lime-dim: #9dbb4d;
  --c-cream: #fbf8f3;
  --c-cream-2: #f6f2e9;
  --c-paper: #fcfaf5;
  --c-mint: #e7ebda;
  --c-mint-2: #d8e4cc;
  --c-ink: #1e2016;
  --c-ink-2: #5c6353;
  --c-ink-3: #8a9080;
  --c-ink-inv: #f4f1e6;
  --c-ink-inv-2: rgba(244, 241, 230, 0.74);
  --c-line: rgba(30, 32, 22, 0.12);
  --c-line-soft: rgba(30, 32, 22, 0.07);
  --c-line-inv: rgba(244, 241, 230, 0.18);

  --f-sans: "Noto Sans CJK SC", "Source Han Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --f-display: var(--f-sans);

  --fs-hero: 50px;
  --fs-h2: 26px;
  --fs-h3: 17px;
  --fs-lead: 16px;
  --fs-base: 15px;
  --fs-sm: 14px;
  --fs-xs: 12.5px;
  --fs-2xs: 11.5px;

  --wrap: 1440px;
  --gutter: 34px;
  --header-h: 66px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 22px;
  --sp-6: 30px;
  --sp-7: 40px;
  --sp-8: 56px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --pill: 999px;
  --shadow-1: 0 1px 2px rgba(30, 32, 22, 0.06);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

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

img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--c-lime);
  color: var(--c-forest-deep);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.skip-link:focus { left: 16px; }

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

/* ---------------------------------------------------------------- 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-forest);
  color: var(--c-ink-inv);
  border-bottom: 1px solid var(--c-line-inv);
}
.site-header.is-scrolled { box-shadow: var(--c-shadow-header); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .01em;
  font-size: var(--fs-16-5);
  color: var(--c-ink-inv);
  white-space: nowrap;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-lime-veil);
  color: var(--c-lime);
  flex: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: var(--fs-xs);
  color: var(--c-ink-inv-2);
}
.main-nav > a { padding: 6px 2px; transition: color .2s var(--ease); }
.main-nav > a:hover { color: var(--c-ink-inv); }
.main-nav > a[aria-current="page"] { color: var(--c-lime); }

/* 主导航下拉（分类树） */
.nav-item { position: relative; }
.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
  color: var(--c-ink-inv-2);
  transition: color .2s var(--ease);
}
.nav-item > a:hover { color: var(--c-ink-inv); }
.caret {
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4.5px solid currentColor;
  opacity: .7;
  transition: transform .2s var(--ease);
}
.dropdown:hover .caret { transform: rotate(180deg); }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  z-index: 60;
  min-width: 168px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
  background: var(--c-forest-soft);
  border: 1px solid var(--c-line-inv);
  border-radius: var(--radius);
  box-shadow: var(--c-shadow-header);
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu > a {
  display: block;
  padding: 8px 16px;
  font-size: var(--fs-xs);
  color: var(--c-ink-inv-2);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.dropdown-menu > a:hover { background: var(--c-lime-veil); color: var(--c-lime); }
.nav-cta {
  margin-left: 6px;
  padding: 8px 16px !important;
  border-radius: var(--pill);
  background: var(--c-lime-veil);
  color: var(--c-lime) !important;
  font-weight: 700;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--c-lime-veil-3); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 36px;
  border: 1px solid var(--c-line-inv);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 8px 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-ink-inv);
  border-radius: 2px;
}
.nav-toggle span + span { margin-top: 5px; }

/* ----------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--c-forest);
  color: var(--c-ink-inv);
  min-height: 405px;
  display: flex;
  align-items: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--c-forest-deep) 0%, rgba(27, 46, 29, .95) 30%, rgba(27, 46, 29, .3) 52%, rgba(27, 46, 29, 0) 66%);
  pointer-events: none;
}
.hero-media {
  position: absolute;
  top: 0;
  right: max(0px, calc((100% - var(--wrap)) / 2));
  width: min(58%, 840px);
  height: 100%;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 46%;
}
.hero-inner { position: relative; z-index: 1; }
.hero-copy { max-width: 600px; padding-block: 34px; }

.hero h1 {
  margin: 0 0 24px;
  font-size: var(--fs-hero);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.005em;
}
.hero-lead {
  font-size: var(--fs-15-5);
  line-height: 1.95;
  color: rgba(244, 241, 230, .92);
  margin-bottom: 10px;
}
.hero-sub {
  font-size: var(--fs-14-5);
  line-height: 1.9;
  color: var(--c-ink-inv-2);
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border-radius: var(--pill);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary { background: var(--c-lime); color: var(--c-forest-deep); }
.btn-primary:hover { background: var(--c-lime-dim); }
.btn-ghost {
  border: 1px solid rgba(244, 241, 230, .38);
  color: var(--c-ink-inv);
}
.btn-ghost:hover { border-color: var(--c-lime); color: var(--c-lime); }

/* --------------------------------------------------------------- 区块通用 */
.section { padding-block: 18px; }
.section-title {
  margin: 0 0 18px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.005em;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}
.section-head .section-title { margin-bottom: 0; }
.section-sub {
  font-size: var(--fs-sm);
  color: var(--c-ink-2);
}

/* --------------------------------------------------------- M2 分类 8 列 */
.section-cats { padding-block: 32px 84px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 22px;
}
.cat-card > a { display: flex; flex-direction: column; height: 100%; }
.cat-thumb {
  display: block;
  width: 62%;
  min-width: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--c-cream-2);
  aspect-ratio: 3 / 2;
  margin-bottom: 12px;
}
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.cat-desc {
  display: block;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--c-ink-2);
}
.cat-card > a:hover .cat-name { color: var(--c-forest); text-decoration: underline; text-underline-offset: 4px; }

/* ----------------------------------------------------- M3 精选 4 列卡 */
.section-picks { padding-block: 12px 32px; }
.pick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.pick-card > a { display: flex; flex-direction: column; height: 100%; }
.pick-thumb {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-cream-2);
  aspect-ratio: 2 / 1;
  margin-bottom: 12px;
}
.pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 7px;
}
.pick-desc {
  display: block;
  font-size: var(--fs-xs);
  line-height: 1.75;
  color: var(--c-ink-2);
}
.pick-card > a:hover .pick-title { color: var(--c-forest); text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------------------------------ M4 最新 6 列卡 */
.section-latest { padding-block: 10px 0; }
.latest-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 15px;
}
.latest-card > a { display: flex; flex-direction: column; height: 100%; }
.latest-thumb {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--c-cream-2);
  aspect-ratio: 16 / 8.6;
  margin-bottom: 8px;
}
.latest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-tag {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: var(--c-ink-3);
  margin-bottom: 5px;
}
.latest-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 5px;
}
.latest-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.6;
  color: var(--c-ink-2);
}
.latest-card > a:hover .latest-title { color: var(--c-forest); text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------- M5 参数速查 */
.section-params { padding-block: 0 14px; }
.param-panel {
  background: var(--c-mint);
  border-radius: var(--radius-lg);
  padding: 10px 24px 10px;
}
.param-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}
.param-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-forest-veil-2);
  color: var(--c-forest);
  flex: none;
}
.param-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(30, 32, 22, .1);
}
.param-grid > li { display: flex; flex-direction: column; gap: 2px; }
.param-icon {
  font-size: 13px;
  color: var(--c-forest);
  opacity: .75;
  line-height: 1;
  margin-bottom: 2px;
}
.param-label { font-size: var(--fs-2xs); color: var(--c-ink-2); }
.param-value { font-size: var(--fs-sm); font-weight: 800; letter-spacing: -.01em; }
.param-note {
  max-width: 1120px;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--c-ink-2);
}

/* ------------------------------------------------- M6 清单 + M7 FAQ */
.section-duo { padding-block: 0 26px; }
.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.panel {
  background: var(--c-paper);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}
.panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-forest-veil);
  color: var(--c-forest);
  flex: none;
}

.check-list { display: grid; gap: 6px; }
.check-list li {
  position: relative;
  padding-left: 26px;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--c-ink);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--c-forest-veil-3);
  background: var(--c-lime-veil-2);
}

.faq-list { display: grid; }
.faq-list details { border-bottom: 1px solid var(--c-line-soft); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.6px solid var(--c-ink-3);
  border-bottom: 1.6px solid var(--c-ink-3);
  transform: rotate(45deg) translateY(-2px);
  flex: none;
  transition: transform .2s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-list summary:hover { color: var(--c-forest); }
.faq-list p {
  padding: 0 0 12px;
  font-size: var(--fs-xs);
  line-height: 1.8;
  color: var(--c-ink-2);
}

/* ------------------------------------------------------------ M8 notice */
.section-notice { padding-block: 34px 34px; }
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--c-mint-2);
  border-radius: var(--radius);
  padding: 13px 18px;
}
.notice-icon { color: var(--c-forest); flex: none; margin-top: 2px; }
.notice p {
  font-size: var(--fs-xs);
  line-height: 1.8;
  color: var(--c-ink-on-mint);
}

/* -------------------------------------------------------------- 页脚 */
.site-footer {
  background: var(--c-forest);
  color: var(--c-ink-inv);
  padding-top: 28px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  padding-bottom: 22px;
}
.footer-inner > * { flex: 1 1 180px; min-width: 170px; }
.footer-brand { flex: 1.4 1 240px; }
.brand-invert { color: var(--c-ink-inv); font-size: 16px; }
.footer-tagline {
  margin-top: 12px;
  font-size: var(--fs-xs);
  line-height: 1.8;
  color: var(--c-ink-inv-2);
  max-width: 300px;
}
.footer-heading {
  margin: 0 0 12px;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(244, 241, 230, .55);
}
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: var(--fs-xs);
}
.footer-nav a { color: var(--c-ink-inv-2); }
.footer-nav a:hover { color: var(--c-lime); }
.footer-about p {
  font-size: var(--fs-xs);
  line-height: 1.8;
  color: var(--c-ink-inv-2);
}
.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 12px 16px;
  border-top: 1px solid var(--c-line-inv);
  font-size: var(--fs-2xs);
  color: rgba(244, 241, 230, .5);
}

/* --------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  :root { --gutter: 34px; }
  .main-nav { gap: 12px; font-size: 12px; }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .latest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .param-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 20px; }
  .footer-inner { gap: 28px; }
  .footer-inner > * { flex: 1 1 200px; }
}

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; padding-block: 10px; }
  .main-nav {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding-top: 4px;
    font-size: var(--fs-sm);
  }
  .main-nav > a { padding: 8px 0; }
  .nav-item > a { padding: 8px 0; }
  .dropdown-menu {
    position: static;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 4px 0 6px 14px;
    border: 0;
    border-left: 1px solid var(--c-line-inv);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .dropdown:hover .dropdown-menu { display: block; }
  .dropdown-menu > a { padding: 6px 0; }
  .nav-cta { margin: 8px 0 0; align-self: flex-start; }
  .site-header { position: sticky; }
  .hero { min-height: 0; }
  .hero::after { background: linear-gradient(180deg, rgba(27, 46, 29, .96) 40%, rgba(27, 46, 29, .55) 100%); }
  .hero-media { width: 100%; opacity: .5; }
  .hero-media img { object-position: 60% 40%; }
  .hero-copy { max-width: none; padding-block: 40px; }
  .hero h1 { font-size: 34px; }
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 660px) {
  :root { --gutter: 20px; --fs-hero: 28px; --fs-h2: 21px; }
  .section { padding-block: 32px; }
  .hero h1 { font-size: var(--fs-hero-sm); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .param-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-inner > * { flex: 1 1 auto; width: 100%; }
  .list-toolbar { flex-direction: column; align-items: flex-start; }
}

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