/* =============================================
   首页 · 目录型内容地图
   作用域：.page-home
   ============================================= */

.page-home {
  --home-page-gutter: clamp(1rem, 2.5vw, 2rem);
  position: relative;
  overflow-x: clip;
  background:
    linear-gradient(rgba(10, 35, 66, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 35, 66, 0.03) 1px, transparent 1px),
    var(--lm-off-white);
  background-size: 44px 44px;
}

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

/* 页面主体宽度约束 */
.page-home .home-hero,
.page-home .home-calendar,
.page-home .home-scorers,
.page-home .home-reviews,
.page-home .home-community__inner {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.page-home .breadcrumb {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
  padding-block: 0.6rem 0;
}

/* ---------- 展签标签 ---------- */
.page-home .home-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--lm-blue);
  color: var(--lm-white);
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  line-height: 1;
  padding: 0.4rem 0.75rem 0.4rem 0.65rem;
  margin: 0 0 0.85rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

.page-home .home-marker--orange {
  background: var(--lm-orange);
}

.page-home .home-marker--yellow {
  background: var(--lm-yellow);
  color: var(--lm-ink);
}

/* ---------- Hero / 章节预览 ---------- */
.page-home .home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-block: 1.5rem 0.5rem;
}

.page-home .home-hero__copy {
  align-self: end;
}

.page-home .home-hero h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--lm-ink);
}

.page-home .home-hero__lead {
  margin: 1rem 0 0;
  max-width: 44rem;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--lm-dark-gray);
}

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

.page-home .home-hero__actions .btn-primary {
  background: var(--lm-orange);
  border-color: var(--lm-orange);
  color: var(--lm-white);
}

.page-home .home-hero__media {
  position: relative;
  background: var(--lm-gray);
  border: 1px solid var(--lm-warm-gray);
  box-shadow: var(--shadow-2);
}

.page-home .home-hero__media::after {
  content: "";
  position: absolute;
  right: -0.55rem;
  bottom: -0.55rem;
  width: 3.2rem;
  height: 3.2rem;
  border-right: 3px solid var(--lm-orange);
  border-bottom: 3px solid var(--lm-orange);
  pointer-events: none;
}

/* ---------- 章节索引 ---------- */
.page-home .chapter-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 1.5rem;
  border-top: 2px solid var(--lm-ink);
  border-bottom: 1px solid var(--lm-gray);
}

.page-home .chapter-index__label {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.55rem 0 0.35rem;
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lm-orange);
}

.page-home .chapter-index__link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 0.3rem;
  border-top: 1px solid var(--lm-gray);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
  color: var(--lm-ink);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.page-home .chapter-index__link:nth-child(odd) {
  border-right: 1px solid var(--lm-gray);
}

.page-home .chapter-index__link:hover,
.page-home .chapter-index__link:focus-visible {
  background: var(--lm-yellow);
  color: var(--lm-ink);
}

.page-home .chapter-index__num {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--lm-orange);
}

.page-home .chapter-index__arrow {
  margin-left: auto;
  font-size: 1rem;
  color: var(--lm-dark-gray);
}

/* ---------- 滚动比分条 ---------- */
.page-home .scores-ticker {
  width: 100%;
  margin-block: 2rem 0;
  background: var(--lm-blue);
  color: var(--lm-white);
  border-block: 3px solid var(--lm-yellow);
  overflow: hidden;
}

.page-home .scores-ticker__inner {
  display: flex;
  align-items: stretch;
  width: min(calc(100% - 1rem), var(--container));
  margin-inline: auto;
}

.page-home .scores-ticker__title {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.55rem 0.9rem 0.55rem 0;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: var(--lm-yellow);
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.page-home .scores-ticker__pause {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--lm-orange);
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0 0.6rem;
}

.page-home .scores-ticker__pause:hover,
.page-home .scores-ticker__pause:focus-visible {
  color: var(--lm-yellow);
  outline: none;
}

.page-home .scores-ticker__pause:focus-visible {
  text-decoration: underline;
}

.page-home .scores-ticker:hover .scores-ticker__track,
.page-home .scores-ticker__pause:focus ~ .scores-ticker__viewport .scores-ticker__track {
  animation-play-state: paused;
}

.page-home .scores-ticker__viewport {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0.62rem 0 0.62rem 1rem;
}

.page-home .scores-ticker__track {
  display: inline-flex;
  align-items: center;
  gap: 2.4rem;
  width: max-content;
  padding: 0;
  margin: 0;
  list-style: none;
  will-change: transform;
  animation: lm-ticker-scroll 38s linear infinite;
}

.page-home .scores-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
}

.page-home .scores-ticker__league {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
}

.page-home .scores-ticker__match {
  font-family: var(--font-data);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--lm-white);
}

.page-home .scores-ticker__status {
  font-size: 0.68rem;
  color: var(--lm-yellow);
}

