/* 首页独立视觉：潮际叙事 — 不沿用站内其他页的卡片/蓝圆角语言 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+XiaoWei&display=swap");

body.is-home {
  --h-ink: #15201e;
  --h-muted: #4a5855;
  --h-accent: #0f6b5c;
  --h-accent-2: #1a8f7a;
  --h-wash: #e6efec;
  --h-paper: #f4f7f6;
  --h-line: #c5d4cf;
  --h-deep: #0b2e28;
  --font-display: "ZCOOL XiaoWei", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-family: var(--font-body);
  color: var(--h-ink);
  background:
    linear-gradient(180deg, #dce8e4 0%, var(--h-paper) 18%, #eef3f1 55%, #e7eeeb 100%);
  background-attachment: fixed;
}

body.is-home .site-header {
  background: rgba(244, 247, 246, 0.88);
  border-bottom: 1px solid rgba(15, 107, 92, 0.12);
  box-shadow: none;
}
body.is-home .brand { color: var(--h-deep); font-family: var(--font-display); font-size: 1.15rem; }
body.is-home .brand:hover { color: var(--h-accent); }
body.is-home .nav a {
  border-radius: 4px;
  color: var(--h-ink);
}
body.is-home .nav a:hover,
body.is-home .nav a.active {
  background: transparent;
  color: var(--h-accent);
  box-shadow: inset 0 -2px 0 var(--h-accent);
}

body.is-home .page-shell { overflow-x: hidden; }
body.is-home .home-wrap {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* —— Hero：全幅构图，品牌优先 —— */
.home-hero {
  position: relative;
  min-height: calc(100vh - var(--header-h) - var(--ads-h, 0px));
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: stretch;
  isolation: isolate;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 40%, rgba(15, 107, 92, 0.14), transparent 70%),
    linear-gradient(115deg, #d5e6e1 0%, #eef4f2 42%, transparent 58%);
  pointer-events: none;
}
.home-hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px) clamp(20px, 4vw, 64px);
  max-width: 640px;
  animation: homeFadeUp 0.9s ease both;
}
.home-brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  line-height: 1.15;
  color: var(--h-deep);
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
.home-hero-copy h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  color: var(--h-muted);
  margin: 0 0 14px;
  line-height: 1.55;
}
.home-hero-copy .lead {
  font-size: 1rem;
  color: var(--h-muted);
  margin: 0 0 28px;
  max-width: 36em;
  line-height: 1.75;
}
.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.home-cta a {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.home-cta a:hover { transform: translateY(-1px); text-decoration: none; }
.home-cta .cta-main {
  background: var(--h-deep);
  color: #f4faf8;
}
.home-cta .cta-main:hover { background: var(--h-accent); color: #fff; }
.home-cta .cta-sub {
  color: var(--h-accent);
  border-bottom: 1px solid var(--h-accent);
  padding: 12px 4px;
  border-radius: 0;
}
.home-cta .cta-sub:hover { color: var(--h-deep); border-color: var(--h-deep); }

.home-hero-media {
  position: relative;
  z-index: 1;
  min-height: 420px;
  overflow: hidden;
  animation: homeFadeIn 1.1s ease 0.15s both;
}
.home-hero-media img {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - var(--header-h) - var(--ads-h, 0px));
  object-fit: cover;
  object-position: top center;
  transform: scale(1.02);
  animation: homeKen 18s ease-in-out infinite alternate;
}
.home-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(238, 244, 242, 0.55) 0%, transparent 28%);
  pointer-events: none;
}

@keyframes homeFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes homeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes homeKen {
  from { transform: scale(1.02) translateY(0); }
  to { transform: scale(1.06) translateY(-1.5%); }
}

