.page-home {
  --ph-rail: 72px;
  --ph-cyan: #38E8FF;
  --ph-blue: #1FA2FF;
  --ph-amber: #FFB443;
  --ph-magenta: #FF3D9A;
  --ph-mint: #7CFFB2;
  position: relative;
  padding-bottom: 88px;
}

.page-home [id] {
  scroll-margin-top: calc(var(--bar-h) + 24px);
}

/* ---------- 左侧栏目轨道 ---------- */
.page-home .rail {
  display: none;
}

@media (min-width: 1040px) {
  .page-home {
    padding-left: var(--ph-rail);
  }

  .page-home .rail {
    display: flex;
    position: fixed;
    top: calc(var(--bar-h) + 36px);
    left: 0;
    width: var(--ph-rail);
    bottom: 32px;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 30;
  }

  .page-home .rail::before {
    content: "";
    position: absolute;
    top: -20px;
    bottom: -20px;
    left: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
  }
}

.page-home .rail__link {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease), background 0.24s var(--ease);
}

.page-home .rail__link:hover,
.page-home .rail__link:focus-visible {
  color: var(--fg);
  border-color: var(--line);
}

.page-home .rail__link[aria-current] {
  color: var(--ph-cyan);
  border-color: rgba(56, 232, 255, 0.42);
  background: rgba(56, 232, 255, 0.09);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero {
  position: relative;
  padding: 26px 0 44px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-home .home-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: saturate(0.85);
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 88% 0%, rgba(56, 232, 255, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(7, 9, 12, 0.5) 0%, rgba(7, 9, 12, 0.9) 74%, var(--ink) 100%);
}

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

.page-home .home-hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.page-home .home-hero__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(29px, 7.4vw, 58px);
  line-height: 1.12;
  color: var(--fg);
}

.page-home .home-hero__lede {
  margin: 18px 0 0;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
}

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

/* ---------- 通用节间距 ---------- */
.page-home .section {
  padding-block: 52px;
}

.page-home .section--tight {
  padding-block: 34px;
}

@media (min-width: 900px) {
  .page-home .section {
    padding-block: 78px;
  }

  .page-home .section--tight {
    padding-block: 48px;
  }
}

.page-home .home-hero__inner,
.page-home .home-index .container,
.page-home .home-rank .container,
.page-home .home-steps .container,
.page-home .home-cases .container,
.page-home .home-rescue .container,
.page-home .home-scale .container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 六栏索引墙 ---------- */
.page-home .home-index__intro {
  margin: 12px 0 0;
  max-width: 32em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .home-index__layout {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

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

.page-home .home-index__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.page-home .idx-card {
  --c: var(--ph-cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 148px;
  padding: 18px 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--fg);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), background 0.24s var(--ease);
}

.page-home .idx-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c), transparent 78%);
  opacity: 0.75;
}

.page-home .idx-card:hover,
.page-home .idx-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--c);
  background: #121A22;
}

.page-home .idx-card--c1 {
  --c: var(--ph-cyan);
}

.page-home .idx-card--c2 {
  --c: #C7D5E2;
}

.page-home .idx-card--c3 {
  --c: var(--ph-blue);
}

.page-home .idx-card--c4 {
  --c: var(--ph-amber);
}

.page-home .idx-card--c5 {
  --c: var(--ph-mint);
}

.page-home .idx-card--c6 {
  --c: var(--ph-magenta);
}

.page-home .idx-card__num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c);
  transform-origin: left center;
  transition: transform 0.24s var(--ease);
}

.page-home .idx-card:hover .idx-card__num,
.page-home .idx-card:focus-visible .idx-card__num {
  transform: scale(1.18);
}

.page-home .idx-card__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.page-home .idx-card__desc {
  display: block;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  opacity: 0.72;
  transition: opacity 0.24s var(--ease);
}

.page-home .idx-card:hover .idx-card__desc,
.page-home .idx-card:focus-visible .idx-card__desc {
  opacity: 1;
}

.page-home .home-index__figure {
  margin: 0;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  overflow: hidden;
}

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

@media (min-width: 1024px) {
  .page-home .home-index__figure img {
    aspect-ratio: 3 / 4;
  }
}

/* ---------- 本周榜单 ---------- */
.page-home .home-rank__panel {
  margin-top: 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  overflow: hidden;
}

