/* ==========================================================================
   pages.css — 页面专属模块
   ========================================================================== */

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: clamp(48px, 7vw, 92px);
}
.hero::before {
  content: "";
  position: absolute;
  top: -18%;
  right: -12%;
  width: 62vw;
  height: 62vw;
  max-width: 820px;
  max-height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
              color-mix(in srgb, var(--brand) 15%, transparent) 0%,
              transparent 66%);
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}

.kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: .05em;
}
.kicker__left { display: flex; align-items: center; gap: 10px; }
.kicker .mono { color: var(--ink-2); }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero__title {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.035em;
  margin-bottom: var(--s-5);
}
.hero__title .accent {
  color: var(--brand);
  position: relative;
  display: inline-block;
}
.hero__title .accent::after {
  content: "";
  position: absolute;
  left: .02em; right: .02em;
  bottom: -.085em;
  height: .04em;
  background: color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: swash 1.1s var(--ease) .35s forwards;
}
@keyframes swash { to { transform: scaleX(1); } }

.hero__lede {
  font-size: var(--fs-lead);
  line-height: 1.76;
  color: var(--ink-2);
  max-width: 46ch;
  margin-bottom: var(--s-6);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-6);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.hero__meta li { display: flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 14px; height: 14px; color: var(--brand); flex-shrink: 0; }

.hero__visual { position: relative; }
.hero__visual .cover-stack { min-height: 440px; }
.hero__visual .float-card { bottom: 4%; left: -6%; }
.hero__visual .float-card--tr { bottom: auto; top: 2%; left: auto; right: -2%; }

@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy { order: 1; }
  .hero__visual { order: 2; margin-top: var(--s-8); margin-bottom: 0; }
  .hero__visual .cover-stack { min-height: 340px; }
  .hero__visual .float-card { left: 0; bottom: 2%; }
  .hero__visual .float-card--tr { right: 0; top: 0; }
}
@media (max-width: 560px) {
  .hero__visual .cover-stack { min-height: 300px; }
  .hero__visual .float-card { padding: 10px 13px; font-size: var(--fs-micro); }
}

/* ---------- 内页头 ---------- */
.page-hero {
  position: relative;
  z-index: 1;
  padding-top: clamp(32px, 4.5vw, 56px);
  padding-bottom: clamp(32px, 4.5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.page-hero__inner { max-width: 800px; }
.page-hero h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--s-4);
  max-width: 22ch;
}
.page-hero__lede {
  font-size: var(--fs-lead);
  line-height: 1.74;
  color: var(--muted);
  max-width: 60ch;
}
.page-hero__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  margin-top: var(--s-5);
  font-size: var(--fs-xs);
  color: var(--muted-2);
}

/* 面包屑 */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--muted-2);
  margin-bottom: var(--s-4);
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb span[aria-hidden] { opacity: .45; }

/* ---------- 题材网格 ---------- */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}
@media (max-width: 860px) { .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .genre-grid { grid-template-columns: 1fr; } }

.genre {
  position: relative;
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.genre:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--ink) 20%, transparent);
}
.genre__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-deep);
}
.genre__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(.9);
  transition: transform .6s var(--ease), filter .4s var(--ease);
}
.genre:hover .genre__media img { transform: scale(1.06); filter: saturate(1.02); }
.genre__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 9, .06) 0%, rgba(10, 12, 9, .58) 100%);
}
.genre__mood {
  position: absolute;
  left: 16px;
  bottom: 13px;
  z-index: 2;
  color: #fff;
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.genre__idx {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 2;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, .82);
  letter-spacing: .08em;
}
.genre__body { padding: 18px 20px 20px; }
.genre__title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 7px;
}
.genre__title h3 { font-size: 1.16rem; }
.genre__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-xs);
  color: var(--muted-2);
  letter-spacing: .06em;
}
.genre__tags {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.genre__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs);
  color: var(--muted-2);
}
.genre__foot .arrow-link { font-size: var(--fs-xs); }

/* ---------- 书架列表 ---------- */
.shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--s-8);
}
@media (max-width: 780px) { .shelf { grid-template-columns: 1fr; } }

