/* =========================================================
   NG娱乐官网 · 试玩模式  —  共享外壳样式 /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: 5rem;
}

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

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

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

button, input, select, textarea { font: inherit; color: inherit; }

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

[hidden] { display: none !important; }

main { display: block; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink-900: #0A1024;
  --ink-800: #121A33;
  --ink-700: #1B2140;
  --ink-600: #2A2F4A;
  --cyan: #35E0D0;
  --amber: #FF7A2F;
  --paper: #F2F0E9;
  --stone: #8A8FA3;
  --clay: #C2643F;
  --moss: #7FA37A;

  --rail-w: 236px;
  --edge: 2px;

  --shadow-hard: 6px 6px 0 0 var(--ink-600);
  --shadow-hard-cyan: 6px 6px 0 0 rgba(53, 224, 208, .28);

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

  --t-fast: 140ms ease;
  --t-base: 180ms ease;

  --measure: 36em;

  color-scheme: dark;
}

/* ---------- 3. 基础与中文排版 ---------- */
body {
  background-color: var(--ink-900);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: .01em;
  min-height: 100vh;
  padding-left: var(--rail-w);
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.28; font-weight: 900; letter-spacing: -.01em; }

h1 { font-size: clamp(2.125rem, 4.6vw, 3.75rem); line-height: 1.12; }
h2 { font-size: clamp(1.375rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.125rem; }

p { line-height: 1.9; }

strong { font-weight: 900; }

::selection { background: var(--cyan); color: var(--ink-900); }

/* ---------- 4. 焦点与无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 200;
  padding: .5rem .75rem;
  background: var(--cyan);
  color: var(--ink-900);
  border: var(--edge) solid var(--paper);
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.skip-link:focus {
  left: .5rem;
  top: .5rem;
}

/* ---------- 5. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.75rem);
  padding-right: clamp(1rem, 4vw, 2.75rem);
}

.wrap--wide { max-width: 1440px; }
.wrap--narrow { max-width: 840px; }

.section { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.section--tight { padding-top: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section--edge { border-top: var(--edge) solid var(--ink-600); }

.breather { height: clamp(2.5rem, 8vw, 7rem); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.5rem;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.texture-grid {
  background-color: var(--ink-800);
  background-image:
    linear-gradient(to right, rgba(138, 143, 163, .13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(138, 143, 163, .13) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ---------- 6. 头部：左侧数据索引轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  background-color: var(--ink-800);
  border-right: var(--edge) solid var(--paper);
  overflow: hidden;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1rem .875rem;
  border-bottom: var(--edge) solid var(--ink-600);
}

.brand {
  display: flex;
  align-items: center;
  gap: .625rem;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.125rem;
  height: 2.125rem;
  background: var(--cyan);
  color: var(--ink-900);
  border: var(--edge) solid var(--paper);
  font-family: var(--font-mono);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background-color var(--t-fast), color var(--t-fast);
}

.brand:hover .brand__mark { background: var(--amber); }

.brand__text { display: flex; flex-direction: column; min-width: 0; }

.brand__line {
  font-size: .9375rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .01em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.5;
  letter-spacing: .14em;
  color: var(--stone);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .4375rem .625rem;
  background: transparent;
  border: var(--edge) solid var(--paper);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 1rem;
  height: 2px;
  background: currentColor;
  transition: background-color var(--t-fast);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1rem;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-fast);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

.site-header__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.header-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  padding: .5rem 1rem;
  border-bottom: var(--edge) solid var(--ink-600);
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.6;
  letter-spacing: .04em;
}

.header-strip__key { color: var(--stone); }
.header-strip__val { color: var(--amber); }
.header-strip__sep { color: var(--ink-600); }

/* ---------- 7. 导航 ---------- */
.site-nav { padding: .75rem 0; }

.nav__list { display: flex; flex-direction: column; }

.nav__item { display: block; }

.nav__link {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .5rem 1rem;
  border-left: var(--edge) solid transparent;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--paper);
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}

