/* ==========================================================================
   HTH赛场 · 共享样式 /assets/site.css
   夜场数据面板：墨黑底 + 网格 + 斜切 + 三信号色
   ========================================================================== */

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

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

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

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

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #06110F;
  --panel: #0C1F1B;
  --line: #12332C;
  --cyan: #00F5D4;
  --orange: #FF6B1A;
  --gold: #C9A227;
  --white: #E8F2EF;
  --muted: #9FB3AE;
  --steel: #1E4A40;
  --ember: #7A2E0A;
  --body-text: #CBD9D5;
  --dim: #7B948D;

  --maxw: 1280px;
  --maxw-wide: 1600px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, .45);

  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
             "Source Han Sans SC", "Noto Sans CJK SC", system-ui,
             -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
               SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-cn);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--body-text);
  background-color: var(--ink);
  background-image:
    repeating-linear-gradient(90deg, rgba(30, 74, 64, .22) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, rgba(30, 74, 64, .22) 0 1px, transparent 1px 24px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-cn);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.12;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

strong, b {
  font-weight: 700;
  color: var(--white);
}

::selection {
  background: var(--cyan);
  color: #04100D;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

#main-content {
  display: block;
  scroll-margin-top: 88px;
}

/* ---------- 4. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(6, 17, 15, .9);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color .16s ease, border-color .16s ease;
}

.site-header[data-scrolled] {
  background: rgba(6, 17, 15, .98);
  border-bottom-color: var(--steel);
}

.header-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  pointer-events: none;
}

.header-inner {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 76px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  transition: min-height .16s ease;
}

.site-header[data-scrolled] .header-inner {
  min-height: 56px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}

.header-line {
  flex: 1 1 auto;
  height: 1px;
  min-width: 12px;
  background: var(--line);
}

/* 品牌字标 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--white);
}

.brand-glyph {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 58%, 58% 100%, 0 100%);
  transition: transform .16s ease;
}

.brand:hover .brand-glyph {
  transform: translateX(2px);
}

.brand-word {
  font-family: var(--font-cn);
  font-size: 1.1875rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
  color: var(--white);
}

.brand-word-em {
  color: var(--cyan);
}

/* 认证徽章 */
.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(201, 162, 39, .5);
  border-radius: 2px;
  background: rgba(201, 162, 39, .06);
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .1em;
  color: var(--gold);
  white-space: nowrap;
}

.cert-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* 导航 */
.site-nav {
  flex: 0 0 auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 11px;
  border-radius: 2px;
  font-family: var(--font-cn);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  transition: color .16s ease, background-color .16s ease;
}

.nav-index {
  display: none;
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--steel);
  transition: color .16s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .16s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--white);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--white);
}

.nav-link:hover .nav-index,
.nav-link:focus-visible .nav-index,
.nav-link[aria-current="page"] .nav-index {
  color: var(--cyan);
}

/* 移动端触发按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  font-family: var(--font-cn);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .06em;
  color: var(--white);
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}

.nav-toggle:hover {
  border-color: var(--cyan);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 245, 212, .08);
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle-bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform .16s ease, opacity .16s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* 跳转链接 */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 2px;
  background: var(--cyan);
  color: #04100D;
  font-family: var(--font-cn);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  transition: top .16s ease;
}

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

/* ---------- 5. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 96px);
  background: var(--panel);
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.7;
  overflow: hidden;
}

.footer-slash {
  display: block;
  height: 52px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 18%, 0 100%);
}

.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px var(--gutter) 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, 1.15fr);
  gap: 40px clamp(24px, 4vw, 56px);
  padding-top: 8px;
}

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

.footer-brand {
  font-family: var(--font-cn);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .06em;
  color: var(--white);
}

.footer-brand-em {
  color: var(--cyan);
}

.footer-claim {
  margin-top: 12px;
  max-width: 30ch;
  font-size: .8125rem;
  line-height: 1.75;
  color: var(--muted);
}

.footer-cert {
  margin-top: 18px;
}

.footer-heading {
  margin-bottom: 14px;
  font-family: var(--font-cn);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .16em;
  color: var(--dim);
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--white);
  transition: color .16s ease;
}

.footer-links a::before {
  content: "";
  width: 12px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--steel);
  transition: background-color .16s ease, width .16s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--cyan);
}

.footer-links a:hover::before,
.footer-links a:focus-visible::before {
  width: 20px;
  background: var(--cyan);
}

.footer-meta {
  display: grid;
  gap: 10px;
}

.footer-meta li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.footer-meta-key {
  flex: 0 0 auto;
  min-width: 2.4em;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.9;
  color: var(--cyan);
}

.footer-meta-val {
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--muted);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .75rem;
  color: var(--dim);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
}

.footer-legal a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color .16s ease, border-color .16s ease;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--dim);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--dim);
}

/* ---------- 6. 布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--wide {
  max-width: var(--maxw-wide);
}

.section {
  padding: clamp(48px, 7vw, 96px) 0;
}

.section--tight {
  padding: clamp(28px, 4vw, 56px) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ---------- 7. 标识与文本组件 ---------- */
