/* =========================================================
   BET9 · 全站共享样式 /assets/site.css
   设计语言：深靛蓝连续画布 · Bento 信息板 · 1px 精密网格
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --ink-900: #0A1029;
  --ink-800: #121A3E;
  --line: #233066;
  --cyan: #22E0D2;
  --orange: #FF7A2E;
  --lime: #B4FF45;
  --blue: #3AA9FF;
  --violet: #4A2E8F;
  --ink-shadow: #060A1B;

  --text-hi: #EEF2FF;
  --text-body: #A8B3D6;
  --text-idx: #6B7AA6;

  --ff-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --ff-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --fs-13: 13px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-24: 24px;
  --fs-30: 30px;
  --fs-38: 38px;
  --fs-48: 48px;
  --display: clamp(40px, 7vw, 96px);

  --maxw: 1320px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 72px;

  --dur: 360ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 1024px) {
  :root { --header-h: 88px; }
}

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { list-style: none; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100%;
  background-color: var(--ink-900);
  background-image:
    linear-gradient(to right, rgba(35, 48, 102, 0.42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(35, 48, 102, 0.42) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: -1px -1px;
  color: var(--text-body);
  font-family: var(--ff-sans);
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--text-hi);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { max-width: 42em; }

strong { color: var(--text-hi); font-weight: 700; }

.display-xl {
  font-size: var(--display);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--text-hi);
}

.mono { font-family: var(--ff-mono); letter-spacing: 0.08em; }

.index {
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  color: var(--lime);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.accent-cyan { color: var(--cyan); }
.accent-orange { color: var(--orange); }
.accent-lime { color: var(--lime); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--cyan);
}

.link-more::after {
  content: "→";
  transition: transform 0.24s var(--ease);
}

.link-more:hover::after { transform: translateX(4px); }

.stat { display: flex; flex-direction: column; gap: 6px; }

.stat__value {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-hi);
}

.stat__label {
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  color: var(--text-idx);
}

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: currentColor;
}

/* ---------- 4. 布局 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 112px); }
.section--tight { padding-block: clamp(32px, 5vw, 64px); }
.section--alt { background: var(--ink-800); }

.section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 760px;
  margin-bottom: clamp(24px, 4vw, 48px);
}

.section__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section__lead {
  font-size: var(--fs-18);
  line-height: 1.75;
  color: var(--text-body);
  max-width: 34em;
}

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

.grid--lined {
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

/* ---------- 5. Bento 信息板 ---------- */
.bento {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.bento__item {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 172px;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--ink-900);
  transition: background-color 0.28s var(--ease), transform 0.28s var(--ease);
}

.bento__item:hover { background: var(--ink-800); }

.bento__item--focus {
  background: linear-gradient(150deg, var(--ink-800) 0%, rgba(74, 46, 143, 0.42) 62%, rgba(34, 224, 210, 0.14) 100%);
}

@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento__item--wide { grid-column: span 2; }
}

@media (min-width: 1080px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bento__item--focus { grid-column: span 2; grid-row: span 2; }
  .bento__item--tall { grid-row: span 2; }
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--line);
  background: var(--ink-800);
}

.tile__title {
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: -0.01em;
}

.tile__text { font-size: var(--fs-15); color: var(--text-body); }

/* ---------- 6. 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-hi);
  background: transparent;
  transition: background-color 0.24s var(--ease), border-color 0.24s var(--ease), color 0.24s var(--ease), transform 0.24s var(--ease);
}

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink-900);
}

.btn--primary:hover {
  background: #FF9250;
  border-color: #FF9250;
}

.btn--ghost {
  border-color: rgba(34, 224, 210, 0.55);
  color: var(--cyan);
}

.btn--ghost:hover {
  background: rgba(34, 224, 210, 0.12);
  border-color: var(--cyan);
}

.btn--link {
  min-height: 0;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--cyan);
  color: var(--cyan);
}

.btn--link:hover { color: var(--lime); border-bottom-color: var(--lime); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-body);
}

.chip--cyan { color: var(--cyan); border-color: rgba(34, 224, 210, 0.42); background: rgba(34, 224, 210, 0.08); }
.chip--lime { color: var(--lime); border-color: rgba(180, 255, 69, 0.42); background: rgba(180, 255, 69, 0.08); }
.chip--orange { color: var(--orange); border-color: rgba(255, 122, 46, 0.42); background: rgba(255, 122, 46, 0.08); }

/* ---------- 7. 图片容器 ---------- */
.media-frame {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--ink-800);
  overflow: hidden;
}

.media-frame__inner { position: relative; width: 100%; height: 100%; }

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

.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--device { aspect-ratio: 9 / 19; max-width: 320px; }

.media-frame__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(35, 48, 102, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(35, 48, 102, 0.55) 1px, transparent 1px);
  background-size: 48px 48px;
}

.media-frame__caption {
  margin-top: 10px;
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  color: var(--text-idx);
}

/* ---------- 8. 数据与对比表 ---------- */
.table-shell {
  position: relative;
  border: 1px solid var(--line);
  background: var(--ink-800);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease);
}

.table-shell--float {
  background: linear-gradient(180deg, rgba(18, 26, 62, 0.97) 0%, rgba(10, 16, 41, 0.97) 100%);
  border-color: var(--blue);
}

.table-shell--float:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
}

.table-shell__scroll { overflow-x: auto; }

table.data {
  width: 100%;
  min-width: 640px;
  font-size: var(--fs-15);
}

table.data th,
table.data td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data thead th {
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cyan);
  background: rgba(18, 26, 62, 0.92);
}