.nav__index {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--stone);
  transition: color var(--t-fast);
}

.nav__link:hover {
  border-left-color: var(--cyan);
  background-color: rgba(53, 224, 208, .08);
  color: var(--cyan);
}

.nav__link:hover .nav__index { color: var(--cyan); }

.nav__link[aria-current="page"] {
  border-left-color: var(--cyan);
  background-color: var(--ink-600);
  color: var(--cyan);
}

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

/* ---------- 8. 读数与轨道进度 ---------- */
.site-header__meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: .875rem 1rem 1.25rem;
  border-top: var(--edge) solid var(--ink-600);
}

.readout {
  display: flex;
  flex-direction: column;
  gap: .1875rem;
}

.readout__key {
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.5;
  letter-spacing: .1em;
  color: var(--stone);
}

.readout__val {
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--paper);
  word-break: break-all;
}

.readout__val--amber { color: var(--amber); }
.readout__val--cyan { color: var(--cyan); }

.rail-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- 9. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5625rem .875rem;
  background: transparent;
  border: var(--edge) solid var(--paper);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.btn:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}

.btn--solid {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}

.btn--solid:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink-900);
}

.btn--ghost {
  border-color: var(--ink-600);
  color: var(--stone);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--block { width: 100%; }

/* ---------- 10. 面包屑 ---------- */
.breadcrumbs { padding-top: 1rem; }

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .05em;
  color: var(--stone);
}

.breadcrumbs__item { display: inline-flex; align-items: center; gap: .5rem; }

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: var(--ink-600);
}

.breadcrumbs__link { transition: color var(--t-fast); }
.breadcrumbs__link:hover { color: var(--cyan); }

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

/* ---------- 11. 章节头 · 编号体系 ---------- */
.chapter-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .5rem 1.25rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.chapter-head__num {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--cyan);
}

.chapter-head__title {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 900;
  line-height: 1.3;
}

.chapter-head__note {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--stone);
}

.annotation-side {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .32em;
  color: var(--stone);
}

/* ---------- 12. 卡片 ---------- */
.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.125rem 1.25rem 1.25rem;
  background: var(--ink-800);
  border: var(--edge) solid var(--ink-600);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}

.card:hover {
  border-color: var(--cyan);
  background-color: var(--ink-700);
}

.card--index { padding: .875rem 1rem 1rem; gap: .5rem; }

.card--readout {
  padding: 1.25rem 1.25rem 1.375rem;
  background: var(--ink-700);
}

.card--compare {
  padding: 1.5rem 1.5rem 1.625rem;
  border-color: var(--paper);
  box-shadow: var(--shadow-hard);
}

.card--compare:hover { border-color: var(--cyan); box-shadow: var(--shadow-hard-cyan); }

.card__label {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  color: var(--stone);
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 900;
  line-height: 1.45;
}

.card__meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: 1.7;
  color: var(--stone);
}

/* ---------- 13. 标记与筛选 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .1875rem .5rem;
  border: 1px solid var(--ink-600);
  background: transparent;
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.6;
  letter-spacing: .05em;
  color: var(--stone);
}

.tag--gz { border-color: var(--cyan); color: var(--cyan); }
.tag--cd { border-color: var(--clay); color: var(--clay); }
.tag--nj { border-color: var(--moss); color: var(--moss); }
.tag--amber { border-color: var(--amber); color: var(--amber); }

.tag--active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .75rem 0;
}

.filter-bar__legend {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .1em;
  color: var(--stone);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .3125rem .625rem;
  background: transparent;
  border: 1px solid var(--ink-600);
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.6;
  letter-spacing: .05em;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}

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

.chip[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-900);
}

.filter-count {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--amber);
}

/* ---------- 14. 图形容器（页面阶段放置图片占位） ---------- */
.figure {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin: 0;
}

