/* ===== 首页专属样式 · 作用域 .page-home ===== */

.page-home {
  --home-gap: clamp(1.5rem, 4vw, 3rem);
  background: var(--ink);
}

/* ---------- 首屏 ---------- */
.page-home .home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 4.75rem) 0 clamp(1.75rem, 4vw, 3rem);
}

.page-home .home-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120%;
  background:
    radial-gradient(58% 52% at 6% 0%, rgba(46, 240, 207, 0.12), transparent 66%),
    radial-gradient(46% 46% at 102% 6%, rgba(242, 178, 60, 0.09), transparent 70%);
  pointer-events: none;
}

.page-home .home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--tier-1),
    var(--tier-3),
    var(--tier-5),
    var(--tier-7),
    var(--tier-9)
  );
}

.page-home .home-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
}

.page-home .home-hero h1 {
  margin: 0.6rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.05rem, 6.6vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--paper);
}

.page-home .home-hero__em {
  font-style: normal;
  color: var(--cyan);
}

.page-home .home-hero__lead .lede {
  margin-top: 1.25rem;
  max-width: 46ch;
}

.page-home .home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.page-home .home-hero__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.15rem;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--panel) 0%, var(--ink-2) 100%);
  box-shadow: 0 18px 44px -32px rgba(0, 0, 0, 0.9);
}

.page-home .home-metric {
  position: relative;
  min-width: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.page-home .home-metric::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 26px;
  height: 2px;
  background: var(--tier-1);
}

.page-home .home-metric:nth-child(2)::before { background: var(--tier-4); }
.page-home .home-metric:nth-child(3)::before { background: var(--tier-7); }
.page-home .home-metric:nth-child(4)::before { background: var(--tier-9); }

.page-home .home-metric__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.85rem, 5.4vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.page-home .home-metric--amber .home-metric__num {
  color: var(--amber);
}

.page-home .home-metric__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.79rem;
  line-height: 1.55;
  color: var(--muted);
}

.page-home .home-hero__visual {
  position: relative;
  z-index: 1;
  margin-top: clamp(2rem, 4.5vw, 3.25rem);
}

/* ---------- 通用框架 ---------- */
.page-home .home-frame {
  display: block;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel) 0%, var(--ink-2) 100%);
}

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

/* ---------- 限红九档 ---------- */
.page-home .home-tiers {
  border-bottom: 1px solid var(--line);
}

.page-home .home-tiers__lede {
  max-width: 62ch;
  margin: 1.1rem 0 0;
  color: var(--body-text);
}

.page-home .tier-scale {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(9, minmax(56px, 1fr));
  gap: 5px;
  margin: 2.25rem 0 0;
  padding: 0 0 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.page-home .tier-scale__item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.page-home .tier-scale__bar {
  display: block;
  border-radius: 1px;
  background: linear-gradient(to top, var(--t), rgba(7, 11, 9, 0));
  opacity: 0.92;
}

.page-home .tier-scale__item:nth-child(1) .tier-scale__bar { --t: var(--tier-1); height: 30px; }
.page-home .tier-scale__item:nth-child(2) .tier-scale__bar { --t: var(--tier-2); height: 36px; }
.page-home .tier-scale__item:nth-child(3) .tier-scale__bar { --t: var(--tier-3); height: 42px; }
.page-home .tier-scale__item:nth-child(4) .tier-scale__bar { --t: var(--tier-4); height: 48px; }
.page-home .tier-scale__item:nth-child(5) .tier-scale__bar { --t: var(--tier-5); height: 54px; }
.page-home .tier-scale__item:nth-child(6) .tier-scale__bar { --t: var(--tier-6); height: 60px; }
.page-home .tier-scale__item:nth-child(7) .tier-scale__bar { --t: var(--tier-7); height: 66px; }
.page-home .tier-scale__item:nth-child(8) .tier-scale__bar { --t: var(--tier-8); height: 72px; }
.page-home .tier-scale__item:nth-child(9) .tier-scale__bar { --t: var(--tier-9); height: 78px; }

.page-home .tier-scale__val {
  font-size: clamp(0.68rem, 1.5vw, 0.86rem);
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.page-home .tier-scale__note {
  margin: 0.9rem 0 0;
  font-size: 0.79rem;
  color: var(--dim);
}

/* ---------- 玩法分类 ---------- */
.page-home .home-catalog__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: end;
}

.page-home .home-catalog__lede {
  max-width: 60ch;
  margin: 1.25rem 0 0;
  color: var(--body-text);
}

.page-home .filters {
  margin-top: 1.75rem;
}

.page-home .home-cards {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: 1.5rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.page-home .home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.45rem 1.35rem 1.6rem;
  background: var(--panel);
  transition: background 0.35s var(--ease-out);
}

.page-home .home-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cyan);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.page-home .home-card:hover {
  background: var(--panel-2);
}