.shelf__row {
  display: grid;
  grid-template-columns: 34px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-4);
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.shelf__row:hover .shelf__title { color: var(--brand); }
.shelf__idx {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-xs);
  color: var(--muted-2);
}
.shelf__thumb {
  width: 56px;
  aspect-ratio: 3 / 4;
  border-radius: 5px;
  overflow: hidden;
  background: var(--paper-deep);
  box-shadow: var(--shadow-xs);
}
.shelf__thumb img { width: 100%; height: 100%; object-fit: cover; }
.shelf__title {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.008em;
  transition: color .2s var(--ease);
  display: block;
  margin-bottom: 3px;
}
.shelf__tag { font-size: var(--fs-xs); color: var(--muted-2); }
.shelf__status {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.shelf__status b { color: var(--brand); font-weight: 600; }

/* ---------- 下载卡 ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
}
@media (max-width: 860px) { .dl-grid { grid-template-columns: 1fr; } }

.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dl-card--dark {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}
.dl-card--dark .dl-card__os { color: var(--paper); }
.dl-card--dark .dl-card__desc { color: rgba(244, 240, 230, .68); }
.dl-card--dark .dl-row { border-color: rgba(244, 240, 230, .14); }
.dl-card--dark .dl-row dt { color: rgba(244, 240, 230, .5); }
.dl-card--dark .dl-row dd { color: rgba(244, 240, 230, .9); }
.dl-card__top {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.dl-card__os {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.dl-card__badge {
  margin-left: auto;
  font-size: var(--fs-micro);
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid currentColor;
  opacity: .6;
}
.dl-card__desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.72;
  margin-bottom: var(--s-5);
}
.dl-rows { margin-bottom: var(--s-5); }
.dl-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs);
}
.dl-row dt { color: var(--muted-2); letter-spacing: .04em; }
.dl-row dd { margin: 0; color: var(--ink-2); font-weight: 500; }
.dl-card .btn { margin-top: auto; }
.dl-card__alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.dl-card--dark .dl-card__alt { color: rgba(244, 240, 230, .55); }
.dl-card__alt:hover { color: var(--brand); }

/* ---------- 场景卡 ---------- */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}
@media (max-width: 860px) { .scene-grid { grid-template-columns: 1fr; } }

.scene {
  padding: var(--s-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
}
.scene__time {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: .1em;
  margin-bottom: var(--s-4);
  display: block;
}
.scene h3 { font-size: 1.1rem; margin-bottom: 10px; }
.scene p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.78; }
.scene__tag {
  display: inline-block;
  margin-top: var(--s-4);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
  color: var(--brand);
  border-top: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  padding-top: 5px;
}

/* ---------- 功能长条 ---------- */
.frow {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--s-5);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.frow:last-child { border-bottom: 1px solid var(--line); }
.frow__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--muted-2);
  line-height: 1;
}
.frow h3 { font-size: 1.22rem; }
.frow p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.78; }
.frow__note {
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: var(--muted-2);
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
@media (max-width: 780px) {
  .frow { grid-template-columns: 48px minmax(0, 1fr); }
  .frow__note { grid-column: 2; }
  .frow__body { grid-column: 2; }
  .frow__desc { grid-column: 2; }
}

/* ---------- 结尾行动条 ---------- */
.cta-band {
  position: relative;
  z-index: 1;
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 64px);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -6%;
  top: -40%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 40%, transparent), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  margin-bottom: 10px;
  position: relative;
}
.cta-band p {
  color: rgba(244, 240, 230, .62);
  font-size: var(--fs-sm);
  max-width: 44ch;
  position: relative;
}
.cta-band__actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  position: relative;
}
.cta-band .btn--ghost { border-color: rgba(244, 240, 230, .28); color: var(--paper); }
.cta-band .btn--ghost:hover { background: rgba(244, 240, 230, .1); border-color: rgba(244, 240, 230, .5); }
.cta-band .btn--primary { background: var(--paper); color: var(--ink); }
.cta-band .btn--primary:hover { background: #fff; }

/* ---------- 锚点目录 ---------- */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s-7);
}
.toc a {
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
}
.toc a:hover { border-color: var(--line); color: var(--brand); background: var(--surface); }

/* ---------- 作品方块卡 ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: var(--s-4);
}
.work { display: block; }
.work .cover { border-radius: 8px; margin-bottom: 9px; }
.work__title {
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.5;
  display: block;
  margin-bottom: 2px;
}
.work:hover .work__title { color: var(--brand); }
.work__meta { font-size: var(--fs-micro); color: var(--muted-2); }

/* ---------- 题材详情区 ---------- */
.gsec { padding-block: clamp(36px, 5vw, 64px); border-top: 1px solid var(--line); }
.gsec__head {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: var(--s-6);
  margin-bottom: var(--s-6);
  align-items: start;
}
@media (max-width: 800px) { .gsec__head { grid-template-columns: 1fr; } }
.gsec__title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gsec__title h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.gsec__mood {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-sm);
  color: var(--accent);
}
