/* ============================================ */
/*  page-home 专属样式                          */
/*  所有选择器限定在 .page-home 作用域内         */
/*  移动端优先 + 响应式                          */
/* ============================================ */

/* ---------- 作用域全局变量 ---------- */
.page-home {
  --h-gold: #D4AF37;
  --h-green: #39FF14;
  --h-bg-card: rgba(10, 31, 63, 0.82);
  --h-bg-light: #1A2F4F;
  --h-text-secondary: #B0C4DE;
  --h-font-mono: "SF Mono", "Source Code Pro", "Consolas", "Courier New", monospace;
  --h-radius: 12px;
  --h-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 通用重置（仅作用域内） ---------- */
.page-home *,
.page-home *::before,
.page-home *::after {
  box-sizing: border-box;
}

/* ---------- Hero 首屏 ---------- */
.page-home .hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
  overflow: hidden;
  background-color: var(--color-primary);
}

.page-home .hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.page-home .hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(6px) saturate(0.6);
  transform: scale(1.05);
}

.page-home .hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: 48px;
  padding-bottom: 32px;
}

.page-home .hero__title-block {
  max-width: 720px;
}

.page-home .hero__title {
  margin: 0 0 12px;
  font-size: clamp(42px, 10vw, 80px);
  font-weight: 800;
  font-family: "Inter", "SF Pro Display", "Helvetica Neue", sans-serif;
  line-height: 1.05;
  color: var(--h-gold);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(212, 175, 55, 0.18);
}

.page-home .hero__subtitle {
  margin: 0;
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.page-home .hero__note-block {
  max-width: 420px;
  border-left: 3px solid var(--h-gold);
  padding-left: 20px;
}

.page-home .hero__note {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--h-text-secondary);
}

.page-home .hero__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--h-green);
  border: 1px solid rgba(57, 255, 20, 0.35);
  padding: 4px 14px;
  border-radius: 40px;
  background: rgba(57, 255, 20, 0.06);
  font-family: var(--h-font-mono);
}

/* 路径导航卡片 */
.page-home .hero__paths {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 40px;
  margin-top: 12px;
}

.page-home .path-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: var(--h-bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--h-radius);
  text-decoration: none;
  transition: background var(--h-transition), border-color var(--h-transition), transform 0.25s ease;
  flex: 1 1 180px;
  min-width: 140px;
}

.page-home .path-card:hover,
.page-home .path-card:focus-visible {
  background: rgba(212, 175, 55, 0.10);
  border-color: var(--h-gold);
  transform: translateY(-3px);
}

.page-home .path-card__index {
  font-family: var(--h-font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--h-gold);
  letter-spacing: 0.04em;
  line-height: 1;
}

.page-home .path-card__label {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
  flex: 1;
}

.page-home .path-card__arrow {
  font-size: 18px;
  color: var(--h-green);
  transition: transform 0.25s ease;
}

.page-home .path-card:hover .path-card__arrow {
  transform: translateX(4px);
}

/* ---------- 通用 section 布局 ---------- */
.page-home .section-header {
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  padding-bottom: 20px;
}

.page-home .section-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 800;
  color: var(--h-gold);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.page-home .section-subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--h-text-secondary);
  font-weight: 400;
  max-width: 560px;
}

/* ---------- 赛前前瞻案例・轮播 ---------- */
.page-home .cases {
  padding: 80px 0 60px;
  background: var(--color-bg-dark);
}

.page-home .carousel {
  position: relative;
}

.page-home .carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--h-gold) transparent;
}

.page-home .carousel__track::-webkit-scrollbar {
  height: 6px;
}

.page-home .carousel__track::-webkit-scrollbar-thumb {
  background: var(--h-gold);
  border-radius: 4px;
}

.page-home .carousel__card {
  flex: 0 0 88%;
  max-width: 480px;
  scroll-snap-align: start;
  background: var(--h-bg-card);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.10);
  border-radius: var(--h-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-home .carousel__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.page-home .carousel__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 450;
  overflow: hidden;
  background: var(--h-bg-light);
}

.page-home .carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.page-home .carousel__card:hover .carousel__img {
  transform: scale(1.03);
}

.page-home .carousel__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background: var(--h-green);
  border-radius: 40px;
  font-family: var(--h-font-mono);
  line-height: 1;
  box-shadow: 0 2px 12px rgba(57, 255, 20, 0.25);
}

.page-home .carousel__body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-home .carousel__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
}

.page-home .carousel__desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--h-text-secondary);
  flex: 1;
}

.page-home .carousel__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.08);
  padding-top: 14px;
}

.page-home .carousel__data {
  font-family: var(--h-font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--h-green);
  letter-spacing: 0.04em;
}

.page-home .carousel__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--h-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-home .carousel__link:hover {
  color: var(--h-green);
}

/* 轮播导航点 */
.page-home .carousel__nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.page-home .carousel__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 10px;
  color: var(--h-text-secondary);
  text-decoration: none;
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 50%;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  font-family: var(--h-font-mono);
  line-height: 1;
}

.page-home .carousel__dot:hover,
.page-home .carousel__dot:focus-visible {
  border-color: var(--h-gold);
  color: var(--h-gold);
  background: rgba(212, 175, 55, 0.10);
}