/* —— 章节索引 —— */
.home-chapters {
  border-block: 1px solid var(--h-line);
  background: rgba(255, 255, 255, 0.45);
  padding: 22px clamp(20px, 4vw, 64px);
}
.home-chapters h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--h-deep);
  margin: 0 0 14px;
  border: none;
  padding: 0;
}
.home-chapters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  counter-reset: ch;
}
.home-chapters-list li { counter-increment: ch; }
.home-chapters-list a {
  color: var(--h-ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.home-chapters-list a::before {
  content: counter(ch, decimal-leading-zero) "  ";
  color: var(--h-accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.82rem;
}
.home-chapters-list a:hover { color: var(--h-accent); text-decoration: underline; }
.home-chapters > p {
  margin: 0;
  color: var(--h-muted);
  font-size: 0.92rem;
  max-width: 70em;
}

/* —— 长文分镜区 —— */
.home-band {
  padding: clamp(40px, 6vw, 88px) clamp(20px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
}
.home-band.alt {
  max-width: none;
  background: linear-gradient(180deg, rgba(15, 107, 92, 0.06), transparent 40%),
    var(--h-wash);
  padding-left: 0;
  padding-right: 0;
}
.home-band.alt .home-band-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 64px);
  padding-right: clamp(20px, 4vw, 64px);
}
.home-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  color: var(--h-deep);
  margin: 0 0 18px;
  border: none;
  padding: 0;
  line-height: 1.3;
}
.home-band h3 {
  font-size: 1.08rem;
  color: var(--h-deep);
  margin: 1.4em 0 0.5em;
  font-weight: 700;
}
.home-band p,
.home-band li {
  color: var(--h-ink);
  font-size: 1.02rem;
  line-height: 1.85;
}
.home-band a { color: var(--h-accent); font-weight: 500; }
.home-band a:hover { color: var(--h-deep); }

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.home-split.reverse { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); }
.home-split.reverse .home-split-media { order: -1; }
.home-split-media img {
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  outline: 1px solid var(--h-line);
}
.home-split-body > *:last-child { margin-bottom: 0; }

/* 横向图文条：无卡片边框 */
.home-strip {
  display: grid;
  gap: 0;
  margin: 28px 0 8px;
  border-top: 1px solid var(--h-line);
}
.home-strip-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--h-line);
}
.home-strip-item img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  max-height: 240px;
}
.home-strip-item h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.home-strip-item p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--h-muted);
}

/* 三连图说明：无卡片，标题压在图下 */
.home-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 22px;
  margin: 28px 0 12px;
}
.home-trio figure { margin: 0; }
.home-trio img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  max-height: 320px;
  outline: 1px solid var(--h-line);
}
.home-trio figcaption {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 2px solid var(--h-accent);
}
.home-trio figcaption strong {
  display: block;
  font-size: 1rem;
  color: var(--h-deep);
  margin-bottom: 4px;
}
.home-trio figcaption span {
  font-size: 0.9rem;
  color: var(--h-muted);
  line-height: 1.6;
}

.home-list {
  margin: 0 0 1.1em;
  padding-left: 1.15em;
}
.home-list li { margin-bottom: 0.45em; }
.home-list strong { color: var(--h-deep); }

.home-steps {
  margin: 0;
  padding-left: 1.2em;
}
.home-steps li { margin-bottom: 0.55em; }

.home-linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--h-line);
}
.home-linkrow a {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.home-linkrow a:hover { color: var(--h-deep); }

/* FAQ */
.home-faq details {
  border: none;
  border-bottom: 1px solid var(--h-line);
  padding: 14px 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
}
.home-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--h-deep);
  list-style: none;
}
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::before {
  content: "+ ";
  color: var(--h-accent);
  font-weight: 900;
}
.home-faq details[open] summary::before { content: "– "; }
.home-faq details[open] summary { margin-bottom: 8px; }
.home-faq details p {
  margin: 0;
  color: var(--h-muted);
  font-size: 0.98rem;
}

.home-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.home-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

body.is-home .site-footer {
  background: linear-gradient(180deg, #0b2e28, #071f1b);
  margin-top: 0;
}
body.is-home .site-footer a { color: #9fd4c8; }
body.is-home .site-footer a:hover { color: #fff; }

@media (max-width: 960px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .home-hero-copy {
    max-width: none;
    padding-bottom: 28px;
  }
  .home-hero-media {
    min-height: 52vw;
    max-height: 58vh;
  }
  .home-hero-media img {
    min-height: 52vw;
    max-height: 58vh;
  }
  .home-hero-media::after {
    background: linear-gradient(180deg, rgba(238, 244, 242, 0.75) 0%, transparent 35%);
  }
  .home-split,
  .home-split.reverse {
    grid-template-columns: 1fr;
  }
  .home-split.reverse .home-split-media { order: 0; }
  .home-split-media {
    max-width: 260px;
    margin: 0 auto;
  }
  .home-trio { grid-template-columns: 1fr; max-width: 280px; margin-left: auto; margin-right: auto; }
  .home-strip-item {
    grid-template-columns: 110px 1fr;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .home-brand-mark { font-size: 2.1rem; }
  .home-chapters-list { gap: 8px 18px; }
  .home-strip-item {
    grid-template-columns: 1fr;
  }
  .home-strip-item img {
    max-width: 200px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-copy,
  .home-hero-media,
  .home-hero-media img,
  .home-reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