@keyframes lm-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 赛事日历 ---------- */
.page-home .home-calendar {
  padding-top: 3rem;
}

.page-home .home-calendar .section-head {
  margin-bottom: 1.25rem;
}

.page-home .calendar-legend {
  margin: 0.85rem 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--lm-dark-gray);
  border-top: 1px dashed var(--lm-warm-gray);
  padding-top: 0.75rem;
}

.page-home .calendar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--lm-ink);
  background: var(--lm-white);
}

.page-home .calendar-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "day league time"
    "day match time";
  gap: 0.12rem 1rem;
  align-items: center;
  padding: 0.95rem 0.8rem;
  border-bottom: 1px solid var(--lm-gray);
  transition: background var(--transition);
}

.page-home .calendar-item:hover {
  background: var(--lm-off-white);
}

.page-home .calendar-item__day {
  grid-area: day;
  align-self: center;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--lm-white);
  background: var(--lm-orange);
  padding: 0.3rem 0.45rem;
  min-width: 3.1rem;
  text-align: center;
}

.page-home .calendar-item__league {
  grid-area: league;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lm-dark-gray);
}

.page-home .calendar-item__match {
  grid-area: match;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
}

.page-home .calendar-item__link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--lm-warm-gray);
  transition: color var(--transition), border-color var(--transition);
}

.page-home .calendar-item__link:hover,
.page-home .calendar-item__link:focus-visible {
  color: var(--lm-orange);
  border-bottom-color: var(--lm-orange);
}

.page-home .calendar-item__time {
  grid-area: time;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--lm-blue);
  text-align: right;
  white-space: nowrap;
}

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

/* ---------- 射手榜 ---------- */
.page-home .home-scorers {
  padding-top: 3rem;
}

.page-home .scorer-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.page-home .scorer-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  grid-template-areas:
    "rank player goals"
    "rank bar goals"
    "rank meta meta";
  gap: 0.1rem 0.8rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  background: var(--lm-white);
  border: 1px solid var(--lm-gray);
  border-left: 4px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.page-home .scorer-item:first-child {
  border-left-color: var(--lm-yellow);
}

.page-home .scorer-item__rank {
  grid-area: rank;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--lm-orange);
  text-align: center;
}

.page-home .scorer-item__player {
  grid-area: player;
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  min-width: 0;
}

.page-home .scorer-item__name {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--lm-ink);
}

.page-home .scorer-item__club {
  font-size: 0.72rem;
  color: var(--lm-dark-gray);
}

.page-home .scorer-item__bar {
  grid-area: bar;
  height: 0.55rem;
  background: var(--lm-gray);
  position: relative;
  overflow: hidden;
}

.page-home .scorer-item__fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--lm-orange), var(--lm-yellow));
}

.page-home .scorer-item__goals {
  grid-area: goals;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--lm-blue);
}

.page-home .scorer-item__meta {
  grid-area: meta;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--lm-dark-gray);
}

.page-home .scorer-cta {
  margin: 1.25rem 0 0;
  display: flex;
  justify-content: flex-end;
}

/* ---------- 赛事复盘 ---------- */
.page-home .home-reviews {
  padding-block: 3rem 1rem;
}

.page-home .review-grid {
  display: grid;
  gap: 1.6rem;
  margin-top: 1.6rem;
}

.page-home .review-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--lm-gray);
}

.page-home .review-card__media {
  background: var(--lm-gray);
  border: 1px solid var(--lm-warm-gray);
  box-shadow: var(--shadow-1);
}

.page-home .review-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.page-home .review-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--lm-ink);
  margin: 0.1rem 0 0;
}

.page-home .review-card__excerpt {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--lm-dark-gray);
  margin: 0;
  flex: 1;
}

.page-home .review-card__link {
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--lm-orange);
  text-decoration: none;
  text-transform: uppercase;
  align-self: flex-start;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

.page-home .review-card__link:hover,
.page-home .review-card__link:focus-visible {
  color: var(--lm-blue);
  border-bottom-color: var(--lm-orange);
}

/* ---------- 为什么选择 LM体育2025桌面端 ---------- */
.page-home .home-why {
  width: 100%;
  margin-top: 2.5rem;
  padding-block: 3rem;
  background: var(--lm-blue);
  color: var(--lm-white);
  position: relative;
  overflow: hidden;
}

.page-home .home-why::before {
  content: "";
  position: absolute;
  right: -5rem;
  top: -5rem;
  width: 17rem;
  height: 17rem;
  border: 2px solid rgba(255, 255, 255, 0.14);
  transform: rotate(18deg);
  pointer-events: none;
}

.page-home .home-why__inner {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
  display: grid;
  gap: 2rem;
  position: relative;
}

.page-home .home-why .section-title {
  color: var(--lm-white);
}

.page-home .home-why .section-desc {
  color: rgba(255, 255, 255, 0.78);
}

