/* ============================================================
   page-home · 赛事索引台（首页）
   ============================================================ */

.page-home {
  --home-line: rgba(42, 58, 99, 0.38);
  --home-violet-glow: rgba(122, 92, 255, 0.24);
  --home-cyan-glow: rgba(53, 225, 240, 0.14);
  position: relative;
  display: block;
  overflow-x: hidden;
  color: var(--star);
  font-family: var(--font-sans);
  background:
    radial-gradient(1100px 560px at 84% -10%, var(--home-violet-glow), transparent 62%),
    radial-gradient(760px 480px at 2% 16%, var(--home-cyan-glow), transparent 58%),
    var(--deep);
}

.page-home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--home-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--home-line) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 46%, transparent 84%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 46%, transparent 84%);
}

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

.page-home .home-wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 18px;
}

@media (min-width: 768px) {
  .page-home .home-wrap { padding: 0 34px; }
}

@media (min-width: 1200px) {
  .page-home .home-wrap { padding: 0 44px; }
}

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

.page-home .home-hero {
  padding: 30px 0 54px;
}

@media (min-width: 900px) {
  .page-home .home-hero { padding: 54px 0 78px; }
}

.page-home .home-hero__grid {
  display: grid;
  gap: 30px;
  align-items: center;
}

@media (min-width: 900px) {
  .page-home .home-hero__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 52px;
  }
}

.page-home .home-hero__ctx {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--mist);
}

.page-home .home-hero__ctx-num {
  padding: 3px 8px;
  border: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.page-home .home-hero__title {
  margin: 0;
  font-size: clamp(34px, 8vw, 64px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--star);
}

.page-home .home-hero__title-sub {
  display: block;
  margin-top: 16px;
  font-size: clamp(15px, 3.4vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--mist);
}

.page-home .home-hero__lede {
  margin: 22px 0 0;
  max-width: 600px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--mist);
}

.page-home .home-hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.page-home .home-hero__fact {
  padding: 16px 10px 16px 0;
}

.page-home .home-hero__fact + .home-hero__fact {
  padding-left: 14px;
  border-left: 1px solid var(--line-soft);
}

.page-home .home-hero__fact-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(24px, 7vw, 30px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gold);
}

.page-home .home-hero__fact-label {
  display: block;
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--mist);
}

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

.page-home .home-hero__visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--hull);
  aspect-ratio: 4 / 5;
}

@media (min-width: 900px) {
  .page-home .home-hero__visual { aspect-ratio: 7 / 8; }
}

.page-home .home-hero__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(0.85) contrast(1.05);
}

.page-home .home-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(165deg, rgba(7, 11, 24, 0.1) 0%, rgba(7, 11, 24, 0.76) 64%, rgba(7, 11, 24, 0.95) 100%),
    radial-gradient(72% 56% at 50% 38%, rgba(122, 92, 255, 0.3), transparent 72%);
}

.page-home .home-hero__trace {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-home .home-hero__trace path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  opacity: 0.5;
}

@keyframes home-trace {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .page-home .home-hero__trace path {
    animation: home-trace 1100ms var(--ease) forwards;
  }
  .page-home .home-hero__trace path:nth-child(2) { animation-delay: 160ms; }
  .page-home .home-hero__trace path:nth-child(3) { animation-delay: 320ms; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-hero__trace path { stroke-dashoffset: 0; }
}

.page-home .home-hero__vert {
  position: absolute;
  right: 12px;
  top: 22px;
  z-index: 3;
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 0.34em;
  color: rgba(233, 238, 249, 0.52);
  pointer-events: none;
}

.page-home .home-hero__caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(154, 167, 199, 0.28);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.page-home .home-hero__caption-num {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

/* ---------- 索引概览 ---------- */

.page-home .home-index {
  padding: 62px 0 66px;
  background: linear-gradient(180deg, rgba(14, 23, 48, 0) 0%, rgba(14, 23, 48, 0.88) 18%, rgba(14, 23, 48, 0.88) 82%, rgba(14, 23, 48, 0) 100%);
}

.page-home .home-index__head,
.page-home .home-leagues__head,
.page-home .home-replay__head,
.page-home .home-paths__head {
  max-width: 760px;
}

.page-home .home-index__stats {
  display: grid;
  gap: 1px;
  margin-top: 42px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

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

.page-home .home-index__stat {
  padding: 26px 22px;
  background: var(--deep);
}

.page-home .home-index__stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--star);
}

.page-home .home-index__stat:nth-child(2) .home-index__stat-num { color: var(--gold); }

.page-home .home-index__stat-label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--mist);
}

