/* ============================================================
   安博赛场 · 共享外壳样式 / assets/site.css
   夜场墨绿底 + 奶油纸面 + 信号橙锚点；锐利直角、1px 网格。
   ============================================================ */

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

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

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

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

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

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

a { color: inherit; }

table { border-collapse: collapse; }

/* ---------- 2. 变量 ---------- */
:root {
  --c-night: #0B1F1A;
  --c-pitch: #12362B;
  --c-line: #1F5C42;
  --c-signal: #FF6A2B;
  --c-signal-soft: #FFB489;
  --c-cream: #F3EBDD;
  --c-lead: #1A1512;
  --c-silver: #9AA6A3;
  --c-grid: #3A4A46;
  --c-score: #FCFAF6;

  --f-sans: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --f-mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 74px;
  --shell-max: 1320px;
  --gutter: clamp(18px, 4.2vw, 56px);

  --t-fast: 140ms;
  --t-base: 190ms;
  --ease: cubic-bezier(.2, .62, .2, 1);

  --scroll-progress: 0;
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--c-night);
  color: var(--c-cream);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.display {
  font-weight: 250;
  font-size: clamp(44px, 6.2vw, 92px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-cream);
  text-wrap: balance;
}

.display--sm { font-size: clamp(32px, 4.4vw, 58px); }

.label {
  display: inline-block;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-silver);
}

.label--cn {
  text-transform: none;
  letter-spacing: 0.24em;
  font-size: 12px;
}

.num {
  font-family: var(--f-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--c-signal-soft);
  outline-offset: 2px;
}

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

main { display: block; padding-top: var(--header-h); }

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }
.section--pitch { background-color: var(--c-pitch); }

.section--paper {
  background-color: var(--c-cream);
  color: var(--c-lead);
}

.section--paper .label { color: #6C6259; }
.section--paper .display { color: var(--c-lead); }
.section--paper :focus-visible { outline-color: var(--c-signal); }

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

.rule {
  height: 1px;
  border: 0;
  background-color: var(--c-grid);
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background-color: var(--c-signal);
  color: var(--c-lead);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-260%);
  transition: transform var(--t-base) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--c-lead);
  outline-offset: 2px;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: var(--c-signal);
  transform: scaleX(var(--scroll-progress));
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}

.site-header.is-solid {
  background-color: var(--c-pitch);
  border-bottom-color: var(--c-grid);
}

.site-header.is-solid::after { opacity: 1; }

.header-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 40px);
}

/* 品牌 */
.brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  transition: opacity var(--t-fast) var(--ease);
}

.brand:hover { opacity: 0.82; }

.brand__mark {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--c-cream);
}

.brand__sub {
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  color: var(--c-silver);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
  transition: gap var(--t-base) var(--ease);
}

.site-header.is-solid .nav-list { gap: clamp(11px, 1.3vw, 20px); }

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--c-cream);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 1px;
  background-color: var(--c-signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-base) var(--ease),
              background-color var(--t-fast) var(--ease);
}

.nav-list a:hover { color: var(--c-score); }
.nav-list a:hover::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] {
  color: var(--c-signal-soft);
}

.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
  background-color: var(--c-signal-soft);
}

/* 头部右端 */
.header-tail {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: clamp(8px, 1.6vw, 28px);
}

.round-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--c-grid);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--c-score);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.round-badge::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  background-color: var(--c-signal);
}

/* 汉堡 */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-grid);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}

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

.nav-toggle__bar {
  position: relative;
  display: block;
  width: 18px;
  height: 1px;
  background-color: var(--c-cream);
  transition: background-color var(--t-base) var(--ease);
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background-color: var(--c-cream);
  transition: top var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}

.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background-color: transparent; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before {
  top: 0;
  background-color: var(--c-signal);
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after {
  top: 0;
  background-color: var(--c-signal);
  transform: rotate(-45deg);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}

.btn--accent {
  background-color: var(--c-signal);
  border-color: var(--c-signal);
  color: var(--c-lead);
  font-weight: 700;
}

.btn--accent:hover {
  background-color: var(--c-signal-soft);
  border-color: var(--c-signal-soft);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--c-grid);
  color: var(--c-cream);
}

.btn--ghost:hover {
  border-color: var(--c-signal);
  color: var(--c-signal-soft);
}

.btn--paper {
  background-color: var(--c-lead);
  border-color: var(--c-lead);
  color: var(--c-cream);
}

.btn--paper:hover {
  background-color: var(--c-line);
  border-color: var(--c-line);
  color: var(--c-score);
}

/* ---------- 8. 标签 / 索引条 / 面包屑 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--c-grid);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--c-silver);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tag--anchor {
  border-color: var(--c-signal);
  color: var(--c-signal);
}

.section--paper .tag { border-color: #C9BFAF; color: #6C6259; }
.section--paper .tag--anchor { border-color: var(--c-signal); color: #B2430F; }

.index-row {
  display: grid;
  grid-template-columns: minmax(72px, 128px) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px solid var(--c-grid);
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease),
              padding-left var(--t-fast) var(--ease);
}

.index-row:last-child { border-bottom: 1px solid var(--c-grid); }
.index-row:hover { background-color: var(--c-pitch); padding-left: 14px; }

.section--paper .index-row { border-color: #D8CDBB; }
.section--paper .index-row:hover { background-color: #E9DFCD; }

.breadcrumbs {
  padding-block: 14px;
  border-bottom: 1px solid var(--c-grid);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--c-silver);
}

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

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--c-grid);
}

.breadcrumbs a {
  color: var(--c-silver);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.breadcrumbs a:hover { color: var(--c-cream); }
.breadcrumbs [aria-current="page"] { color: var(--c-cream); }

.section--paper .breadcrumbs { border-color: #D8CDBB; color: #6C6259; }
.section--paper .breadcrumbs a { color: #6C6259; }
.section--paper .breadcrumbs a:hover { color: var(--c-lead); }
.section--paper .breadcrumbs [aria-current="page"] { color: var(--c-lead); }

/* ---------- 9. 正文容器 ---------- */
.prose {
  max-width: 38rem;
  font-size: 16px;
  line-height: 1.75;
}

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.3;
  margin-top: 2.1em;
}