table.data tbody tr:hover { background: rgba(34, 224, 210, 0.06); }
table.data tbody td:first-child { color: var(--text-hi); }

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.06em;
  color: var(--text-idx);
}

.breadcrumb__item { display: inline-flex; align-items: center; }

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  margin: 0 10px;
  color: var(--line);
}

.breadcrumb__link { color: var(--text-idx); transition: color 0.24s var(--ease); }
.breadcrumb__link:hover { color: var(--cyan); }
.breadcrumb__item[aria-current="page"] { color: var(--text-hi); }

/* ---------- 10. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

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

/* ---------- 11. 跳至主内容 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.24s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ---------- 12. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 16, 41, 0.78) 0%, rgba(10, 16, 41, 0) 100%);
  transition: opacity 0.3s var(--ease);
}

.site-header[data-solid="true"] {
  background-color: rgba(10, 16, 41, 0.95);
  border-bottom-color: var(--line);
}

.site-header[data-solid="true"]::before { opacity: 0; }
.site-header[data-open] { background-color: var(--ink-900); border-bottom-color: var(--line); }
.site-header[data-open]::before { opacity: 0; }

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 40px);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--ff-mono);
  font-size: var(--fs-15);
  letter-spacing: 0.04em;
}

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

.brand__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: 0.01em;
}

.brand__line {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-idx);
}

.brand--footer .brand__mark { width: 44px; height: 44px; }

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

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.9vw, 12px);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px;
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.24s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover { color: var(--text-hi); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--text-hi); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-idx {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-idx);
}

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

.nav-shortcuts { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-cta { white-space: nowrap; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--text-hi);
  transition: border-color 0.24s var(--ease);
}

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

.nav-toggle__label {
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.nav-toggle__bars i {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--cyan);
  transition: transform 0.26s var(--ease);
}

.site-header[data-open] .nav-toggle__bars i:first-child { transform: translateY(3px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars i:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (min-width: 1025px) {
  .nav-toggle { display: none; }
}

@media (max-width: 1024px) {
  html.nav-open,
  html.nav-open body { overflow: hidden; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    z-index: 75;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    background: var(--ink-900);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.26s var(--ease), transform 0.26s var(--ease), visibility 0.26s var(--ease);
  }

  .site-header[data-open] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

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

  .nav-link {
    justify-content: flex-start;
    padding: 16px 4px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }

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

  .nav-link[aria-current="page"] {
    color: var(--lime);
    border-bottom-color: rgba(180, 255, 69, 0.45);
  }

  .nav-shortcuts {
    display: block;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }

  .nav-shortcuts__title {
    margin-bottom: 12px;
    font-family: var(--ff-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--text-idx);
  }

  .nav-shortcuts__list { display: flex; flex-wrap: wrap; gap: 10px; }

  .nav-shortcut {
    display: inline-flex;
    padding: 8px 14px;
    border: 1px solid var(--line);
    font-size: 14px;
    color: var(--cyan);
    transition: background-color 0.24s var(--ease), border-color 0.24s var(--ease);
  }

  .nav-shortcut:hover { border-color: var(--cyan); background: rgba(34, 224, 210, 0.08); }
}

@media (max-width: 720px) {
  .header-cta { display: none; }
}

@media (max-width: 560px) {
  .brand__line { display: none; }
  .brand__mark { width: 36px; height: 36px; font-size: 14px; }
}

/* ---------- 13. 左侧进度轨 ---------- */
.rail {
  position: fixed;
  left: clamp(10px, 1.6vw, 24px);
  top: 50%;
  z-index: 70;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform: translateY(-50%);
}

.rail__num {
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  color: var(--lime);
}

.rail__track {
  position: relative;
  display: block;
  width: 2px;
  height: 168px;
  background: var(--line);
}

.rail__fill {
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(to bottom, var(--cyan), var(--lime));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.18s linear;
}

@media (min-width: 1280px) {
  .rail { display: flex; }
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 120px);
  border-top: 1px solid var(--line);
  background: var(--ink-900);
}

.footer-band {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(34, 224, 210, 0.10) 0%, rgba(74, 46, 143, 0.22) 48%, rgba(255, 122, 46, 0.12) 100%);
}

.footer-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px clamp(16px, 3vw, 32px);
  padding-block: 22px;
}

.footer-band__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(180, 255, 69, 0.42);
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.08em;
  color: var(--lime);
}

.footer-band__text {
  flex: 1 1 260px;
  font-size: var(--fs-15);
  color: var(--text-body);
}

.footer-grid {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px);
  grid-template-columns: 1fr;
}

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

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 40ch;
}

.footer-brand__line {
  font-size: var(--fs-15);
  color: var(--text-hi);
}

.footer-brand__meta {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-idx);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col__title {
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-idx);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  font-size: var(--fs-15);
  color: var(--text-body);
  transition: color 0.24s var(--ease), transform 0.24s var(--ease);
}

.footer-link:hover { color: var(--cyan); transform: translateX(3px); }
.footer-link[aria-current="page"] { color: var(--lime); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 20px 30px;
  border-top: 1px solid var(--line);
  font-family: var(--ff-mono);
  font-size: var(--fs-13);
  letter-spacing: 0.04em;
  color: var(--text-idx);
}

.footer-copy { color: var(--text-body); }
.footer-meta { color: var(--cyan); }
.footer-contact { flex: 1 1 320px; }
.footer-updates { color: var(--lime); }

/* ---------- 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;
  }

  .table-shell--float:hover { transform: none; }
  .footer-link:hover { transform: none; }
  .rail__fill { transition: none; }
}