.figure__frame {
  position: relative;
  display: block;
  width: 100%;
  border: var(--edge) solid var(--ink-600);
  background-color: var(--ink-800);
  background-image:
    linear-gradient(to right, rgba(138, 143, 163, .14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(138, 143, 163, .14) 1px, transparent 1px);
  background-size: 28px 28px;
  overflow: hidden;
  transition: border-color var(--t-fast);
}

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

.figure--16x9 .figure__frame { aspect-ratio: 16 / 9; }
.figure--4x3 .figure__frame { aspect-ratio: 4 / 3; }
.figure--1x1 .figure__frame { aspect-ratio: 1 / 1; }
.figure--3x4 .figure__frame { aspect-ratio: 3 / 4; }
.figure--21x9 .figure__frame { aspect-ratio: 21 / 9; }

.figure__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.75;
  letter-spacing: .03em;
  color: var(--stone);
}

/* ---------- 15. 正文 ---------- */
.prose { max-width: 100%; }

.prose > * + * { margin-top: 1rem; }

.prose p,
.prose li { max-width: var(--measure); }

.prose h2 { margin-top: 2.25rem; }
.prose h3 { margin-top: 1.75rem; }

.prose ul li {
  position: relative;
  padding-left: 1.25rem;
}

.prose ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--cyan);
}

.prose a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(53, 224, 208, .45);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.prose a:hover {
  background: var(--cyan);
  color: var(--ink-900);
  border-bottom-color: var(--cyan);
}

/* ---------- 16. 页脚 ---------- */
.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  background-color: var(--ink-800);
  border-top: var(--edge) solid var(--paper);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 1.5rem;
  border-bottom: var(--edge) solid var(--ink-600);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: .875rem;
  min-width: 0;
}

.footer__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: var(--edge) solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.footer__name {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.5;
}

.footer__slogan {
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.7;
  letter-spacing: .08em;
  color: var(--stone);
}

.footer__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
}

.footer__col { min-width: 0; }

.footer__title {
  margin-bottom: .75rem;
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.6;
  letter-spacing: .16em;
  color: var(--cyan);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.footer__item { min-width: 0; }

.footer__link {
  font-size: .875rem;
  line-height: 1.7;
  color: var(--stone);
  transition: color var(--t-fast);
  word-break: break-word;
}

.footer__link:hover { color: var(--cyan); }

.footer__link--mono {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .02em;
}

.footer__note {
  margin-top: .875rem;
  max-width: 30em;
  font-size: .75rem;
  line-height: 1.8;
  color: var(--stone);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem 1.5rem;
  padding: 1rem 0 1.75rem;
  border-top: 1px solid var(--ink-600);
  font-family: var(--font-mono);
  font-size: .6875rem;
  line-height: 1.8;
  letter-spacing: .05em;
  color: var(--stone);
}

.footer__stamp { color: var(--amber); }

/* ---------- 17. 响应式：平板与手机 ---------- */
@media (max-width: 1023px) {
  body { padding-left: 0; }

  .site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: var(--edge) solid var(--paper);
    overflow: visible;
  }

  .site-header__bar { padding: .75rem 1rem; }

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

  .site-header__body {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    background-color: var(--ink-800);
    border-bottom: var(--edge) solid var(--paper);
  }

  .site-header[data-open] .site-header__body { display: flex; }

  .site-header__meta { margin-top: 0; }

  .rail-progress { bottom: -3px; }

  .grid-12 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
  }

  .col-3, .col-4 { grid-column: span 3; }
  .col-5, .col-6, .col-7 { grid-column: span 6; }
  .col-8, .col-9, .col-12 { grid-column: span 6; }

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

@media (max-width: 600px) {
  body { font-size: .9375rem; }

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

  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: span 1; }

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

  .chapter-head { grid-template-columns: minmax(0, 1fr); gap: .5rem; }

  .chapter-head__note { grid-column: 1; }

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

  .footer__top { flex-direction: column; align-items: flex-start; }

  .footer__cta-row { width: 100%; }

  .footer__cta-row .btn { flex: 1 1 auto; }
}

/* ---------- 18. 降低动效 ---------- */
@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;
  }
}
