/* ==========================================================================
   沙巴赛场 — /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 刊头 / 页脚 / 通用组件 / 图文容器
   ========================================================================== */

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

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

body {
  margin: 0;
  background: #F6F4EF;
  color: #1C1F26;
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 结构 */
  --ink: #0E0F12;
  --graphite: #1C1F26;
  --paper: #F6F4EF;
  --khaki: #E7E1D6;

  /* 品牌锚点 */
  --shaba: #7A1122;
  --shaba-deep: #4C0A15;

  /* 数据强调 */
  --amber: #C98A2E;
  --gold: #E6B85C;

  /* 功能 */
  --pitch: #2F6B45;
  --slate: #33465C;

  /* 中性 */
  --mist: #97A0AC;
  --readable-mist: #5C6672;
  --line: rgba(14, 15, 18, 0.12);
  --line-strong: rgba(14, 15, 18, 0.24);
  --on-dark: #C8C5BE;
  --on-dark-dim: #8A8880;

  /* 尺度 */
  --wide: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --narrow: 68ch;
  --r-organic: 62% 38% 46% 54% / 48% 52% 48% 52%;

  /* 字体 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", "SFMono-Regular", Menlo, Consolas,
    "Courier New", monospace;

  /* 动效 */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 3. 中文基础排版 ---------- */
.body-text,
.body-text p {
  max-width: var(--narrow);
  font-size: 17px;
  line-height: 1.85;
  color: #1C1F26;
}

.body-text p + p { margin-top: 1.2em; }

[data-reveal] { will-change: opacity, transform; }

/* ---------- 4. 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.brandbar a:focus-visible,
.site-footer a:focus-visible,
.btn:focus-visible {
  outline-color: var(--gold);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  display: inline-block;
  padding: 11px 20px;
  background: var(--shaba);
  color: #F6F4EF;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  transition: top .18s var(--ease);
}

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

[id] { scroll-margin-top: 108px; }
[id="main-content"] { scroll-margin-top: 0; }

/* ---------- 5. 布局容器与栅格 ---------- */
.container {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(40px, 6vw, 88px); }
.section--tight { padding-block: clamp(26px, 4vw, 52px); }

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

.editorial-grid__main { grid-column: 1 / span 8; min-width: 0; }
.editorial-grid__side { grid-column: 10 / span 3; min-width: 0; }
.editorial-grid__wide { grid-column: 1 / -1; min-width: 0; }

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

.rule--brand { background: var(--shaba); opacity: .32; }

/* ---------- 6. 栏目级标题与旁注 ---------- */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--ink);
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 4px;
  background: var(--shaba);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--shaba);
}

.annotation {
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .06em;
  color: var(--readable-mist);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.3;
  text-decoration: none;
  transition: background .18s var(--ease), color .18s var(--ease),
    border-color .18s var(--ease), transform .18s var(--ease);
}

.btn--primary {
  background: var(--shaba);
  color: #F6F4EF;
}

.btn--primary:hover {
  background: var(--shaba-deep);
  transform: translateY(-2px);
}

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

.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* ---------- 8. 图文容器（页面阶段放置图片） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--graphite);
  border: 1px solid rgba(201, 138, 46, 0.28);
}

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }

.media-frame--organic {
  border-radius: var(--r-organic);
  border-color: rgba(201, 138, 46, 0.34);
}

.media-frame--skew {
  clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
}

.media-frame--duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(122, 17, 34, 0.34), rgba(14, 15, 18, 0.52));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(14, 15, 18, 0.86), rgba(14, 15, 18, 0));
  font-size: 13px;
  letter-spacing: .06em;
  line-height: 1.6;
  color: #E6E3DC;
}

.media-frame--flat .media-frame__caption {
  position: static;
  background: none;
  color: var(--readable-mist);
  padding: 10px 0 0;
}

/* ---------- 9. 数据表 ---------- */
.data-table {
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
  background: transparent;
}

.data-table caption {
  caption-side: top;
  padding-bottom: 12px;
  text-align: left;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--readable-mist);
}

.data-table th {
  padding: 11px 14px;
  background: var(--graphite);
  color: #E8E6E0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--graphite);
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) td { background: rgba(231, 225, 214, 0.5); }
.data-table tbody tr:hover td { background: rgba(231, 225, 214, 0.86); }

.data-table .is-num,
.data-table td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -.01em;
}

.data-table--dark { background: var(--graphite); color: #E8E6E0; }
.data-table--dark th { background: var(--ink); color: var(--gold); }
.data-table--dark td { color: #D8D5CE; border-bottom-color: rgba(246, 244, 239, 0.12); }
.data-table--dark tbody tr:nth-child(even) td { background: rgba(246, 244, 239, 0.04); }
.data-table--dark .is-num { color: var(--gold); }

/* ---------- 10. 状态标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.5;
  white-space: nowrap;
}

.tag--live { color: var(--pitch); }
.tag--review { color: #8C5A12; }
.tag--pending { color: var(--readable-mist); }
.tag--dark { color: var(--gold); }

/* ---------- 11. 面包屑 ---------- */
.breadcrumb { font-size: 13px; letter-spacing: .04em; }

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

.breadcrumb__list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--readable-mist);
}

.breadcrumb__list li + li::before {
  content: "/";
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--readable-mist);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.breadcrumb a:hover { color: var(--shaba); }

/* ---------- 12. 数据锚点 ---------- */
.data-figure {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--shaba);
}

.data-figure--gold { color: var(--gold); }
.data-figure--amber { color: var(--amber); font-size: clamp(28px, 3.4vw, 44px); }

