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

.page-home {
  --home-scale-unit: 4rem;
  display: block;
  background: var(--ink);
  color: var(--fog);
}

/* ---------- 首屏 ---------- */
.page-home .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.25rem, 9vw, 7.5rem) 0 clamp(2.75rem, 6vw, 5rem);
  background:
    radial-gradient(115% 85% at 8% -12%, rgba(76, 224, 210, .2), transparent 60%),
    radial-gradient(85% 75% at 92% 6%, rgba(255, 123, 92, .16), transparent 62%),
    var(--ink);
  color: var(--fog);
}

.page-home .hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-home .hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .42;
}

.page-home .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(245, 248, 252, .03) 0 1px,
    transparent 1px 4px
  );
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 78%);
}

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

.page-home .hero__title {
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(2.5rem, 8.6vw, 5.6rem);
  line-height: 1.03;
  letter-spacing: -.035em;
  max-width: 16ch;
}

.page-home .hero__title-accent {
  display: block;
  background: linear-gradient(96deg, var(--cyan) 8%, var(--coral) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-home .hero__version {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding: .7rem 1.25rem .7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(11, 21, 35, .55);
  color: var(--fog);
  text-decoration: none;
  font-size: .95rem;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

.page-home .hero__version:hover,
.page-home .hero__version:focus-visible {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.page-home .hero__version-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: home-pulse 2.6s var(--ease) infinite;
}

@keyframes home-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 123, 92, .2); }
  50% { box-shadow: 0 0 0 9px rgba(255, 123, 92, .04); }
}

.page-home .hero__version-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .02em;
}

.page-home .hero__version-text {
  color: var(--slate);
}

.page-home .hero__lead {
  margin: clamp(1.5rem, 3.5vw, 2.25rem) 0 0;
  max-width: 46ch;
  color: var(--slate);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.95;
}

.page-home .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.page-home .hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.75rem, 6vw, 4rem);
  margin-top: clamp(2.75rem, 7vw, 4.5rem);
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid var(--line);
}

.page-home .hero__stat {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.page-home .hero__stat-num {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  color: var(--cyan);
}

.page-home .hero__stat-label {
  font-size: .875rem;
  color: var(--slate);
}

/* ---------- 章节色带 ---------- */
.page-home .band {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.page-home .band--light {
  background: var(--fog);
  color: var(--deep);
}

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

.page-home .band--panel {
  background:
    linear-gradient(180deg, rgba(76, 224, 210, .07), transparent 46%),
    var(--panel);
  color: var(--fog);
}

.page-home .band__title {
  margin: .9rem 0 0;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  line-height: 1.24;
  letter-spacing: -.02em;
  max-width: 24ch;
}

.page-home .band__lead {
  margin: 1rem 0 0;
  max-width: var(--measure);
  color: var(--slate);
  line-height: 1.9;
}

.page-home .band--light .eyebrow {
  color: rgba(11, 21, 35, .55);
  padding-left: .7rem;
  border-left: 3px solid var(--coral);
}

/* ---------- 01 标签合并 ---------- */
.page-home .labels__grid {
  margin-top: clamp(2rem, 4vw, 3rem);
  align-items: center;
  row-gap: clamp(1.75rem, 4vw, 2.5rem);
}

.page-home .labels__copy p {
  margin: 0 0 1.1rem;
  max-width: var(--measure);
  line-height: 1.9;
  color: rgba(11, 21, 35, .76);
}

.page-home .labels__compare {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.25rem 1.35rem;
  display: grid;
  gap: .9rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(11, 21, 35, .1);
  background: rgba(19, 39, 67, .06);
}

.page-home .labels__row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: .7rem;
  font-size: .95rem;
}

.page-home .labels__label {
  color: rgba(11, 21, 35, .62);
}

.page-home .labels__before {
  color: rgba(11, 21, 35, .38);
  text-decoration: line-through;
}

.page-home .labels__arrow {
  color: var(--coral);
  font-size: .9rem;
}

.page-home .labels__after {
  padding: .12rem .55rem;
  border-radius: var(--r-sm);
  background: rgba(76, 224, 210, .28);
  color: var(--deep);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.page-home .labels__media {
  margin: 0;
}

/* ---------- 02 能力标签页 ---------- */
.page-home .caps {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.page-home .caps__list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.page-home .caps .tabs__tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--slate);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: .95rem;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color .28s var(--ease), border-color .28s var(--ease), background-color .28s var(--ease);
}

.page-home .caps .tabs__tab:hover {
  color: var(--fog);
  border-color: var(--line-strong);
}

.page-home .caps .tabs__tab[aria-selected="true"] {
  color: var(--deep);
  background: var(--cyan);
  border-color: var(--cyan);
}

.page-home .caps__panel {
  padding-top: clamp(1.75rem, 3.5vw, 2.5rem);
  max-width: 60ch;
}

.page-home .caps__panel[hidden] {
  display: none;
}

.page-home .caps__panel-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  color: var(--fog);
}

.page-home .caps__panel p {
  margin: .9rem 0 0;
  color: var(--slate);
  line-height: 1.9;
}

.page-home .caps__foot {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
}

/* ---------- 过渡带宽幅 ---------- */
.page-home .interlude {
  background: var(--deep);
  color: var(--fog);
}

.page-home .interlude__figure {
  position: relative;
  margin: 0;
}

.page-home .interlude__figure::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 62%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--deep));
}

.page-home .interlude__figure img {
  display: block;
  width: 100%;
  height: clamp(210px, 32vw, 400px);
  object-fit: cover;
  opacity: .55;
}

