/* ===== 首页：纵向编号长卷 ===== */

.page-home {
  --home-hair: 1px solid var(--line);
}

.page-home .breadcrumb {
  padding-top: clamp(1rem, 2.5vw, 1.75rem);
}

.page-home .home-shell {
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.page-home .home-body {
  min-width: 0;
}

/* ---------- 左侧跟随目录 ---------- */

.page-home .chapter-shell {
  display: none;
}

.page-home .chapter-nav-title {
  margin: 0 0 .9rem;
  padding-bottom: .6rem;
  font-family: var(--f-mono);
  font-size: var(--fs-12);
  letter-spacing: .18em;
  text-transform: lowercase;
  color: var(--gold);
  border-bottom: var(--home-hair);
}

.page-home .chapter-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .1rem;
}

.page-home .chapter-nav-list a {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  padding: .42rem .25rem .42rem .6rem;
  font-size: var(--fs-14);
  line-height: 1.4;
  color: var(--text-soft);
  text-decoration: none;
  border-left: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.page-home .chapter-nav-list a:hover,
.page-home .chapter-nav-list a:focus-visible {
  color: var(--gold-bright);
  border-left-color: var(--line-strong);
}

.page-home .chapter-nav-list a[aria-current="true"] {
  color: var(--gold-bright);
  border-left-color: var(--gold);
}

.page-home .chapter-nav-list .nav-num {
  font-family: var(--f-mono);
  font-size: var(--fs-12);
  letter-spacing: .08em;
  color: var(--gold);
}

@media (min-width: 1024px) {
  .page-home .home-shell {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }

  .page-home .chapter-shell {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    padding-top: clamp(2rem, 4vw, 3rem);
  }
}

/* ---------- 章节骨架 ---------- */

.page-home .chapter {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: var(--home-hair);
}

.page-home .chapter:first-of-type {
  border-top: 0;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.page-home .chapter-head {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.page-home .chapter-num {
  display: block;
  margin: 0 0 .4rem;
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.02em;
  color: rgba(200, 162, 74, .3);
}

.page-home .latin-label {
  margin: 0 0 .55rem;
  font-family: var(--f-mono);
  font-size: var(--fs-12);
  letter-spacing: .18em;
  text-transform: lowercase;
  color: var(--gold);
}

.page-home .chapter-title {
  margin: 0 0 .85rem;
  max-width: 24ch;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--ivory);
}

.page-home .chapter-lede {
  margin: 0;
  max-width: 48ch;
  font-size: var(--fs-16);
  line-height: 1.78;
  color: var(--text-soft);
}

/* ---------- 01 主题宣言 ---------- */

.page-home .home-declare-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
}

.page-home .home-declare-copy p {
  margin: 0 0 1rem;
  font-size: var(--fs-16);
  line-height: 1.8;
  color: var(--text-soft);
}

.page-home .home-declare-copy p:last-child {
  margin-bottom: 0;
}

.page-home .home-declare-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ink-2);
  border: var(--home-hair);
}

.page-home .home-declare-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (min-width: 900px) {
  .page-home .home-declare-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }
}

.page-home .home-pill-row {
  list-style: none;
  margin: clamp(1.75rem, 3vw, 2.5rem) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ---------- 02 双入口 ---------- */

.page-home .home-entry-grid {
  display: grid;
  gap: 1.25rem;
}

.page-home .home-entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: linear-gradient(165deg, var(--ink-2) 0%, var(--ink) 100%);
  border: var(--home-hair);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-mid) var(--ease);
}

.page-home .home-entry:hover,
.page-home .home-entry:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.page-home .home-entry-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: .2rem;
}

.page-home .home-entry-label {
  font-family: var(--f-mono);
  font-size: var(--fs-12);
  letter-spacing: .18em;
  text-transform: lowercase;
  color: var(--gold);
}

.page-home .home-entry-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.3;
  color: var(--ivory);
}

.page-home .home-entry-desc {
  margin: 0;
  font-size: var(--fs-16);
  line-height: 1.78;
  color: var(--text-soft);
}

.page-home .home-entry-go {
  margin-top: auto;
  padding-top: 1rem;
  font-size: var(--fs-14);
  color: var(--gold-bright);
  border-top: var(--home-hair);
}

@media (min-width: 780px) {
  .page-home .home-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 03 状态面板 ---------- */

.page-home .home-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--ink-2);
  border: var(--home-hair);
}

.page-home .home-panel-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .16;
  pointer-events: none;
}

.page-home .home-panel > *:not(.home-panel-texture) {
  position: relative;
  z-index: 1;
}