.page-home .home-why__desc {
  font-size: 0.94rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.page-home .why-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.page-home .why-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

.page-home .why-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--lm-orange);
  transform: rotate(45deg);
}

.page-home .home-why__more {
  margin: 1.6rem 0 0;
}

.page-home .home-why__more .btn-outline {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--lm-white);
}

.page-home .home-why__more .btn-outline:hover {
  border-color: var(--lm-yellow);
  color: var(--lm-yellow);
}

.page-home .home-why__media {
  border: 1px solid rgba(255, 255, 255, 0.3);
  outline: 1px solid rgba(255, 255, 255, 0.16);
  outline-offset: -0.5rem;
  background: var(--lm-blue);
  aspect-ratio: 8 / 5;
}

.page-home .home-why__media img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
}

.page-home .home-why__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.page-home .why-stat {
  padding: 1rem 1rem 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.page-home .why-stat__num {
  display: block;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.05;
  color: var(--lm-yellow);
}

.page-home .why-stat__label {
  display: block;
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- 社区 / 内容生态 ---------- */
.page-home .home-community {
  padding-block: 3rem 3.5rem;
  width: 100%;
}

.page-home .home-community__inner {
  display: grid;
  gap: 1.6rem;
  align-items: center;
}

.page-home .home-community__media {
  background: var(--lm-gray);
  border: 1px solid var(--lm-warm-gray);
  box-shadow: var(--shadow-1);
}

.page-home .home-community__desc {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--lm-dark-gray);
  margin: 0.5rem 0 0;
}

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

.page-home .home-community__actions .btn-primary {
  background: var(--lm-orange);
  border-color: var(--lm-orange);
  color: var(--lm-white);
}

.page-home .home-trust {
  margin: 2rem 0 0;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid var(--lm-yellow);
  background: var(--lm-off-white);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--lm-dark-gray);
}

/* ---------- 桌面端增强 ---------- */
@media (min-width: 768px) {
  .page-home .chapter-index {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home .chapter-index__label {
    grid-column: auto;
    padding: 0.55rem 1rem 0.35rem 0;
    border-right: 1px solid var(--lm-gray);
    margin-right: 1rem;
  }

  .page-home .chapter-index__link {
    padding: 0.75rem 0.9rem;
    border-top: 0;
    border-right: 1px solid var(--lm-gray);
  }

  .page-home .chapter-index__link:nth-child(2) {
    border-left: 1px solid var(--lm-gray);
  }

  .page-home .calendar-item {
    grid-template-columns: auto 8rem 1fr auto;
    grid-template-areas: "day league match time";
    padding: 1rem 1.2rem;
  }

  .page-home .calendar-item__day {
    min-width: 3.4rem;
  }

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

  .page-home .review-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .page-home .review-card--hero {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .page-home .home-community__inner {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 2.5rem;
  }
}

@media (min-width: 860px) {
  .page-home .scorer-item {
    grid-template-columns: 3rem 1.1fr 2.4fr 0.7fr auto;
    grid-template-areas: "rank player bar goals meta";
    gap: 0.2rem 1rem;
    padding: 0.75rem 1rem;
  }

  .page-home .scorer-item:hover {
    border-color: var(--lm-orange);
    box-shadow: var(--shadow-1);
  }

  .page-home .scorer-item__rank {
    font-size: 1.45rem;
  }

  .page-home .scorer-item__meta {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--transition), transform var(--transition);
    background: var(--lm-dark-gray);
    color: var(--lm-white);
    padding: 0.22rem 0.5rem;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .page-home .scorer-item:hover .scorer-item__meta {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 900px) {
  .page-home .home-hero {
    grid-template-columns: 1.12fr 0.88fr;
    grid-template-areas:
      "copy media"
      "index index";
    column-gap: clamp(2rem, 5vw, 4.5rem);
    padding-block: 2.5rem 1rem;
  }

  .page-home .home-hero__copy {
    grid-area: copy;
    padding-bottom: 1.25rem;
  }

  .page-home .home-hero__media {
    grid-area: media;
    transform: rotate(0.7deg);
    align-self: start;
    margin-top: 0.75rem;
  }

  .page-home .chapter-index {
    grid-area: index;
    margin-top: 0.75rem;
  }

  .page-home .home-why__inner {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas:
      "copy media"
      "stats media";
    align-items: start;
  }

  .page-home .home-why__copy {
    grid-area: copy;
  }

  .page-home .home-why__stats {
    grid-area: stats;
  }

  .page-home .home-why__media {
    grid-area: media;
  }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-home .scores-ticker__track {
    animation: none;
    transform: none;
  }

  .page-home .home-hero__media {
    transform: none;
  }

  .page-home *,
  .page-home *::before,
  .page-home *::after {
    transition-duration: 0.01ms !important;
  }
}
