/* ============================================
   home.css — 首页专属样式
   ============================================ */

/* ============================================
   1. Hero 区
   ============================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0A3D24 0%, #0F5132 50%, #1A7A4F 100%);
  color: var(--color-bg);
  padding: var(--sp-20) 0 var(--sp-24);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.7;
}

.hero-bg img,
.hero-bg svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 580px;
  animation: fadeUp 0.8s ease forwards;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(201, 169, 97, 0.15);
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-radius: var(--r-full);
  color: var(--color-gold);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-6);
}

.hero-eyebrow .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 50%;
  animation: float 1.6s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--fw-black);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-bg);
  margin-bottom: var(--sp-6);
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: var(--sp-8);
  max-width: 520px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
}

.hero-trust-item strong {
  color: var(--color-gold);
  font-weight: var(--fw-bold);
}

/* Hero 视觉侧 */
.hero-visual {
  position: relative;
  height: 480px;
  animation: scaleIn 1s ease forwards;
}

.hero-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--sp-5);
  color: var(--color-ink);
}

.hero-card-1 {
  top: 0;
  left: -20px;
  width: 230px;
  z-index: 2;
  animation: float 4s ease-in-out infinite;
}

.hero-card-2 {
  bottom: 0;
  right: 0;
  width: 220px;
  z-index: 2;
  animation: float 5s ease-in-out infinite 0.5s;
}

.hero-card-3 {
  /* 居中略偏上，避免遮挡左右两张卡片 */
  top: 50%;
  left: 50%;
  width: 180px;
  height: fit-content;
  text-align: center;
  background: var(--color-primary);
  color: var(--color-bg);
  border: 3px solid var(--color-gold);
  /* 使用本地动画保留 translate(-50%,-50%) 居中 */
  animation: scaleInCenter 1.2s ease forwards;
  transform-origin: center;
  z-index: 3;
}

@keyframes scaleInCenter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* 中等屏幕：缩小卡片，避免相互遮挡 */
@media (max-width: 1200px) {
  .hero-card-1 {
    width: 200px;
    left: -20px;
  }
  .hero-card-2 {
    width: 190px;
    right: 0;
  }
  .hero-card-3 {
    width: 150px;
  }
}

/* 平板及以下：改为垂直堆叠，彻底避免遮挡 */
@media (max-width: 960px) {
  .hero-visual {
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--sp-4);
    max-width: 520px;
    margin: 0 auto;
  }

  .hero-card {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    transform: none !important;
    animation: none !important;
  }

  .hero-card-3 {
    grid-column: 1 / -1;
    max-width: 240px;
    margin: 0 auto;
    width: 100%;
    background: var(--color-primary);
    color: var(--color-bg);
    border: 3px solid var(--color-gold);
  }
}

@media (max-width: 480px) {
  .hero-visual {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
  .hero-card-3 {
    max-width: 220px;
  }
}

.hero-card-tag {
  display: inline-block;
  padding: 2px var(--sp-2);
  background: var(--color-gold-bg);
  color: var(--color-gold-dark);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-3);
}

.hero-card-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.hero-card-info {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.hero-card-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-1);
}

.hero-card-info-row strong {
  color: var(--color-ink);
}

.hero-card-prize {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--color-border);
}

.hero-card-prize-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-1);
}

.hero-card-prize-row .prize {
  color: var(--color-ball-red);
  font-weight: var(--fw-bold);
}

.hero-card-vs {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin: var(--sp-2) 0;
  text-align: center;
}

.hero-card-score {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: var(--sp-3) 0;
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
}

.hero-card-score-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--color-bg);
}

.hero-card-score-team .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

.hero-card-score-vs {
  font-size: var(--fs-sm);
  color: var(--color-gold);
  font-weight: var(--fw-bold);
  align-self: flex-start;
  margin-top: var(--sp-4);
}

