/* ============================================================================
   MOK 篮球社区 · 首页专属部分
   ----------------------------------------------------------------------------
   全站配色/卡片/榜单/表格等共同规则都在 assets/skin.css；
   这里只放「只有首页才有」的东西：首屏 hero 与四宫格快捷入口。
   ========================================================================== */

/* ---------- 首屏 hero：海报完整显示，铭牌放进海报下方的纸色说明条 ---------- */
.hero {
  position: relative;
  height: auto;
  aspect-ratio: auto;                     /* 盖掉 style.css 的横版比例：高度由海报+说明条决定 */
  padding-bottom: 0;                      /* 铭牌已去掉，海报下方不留空带 */
  margin: 0 calc(var(--gap) * -1) 18px;   /* 冲破卡片留白，全出血 */
  border-radius: 0;
  box-shadow: none;
  background: var(--card);
}

/* 海报本体：按原图比例完整显示，一丝不裁 */
.hero-art {
  position: relative;
  inset: auto;
  width: 100%;
  aspect-ratio: 1080 / 1620;
  background: #0a0608 url("hero-fire-purple-portrait-v600.webp?v=1795523346296") center / contain no-repeat;
}
/* 手机端：动态海报视频铺满首屏；加载失败/不支持时 video 透明，露出上面的静态图降级 */
.hero-motion {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 不再往海报上压任何渐变：海报完整见光 */
.hero::after { content: none; }

/* 铭牌收进海报下方的说明条，和海报上印的字互不遮挡 */
.hero-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 11px 14px;
}

/* 赛季徽章：纸面小铭牌 */
.hero-tag {
  display: inline-block;
  margin-bottom: 0;
  padding: 5px 14px;
  border: 1px solid rgba(200, 51, 43, .5);
  border-radius: 999px;
  background: rgba(255, 252, 246, .95);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  box-shadow: 0 2px 10px rgba(90, 62, 34, .1);
}

.hero-sub {
  display: inline-block;
  margin-top: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 252, 246, .95);
  color: var(--text-sub);
  font-size: 13px;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(90, 62, 34, .1);
}

/* ---------- 快捷入口：四宫格，拇指热区 ---------- */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 4px 11px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-sub);
  font-size: 12px;
  transition: border-color .15s, transform .15s;
}
.quick-item:active { transform: scale(.96); border-color: rgba(255, 122, 41, .5); }
.quick-item svg { width: 22px; height: 22px; stroke: var(--text); fill: none; }
.quick-item.is-hot svg { stroke: var(--team-m); }  /* 接龙：橙，当前最活跃入口 */

/* ---------- 桌面端：海报「装裱」式 —— 圆角卡 + 横版海报 + 单行说明条 ---------- */
@media (min-width: 720px) {
  .hero {
    padding-bottom: 0;                  /* 铭牌已去掉 */
    margin: 0 calc(var(--gap) * -1) 22px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
  }
  /* 换横版海报：优先 WebP，老浏览器回落 JPEG */
  .hero-art {
    aspect-ratio: 1920 / 1080;
    background-position: center;
    background-image: url("hero-fire-purple-dual-banner-v620.webp?v=1795523346296");
  }
  /* 电脑端改用横版动态视频：按原比例完整显示，与静态横幅一致 */
  .hero-motion { display: block; object-fit: contain; }
  /* 铭牌横排一行 */
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
  }
  .hero-sub { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .quick-item:active { transform: none; }
}

/* ============================================================================
   首页背景「烈焰余烬」——让页底色和首屏火焰海报同源
   ----------------------------------------------------------------------------
   问题：海报是黑红火焰的强画面，页底若偏蓝就像「亮图贴蓝板」。
   做法：把火焰的橙红做成页面环境光，从底部向上晕开、越往上越沉，
        呼应海报里篮球的火光和升腾的火星。
   范围：只作用于 index.html（body.home），其它页面用 skin.css 的统一配色。
   ========================================================================== */

