/* ============================================================
   OG对战平台 — /assets/site.css
   共享层：reset / 变量 / 中文排版 / 框架头尾 / 通用组件
   ============================================================ */

/* ---------- 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, ul, ol, li, dl, dt, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; border-spacing: 0; width: 100%; }
[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #07070C;
  --ink-800: #101220;
  --ink-700: #1A1330;
  --line: #2A2C40;
  --line-soft: rgba(42, 44, 64, .6);
  --violet: #6C3BFF;
  --violet-deep: #4A22C4;
  --cyan: #00E5CF;
  --flame: #FF4D2E;
  --amber: #FFC24B;
  --paper: #F4E9D8;
  --muted: #8E8BA6;
  --text: #E8E6F2;

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

  --radius: 3px;
  --radius-sm: 2px;
  --gutter: clamp(16px, 3vw, 40px);
  --maxw: 1440px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 页面底与中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    linear-gradient(to right, rgba(42, 44, 64, .55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 44, 64, .55) 1px, transparent 1px),
    radial-gradient(1200px 620px at 78% -12%, rgba(108, 59, 255, .22), transparent 70%),
    radial-gradient(900px 520px at 4% 6%, rgba(0, 229, 207, .07), transparent 72%);
  background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%;
  background-attachment: fixed, fixed, fixed, fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .004em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 900; line-height: 1.16; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 4.6vw, 58px); }
h2 { font-size: clamp(23px, 3vw, 38px); }
h3 { font-size: clamp(18px, 2vw, 24px); }
h4 { font-size: clamp(16px, 1.4vw, 19px); }

::selection { background: var(--violet); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

.prose p { max-width: 38em; }
.prose p + p { margin-top: 14px; }

/* ---------- 4. skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  border-radius: var(--radius);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 容器与分区 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(40px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.section-title { max-width: 22ch; }

.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 38em;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: clamp(24px, 4vw, 40px) 0;
}

/* ---------- 6. 网格 ---------- */
.grid { display: grid; gap: clamp(12px, 1.6vw, 20px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-split { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }

/* ---------- 7. 头部：框架式导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-900);
  border-bottom: 1px solid var(--line);
}

.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  transition: width .12s linear;
}

.header-frame {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* 品牌舱门 */
.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-right: 1px solid var(--line);
  transition: background .18s var(--ease);
}
.brand-mark:hover { background: var(--ink-700); }

.brand-chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--violet);
  border-radius: var(--radius-sm);
  background: linear-gradient(140deg, rgba(108, 59, 255, .35), rgba(0, 229, 207, .12));
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-text { display: grid; gap: 2px; min-width: 0; }
.brand-name { font-size: 17px; font-weight: 900; letter-spacing: -.01em; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

/* 双轴切换条 */
.axis-bar {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 19, 48, .55), transparent);
}
.axis-row { display: flex; align-items: center; gap: 10px; }
.axis-label {
  flex: none;
  width: 2.4em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}
.axis-track { display: flex; flex-wrap: wrap; gap: 4px; }

.axis-pill {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-800);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.axis-pill:hover { color: var(--cyan); border-color: rgba(0, 229, 207, .55); }
.axis-pill[aria-pressed="true"] {
  color: var(--ink-900);
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 700;
}

/* 行动区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
}
.header-phone { display: grid; gap: 1px; text-align: right; }
.phone-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.phone-value {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--paper);
  white-space: nowrap;
}

/* 移动开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-toggle-bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle-bars span { display: block; height: 1px; background: currentColor; }
.nav-toggle-text { white-space: nowrap; }

/* 导航条 = 页面上边框 */
.site-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.nav-list { display: flex; flex-wrap: wrap; }
.nav-item { display: flex; }
.nav-link {
  display: block;
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
  border-right: 1px solid var(--line);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--paper); background: var(--ink-700); }
