/* ==========================================================================
   三亿赛场 — 共享样式 /assets/site.css
   夜间赛场数据舱 × 展览画册：深空蓝底、荧光青信号、印刷边框与纸张叠层
   ========================================================================== */

/* ---------- 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, figure, blockquote,
ul, ol, dl, dd, dt { margin: 0; }

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

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

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

button { background: none; border: 0; padding: 0; }

a { color: inherit; }

table { border-collapse: collapse; width: 100%; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink-900: #0B1B2B;
  --ink-800: #12293F;
  --ink-700: #2A3A4A;
  --paper: #F2EFE6;
  --paper-tint: #E8E1D2;
  --paper-dim: rgba(242, 239, 230, .68);
  --paper-faint: rgba(242, 239, 230, .38);
  --neon: #35F0D0;
  --up: #2FD08A;
  --signal: #FF7A33;
  --signal-lift: #FF9257;
  --clay: #C6512F;
  --moss: #7C9A5E;

  --line: rgba(242, 239, 230, .14);
  --line-strong: rgba(242, 239, 230, .30);

  --font-data: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-title: "Source Han Sans HC", "Source Han Sans SC", "PingFang SC", "Noto Sans SC", system-ui, "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", system-ui, "Microsoft YaHei", sans-serif;

  --radius: 4px;
  --radius-card: 8px;
  --radius-pill: 999px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-paper: 0 26px 54px -34px rgba(0, 0, 0, .95);
  --shadow-lift: 0 22px 44px -30px rgba(0, 0, 0, 1);

  --wrap-max: 1240px;
  --wrap-pad: clamp(18px, 5vw, 48px);
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 520px at 84% -12%, rgba(53, 240, 208, .10), transparent 62%),
    radial-gradient(820px 440px at 4% 6%, rgba(255, 122, 51, .07), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (min-width: 900px) {
  body { font-size: 18px; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--paper);
}

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

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

#main-content {
  display: block;
  scroll-margin-top: 150px;
}

/* ---------- 4. Utility type ---------- */
.mono,
.num {
  font-family: var(--font-data);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: .02em;
}

.label {
  display: inline-block;
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--neon);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .65;
}

.display {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: clamp(36px, 7vw, 84px);
  line-height: 1;
  letter-spacing: -.03em;
}

.section-title {
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.08;
}

.side-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

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

/* ---------- 5. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

.section {
  padding-block: clamp(40px, 7vw, 92px);
}

.section--tight {
  padding-block: clamp(24px, 4vw, 52px);
}

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

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

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

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

/* ---------- 6. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--neon);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

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

/* ---------- 7. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(11, 27, 43, .94);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.site-header[data-scrolled] {
  border-bottom-color: var(--line-strong);
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 1);
}

.site-header__main {
  position: relative;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding: 12px var(--wrap-pad);
}

/* 品牌浮岛 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--paper);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--neon);
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(53, 240, 208, .18), rgba(53, 240, 208, 0) 62%);
  color: var(--neon);
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(11, 27, 43, .6);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand__name {
  display: block;
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
}

.brand__tagline {
  display: block;
  font-size: 10.5px;
  letter-spacing: .22em;
  color: var(--paper-faint);
}

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

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(18, 41, 63, .72);
}

.site-nav__link {
  display: block;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  color: var(--paper-dim);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .22s var(--ease), color .22s var(--ease);
}

.site-nav__link:hover {
  background: rgba(53, 240, 208, .12);
  color: var(--paper);
}

.site-nav__link[aria-current="page"] {
  background: var(--neon);
  color: var(--ink-900);
  box-shadow: 0 6px 18px -10px rgba(53, 240, 208, .9);
}

.site-nav__cta {
  display: none;
}

/* 操作区 */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(18, 41, 63, .7);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .22s var(--ease), border-color .22s var(--ease);
}

.nav-toggle:hover {
  background: rgba(53, 240, 208, .12);
  border-color: rgba(53, 240, 208, .5);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .24s var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after  { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(4.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-4.25px) rotate(-45deg);
}

/* 排名信号带 —— 顶部第二栏 */
.rank-rail {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg,
      rgba(53, 240, 208, .12) 0%,
      rgba(53, 240, 208, .04) 34%,
      rgba(255, 122, 51, .09) 72%,
      rgba(11, 27, 43, 0) 100%);
}

.rank-rail__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding: 8px var(--wrap-pad);
}

.rank-rail__pulse {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  animation: rail-pulse 2.4s var(--ease) infinite;
}

@keyframes rail-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(53, 240, 208, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(53, 240, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 240, 208, 0); }
}

.rank-rail__label {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper-faint);
  white-space: nowrap;
}

.rank-rail__link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--neon);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 240, 208, .38);
  padding-bottom: 1px;
  white-space: nowrap;
  transition: border-color .22s var(--ease), color .22s var(--ease);
}

.rank-rail__link:hover {
  color: #7DFCE4;
  border-bottom-color: var(--neon);
}

.rank-rail__timer {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--paper-dim);
}