html.home { background: #0b0607; }
body.home { background: transparent; }

/* ① 火焰环境光层：底部一团橙红炉火向上烘，两侧各一束跳动的火光 */
body.home::before {
  content: ;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #0a0506;
  background-image:
    /* 竖向压暗：顶部留暗，越往下越有火光（滚动到下方也不刺眼） */
    linear-gradient(180deg,
      rgba(10, 5, 6, .55) 0%,
      rgba(10, 5, 6, .40) 22%,
      rgba(10, 5, 6, .30) 52%,
      rgba(10, 5, 6, .18) 80%,
      rgba(28, 8, 6, .42) 100%),
    /* 中心压暗：内容区保持炭黑，字才读得清 */
    linear-gradient(90deg,
      rgba(11, 6, 7, 0) 0%,
      rgba(11, 6, 7, .20) 14%,
      rgba(11, 6, 7, .78) 30%,
      rgba(11, 6, 7, .78) 70%,
      rgba(11, 6, 7, .20) 86%,
      rgba(11, 6, 7, 0) 100%),
    /* 两侧火光：橙红为主，边缘落在屏幕外没有硬边 */
    radial-gradient(42% 34% at 18% 24%, rgba(255, 96, 30, .20), transparent 70%),
    radial-gradient(40% 38% at 82% 22%, rgba(214, 40, 28, .18), transparent 72%),
    /* 底部炉火：一整片橙红从下往上烘 */
    radial-gradient(120% 46% at 50% 108%, rgba(255, 92, 26, .30), transparent 68%);
  background-size: cover;
  background-repeat: no-repeat;
}

/* ② 质感层：极细颗粒，压住渐变的「塑料感」（不加条纹，避免摩尔纹） */
body.home::after {
  content: ;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .20;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
  background-repeat: repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, .4) 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, .4) 100%);
}

/* ③ 顶栏：炭黑玻璃，底边一条火焰橙发丝光 */
body.home .site-header {
  background: linear-gradient(100deg,
    rgba(255, 96, 30, .10) 0%,
    rgba(11, 6, 7, .82) 26%,
    rgba(11, 6, 7, .82) 74%,
    rgba(214, 40, 28, .10) 100%);
}
body.home .site-header::after {
  content: ;
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(255, 122, 41, .70) 0%,
    rgba(255, 140, 100, .12) 34%,
    rgba(255, 140, 100, .12) 66%,
    rgba(255, 87, 64, .60) 100%);
}

/* ④ hero：铭牌已去掉，整块只剩海报；给一圈火焰泛光像从画面里长出来 */
body.home .hero {
  background: #0a0506;
  box-shadow:
    -20px 30px 66px -34px rgba(255, 96, 30, .40),
    20px 30px 66px -34px rgba(214, 40, 28, .36),
    0 26px 60px -34px rgba(0, 0, 0, .9);
}
@media (min-width: 720px) {
  body.home .hero { border-color: rgba(255, 140, 100, .20); }
}

/* ⑤ 卡片：在火光底上做成深炭玻璃片，边缘被暖光扫到 */
body.home .card,
body.home .quick-item {
  background-image:
    linear-gradient(180deg, rgba(28, 16, 17, .97) 0%, rgba(14, 8, 9, .97) 100%);
  border-color: rgba(255, 140, 100, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 140, .07),
    0 24px 48px -34px rgba(0, 0, 0, .95);
}

@media (hover: hover) and (min-width: 720px) {
  body.home .card {
    transition: border-color .22s, box-shadow .22s, transform .22s;
  }
  body.home .card:hover {
    border-color: rgba(255, 150, 110, .28);
    box-shadow:
      inset 0 1px 0 rgba(255, 180, 140, .09),
      0 30px 56px -38px rgba(0, 0, 0, .95);
  }
  body.home .quick-item {
    transition: border-color .18s, box-shadow .18s, transform .18s;
  }
  body.home .quick-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 122, 41, .40);
    box-shadow:
      inset 0 1px 0 rgba(255, 180, 140, .10),
      0 16px 30px -22px rgba(255, 122, 41, .45);
  }
}
