/* ============================================================
   火马电竞站 — 共享层 /assets/site.css
   炭黑赛道 + 熔岩橙速度 + 暗金框架 + 暖纸阅读区
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body,
h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

img, svg, video { display: block; max-width: 100%; }

table { width: 100%; border-collapse: collapse; }

:focus-visible {
  outline: 2px solid var(--c-lava-2);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 2. Design tokens ---------- */
:root {
  --c-black: #0E0F12;
  --c-deep: #17191F;
  --c-lava: #FF5A1F;
  --c-lava-2: #FF8A3D;
  --c-red: #B3301A;
  --c-gold: #C9A227;
  --c-blue: #3D8BFF;
  --c-paper: #F2E9DC;
  --c-paper-ink: #1A1C22;
  --c-ash: #8A8F98;
  --c-moss: #2FBF9B;
  --c-cream: #F2E9DC;

  --line-gold: rgba(201, 162, 39, 0.30);
  --line-soft: rgba(242, 233, 220, 0.12);

  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --header-h: 70px;

  --font-cn: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--c-black);
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 90, 31, 0.045) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(25deg, rgba(61, 139, 255, 0.035) 0 1px, transparent 1px 130px);
  color: var(--c-cream);
  font-family: var(--font-cn);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4 { font-weight: 900; line-height: 1.14; }

p { max-width: 68ch; }

::selection { background: var(--c-lava); color: #14100D; }

/* ---------- 4. 布局容器与章节 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gut);
}

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 104px);
}

.section--deep { background: var(--c-deep); }

.section--paper {
  background: var(--c-paper);
  color: var(--c-paper-ink);
}

.section-band {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  margin-bottom: clamp(24px, 4vw, 48px);
  padding-block: 10px;
  border-top: 1px solid var(--line-gold);
  border-bottom: 1px solid var(--line-gold);
}

.section-band::before {
  content: "";
  flex: none;
  width: clamp(28px, 6vw, 72px);
  height: 6px;
  background: linear-gradient(90deg, var(--c-lava), var(--c-lava-2));
}

.section-band h2,
.section-band h3 {
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  letter-spacing: 0.08em;
}

.section-index {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--c-gold);
  white-space: nowrap;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ash);
}

.display-xl {
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.04;
}

.lede {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(242, 233, 220, 0.78);
  max-width: 64ch;
}

.stat-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--c-lava);
}

.divider-rail {
  height: 1px;
  border: 0;
  margin-block: clamp(20px, 3vw, 36px);
  background: linear-gradient(90deg, var(--c-lava), rgba(201, 162, 39, 0.5) 38%, transparent);
}

/* 暖纸区反色适配 */
.section--paper .lede { color: rgba(26, 28, 34, 0.78); }
.section--paper .eyebrow { color: #6C5A3A; }
.section--paper .section-index { color: #8A6A12; }
.section--paper .stat-num { color: var(--c-red); }
.section--paper .section-band { border-color: rgba(26, 28, 34, 0.22); }
.section--paper .divider-rail { background: linear-gradient(90deg, var(--c-red), rgba(26, 28, 34, 0.3) 38%, transparent); }

/* ---------- 5. 栅格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

.grid--halves { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--thirds { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--asym { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }

@media (max-width: 900px) {
  .grid--asym { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 6. 卡片 / 表格 / 标签 ---------- */
.card {
  background: var(--c-deep);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--c-lava);
  border-radius: 3px;
  padding: clamp(18px, 2.4vw, 28px);
}

.card--glass {
  background: rgba(23, 25, 31, 0.62);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--line-gold);
  border-left: 2px solid var(--c-gold);
}

.card--paper {
  background: var(--c-paper);
  color: var(--c-paper-ink);
  border: 1px solid rgba(26, 28, 34, 0.18);
  border-left: 2px solid var(--c-gold);
}

.index-table {
  font-size: 14px;
  border-top: 1px solid var(--line-gold);
}

.index-table th {
  text-align: left;
  padding: 12px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--c-gold);
  border-bottom: 1px solid var(--line-gold);
  white-space: nowrap;
}

.index-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.index-table tbody tr:nth-child(odd) { background: rgba(23, 25, 31, 0.55); }

.section--paper .index-table,
.section--paper .index-table th { border-color: rgba(26, 28, 34, 0.22); }
.section--paper .index-table th { color: #8A6A12; }
.section--paper .index-table td { border-color: rgba(26, 28, 34, 0.14); }
.section--paper .index-table tbody tr:nth-child(odd) { background: rgba(26, 28, 34, 0.05); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--c-gold);
}

