/* =========================================================
   火博体育 · 共享样式表 /assets/site.css
   夜场炭黑 + 熔岩橙 + 计时荧光绿 · 直角 / 细线 / 精密网格
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: #0B0B0D;
  background-image:
    linear-gradient(to right, rgba(38, 42, 49, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(38, 42, 49, 0.32) 1px, transparent 1px);
  background-size: 72px 72px;
  background-attachment: fixed;
  color: #F4F6F7;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a { color: #2BE3C5; text-decoration: none; transition: color 0.18s ease-out; }
a:hover { color: #FF8A3D; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 800; line-height: 1.18; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid #C8FF3C; outline-offset: 3px; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0B0B0D;
  --panel: #14161A;
  --line: #262A31;
  --orange: #FF5A1F;
  --orange-soft: #FF8A3D;
  --lime: #C8FF3C;
  --cyan: #2BE3C5;
  --white: #F4F6F7;
  --gray: #9AA1A9;
  --ember: #7A2A0E;
  --max: 1240px;
  --gutter: clamp(18px, 4vw, 44px);
  --gap: clamp(16px, 2.4vw, 28px);
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 3. 容器与正文 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--prose { max-width: 760px; }

.prose { max-width: 36em; }
.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul,
.prose ol { list-style: square; padding-left: 1.25em; margin: 0 0 1.15em; }
.prose a { border-bottom: 1px solid rgba(43, 227, 197, 0.45); }

.measure { display: inline; }

/* ---------- 4. 排字阶梯 ---------- */
.t-display {
  font-size: clamp(38px, 7vw, 84px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.t-score {
  font-family: var(--font-mono);
  font-size: clamp(48px, 9vw, 104px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--orange);
}
.t-h2 {
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.t-h3 { font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; line-height: 1.35; }
.t-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}
.lede {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  line-height: 1.7;
  color: #D9DEE3;
  max-width: 34em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--lime);
}
.chapter-no {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #170701;
  background: var(--orange);
  padding: 2px 8px;
}

/* ---------- 5. 布局工具 ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.section-head .t-h3 { margin-right: auto; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 32px);
}

.theme-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  background: var(--orange);
  color: #170701;
  padding: clamp(14px, 2.4vw, 22px) var(--gutter);
}
.theme-band--lime { background: var(--lime); color: #131A00; }
.theme-band--ink { background: var(--panel); color: var(--white); border-block: 1px solid var(--line); }
.theme-band .t-mono,
.theme-band .eyebrow { color: inherit; }

.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.rail > * { flex: 0 0 auto; scroll-snap-align: start; }
.rail::-webkit-scrollbar { height: 4px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb { background: var(--line); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.18s ease-out, border-color 0.18s ease-out, color 0.18s ease-out;
}
.btn:hover { border-color: var(--orange); color: var(--orange-soft); }
.btn--primary { background: var(--orange); border-color: var(--orange); color: #170701; }
.btn--primary:hover { background: var(--orange-soft); border-color: var(--orange-soft); color: #170701; }
.btn--ghost { background: transparent; }
.btn--lime { background: var(--lime); border-color: var(--lime); color: #131A00; }
.btn--lime:hover { background: #D8FF6E; border-color: #D8FF6E; color: #131A00; }

/* ---------- 7. 标签与面包屑 ---------- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--lime);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 3px 8px;
}
.tag--orange { color: var(--orange-soft); border-color: rgba(255, 90, 31, 0.4); }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gray);
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--line); }
.breadcrumbs a { color: var(--cyan); }
.breadcrumbs a:hover { color: var(--orange-soft); }
.breadcrumbs [aria-current="page"] { color: var(--gray); }

/* ---------- 8. 图片容器（供页面阶段放图） ---------- */
.media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--panel);
  background-image:
    linear-gradient(135deg, rgba(122, 42, 14, 0.55) 0%, rgba(20, 22, 26, 0.9) 60%),
    linear-gradient(to right, rgba(38, 42, 49, 0.8) 1px, transparent 1px);
  background-size: auto, 48px 48px;
  border: 1px solid var(--line);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(122, 42, 14, 0) 42%, rgba(11, 11, 13, 0.74) 100%);
}
.media--plain::after { background: none; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--white);
  background: rgba(11, 11, 13, 0.72);
  border-left: 3px solid var(--orange);
  padding: 4px 10px;
}