.index-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.index-mark::before {
  content: "";
  width: 40px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--cyan);
}

.lede {
  max-width: 46ch;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.7;
  color: var(--muted);
}

.prose {
  max-width: 68ch;
}

.prose p {
  margin-bottom: 1.1em;
  color: var(--body-text);
}

.prose h2 {
  margin: 1.8em 0 .6em;
}

.prose h3 {
  margin: 1.4em 0 .5em;
}

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .5em; }

/* ---------- 8. 徽章与按钮 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(12, 31, 27, .7);
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

.badge--cyan {
  border-color: rgba(0, 245, 212, .55);
  background: rgba(0, 245, 212, .08);
  color: var(--cyan);
}

.badge--orange {
  border-color: rgba(255, 107, 26, .55);
  background: rgba(255, 107, 26, .1);
  color: var(--orange);
}

.badge--gold {
  border-color: rgba(201, 162, 39, .55);
  background: rgba(201, 162, 39, .08);
  color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-cn);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  text-align: center;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease,
              color .16s ease, transform .16s ease;
}

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

.btn-primary {
  background: var(--orange);
  color: #08120F;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #FF7F38;
  transform: translateY(-2px);
}

.btn-cyan {
  background: var(--cyan);
  color: #04100D;
}

.btn-cyan:hover,
.btn-cyan:focus-visible {
  background: #3CFFE4;
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--white);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 14px;
  font-size: .8125rem;
}

.btn[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}

/* ---------- 9. 卡片 ---------- */
.card {
  position: relative;
  display: block;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.card:hover,
.card:focus-within {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}

.card--cut {
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
}

.card h3 {
  margin-bottom: .5em;
}

.card p {
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  color: var(--dim);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--steel);
}

.breadcrumb a {
  color: var(--muted);
  transition: color .16s ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--cyan);
}

.breadcrumb [aria-current="page"] {
  color: var(--white);
}

/* ---------- 11. 图像容器（供页面阶段使用） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    repeating-linear-gradient(135deg, rgba(0, 245, 212, .045) 0 1px, transparent 1px 10px),
    linear-gradient(135deg, #0C1F1B 0%, #12332C 100%);
}

.media > img,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.06) brightness(.94);
}

.media--wide { aspect-ratio: 21 / 9; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.media--diagonal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(116deg, transparent 0 56%, rgba(6, 17, 15, .88) 56%);
  pointer-events: none;
}

.media--cut {
  clip-path: polygon(24px 0, 100% 0, 100% 100%, 0 100%, 0 24px);
}

.media__caption {
  margin-top: 10px;
  font-size: .75rem;
  line-height: 1.65;
  color: var(--dim);
}

/* ---------- 12. 进入视口淡入 ---------- */
html[data-reveal-ready] [data-reveal] {
  transition: opacity .24s ease, transform .24s ease;
}

html[data-reveal-ready] [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(8px);
}

/* ---------- 13. 响应式 ---------- */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .header-line { display: none; }
  .header-left { margin-right: auto; }

  .site-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 95;
    width: min(86vw, 360px);
    max-height: min(78vh, 560px);
    overflow-y: auto;
    padding: 28px 22px 34px;
    border: 1px solid var(--line);
    border-right: 0;
    border-bottom: 0;
    background: var(--panel);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .55);
    transform: translateY(calc(100% + 48px));
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
  }

  .site-nav[data-open] {
    transform: translateY(0);
    visibility: visible;
    transition: transform .2s ease, visibility 0s;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item + .nav-item {
    border-top: 1px solid var(--line);
  }

  .nav-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 16px 4px;
    font-size: 1.0625rem;
  }

  .nav-index { display: inline-block; }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    color: var(--cyan);
  }
}

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

  .footer-col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .col-4, .col-6, .col-8 { grid-column: span 12; }

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

@media (max-width: 640px) {
  .header-left .cert-badge { display: none; }
  .footer-slash { height: 36px; }
}

@media (max-width: 560px) {
  body {
    background-image: none;
    font-size: 16px;
  }

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

  .footer-inner { padding-bottom: 32px; }
}

@media (max-width: 420px) {
  .brand-word { font-size: 1.0625rem; }
  .nav-toggle-text { display: none; }
}

/* ---------- 14. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .card:hover,
  .card:focus-within,
  .btn:hover,
  .btn:focus-visible,
  .brand:hover .brand-glyph {
    transform: none;
  }
}