/* ==========================================================================
   13. 刊头
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--paper);
}

/* 顶条 */
.brandbar {
  max-height: 46px;
  overflow: hidden;
  background: var(--ink);
  transition: max-height .3s var(--ease), opacity .24s var(--ease);
}

.brandbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--wide);
  min-height: 40px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brandbar__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--on-dark);
}

.brandbar__link {
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.brandbar__link:hover {
  color: #F6F4EF;
  border-bottom-color: var(--gold);
}

.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pitch);
  animation: livePulse 2.6s ease-out infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 107, 69, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(47, 107, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 107, 69, 0); }
}

/* 刊头主体 */
.masthead__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 32px var(--gutter) 24px;
  transition: padding .3s var(--ease);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  text-align: center;
}

.brand__name {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--ink);
}

.brand__name::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin: 10px auto 0;
  background: var(--shaba);
}

.brand__tag {
  max-height: 24px;
  overflow: hidden;
  font-size: 12px;
  letter-spacing: .16em;
  line-height: 1.6;
  color: var(--readable-mist);
  transition: max-height .3s var(--ease), opacity .22s var(--ease);
}

/* 收窄态 */
.site-header.is-condensed .brandbar {
  max-height: 0;
  opacity: 0;
}

.site-header.is-condensed .masthead__inner { padding: 12px var(--gutter); }
.site-header.is-condensed .brand__tag { max-height: 0; opacity: 0; }
.site-header.is-condensed .brand__name::after { margin-top: 6px; }

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 11px;
}

.nav-toggle__bars span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--shaba);
  transition: transform .22s var(--ease), opacity .18s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(4.75px) 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(-4.75px) rotate(-45deg);
}

/* 栏目目录 */
.site-nav {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-strong);
}

.site-nav__list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2px;
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__item { flex: 0 0 auto; }

.site-nav__link {
  position: relative;
  display: block;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--graphite);
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 9px;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}

.site-nav__link:hover { color: var(--ink); }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__link[aria-current="page"] { color: var(--shaba); font-weight: 700; }

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--shaba);
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   14. 页脚
   ========================================================================== */
.site-footer {
  margin-top: clamp(40px, 6vw, 92px);
  padding: clamp(48px, 6vw, 72px) 0 28px;
  background: var(--ink);
  color: var(--on-dark);
  border-top: 3px solid var(--amber);
}

.site-footer__inner {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr 1fr 1.5fr;
  gap: 40px 32px;
}

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

.footer-brand {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: .02em;
  color: #F6F4EF;
}

.footer-brand__tag {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--on-dark-dim);
}

.footer-col__title {
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(230, 184, 92, 0.3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--gold);
}

.footer-list a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  line-height: 2.1;
  color: var(--on-dark);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.footer-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}

.footer-list a:hover { color: #F6F4EF; }
.footer-list a:hover::after { transform: scaleX(1); }

.footer-contact li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: var(--on-dark-dim);
}

.footer-contact__v {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0;
  color: #E8E6E0;
  word-break: break-all;
}

.footer-contact__note {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 2px solid rgba(230, 184, 92, 0.5);
  font-size: 12.5px;
  line-height: 1.8;
  letter-spacing: .03em;
  color: var(--on-dark-dim);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 20px;
  border-top: 1px solid rgba(230, 184, 92, 0.22);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--on-dark-dim);
}

/* ==========================================================================
   15. 滚动显现
   ========================================================================== */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}

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

html.js [data-reveal-group] > [data-reveal]:nth-child(2) { transition-delay: 90ms; }
html.js [data-reveal-group] > [data-reveal]:nth-child(3) { transition-delay: 180ms; }
html.js [data-reveal-group] > [data-reveal]:nth-child(4) { transition-delay: 270ms; }
html.js [data-reveal-group] > [data-reveal]:nth-child(5) { transition-delay: 360ms; }
html.js [data-reveal-group] > [data-reveal]:nth-child(6) { transition-delay: 450ms; }

/* ==========================================================================
   16. 响应式
   ========================================================================== */
@media (max-width: 1100px) {
  .editorial-grid__main { grid-column: 1 / span 8; }
  .editorial-grid__side { grid-column: 9 / span 4; }
}

@media (max-width: 1024px) {
  .editorial-grid__main,
  .editorial-grid__side { grid-column: 1 / -1; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 28px;
  }
}

@media (max-width: 900px) {
  body { font-size: 16px; }

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

  .site-nav {
    display: none;
    border-top: 1px solid var(--line-strong);
  }

  .site-nav[data-open] {
    display: block;
    animation: navDrop .24s var(--ease) both;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding: 4px var(--gutter) 16px;
    overflow: visible;
  }

  .site-nav__item { width: 100%; }

  .site-nav__link {
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }

  .site-nav__item:last-child .site-nav__link { border-bottom: 0; }

  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"]::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    vertical-align: middle;
    background: var(--shaba);
  }

  .masthead__inner { padding: 22px var(--gutter) 18px; }
  .site-header.is-condensed .masthead__inner { padding: 12px var(--gutter); }
  .brand__name { font-size: clamp(26px, 7vw, 34px); }
}

@media (max-width: 640px) {
  .brandbar__link { display: none; }
  .brandbar__inner { justify-content: flex-start; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }

  .footer-base { flex-direction: column; align-items: flex-start; gap: 8px; }

  .data-table { font-size: 13px; }
  .data-table th,
  .data-table td { padding: 9px 10px; }
}

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

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

  .live-dot { animation: none; box-shadow: none; }
  .btn:hover,
  .btn--primary:hover,
  .btn--ghost:hover { transform: none; }
}