.page-home .home-rank__banner {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.page-home .home-rank__body {
  display: grid;
  gap: 20px;
  padding: 22px 18px;
}

@media (min-width: 860px) {
  .page-home .home-rank__body {
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 32px;
    padding: 30px 28px;
  }
}

.page-home .home-rank__dial {
  display: block;
  width: 100%;
  max-width: 168px;
  margin-inline: auto;
}

.page-home .rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-home .rank-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 180, 67, 0.055);
}

.page-home .rank-item__no {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ph-amber);
  padding-top: 2px;
}

.page-home .rank-item__body {
  display: block;
  min-width: 0;
}

.page-home .rank-item__name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
}

.page-home .rank-item__meta {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.page-home .home-rank__archive {
  margin: 0 18px 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

@media (min-width: 860px) {
  .page-home .home-rank__archive {
    margin: 0 28px 28px;
  }
}

.page-home .home-rank__archive summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ph-amber);
}

.page-home .home-rank__archive summary::-webkit-details-marker {
  display: none;
}

.page-home .home-rank__archive summary::before {
  content: "+";
  margin-right: 8px;
  font-weight: 700;
}

.page-home .home-rank__archive[open] summary::before {
  content: "–";
}

.page-home .home-rank__archive p {
  margin: 6px 0 0;
}

/* ---------- 入口三步 ---------- */
.page-home .home-steps__list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

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

.page-home .step-card {
  position: relative;
  padding: 20px 18px 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(56, 232, 255, 0.05), rgba(15, 19, 24, 0) 62%), var(--panel);
  overflow: hidden;
}

.page-home .step-card__num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(54px, 13vw, 86px);
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(56, 232, 255, 0.18);
}

.page-home .step-card__title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--fg);
}

.page-home .step-card__text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .home-steps__note {
  margin: 20px 0 0;
  padding-left: 14px;
  border-left: 2px solid rgba(124, 255, 178, 0.5);
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 桌面端收藏案例 ---------- */
.page-home .home-cases__panel {
  display: grid;
  border-radius: 28px;
  border: 1px solid rgba(255, 61, 154, 0.3);
  background: linear-gradient(158deg, rgba(255, 61, 154, 0.11), rgba(11, 14, 18, 0.94) 58%);
  overflow: hidden;
}

@media (min-width: 900px) {
  .page-home .home-cases__panel {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
    align-items: stretch;
  }
}

.page-home .home-cases__figure {
  margin: 0;
  overflow: hidden;
}

.page-home .home-cases__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 6;
  object-fit: cover;
}

@media (min-width: 900px) {
  .page-home .home-cases__figure img {
    height: 100%;
    aspect-ratio: auto;
  }
}

.page-home .home-cases__body {
  padding: 24px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (min-width: 900px) {
  .page-home .home-cases__body {
    padding: 34px 32px;
    justify-content: center;
  }
}

.page-home .home-cases__body .section__title {
  margin: 12px 0 0;
  font-size: clamp(22px, 4.6vw, 32px);
  line-height: 1.3;
}

.page-home .home-cases__text {
  margin: 14px 0 0;
  max-width: 33em;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
}

.page-home .home-cases__body .btn {
  margin-top: 22px;
}

/* ---------- 卡住的时候 ---------- */
.page-home .home-rescue {
  background: linear-gradient(180deg, rgba(124, 255, 178, 0.045), transparent 68%);
}

.page-home .home-rescue__grid {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

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

.page-home .rescue-card {
  padding: 22px 20px 24px;
  border-radius: 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ph-mint);
  background: var(--panel);
}

.page-home .rescue-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--fg);
}

.page-home .rescue-card__text {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.page-home .rescue-card .btn {
  margin-top: 20px;
}

/* ---------- 服务规模 ---------- */
.page-home .home-scale__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

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

.page-home .stat {
  padding: 18px 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.page-home .stat__num {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(25px, 6.4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.page-home .stat__num small {
  margin-left: 4px;
  font-size: 0.44em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.page-home .stat__label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.page-home .home-scale__more {
  margin: 24px 0 0;
}

.page-home .home-scale__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--ph-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(56, 232, 255, 0.35);
}

.page-home .home-scale__link:hover,
.page-home .home-scale__link:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--ph-cyan);
}