.page-home .interlude__body {
  position: relative;
  padding: clamp(1.25rem, 3.5vw, 2rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.page-home .interlude__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: -.015em;
  max-width: 20ch;
}

.page-home .interlude__text {
  margin: 1rem 0 0;
  max-width: var(--measure);
  color: var(--slate);
  line-height: 1.9;
}

.page-home .interlude__link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: .28em;
  text-decoration-thickness: 1px;
}

/* ---------- 03 季度资料库 ---------- */
.page-home .library__body {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 62ch;
}

.page-home .library__body p {
  margin: 0;
  color: var(--slate);
  line-height: 1.9;
}

.page-home .library__figures {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 5vw, 3.5rem);
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.page-home .library__figure {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.page-home .library__num {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  color: var(--cyan);
}

.page-home .library__unit {
  font-size: .875rem;
  color: var(--slate);
}

.page-home .library__scale {
  display: flex;
  align-items: flex-end;
  gap: clamp(.3rem, 1.4vw, .7rem);
  height: 56px;
  max-width: 62ch;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.page-home .library__scale span {
  flex: 1;
  display: block;
  height: 34%;
  border-radius: 2px 2px 0 0;
  background: var(--line-strong);
}

.page-home .library__scale span:nth-child(2n) {
  height: 48%;
}

.page-home .library__scale span:last-child {
  height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--coral));
}

/* ---------- 04 版本时间栏 ---------- */
.page-home .version__timeline {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.page-home .version__item {
  position: relative;
  padding: 1.25rem clamp(.75rem, 2.5vw, 1.5rem) 0 0;
  border-top: 2px solid var(--line);
  transition: border-color .3s var(--ease);
}

.page-home .version__item::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slate);
  opacity: .45;
  transition: background-color .3s var(--ease), opacity .3s var(--ease), box-shadow .3s var(--ease);
}

.page-home .version__item:hover,
.page-home .version__item.is-current {
  border-top-color: var(--cyan);
}

.page-home .version__item:hover::before,
.page-home .version__item.is-current::before {
  background: var(--cyan);
  opacity: 1;
  box-shadow: 0 0 0 5px rgba(76, 224, 210, .15);
}

.page-home .version__date {
  display: block;
  margin-bottom: .65rem;
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--slate);
}

.page-home .version__item .tag {
  display: inline-block;
  margin-bottom: .8rem;
}

.page-home .version__item p {
  margin: 0;
  max-width: 30ch;
  font-size: .95rem;
  line-height: 1.85;
  color: var(--slate);
}

.page-home .version__preview {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(76, 224, 210, .14), rgba(255, 123, 92, .12));
}

.page-home .version__preview img {
  display: block;
  width: 100%;
  height: auto;
}

.page-home .version__actions {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
}

/* ---------- 05 首次访问三步 ---------- */
.page-home .steps {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: clamp(2rem, 4vw, 2.5rem);
}

.page-home .steps__item {
  position: relative;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  transition: border-color .3s var(--ease);
}

.page-home .steps__item:hover {
  border-top-color: var(--cyan);
}

.page-home .steps__num {
  position: absolute;
  top: -1.125rem;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(76, 224, 210, .42);
  background: var(--panel);
  color: var(--cyan);
  font-size: .9rem;
  font-weight: 700;
}

.page-home .steps__title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.4;
  color: var(--fog);
}

.page-home .steps__text {
  margin: .6rem 0 0;
  font-size: .95rem;
  line-height: 1.85;
  color: var(--slate);
}

.page-home .start__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* ---------- 结尾分流 ---------- */
.page-home .outro {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent, rgba(76, 224, 210, .08)),
    var(--ink);
  color: var(--fog);
}

.page-home .outro__title {
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  color: var(--fog);
}

.page-home .outro__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}

.page-home .outro__link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--fog);
  text-decoration: none;
  transition: color .28s var(--ease);
}

.page-home .outro__link:hover,
.page-home .outro__link:focus-visible {
  color: var(--cyan);
}

.page-home .outro__index {
  grid-row: 1 / 3;
  align-self: start;
  padding-top: .2rem;
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--slate);
}

.page-home .outro__label {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.page-home .outro__hint {
  margin-top: .3rem;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--slate);
}

/* ---------- 桌面端 ---------- */
@media (min-width: 900px) {
  .page-home .hero__title {
    max-width: 15ch;
  }

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

  .page-home .outro__link {
    padding: 1.5rem 1.75rem 1.5rem 0;
    border-bottom: none;
    border-right: 1px solid var(--line);
  }

  .page-home .outro__link[href]:last-of-type,
  .page-home .outro__list > li:last-child .outro__link {
    padding-right: 0;
    border-right: none;
  }
}

/* ---------- 降级与窄屏 ---------- */
@media (max-width: 520px) {
  .page-home .labels__row {
    grid-template-columns: 1fr auto auto auto;
    gap: .5rem;
    font-size: .875rem;
  }

  .page-home .labels__after {
    font-size: 1.1rem;
  }

  .page-home .hero__version {
    border-radius: var(--r-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero__version-dot {
    animation: none;
    box-shadow: 0 0 0 4px rgba(255, 123, 92, .18);
  }

  .page-home .hero__version,
  .page-home .version__item,
  .page-home .version__item::before,
  .page-home .steps__item,
  .page-home .outro__link,
  .page-home .caps .tabs__tab {
    transition: none;
  }
}