.prose h3 {
  font-size: 18px;
  line-height: 1.4;
  margin-top: 1.7em;
}

.prose ul,
.prose ol {
  padding-left: 0;
}

.prose li {
  position: relative;
  padding-left: 20px;
}

.prose li + li { margin-top: 0.5em; }

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 10px;
  height: 1px;
  background-color: var(--c-line);
}

.section--paper .prose li::before { background-color: #B2430F; }

.prose blockquote {
  padding-left: 20px;
  border-left: 2px solid var(--c-line);
  color: var(--c-silver);
}

.prose a {
  color: var(--c-signal-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line);
  transition: border-color var(--t-fast) var(--ease);
}

.prose a:hover { border-bottom-color: var(--c-signal); }

.section--paper .prose a { color: #B2430F; border-bottom-color: #D8CDBB; }

/* ---------- 10. 数据表格 ---------- */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: var(--c-line) transparent;
}

.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background-color: var(--c-line); }
.table-scroll::-webkit-scrollbar-track { background-color: transparent; }

.data-table {
  width: 100%;
  min-width: 560px;
  font-size: 14px;
  line-height: 1.6;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-grid);
  white-space: nowrap;
}

.data-table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-silver);
  border-bottom-color: var(--c-line);
}

.data-table tbody tr { transition: background-color var(--t-fast) var(--ease); }
.data-table tbody tr:nth-child(even) { background-color: rgba(18, 54, 43, 0.55); }
.data-table tbody tr:hover { background-color: var(--c-pitch); }

.data-table .num { color: var(--c-score); }

.data-table--sticky th:first-child,
.data-table--sticky td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: var(--c-night);
}

.data-table--sticky tbody tr:nth-child(even) td:first-child {
  background-color: #0E2721;
}

.section--paper .data-table th,
.section--paper .data-table td { border-bottom-color: #D8CDBB; }

.section--paper .data-table thead th {
  color: #6C6259;
  border-bottom-color: #B2430F;
}

.section--paper .data-table .num { color: var(--c-lead); }

/* ---------- 11. 图片容器基础规则 ---------- */
.frame {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--c-pitch);
  border: 1px solid var(--c-grid);
}

.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--c-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-grid) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.45;
}

.frame > * { position: relative; z-index: 1; }

.frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.86);
}

.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--4x5 { aspect-ratio: 4 / 5; }
.frame--1x1 { aspect-ratio: 1 / 1; }
.frame--21x9 { aspect-ratio: 21 / 9; }

.frame__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-cream);
  opacity: 0.18;
  pointer-events: none;
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
  margin-top: 0;
  padding-block: clamp(48px, 6.5vw, 84px) 28px;
  background-color: var(--c-night);
  border-top: 1px solid var(--c-grid);
}

.footer-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) repeat(3, minmax(120px, 0.8fr));
  gap: clamp(24px, 3.4vw, 56px);
}

.footer-brand__mark {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
  color: var(--c-cream);
}

.footer-brand__sub {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--c-silver);
}

.footer-brand__note {
  margin-top: 20px;
  max-width: 28ch;
  font-size: 13px;
  line-height: 1.75;
  color: var(--c-silver);
}

.footer-col__title {
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--c-silver);
}

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

.footer-col a {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--c-cream);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}

.footer-col a:hover {
  color: var(--c-signal-soft);
  border-bottom-color: var(--c-line);
}

.footer-fixed {
  margin-top: clamp(30px, 4.4vw, 54px);
  padding-top: 18px;
  border-top: 1px solid var(--c-grid);
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--c-silver);
  font-variant-numeric: tabular-nums;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--c-grid);
  font-size: 12px;
  line-height: 1.7;
  color: var(--c-silver);
}

.footer-legal__item { white-space: nowrap; }

.footer-legal__contact {
  font-family: var(--f-mono);
  letter-spacing: 0.02em;
}

/* ---------- 13. 滚动显现 ---------- */
[data-reveal-ready] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

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

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1100px) {
  .header-cta { padding: 10px 14px; font-size: 12px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .header-cta { display: none; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    margin-left: 0;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 6px var(--gutter) 24px;
    background-color: var(--c-pitch);
    border-top: 1px solid var(--c-grid);
    border-bottom: 1px solid var(--c-grid);
    display: none;
  }

  .site-nav[data-open] { display: block; }

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

  .site-header.is-solid .nav-list { gap: 0; }

  .nav-list li + li { border-top: 1px solid var(--c-grid); }

  .nav-list a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    white-space: normal;
  }

  .nav-list a::after {
    right: auto;
    bottom: 11px;
    width: 28px;
  }

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

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 24px;
  }

  .footer-brand { grid-column: 1 / -1; }
  .footer-brand__note { max-width: none; }
}

@media (max-width: 720px) {
  :root { --header-h: 66px; }

  .brand__mark { font-size: 17px; }
  .brand__sub { font-size: 10px; letter-spacing: 0.14em; }

  .round-badge { padding: 4px 8px; font-size: 11px; }

  .index-row {
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
  }

  .index-row > :first-child { grid-column: 1 / -1; }

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

@media (max-width: 560px) {
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand__mark { font-size: 22px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal-ready] {
    opacity: 1 !important;
    transform: none !important;
  }
}