.page-home .carousel__dot:target,
.page-home .carousel__dot[aria-current="page"] {
  background: var(--h-gold);
  color: var(--color-primary);
  border-color: var(--h-gold);
}

/* ---------- 平台亮点 ---------- */
.page-home .highlights {
  padding: 70px 0 80px;
  background: var(--h-bg-light);
  position: relative;
}

.page-home .highlights::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--h-gold), transparent);
  opacity: 0.3;
}

.page-home .highlights__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.page-home .highlight-card {
  display: flex;
  flex-direction: column;
  background: var(--h-bg-card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(212, 175, 55, 0.08);
  border-radius: var(--h-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-home .highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.30);
  border-color: rgba(212, 175, 55, 0.18);
}

.page-home .highlight-card__graphic {
  width: 100%;
  aspect-ratio: 400 / 300;
  overflow: hidden;
  background: var(--color-primary);
}

.page-home .highlight-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.page-home .highlight-card:hover .highlight-card__img {
  opacity: 0.65;
  transform: scale(1.04);
}

.page-home .highlight-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-home .highlight-card__index {
  display: inline-block;
  font-family: var(--h-font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--h-green);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.page-home .highlight-card__title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.page-home .highlight-card__desc {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--h-text-secondary);
  flex: 1;
}

.page-home .highlight-card__stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  border-top: 1px solid rgba(212, 175, 55, 0.06);
  padding-top: 14px;
}

.page-home .highlight-card__num {
  font-family: var(--h-font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--h-gold);
  letter-spacing: 0.02em;
}

.page-home .highlight-card__unit {
  font-size: 13px;
  color: var(--h-text-secondary);
  font-weight: 400;
}

/* ---------- 版本归档 ---------- */
.page-home .archive {
  padding: 70px 0 60px;
  background: var(--color-bg-dark);
}

.page-home .archive__entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 32px;
  background: var(--h-bg-card);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--h-radius);
}

.page-home .archive__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(212, 175, 55, 0.20);
  background: var(--h-bg-light);
  flex-shrink: 0;
}

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

.page-home .archive__details {
  width: 100%;
  color: var(--color-text-primary);
}

.page-home .archive__summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 600;
  color: var(--h-gold);
  transition: color 0.2s ease;
  user-select: none;
}

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

.page-home .archive__summary:hover {
  color: var(--h-green);
}

.page-home .archive__summary-text {
  flex: 1;
}

.page-home .archive__summary-indicator {
  font-family: var(--h-font-mono);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s ease;
  color: var(--h-text-secondary);
}

.page-home .archive__details[open] .archive__summary-indicator {
  transform: rotate(45deg);
  color: var(--h-green);
}

.page-home .archive__list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.08);
  padding-top: 24px;
}

.page-home .archive__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 4px;
}

.page-home .archive__version {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
}

.page-home .archive__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--h-text-secondary);
}

.page-home .archive__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--h-green);
  text-decoration: none;
  transition: color 0.2s ease;
  margin-top: 4px;
}

.page-home .archive__link:hover {
  color: var(--h-gold);
}

/* ---------- 信任声明 ---------- */
.page-home .trust {
  padding: 32px 0 40px;
  background: var(--color-primary);
  border-top: 1px solid rgba(212, 175, 55, 0.06);
}

.page-home .trust__inner {
  text-align: center;
}

.page-home .trust__text {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--h-text-secondary);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.page-home .trust__tagline {
  margin: 0;
  font-size: 14px;
  color: var(--h-gold);
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0.75;
}

/* ---------- 响应式 · 桌面端 ---------- */
@media (min-width: 768px) {
  .page-home .hero__inner {
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding-top: 64px;
    padding-bottom: 40px;
  }

  .page-home .hero__note-block {
    padding-left: 28px;
    margin-top: 16px;
  }

  .page-home .hero__paths {
    gap: 16px;
    padding-top: 8px;
  }

  .page-home .path-card {
    flex: 1;
    max-width: 280px;
  }

  .page-home .carousel__card {
    flex: 0 0 calc(50% - 10px);
    max-width: 520px;
  }

  .page-home .highlights__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .page-home .highlight-card {
    flex-direction: column;
  }

  .page-home .archive__entry {
    flex-direction: row;
    align-items: center;
  }

  .page-home .archive__icon {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
  }

  .page-home .archive__details {
    width: auto;
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .page-home .hero__inner {
    grid-template-columns: 1fr 360px;
    gap: 60px;
  }

  .page-home .hero__title {
    font-size: clamp(56px, 7vw, 80px);
  }

  .page-home .carousel__card {
    flex: 0 0 calc(33.33% - 14px);
    max-width: 520px;
  }

  .page-home .highlights__grid {
    gap: 32px;
  }

  .page-home .archive__entry {
    padding: 44px 52px;
  }
}

/* ---------- 可访问性 ---------- */
.page-home .path-card:focus-visible,
.page-home .carousel__dot:focus-visible,
.page-home .archive__summary:focus-visible {
  outline: 2px solid var(--h-green);
  outline-offset: 3px;
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .page-home *,
  .page-home *::before,
  .page-home *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