.page-home .home-card:hover::before {
  opacity: 1;
}

.page-home .home-card__idx {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.page-home .home-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.16rem;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.page-home .home-card > p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--body-text);
}

.page-home .home-card__specs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: auto 0 0;
  padding: 0.9rem 0 0;
  border-top: 1px solid var(--line);
}

.page-home .home-card__specs li {
  font-size: 0.73rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.24rem 0.55rem;
}

/* ---------- 牌路记录 ---------- */
.page-home .home-paths {
  border-top: 1px solid var(--line);
}

.page-home .home-paths__inner,
.page-home .home-start__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.25rem);
}

.page-home .home-paths__text > p {
  max-width: 54ch;
  margin: 1.1rem 0 0;
  color: var(--body-text);
}

.page-home .home-paths__list {
  list-style: none;
  display: grid;
  gap: 0.8rem;
  margin: 1.6rem 0 0;
  padding: 0;
}

.page-home .home-paths__list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
}

.page-home .home-paths__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 12px;
  height: 2px;
  background: var(--amber);
}

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

/* ---------- 新手入门 ---------- */
.page-home .home-start {
  border-top: 1px solid var(--line);
}

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

.page-home .home-start__text > p {
  max-width: 52ch;
  margin: 1.1rem 0 0;
  color: var(--body-text);
}

.page-home .home-start__steps {
  list-style: none;
  counter-reset: hs;
  display: grid;
  gap: 0.8rem;
  margin: 1.6rem 0 0;
  padding: 0;
}

.page-home .home-start__steps li {
  counter-increment: hs;
  position: relative;
  padding-left: 2.4rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
}

.page-home .home-start__steps li::before {
  content: "0" counter(hs);
  position: absolute;
  left: 0;
  top: 0.18em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--tier-1);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.1rem;
}

.page-home .home-start__text .btn {
  margin-top: 1.75rem;
}

/* ---------- 收尾 ---------- */
.page-home .home-cta {
  border-top: 1px solid var(--line);
}

.page-home .home-cta__inner {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem);
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, var(--panel-2) 0%, var(--ink-2) 70%),
    radial-gradient(80% 120% at 100% 0%, rgba(46, 240, 207, 0.1), transparent 60%);
  overflow: hidden;
}

.page-home .home-cta__inner::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 3px;
  background: linear-gradient(90deg, var(--tier-1), var(--tier-6), var(--tier-9));
}

.page-home .home-cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: 0.02em;
  color: var(--paper);
}

.page-home .home-cta p {
  max-width: 56ch;
  margin: 0.9rem 0 0;
  color: var(--body-text);
}

.page-home .home-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .page-home .home-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .page-home .home-catalog__head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .page-home .home-paths__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
  }

  .page-home .home-start__inner {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }
}

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

@media (max-width: 479px) {
  .page-home .home-hero__panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-home .tier-scale {
    gap: 3px;
  }

  .page-home .home-cta__inner::after {
    width: 70%;
  }
}

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