.page-home .panel-title {
  margin: 0 0 1.25rem;
  font-family: var(--f-mono);
  font-size: var(--fs-12);
  letter-spacing: .18em;
  text-transform: lowercase;
  color: var(--gold);
}

.page-home .home-status-list {
  margin: 0;
  display: grid;
  gap: 0;
}

.page-home .status-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: var(--home-hair);
}

.page-home .status-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.page-home .status-key {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: var(--fs-14);
  color: var(--text-soft);
}

.page-home .status-value {
  margin: 0;
  font-family: var(--f-display);
  font-size: var(--fs-20);
  letter-spacing: .01em;
  color: var(--gold-bright);
  text-align: right;
}

@media (min-width: 720px) {
  .page-home .home-status-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 5vw, 4rem);
  }
}

/* ---------- 04 主题索引 ---------- */

.page-home .home-tagwall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}

.page-home .home-tag {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.1rem 1.15rem;
  background: var(--ink-2);
  border: var(--home-hair);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.page-home .home-tag:hover {
  border-color: var(--line-strong);
  background: var(--ink-3);
}

.page-home .home-tag--wide {
  grid-column: span 2;
}

.page-home .home-tag-name {
  font-family: var(--f-display);
  font-size: var(--fs-20);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ivory);
}

.page-home .home-tag-subs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

@media (max-width: 560px) {
  .page-home .home-tag--wide {
    grid-column: auto;
  }
}

/* ---------- 05 使用场景 ---------- */

.page-home .home-scene-grid {
  display: grid;
  gap: 1.25rem;
}

.page-home .home-scene {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: clamp(1.35rem, 2.6vw, 1.85rem);
}

.page-home .home-scene .card-label {
  margin: 0;
  font-family: var(--f-mono);
  font-size: var(--fs-12);
  letter-spacing: .18em;
  text-transform: lowercase;
  color: var(--gold);
}

.page-home .home-scene-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: var(--fs-20);
  line-height: 1.35;
  color: var(--ivory);
}

.page-home .home-scene p {
  margin: 0;
  font-size: var(--fs-16);
  line-height: 1.78;
  color: var(--text-soft);
}

.page-home .home-scene-link {
  margin-top: auto;
  padding-top: .9rem;
  font-size: var(--fs-14);
  color: var(--gold-bright);
  text-decoration: none;
  border-top: var(--home-hair);
  transition: color var(--t-fast) var(--ease);
}

.page-home .home-scene-link:hover,
.page-home .home-scene-link:focus-visible {
  color: var(--gold);
}

.page-home .home-scene-figure {
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 0;
  background: var(--ink-2);
  border: var(--home-hair);
}

.page-home .home-scene-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 12 / 5;
  object-fit: cover;
}

.page-home .home-scene-figure .media-caption {
  margin: 0;
  padding: .85rem clamp(1rem, 2vw, 1.35rem);
  font-size: var(--fs-14);
  line-height: 1.7;
  color: var(--text-soft);
  border-top: var(--home-hair);
}

@media (min-width: 820px) {
  .page-home .home-scene-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 06 多端与收藏 ---------- */

.page-home .home-device-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.page-home .home-device-grid .prose p {
  margin: 0 0 1rem;
  font-size: var(--fs-16);
  line-height: 1.8;
  color: var(--text-soft);
}

.page-home .home-device-grid .prose p:last-child {
  margin-bottom: 0;
}

.page-home .home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
  align-content: start;
}

.page-home .home-steps li {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1rem 1.1rem;
  font-size: var(--fs-16);
  line-height: 1.7;
  color: var(--text-soft);
  background: var(--ink-2);
  border: var(--home-hair);
}

.page-home .home-step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--f-mono);
  font-size: var(--fs-12);
  color: var(--gold-bright);
}

@media (min-width: 860px) {
  .page-home .home-device-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ---------- 07 合作对接 ---------- */

.page-home .home-contact-band {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: linear-gradient(140deg, rgba(200, 162, 74, .12), rgba(78, 140, 134, .09) 58%, transparent 100%);
  border: var(--home-hair);
}

.page-home .home-contact-note {
  margin: 0;
  font-size: var(--fs-16);
  line-height: 1.8;
  color: var(--text-soft);
}

.page-home .home-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

@media (min-width: 760px) {
  .page-home .home-contact-band {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
  }
}

/* ---------- 无障碍与降级 ---------- */

.page-home .home-entry:focus-visible,
.page-home .home-scene-link:focus-visible,
.page-home .chapter-nav-list a:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-entry,
  .page-home .home-tag,
  .page-home .home-scene-link {
    transition: none;
  }

  .page-home .home-entry:hover,
  .page-home .home-entry:focus-visible {
    transform: none;
  }
}