.page-home .home-index__disc {
  margin-top: 30px;
  border: 1px solid var(--line);
  background: rgba(22, 34, 74, 0.42);
}

.page-home .home-index__disc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--star);
  cursor: pointer;
  list-style: none;
}

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

.page-home .home-index__disc > summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  color: var(--cyan);
}

.page-home .home-index__disc[open] > summary::after { content: "\2212"; }

.page-home .home-index__disc-body {
  max-width: 760px;
  padding: 0 22px 22px;
}

.page-home .home-index__disc-body p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--mist);
}

.page-home .home-index__disc-body p:last-child { margin-bottom: 0; }

.page-home .home-index__disc-link {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 225, 240, 0.42);
  padding-bottom: 2px;
}

.page-home .home-index__disc-link:hover {
  color: var(--star);
  border-color: var(--star);
}

/* ---------- 联赛星座导航 ---------- */

.page-home .home-leagues {
  position: relative;
  padding: 70px 0 84px;
  overflow: hidden;
}

.page-home .home-leagues__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

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

.page-home .home-leagues__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--deep) 0%, rgba(7, 11, 24, 0.62) 42%, var(--deep) 100%);
}

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

.page-home .const {
  position: relative;
  margin-top: 44px;
}

.page-home .const__lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-home .const__lines path {
  fill: none;
  stroke: var(--violet);
  stroke-width: 1;
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  opacity: 0.4;
}

@keyframes const-draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .page-home .const__lines path {
    animation: const-draw 900ms var(--ease) forwards;
  }
  .page-home .const__lines path:nth-child(2) { animation-delay: 140ms; }
  .page-home .const__lines path:nth-child(3) { animation-delay: 280ms; }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .const__lines path { stroke-dashoffset: 0; }
}

.page-home .const__nodes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .page-home .const__nodes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .page-home .const__nodes > li:nth-child(3n + 2) { margin-top: 26px; }
  .page-home .const__nodes > li:nth-child(3n + 3) { margin-top: 52px; }
}

@media (min-width: 1040px) {
  .page-home .const__nodes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
  .page-home .const__nodes > li:nth-child(n) { margin-top: 0; }
  .page-home .const__nodes > li:nth-child(4n + 2) { margin-top: 24px; }
  .page-home .const__nodes > li:nth-child(4n + 3) { margin-top: 48px; }
  .page-home .const__nodes > li:nth-child(4n + 4) { margin-top: 72px; }
}

.page-home .const-node {
  position: relative;
}

.page-home .const-node__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 124px;
  height: 100%;
  padding: 18px 16px;
  border: 1px solid var(--line);
  background: linear-gradient(152deg, rgba(22, 34, 74, 0.85), rgba(14, 23, 48, 0.72));
  color: var(--star);
  text-decoration: none;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.page-home .const-node__link:hover,
.page-home .const-node__link:focus-visible {
  border-color: var(--violet);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 0 1px rgba(122, 92, 255, 0.45), 0 16px 36px -20px rgba(122, 92, 255, 0.95);
  outline: none;
}

.page-home .const-node__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

.page-home .const-node__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--star);
}

.page-home .const-node__meta {
  margin-top: auto;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--mist);
}

/* ---------- 数据面板速览 ---------- */

.page-home .home-data {
  padding: 68px 0 72px;
  background:
    radial-gradient(820px 420px at 10% 22%, rgba(53, 225, 240, 0.1), transparent 62%),
    linear-gradient(180deg, rgba(7, 11, 24, 0) 0%, rgba(14, 23, 48, 0.92) 20%, rgba(14, 23, 48, 0.92) 80%, rgba(7, 11, 24, 0) 100%);
}

.page-home .home-data__grid {
  display: grid;
  gap: 30px;
}

@media (min-width: 900px) {
  .page-home .home-data__grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 52px;
    align-items: center;
  }
}

.page-home .home-data__figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--deep);
  aspect-ratio: 1 / 1;
}

.page-home .home-data__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.page-home .home-data__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.page-home .home-data__cats li {
  padding: 7px 13px;
  border: 1px solid rgba(122, 92, 255, 0.42);
  background: rgba(122, 92, 255, 0.1);
  font-size: 13px;
  color: var(--star);
}

