/* ================= 首页 page-home ================= */

.page-home {
  --home-num-size: clamp(40px, 7vw, 88px);
  --home-card-bg: linear-gradient(155deg, rgba(26, 28, 34, .96), rgba(21, 23, 29, .9));
  --home-card-border: rgba(90, 98, 112, .35);
  background: var(--ink);
  color: var(--text);
  overflow-x: clip;
}

/* ---------- 首屏 ---------- */

.page-home .home-hero {
  position: relative;
  padding: clamp(28px, 5vw, 56px) 0 clamp(44px, 6vw, 76px);
  background:
    radial-gradient(120% 90% at 88% 4%, rgba(255, 95, 31, .30), transparent 58%),
    radial-gradient(90% 80% at 4% 100%, rgba(42, 240, 208, .12), transparent 62%),
    var(--ink);
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -110px;
  height: 220px;
  background: linear-gradient(100deg, var(--ember), rgba(255, 95, 31, .07) 58%, transparent);
  transform: rotate(-3.4deg);
  opacity: .6;
  pointer-events: none;
}

.page-home .home-hero__shell {
  position: relative;
  z-index: 1;
}

.page-home .home-hero__crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(22px, 3vw, 34px);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--grey);
}

.page-home .home-hero__crumbsep {
  color: var(--flame);
}

.page-home .home-hero__crumbnote {
  color: var(--grey);
}

.page-home .home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
}

.page-home .home-hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 clamp(18px, 2vw, 26px);
  padding: 0;
  list-style: none;
}

.page-home .home-cap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-home .home-cap__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(42, 240, 208, .18);
}

.page-home .home-hero__title {
  margin: 0 0 clamp(14px, 2vw, 22px);
  color: var(--white);
}

.page-home .home-hero__lead {
  margin: 0 0 clamp(22px, 3vw, 32px);
  max-width: 34em;
  color: var(--text);
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* 首屏主视觉 */

.page-home .home-hero__visual {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(90, 98, 112, .32);
  box-shadow: var(--shadow-card);
}

.page-home .home-hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.page-home .home-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg, rgba(255, 95, 31, .34), rgba(14, 15, 18, .12) 52%, rgba(42, 240, 208, .18));
  mix-blend-mode: screen;
  pointer-events: none;
}

.page-home .home-hero__chip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(14, 15, 18, .84);
  border: 1px solid var(--home-card-border);
  backdrop-filter: blur(6px);
}

.page-home .home-hero__chip--a {
  left: 16px;
  bottom: 16px;
}

.page-home .home-hero__chip--b {
  right: 16px;
  top: 16px;
}

.page-home .home-hero__chipk {
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--grey);
}

.page-home .home-hero__chipv {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--cyan);
}

/* 章节索引 */

.page-home .home-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: clamp(20px, 3vw, 30px);
  border-top: 1px solid var(--home-card-border);
}

.page-home .home-index__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--home-card-border);
  border-radius: var(--radius-md);
  background: rgba(26, 28, 34, .72);
  color: var(--text);
  text-decoration: none;
  transition: border-color .22s ease-out, transform .22s ease-out, background-color .22s ease-out;
}

.page-home .home-index__item:hover,
.page-home .home-index__item:focus-visible {
  border-color: var(--flame);
  background: rgba(255, 95, 31, .1);
  transform: translateY(-2px);
}

.page-home .home-index__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--flame);
}

.page-home .home-index__label {
  font-size: 14px;
  color: var(--text);
}

/* ---------- 章节通用 ---------- */

.page-home .home-band {
  padding: clamp(64px, 8vw, 124px) 0;
  background: var(--ink);
}

.page-home .home-band--panel {
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(255, 95, 31, .12), transparent 60%),
    var(--panel-deep);
}

.page-home .home-band--paper {
  background: var(--paper);
  color: var(--paper-ink);
}

.page-home .home-ch {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 2vw, 22px);
}

.page-home .home-ch__num {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--home-num-size);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.02em;
  color: rgba(90, 98, 112, .55);
  transition: color .28s ease-out;
}

.page-home [data-chapter].is-active .home-ch__num {
  color: var(--flame);
}

.page-home .home-ch__title {
  margin: 0 0 clamp(14px, 2vw, 20px);
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: -.01em;
  color: var(--white);
}

.page-home .home-ch__text {
  margin: 0;
  max-width: 38em;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
}

.page-home .home-ch__text + .home-ch__text {
  margin-top: 16px;
}

.page-home .home-ch__text--after {
  margin-top: clamp(20px, 3vw, 30px);
}

.page-home .home-sub {
  margin: 18px 0 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--white);
}

.page-home .home-link {
  color: var(--flame);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 暖纸色区块的文字与链接 */

.page-home .home-band--paper .home-ch__num {
  color: rgba(27, 28, 32, .26);
}

.page-home .home-band--paper [data-chapter].is-active .home-ch__num {
  color: var(--flame);
}

.page-home .home-band--paper .home-ch__title {
  color: var(--paper-ink);
}

.page-home .home-band--paper .home-ch__text {
  color: #3A3B40;
}

.page-home .home-band--paper .home-link {
  color: var(--ember);
}

/* ---------- 两种屏幕 ---------- */

.page-home .home-screens {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 34px);
  margin-top: clamp(24px, 3vw, 34px);
}

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