@media (max-width: 960px) {
  .hero {
    padding: var(--sp-12) 0 var(--sp-16);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
}

/* ============================================
   2. 数据带 Stats
   ============================================ */
.stats-band {
  background: var(--color-bg);
  padding: var(--sp-12) 0;
  position: relative;
  z-index: 2;
  margin-top: -60px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  background: var(--color-bg);
  padding: var(--sp-8);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
}

.stat-card {
  text-align: center;
  padding: var(--sp-4);
  position: relative;
}

.stat-card:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--color-border);
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--sp-5);
  }

  .stat-card:nth-child(2)::after {
    display: none;
  }

  .stat-card:nth-child(1),
  .stat-card:nth-child(2) {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--sp-5);
  }

  .stat-card:nth-child(1),
  .stat-card:nth-child(3) {
    border-right: 1px solid var(--color-border);
  }
}

/* ============================================
   3. 核心功能 Features
   ============================================ */
.features {
  background: var(--color-bg);
  padding: var(--sp-20) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   4. 赛事场景展示
   ============================================ */
.tournament-types {
  background: linear-gradient(180deg, var(--color-bg-soft) 0%, var(--color-bg) 100%);
  padding: var(--sp-20) 0;
}

.tournament-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.tournament-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: all var(--t-base);
}

.tournament-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.tournament-card-banner {
  height: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tournament-card-banner-1 {
  background: linear-gradient(135deg, #0F5132 0%, #2A9D8F 100%);
}

.tournament-card-banner-2 {
  background: linear-gradient(135deg, #7B2CBF 0%, #E63946 100%);
}

.tournament-card-banner-3 {
  background: linear-gradient(135deg, #C9A961 0%, #F4A261 100%);
}

.tournament-card-ball {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25));
}

.tournament-card-body {
  padding: var(--sp-6);
}

.tournament-card-tag {
  display: inline-block;
  padding: 2px var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--r-full);
  background: var(--color-gold-bg);
  color: var(--color-gold-dark);
  margin-bottom: var(--sp-3);
}

.tournament-card-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
}

.tournament-card-desc {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-4);
}

.tournament-card-meta {
  display: flex;
  gap: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border);
}

.tournament-card-meta-item {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.tournament-card-meta-item strong {
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

@media (max-width: 900px) {
  .tournament-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   5. 入驻流程 Merchant CTA
   ============================================ */
.merchant-cta {
  background: var(--color-primary);
  color: var(--color-bg);
  padding: var(--sp-20) 0;
  position: relative;
  overflow: hidden;
}

.merchant-cta::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.25) 0%, transparent 70%);
}

.merchant-cta::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(42, 157, 143, 0.2) 0%, transparent 70%);
}

.merchant-cta-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.merchant-cta-text h2 {
  color: var(--color-bg);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
  line-height: 1.15;
}

.merchant-cta-text h2 .accent {
  color: var(--color-gold);
}

.merchant-cta-text p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-8);
}

.merchant-steps {
  display: grid;
  gap: var(--sp-4);
}

.merchant-step {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-lg);
  transition: all var(--t-base);
}

.merchant-step:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-gold);
  transform: translateX(4px);
}

.merchant-step-num {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
}

.merchant-step-content {
  flex: 1;
}

.merchant-step-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: 2px;
}

.merchant-step-desc {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 900px) {
  .merchant-cta-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
}

/* ============================================
   6. 联系信息简版 Contact Strip
   ============================================ */
.contact-strip {
  background: var(--color-bg-soft);
  padding: var(--sp-16) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

.contact-card {
  background: var(--color-bg);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  border: 1px solid var(--color-border);
  transition: all var(--t-base);
}

.contact-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-info-label {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.contact-info-value {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}

/* ============================================
   2.5 关于台云赛 About（可引用定义 + 关键事实）
   ============================================ */
.about {
  background: var(--color-bg-soft);
  padding: var(--sp-16) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about .section-header .lead {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  max-width: 960px;
  margin: var(--sp-10) auto 0;
}

.about-fact {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}

.about-fact dt {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  letter-spacing: 1px;
  margin-bottom: var(--sp-2);
}

.about-fact dt::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  flex-shrink: 0;
}

.about-fact dd {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--color-ink);
  line-height: var(--lh-relaxed);
}

@media (max-width: 768px) {
  .about {
    padding: var(--sp-10) 0;
  }

  .about-facts {
    grid-template-columns: 1fr;
    margin-top: var(--sp-6);
  }
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}