.page-home .home-data__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.page-home .home-data__metric {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 13px 12px;
  background: var(--deep);
  font-size: 14px;
  line-height: 1.4;
  color: var(--star);
}

.page-home .home-data__metric-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--mist);
}

.page-home .home-data__actions {
  margin-top: 28px;
}

/* ---------- 编号回放目录 ---------- */

.page-home .home-replay {
  padding: 68px 0 72px;
}

.page-home .home-replay__grid {
  display: grid;
  gap: 26px;
  margin-top: 40px;
}

@media (min-width: 940px) {
  .page-home .home-replay__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 42px;
    align-items: start;
  }
}

.page-home .home-replay__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.page-home .home-replay__row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 200ms var(--ease), padding-left 200ms var(--ease);
}

.page-home .home-replay__row:hover {
  background: rgba(53, 225, 240, 0.06);
  padding-left: 12px;
}

.page-home .home-replay__num {
  flex: 0 0 72px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.page-home .home-replay__body {
  flex: 1 1 auto;
  min-width: 0;
}

.page-home .home-replay__name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--star);
}

.page-home .home-replay__tag {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--mist);
}

.page-home .home-replay__figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}

.page-home .home-replay__figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

/* ---------- 三条路径 ---------- */

.page-home .home-paths {
  padding: 0 0 72px;
}

.page-home .home-paths__list {
  display: grid;
  gap: 1px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

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

.page-home .home-paths__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 24px 26px;
  background: var(--deep);
  transition: background-color 240ms var(--ease);
}

.page-home .home-paths__item:hover {
  background: rgba(22, 34, 74, 0.72);
}

.page-home .home-paths__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--violet);
}

.page-home .home-paths__name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--star);
}

.page-home .home-paths__desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--mist);
}

.page-home .home-paths__link {
  margin-top: auto;
  align-self: flex-start;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(53, 225, 240, 0.42);
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}

.page-home .home-paths__link:hover {
  color: var(--star);
  border-color: var(--star);
}

/* ---------- 搜索与协助 ---------- */

.page-home .home-search {
  padding: 0 0 88px;
}

.page-home .home-search__panel {
  display: grid;
  gap: 26px;
  padding: 32px 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(122, 92, 255, 0.18), rgba(53, 225, 240, 0.07) 56%, transparent 100%),
    rgba(14, 23, 48, 0.84);
}

@media (min-width: 820px) {
  .page-home .home-search__panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 42px;
    align-items: center;
    padding: 42px 40px;
  }
}

.page-home .home-search__title {
  margin: 0;
  font-size: clamp(22px, 4.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--star);
}

.page-home .home-search__text {
  margin: 14px 0 0;
  max-width: 540px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--mist);
}

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

.page-home .home-search__field {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1 1 100%;
  padding: 15px 18px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 24, 0.72);
  font-size: 14px;
  color: var(--mist);
  text-decoration: none;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

.page-home .home-search__field:hover,
.page-home .home-search__field:focus-visible {
  border-color: var(--cyan);
  color: var(--star);
  outline: none;
}

.page-home .home-search__icon {
  flex: 0 0 auto;
  color: var(--cyan);
}

.page-home .home-search__btn {
  flex: 1 1 auto;
  justify-content: center;
}

/* ---------- 回到索引浮标 ---------- */

.page-home .home-backtop {
  position: fixed;
  right: 14px;
  bottom: 44px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(14, 23, 48, 0.94);
  font-size: 13px;
  color: var(--star);
  text-decoration: none;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}

.page-home .home-backtop:hover {
  border-color: var(--violet);
  color: var(--cyan);
}

@media (min-width: 1024px) {
  .page-home .home-backtop {
    right: 24px;
    bottom: 54px;
  }
}

@media (max-width: 520px) {
  .page-home .home-hero__vert { display: none; }

  .page-home .home-hero__fact + .home-hero__fact { padding-left: 10px; }

  .page-home .home-data__metric {
    padding: 11px 9px;
    font-size: 13px;
  }

  .page-home .home-replay__num { flex: 0 0 58px; font-size: 17px; }

  .page-home .home-backtop {
    right: 10px;
    bottom: 40px;
    padding: 8px 11px;
    font-size: 12px;
  }
}