/* ---------- 8. Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--btn-line);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), transform .22s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--signal {
  --btn-bg: var(--signal);
  --btn-fg: #1A0C04;
  --btn-line: var(--signal);
}

.btn--signal:hover {
  --btn-bg: var(--signal-lift);
  --btn-line: var(--signal-lift);
}

.btn--neon {
  --btn-fg: var(--neon);
  --btn-line: var(--neon);
}

.btn--neon:hover {
  --btn-bg: rgba(53, 240, 208, .13);
}

.btn--ghost {
  --btn-fg: var(--paper-dim);
  --btn-line: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: rgba(242, 239, 230, .07);
  --btn-fg: var(--paper);
  --btn-line: rgba(242, 239, 230, .5);
}

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

/* ---------- 9. Mobile navigation ---------- */
@media (max-width: 960px) {
  .site-header__actions { flex: 0 0 auto; }
  .site-header__actions .btn--ghost { display: none; }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 140;
    margin-left: 0;
    padding: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: rgba(18, 41, 63, .98);
    box-shadow: var(--shadow-paper);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .site-nav__link {
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 16px;
  }

  .site-nav__cta {
    display: flex;
    width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 620px) {
  .site-header__actions { display: none; }
  .brand__mark { width: 38px; height: 38px; font-size: 12px; }
  .brand__name { font-size: 17px; }
  .brand__tagline { font-size: 9.5px; letter-spacing: .18em; }
  .rank-rail__link { display: none; }
  .rank-rail__timer { font-size: 12px; }
}

/* ---------- 10. Footer ---------- */
.site-footer {
  margin-top: clamp(56px, 9vw, 120px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 41, 63, .88), var(--ink-900));
  color: var(--paper-dim);
}

.site-footer__inner {
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 66px) var(--wrap-pad) clamp(20px, 3vw, 32px);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(230px, 1.05fr) minmax(0, 2.5fr);
  gap: clamp(26px, 4vw, 56px);
  padding-bottom: clamp(24px, 4vw, 42px);
  border-bottom: 1px solid var(--line);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand--footer .brand__mark {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.brand--footer .brand__name { font-size: 17px; }

.site-footer__note {
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--paper-faint);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 32px);
}

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--neon);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col__list a {
  font-size: 14.5px;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}

.footer-col__list a:hover {
  color: var(--paper);
  padding-left: 4px;
}

.site-footer__contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px clamp(18px, 3vw, 36px);
  padding: clamp(20px, 3vw, 32px) 0;
  border-bottom: 1px solid var(--line);
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  color: var(--paper-dim);
}

.contact-line .label { min-width: 66px; }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 26px;
  padding-top: 18px;
  font-size: 12.5px;
  color: var(--paper-faint);
}

.site-footer__copy { letter-spacing: .04em; }

.site-footer__icp {
  font-family: var(--font-data);
  letter-spacing: .08em;
}

@media (max-width: 960px) {
  .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .footer-nav { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* ---------- 11. Content primitives ---------- */
.breadcrumb {
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--paper-faint);
}

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

.breadcrumb a {
  color: var(--paper-dim);
  text-decoration: none;
  transition: color .2s var(--ease);
}

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

.breadcrumb li + li::before {
  content: "／";
  margin-right: 8px;
  color: rgba(242, 239, 230, .22);
}

.prose {
  max-width: 68ch;
  color: rgba(242, 239, 230, .84);
  font-size: 16px;
  line-height: 1.75;
}

.prose p + p { margin-top: 1em; }

.prose h2 {
  margin: 1.9em 0 .6em;
  font-size: clamp(22px, 3vw, 32px);
}

.prose h3 {
  margin: 1.6em 0 .5em;
  font-size: clamp(18px, 2vw, 22px);
}

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose ul,
.prose ol {
  margin: 1em 0;
  padding-left: 1.3em;
  list-style: disc;
}

.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }

@media (min-width: 900px) {
  .prose { font-size: 18px; }
}

.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--ink-800);
}

.panel--paper {
  background: var(--paper-tint);
  border-color: rgba(11, 27, 43, .16);
  color: var(--ink-900);
}

.panel--paper h2,
.panel--paper h3 { color: var(--ink-900); }

.panel--paper .label,
.panel--paper .side-note { color: rgba(11, 27, 43, .5); }

.paper-stack {
  box-shadow:
    6px 6px 0 -1px var(--ink-900),
    6px 6px 0 0 var(--line),
    12px 12px 0 -1px var(--ink-900),
    12px 12px 0 0 var(--line);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.6;
  color: var(--paper-dim);
  white-space: nowrap;
}

.tag--up {
  color: var(--up);
  border-color: rgba(47, 208, 138, .45);
  background: rgba(47, 208, 138, .1);
}

.tag--down {
  color: var(--signal);
  border-color: rgba(255, 122, 51, .45);
  background: rgba(255, 122, 51, .1);
}

.tag--local {
  color: var(--moss);
  border-color: rgba(124, 154, 94, .5);
  background: rgba(124, 154, 94, .12);
}

.tag--paper {
  color: var(--ink-900);
  border-color: var(--paper-tint);
  background: var(--paper-tint);
}

/* ---------- 12. Responsive image containers ---------- */
.figure {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background-color: var(--ink-800);
  background-image:
    radial-gradient(120% 90% at 14% 8%, rgba(53, 240, 208, .18), transparent 62%),
    radial-gradient(100% 80% at 92% 96%, rgba(255, 122, 51, .14), transparent 64%),
    linear-gradient(160deg, var(--ink-800), var(--ink-900));
}

.figure > img,
.figure > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--wide { aspect-ratio: 21 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--1x1  { aspect-ratio: 1 / 1; }
.figure--tall { aspect-ratio: 3 / 4; }

.figure__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 14px 12px;
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--paper-dim);
  background: linear-gradient(180deg, rgba(11, 27, 43, 0), rgba(11, 27, 43, .92));
}

.figure__badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

/* ---------- 13. Reveal & progress ---------- */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
  will-change: opacity, transform;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--neon), var(--up) 55%, var(--signal));
}

/* ---------- 14. Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .btn:hover { transform: none; }

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

  .rank-rail__pulse { animation: none; }
}