/* ---------- 9. 跳转链接与阅读进度 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lime);
  color: #131A00;
  font-weight: 700;
  font-size: 14px;
  transition: top 0.15s ease-out;
}
.skip-link:focus { top: 12px; color: #131A00; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 100%;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 10. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 11, 13, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-strip {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.header-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  min-height: 36px;
  padding-block: 6px;
}
.header-strip__statement {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gray);
}
.header-strip__statement::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--orange);
  transform: translateY(-1px);
}
.utility-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.utility-link { color: var(--cyan); }
.utility-link:hover { color: var(--orange-soft); }

.header-bar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 74px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { color: var(--white); }
.brand__mark {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--orange) 0 58%, var(--ember) 58% 100%);
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 9px;
  height: 9px;
  background: var(--lime);
}
.brand__text { display: flex; flex-direction: column; gap: 2px; }
.brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--gray);
  line-height: 1.4;
}

.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative;
  display: block;
  padding: 10px 12px 12px;
  font-size: 15px;
  font-weight: 600;
  color: #C3C9CF;
  text-decoration: none;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.18s ease-out;
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--orange-soft); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.nav-toggle:hover { border-color: var(--orange); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  transition: background 0.18s ease-out;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--white);
  transition: transform 0.18s ease-out;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.site-header[data-open="true"] .nav-toggle__bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }
.site-header[data-open="true"] .nav-toggle { border-color: var(--orange); color: var(--orange-soft); }

/* ---------- 11. 章节跟随目录 ---------- */
.chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
}
.chapter-nav__link {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.chapter-nav__link:hover { color: var(--white); }
.chapter-nav__link.is-current,
.chapter-nav__link[aria-current="true"] {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: rgba(43, 227, 197, 0.06);
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr) minmax(0, 1.3fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px);
}
.footer__brand .brand--footer { gap: 12px; }
.brand--footer .brand__name { font-size: 19px; }
.footer__summary {
  margin: 16px 0 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray);
}
.footer__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.footer__col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--orange);
}
.footer-list { display: grid; gap: 10px; }
.footer-list a {
  font-size: 14px;
  color: var(--white);
  border-bottom: 1px solid transparent;
}
.footer-list a:hover { color: var(--orange-soft); border-bottom-color: var(--orange-soft); }

.footer-contact__list { display: grid; gap: 14px; }
.footer-contact__item { display: grid; gap: 3px; }
.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gray);
}
.footer-contact__value { font-size: 14px; color: var(--white); word-break: break-word; }
.footer-contact__note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray);
}

.footer__bottom { background: var(--ink); border-top: 1px solid var(--line); }
.footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray);
}
.footer__bottom-inner p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__legal a { color: var(--gray); }
.footer__legal a:hover { color: var(--cyan); }
.footer__icp { color: var(--gray); }

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--orange);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease-out, visibility 0.18s ease-out, border-color 0.18s ease-out;
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; pointer-events: auto; }
.to-top:hover { border-color: var(--orange); color: var(--orange-soft); }
.to-top__arrow {
  display: block;
  width: 10px;
  height: 10px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(1px, 1px);
}

/* ---------- 13. 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1100px) {
  .header-cta { display: none; }
  .brand__sub { display: none; }
  .footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-contact { grid-column: span 2; }
  .footer-contact__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .span-7, .span-8, .span-12 { grid-column: span 6; }
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .header-bar__inner { flex-wrap: wrap; gap: 12px; min-height: 64px; }
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin-left: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  }
  .site-header[data-open="true"] .site-nav,
  .site-nav[data-open="true"] { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav-link {
    padding: 14px 8px 14px 14px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }
  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] {
    color: var(--orange-soft);
    box-shadow: inset 3px 0 0 var(--orange);
    background: linear-gradient(90deg, rgba(255, 90, 31, 0.12), transparent 70%);
  }
  .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { grid-column: auto; }
  .footer__columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { background-size: 48px 48px; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: span 1; }
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .header-strip__inner { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 8px; }
  .utility-list { font-size: 10px; gap: 6px 16px; }
  .brand__name { font-size: 18px; }
  .footer__columns { grid-template-columns: minmax(0, 1fr); }
  .footer-contact__list { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom-inner { flex-direction: column; align-items: flex-start; }
  .theme-band { padding-inline: var(--gutter); }
}

/* ---------- 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;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .scroll-progress { transition: none; }
}