.nav-link[aria-current="page"] {
  color: var(--cyan);
  background: linear-gradient(180deg, transparent, rgba(0, 229, 207, .12));
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.nav-meta { display: flex; gap: 18px; padding-right: 4px; }
.nav-meta-line {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900) 70%);
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.footer-col {
  padding: 32px 22px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.footer-col:last-child { border-right: 0; }

.footer-brand { font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.footer-tagline {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 30ch;
}
.footer-tagline-sub {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(142, 139, 166, .78);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer-list { margin-top: 14px; display: grid; gap: 10px; }
.footer-link {
  font-size: 14px;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-link:hover { color: var(--cyan); border-color: var(--cyan); }

.footer-contact { gap: 12px; }
.footer-contact-row { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.footer-label {
  flex: none;
  min-width: 2.6em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}
.footer-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-word;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid var(--flame);
  border-radius: var(--radius);
  color: var(--flame);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.footer-cta:hover { background: var(--flame); color: #14060A; }

.footer-bottom {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-top: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}
.footer-copy { color: var(--text); }
.footer-legal { color: var(--muted); }
.footer-note { color: rgba(255, 194, 75, .88); }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-800);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-primary {
  background: var(--violet);
  border-color: var(--violet);
  color: #FFFFFF;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--violet-deep);
  border-color: var(--violet-deep);
  color: #FFFFFF;
  box-shadow: 0 10px 28px -14px rgba(108, 59, 255, .95);
}

.btn-flame {
  background: var(--flame);
  border-color: var(--flame);
  color: #14060A;
  font-weight: 700;
}
.btn-flame:hover { background: #E63A1C; border-color: #E63A1C; color: #14060A; }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(0, 229, 207, .08); }

.btn-block { width: 100%; }

/* ---------- 10. 索引块 / 数据块 / 叙事块 ---------- */
.index-block {
  padding: 16px 18px;
  background: var(--paper);
  color: var(--ink-800);
  border-radius: var(--radius);
}
.index-block .field-label { color: rgba(16, 18, 32, .58); }
.index-block .field-value { color: var(--ink-800); }

.data-block {
  padding: 18px;
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.narrative {
  padding: 18px 20px;
  border-left: 2px solid var(--violet);
  background: linear-gradient(180deg, rgba(26, 19, 48, .72), rgba(7, 7, 12, 0));
  border-radius: 0 var(--radius) var(--radius) 0;
}
.narrative h3 { margin-bottom: 8px; }

/* ---------- 11. 表格与字段 ---------- */
.data-table {
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.data-table caption {
  padding: 12px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(26, 19, 48, .6);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(108, 59, 255, .12); }

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field-value {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--paper);
  letter-spacing: -.01em;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}
.tag-win { color: var(--cyan); border-color: rgba(0, 229, 207, .5); background: rgba(0, 229, 207, .1); }
.tag-loss { color: var(--flame); border-color: rgba(255, 77, 46, .5); background: rgba(255, 77, 46, .1); }

/* ---------- 12. 数据锚点与积分条 ---------- */
.stat { display: grid; gap: 6px; }
.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--paper);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.meter {
  position: relative;
  height: 8px;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--amber));
  transition: width .48s var(--ease);
}

/* ---------- 13. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--line); }
.breadcrumbs a:hover { color: var(--cyan); }

/* ---------- 14. 图像容器（页面阶段放置图片） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(26, 19, 48, .9), rgba(7, 7, 12, .95));
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(1.08) brightness(.92);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(7, 7, 12, .34) 0 1px, transparent 1px 3px);
}
.media-frame-wide { aspect-ratio: 21 / 9; }
.media-frame-tall { aspect-ratio: 3 / 4; }
.media-frame-square { aspect-ratio: 1 / 1; }

.caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
}

/* ---------- 15. 显现与状态 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.is-filtered { display: none !important; }

.is-flash { animation: rowFlash .12s linear 2; }
@keyframes rowFlash {
  from { background-color: rgba(0, 229, 207, .26); }
  to { background-color: transparent; }
}

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col-brand { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-col:nth-child(4) { border-right: 0; }
}

@media (max-width: 1080px) {
  .header-frame { grid-template-columns: minmax(0, 1fr) auto; }
  .axis-bar {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 10px 16px;
  }
  .header-actions { border-right: 0; }
  .brand-mark { border-right: 0; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .header-frame { position: relative; z-index: 90; }
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 340px);
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 92px 0 28px;
    background: var(--ink-800);
    border: 0;
    border-right: 1px solid var(--violet);
    box-shadow: 24px 0 60px -30px rgba(108, 59, 255, .8);
    transform: translateX(-102%);
    transition: transform .28s var(--ease);
    overflow-y: auto;
    z-index: 80;
  }
  .site-nav[data-open] { transform: translateX(0); }

  .nav-list { flex-direction: column; }
  .nav-item { display: block; }
  .nav-link {
    padding: 15px 22px;
    font-size: 13px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-meta {
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding: 0 22px;
  }

  .grid-split { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col { border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .axis-bar { grid-template-columns: minmax(0, 1fr); }
  .axis-row { align-items: flex-start; }
  .axis-track { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
  .header-actions { gap: 8px; padding: 10px 12px; }
  .brand-mark { padding: 12px; }
  .footer-bottom { justify-content: flex-start; }
}

/* ---------- 17. 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .meter-fill { transition: none; }
}