.page-home .home-shot {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--home-card-border);
  background: var(--panel-deep);
}

.page-home .home-shot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-home .home-shot--portrait {
  max-width: 300px;
}

.page-home .home-shot--portrait img {
  aspect-ratio: 9 / 16;
}

.page-home .home-shot--wide {
  margin-top: clamp(24px, 3vw, 34px);
}

.page-home .home-shot--wide img {
  aspect-ratio: 16 / 9;
}

.page-home .home-shot__cap {
  padding: 12px 16px;
  border-top: 1px solid var(--home-card-border);
  font-size: 13px;
  line-height: 1.6;
  color: var(--grey);
}

.page-home .home-band--paper .home-shot__cap {
  color: #55565C;
  border-top-color: rgba(27, 28, 32, .14);
}

/* ---------- 速度对比条 ---------- */

.page-home .home-bars {
  display: grid;
  gap: 18px;
  margin-top: clamp(24px, 3vw, 34px);
  max-width: 640px;
}

.page-home .home-bar {
  display: grid;
  gap: 8px;
}

.page-home .home-bar__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--grey);
}

.page-home .home-bar__val {
  font-family: var(--font-mono);
  color: var(--text);
}

.page-home .home-bar__val--flame {
  color: var(--flame);
}

.page-home .home-bar__track {
  display: block;
  height: 12px;
  border-radius: var(--pill);
  background: rgba(90, 98, 112, .22);
  overflow: hidden;
}

.page-home .home-bar__fill {
  display: block;
  height: 100%;
  border-radius: var(--pill);
}

.page-home .home-bar__fill--old {
  width: 100%;
  background: linear-gradient(90deg, var(--line), rgba(90, 98, 112, .45));
}

.page-home .home-bar__fill--new {
  width: 69.2%;
  background: linear-gradient(90deg, var(--flame), var(--cyan));
}

/* ---------- 数据卡片 ---------- */

.page-home .home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: clamp(24px, 3vw, 34px);
}

.page-home .home-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--home-card-border);
  background: var(--home-card-bg);
  box-shadow: var(--shadow-card);
}

.page-home .home-card__k {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--grey);
}

.page-home .home-card__v {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--cyan);
}

.page-home .home-card__v--sm {
  font-size: clamp(18px, 2.2vw, 24px);
}

/* ---------- 版本路径 ---------- */

.page-home .home-path {
  display: grid;
  gap: 0;
  margin-top: clamp(24px, 3vw, 34px);
  max-width: 46em;
}

.page-home .home-path__item {
  position: relative;
  padding: 0 0 26px 28px;
  border-left: 1px solid rgba(27, 28, 32, .22);
}

.page-home .home-path__item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.page-home .home-path__item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--flame);
}

.page-home .home-path__item:last-child::before {
  background: var(--flame);
  box-shadow: 0 0 0 5px rgba(255, 95, 31, .2);
}

.page-home .home-path__t {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--paper-ink);
}

.page-home .home-path__d {
  margin: 0;
  max-width: 38em;
  font-size: 16px;
  line-height: 1.85;
  color: #3A3B40;
}

/* ---------- 多端列表 ---------- */

.page-home .home-ends {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 0;
  list-style: none;
}

.page-home .home-ends__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  padding: 14px 18px;
  border: 1px solid var(--home-card-border);
  border-radius: var(--radius-md);
  background: rgba(26, 28, 34, .66);
}

.page-home .home-ends__k {
  min-width: 76px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .04em;
  color: var(--flame);
}

.page-home .home-ends__v {
  font-size: 16px;
  color: var(--text);
}

/* ---------- 联系方式 ---------- */

.page-home .home-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--home-card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.page-home .home-contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  padding: 16px 20px;
  background: rgba(26, 28, 34, .7);
  border-bottom: 1px solid var(--home-card-border);
}

.page-home .home-contact__row:last-child {
  border-bottom: none;
}

.page-home .home-contact__k {
  min-width: 84px;
  font-size: 14px;
  color: var(--grey);
}

.page-home .home-contact__v {
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: .01em;
  color: var(--cyan);
  word-break: break-word;
}

/* ---------- 响应式 ---------- */

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

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

  .page-home .home-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .page-home .home-ends {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-home .home-contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-home .home-contact__row {
    flex-direction: column;
    gap: 8px;
    border-bottom: none;
    border-right: 1px solid var(--home-card-border);
  }

  .page-home .home-contact__row:last-child {
    border-right: none;
  }
}

@media (min-width: 960px) {
  .page-home .home-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
  }

  .page-home .home-ch {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
  }

  .page-home .home-ch__rail {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 559px) {
  .page-home .home-hero__chip {
    padding: 8px 10px;
  }

  .page-home .home-hero__chipk {
    font-size: 11px;
  }

  .page-home .home-hero__chipv {
    font-size: 15px;
  }

  .page-home .home-shot--portrait {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-index__item,
  .page-home .home-ch__num {
    transition: none;
  }

  .page-home .home-index__item:hover {
    transform: none;
  }
}