/* ---------- 7. 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--c-deep);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 15, 18, 0) 55%, rgba(14, 15, 18, 0.72));
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--plain::after { display: none; }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--ember {
  background: var(--c-lava);
  border-color: var(--c-lava);
  color: #14100D;
  font-weight: 700;
}
.btn--ember:hover { background: var(--c-lava-2); border-color: var(--c-lava-2); }

.btn--ghost {
  background: transparent;
  border-color: rgba(242, 233, 220, 0.28);
  color: var(--c-cream);
}
.btn--ghost:hover { border-color: var(--c-lava); color: var(--c-lava-2); }

.btn--blue {
  background: transparent;
  border-color: rgba(61, 139, 255, 0.6);
  color: #9CC2FF;
}
.btn--blue:hover { background: rgba(61, 139, 255, 0.14); border-color: var(--c-blue); color: #C9DCFF; }

.btn--paper {
  background: var(--c-paper);
  border-color: var(--c-paper);
  color: var(--c-paper-ink);
  font-weight: 700;
}
.btn--paper:hover { background: #fff; border-color: #fff; }

/* ---------- 9. 面包屑 / 目录 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--c-ash);
}

.breadcrumb a:hover { color: var(--c-lava-2); }

.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 14px;
}

.toc__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--c-gold);
  margin-bottom: 14px;
}

.toc ol { display: grid; gap: 6px; }

.toc a {
  display: block;
  padding: 7px 0 7px 12px;
  border-left: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--c-ash);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.toc a:hover { color: var(--c-cream); }

.toc a[aria-current="true"] {
  color: var(--c-lava);
  border-left-color: var(--c-lava);
}

/* ---------- 10. 显现与返回顶部 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.back-to-top {
  position: fixed;
  right: clamp(14px, 2.5vw, 28px);
  bottom: clamp(14px, 2.5vw, 28px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-gold);
  border-radius: 3px;
  background: rgba(14, 15, 18, 0.88);
  color: var(--c-lava);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease, border-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover { border-color: var(--c-lava); color: var(--c-lava-2); }

/* ---------- 11. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 130;
  padding: 10px 18px;
  border-radius: 3px;
  background: var(--c-lava);
  color: #14100D;
  font-weight: 700;
  font-size: 14px;
  transition: top 0.18s ease;
}

.skip-link:focus { top: 12px; }

/* ---------- 12. 头部框架 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(14, 15, 18, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-gold);
}

.header-frame {
  max-width: calc(var(--wrap) + 2 * var(--gut));
  margin: 0 auto;
  border-left: 1px solid var(--line-gold);
  border-right: 1px solid var(--line-gold);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  min-height: var(--header-h);
  padding: 10px var(--gut);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--c-lava), var(--c-red));
  color: #14100D;
  font-size: 17px;
  font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--c-ash);
}

.status-lamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--c-ash);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-moss);
  animation: lamp-pulse 2.6s ease-out infinite;
}

@keyframes lamp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 155, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(47, 191, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 191, 155, 0); }
}

.rail-nav { margin-left: auto; }

.rail-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 24px);
}

.rail-nav__link {
  display: inline-block;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: rgba(242, 233, 220, 0.72);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.rail-nav__link:hover { color: var(--c-lava-2); }

.rail-nav__link[aria-current="page"] {
  color: var(--c-lava);
  border-bottom-color: var(--c-lava);
}

.rail-nav__cta { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-gold);
  border-radius: 3px;
  color: var(--c-cream);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.nav-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 16px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.nav-toggle__label { line-height: 1; }

.scroll-ember {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-lava), var(--c-lava-2) 60%, var(--c-gold));
  pointer-events: none;
}

/* ---------- 13. 页脚收束条 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(40px, 6vw, 84px);
  border-top: 1px solid var(--line-gold);
  background: linear-gradient(180deg, rgba(23, 25, 31, 0.92), var(--c-black));
  font-size: 14px;
  color: rgba(242, 233, 220, 0.78);
}

.footer-ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 90, 31, 0.06);
}

.footer-ticker__track {
  display: flex;
  overflow-x: auto;
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--c-gold);
  white-space: nowrap;
}

.footer-ticker__item {
  padding: 0 18px;
  border-right: 1px solid var(--line-soft);
}

.footer-frame {
  max-width: calc(var(--wrap) + 2 * var(--gut));
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--gut) 24px;
  border-left: 1px solid var(--line-gold);
  border-right: 1px solid var(--line-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
  gap: clamp(22px, 3vw, 44px);
}

.footer-brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--c-cream);
}

.footer-brand__line {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--c-lava-2);
}

.footer-brand__meta {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--c-ash);
}

.footer-heading {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--c-gold);
}

.footer-links { display: grid; gap: 9px; }

.footer-links a {
  font-size: 14px;
  color: rgba(242, 233, 220, 0.76);
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--c-lava-2); }

.footer-contact {
  display: grid;
  gap: 9px;
  font-size: 13px;
  color: rgba(242, 233, 220, 0.76);
}

.footer-contact li { overflow-wrap: anywhere; }

.footer-col--contact { min-width: 0; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--c-ash);
}

.footer-filing,
.footer-note {
  max-width: 68ch;
  color: var(--c-ash);
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

@media (max-width: 1080px) {
  :root { --header-h: 62px; }

  .header-frame,
  .footer-frame {
    border-left: 0;
    border-right: 0;
  }

  .status-lamp,
  .brand-tagline { display: none; }

  .header-actions { margin-left: auto; }

  .nav-toggle { display: inline-flex; }

  .rail-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: none;
    margin: 0;
    padding: 20px var(--gut) 44px;
    overflow-y: auto;
    background: rgba(14, 15, 18, 0.98);
    border-top: 1px solid var(--line-gold);
  }

  .rail-nav[data-open] {
    display: block;
    animation: nav-drop 0.24s ease;
  }

  @keyframes nav-drop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
  }

  .rail-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .rail-nav__item { border-bottom: 1px solid var(--line-soft); }

  .rail-nav__link {
    display: block;
    padding: 16px 4px;
    font-size: 16px;
    letter-spacing: 0.12em;
  }

  .rail-nav__link[aria-current="page"] {
    border-bottom-color: transparent;
    padding-left: 12px;
    color: var(--c-lava);
  }

  .rail-nav__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
  }

  .toc { position: static; }
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .header-actions .btn--ember { display: none; }

  .header-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  .footer-base { justify-content: flex-start; }

  .back-to-top { width: 44px; height: 44px; }
}

/* ---------- 15. 动效克制 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
