/* =========================================================
   竞博看台 · 共享站点样式 /assets/site.css
   夜间看台 × 数据指挥舱
   ========================================================= */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, blockquote, dl, dd {
  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;
  cursor: pointer;
}

a { color: inherit; }

table { border-collapse: collapse; }

/* ---------- tokens ---------- */
:root {
  --ink: #06120F;
  --ink-2: #0C211B;
  --panel: #12332A;
  --paper: #D8E6E0;
  --white: #F2F7F4;
  --muted: #8FB3A6;
  --cyan: #21F3C8;
  --orange: #FF5A1F;
  --amber: #FFB937;
  --line: #1B4A3F;

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bar-h: 64px;
  --rail-w: 0px;
  --maxw: 1280px;
  --gutter: clamp(18px, 4vw, 56px);
  --cut: 18px;
  --ease: cubic-bezier(.22, .72, .2, 1);
  --focus: #21F3C8;
}

@media (min-width: 1024px) {
  :root { --bar-h: 68px; --rail-w: 92px; }
}

/* ---------- base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--white);
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 80% at 10% -12%, rgba(33, 243, 200, .07), transparent 62%),
    radial-gradient(90% 70% at 100% 0%, rgba(255, 90, 31, .055), transparent 58%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--bar-h);
  padding-left: var(--rail-w);
  transition: padding-left .28s var(--ease);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

p { line-height: 1.75; }

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

::selection { background: var(--cyan); color: #04231E; }

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

#main-content {
  scroll-margin-top: calc(var(--bar-h) + 14px);
}

/* ---------- utilities ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

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

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--cyan);
  flex: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--muted);
  max-width: 62ch;
}

.mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
}

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

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #04231E;
  background: var(--cyan);
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

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

/* ---------- header shell ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: rgba(6, 18, 15, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: var(--bar-h);
  padding: 0 clamp(14px, 3vw, 30px);
}

/* ---------- brand ---------- */
.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  text-decoration: none;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--white);
  white-space: nowrap;
}

.brand-name::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  vertical-align: .18em;
  background: var(--cyan);
}

.brand-sub {
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--muted);
  white-space: nowrap;
}

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

/* ---------- header actions ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link {
  padding: 6px 2px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}

.header-link:hover,
.header-link:focus-visible {
  color: var(--white);
  border-bottom-color: var(--cyan);
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .38) 50%, transparent 60%);
  transform: translateX(-125%);
  transition: transform .55s var(--ease);
  pointer-events: none;
}

.btn:hover::after { transform: translateX(125%); }

.btn--sm { padding: 8px 14px; font-size: 13px; }

.btn--amber {
  background: var(--amber);
  color: #1B1200;
}

.btn--amber:hover { background: #FFCE72; }

.btn--cyan {
  background: var(--cyan);
  color: #04231E;
}

.btn--cyan:hover { background: #6CF9DC; }

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

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

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

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

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

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bars i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform .24s var(--ease), opacity .24s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child {
  transform: translateY(2.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

.nav-toggle-text { font-family: var(--font-display); }

/* ---------- rail navigation (desktop spine) ---------- */
.rail-nav {
  position: fixed;
  left: 0;
  top: var(--bar-h);
  bottom: 0;
  z-index: 70;
  width: min(320px, 84vw);
  display: flex;
  flex-direction: column;
  padding: calc(var(--bar-h) + 18px) 0 20px;
  background: var(--ink-2);
  border-right: 1px solid var(--cyan);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  transform: translateX(-104%);
  transition: transform .34s var(--ease);
  box-shadow: 22px 0 60px rgba(0, 0, 0, .55);
}

.rail-nav[data-open="true"] { transform: translateX(0); }

.rail-list {
  display: flex;
  flex-direction: column;
}

.rail-item + .rail-item { border-top: 1px solid var(--line); }

.rail-link {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.rail-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 100%;
  transform: translateY(-50%);
  background: rgba(33, 243, 200, .07);
  transition: width .24s var(--ease);
  pointer-events: none;
}

.rail-num {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(143, 179, 166, .75);
  transition: color .2s var(--ease);
}

.rail-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
  writing-mode: horizontal-tb;
}

.rail-link:hover,
.rail-link:focus-visible {
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.rail-link:hover::before { width: 100%; }

.rail-link[aria-current="page"] {
  color: var(--cyan);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.rail-link[aria-current="page"]::before { width: 100%; }

.rail-link[aria-current="page"] .rail-num { color: var(--cyan); }

/* ---------- nav scrim ---------- */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(2, 10, 8, .74);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}

.nav-scrim[data-active="true"] {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(33, 243, 200, .13);
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transition: width .09s linear;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 112px);
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0 16%, var(--line) 16% 100%);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(26px, 4vw, 48px);
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 68px) var(--gutter) clamp(24px, 3vw, 44px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.brand--footer { gap: 6px; align-self: flex-start; }

.brand--footer .brand-name { font-size: 24px; }

.brand--footer .brand-name::after {
  width: 8px;
  height: 8px;
  background: var(--amber);
}

.footer-tagline {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--cyan);
}

.footer-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

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

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.footer-col-title::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--cyan);
  flex: none;
}

.footer-list li + li { margin-top: 9px; }

.footer-list a {
  display: inline-block;
  font-size: 14.5px;
  color: rgba(242, 247, 244, .82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-contact li {
  display: grid;
  gap: 2px;
}

.footer-contact li + li { margin-top: 13px; }

.footer-contact-label {
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: rgba(143, 179, 166, .72);
}

.footer-contact-value {
  font-size: 14px;
  line-height: 1.65;
  color: var(--white);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 16px var(--gutter) 26px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

.footer-legal-item { line-height: 1.6; }

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ---------- shared components ---------- */
.cut-panel {
  padding: clamp(18px, 3vw, 34px);
  background: var(--panel);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}

.cut-panel--cyan { box-shadow: inset 3px 0 0 var(--cyan); }

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

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }

.stack > * + * { margin-top: var(--stack-gap, 16px); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.tag--live {
  color: var(--cyan);
  border-color: rgba(33, 243, 200, .45);
  background: rgba(33, 243, 200, .07);
}

.tag--next {
  color: var(--orange);
  border-color: rgba(255, 90, 31, .5);
  background: rgba(255, 90, 31, .07);
}

.tag--member {
  color: var(--amber);
  border-color: rgba(255, 185, 55, .5);
  background: rgba(255, 185, 55, .07);
}

.breadcrumb {
  font-size: 12.5px;
  color: var(--muted);
}

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

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

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

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

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

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

/* ---------- responsive media frames ---------- */
.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--ink-2);
  background-image:
    repeating-linear-gradient(90deg, rgba(33, 243, 200, .055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(33, 243, 200, .055) 0 1px, transparent 1px 72px),
    linear-gradient(160deg, #0C211B 0%, #06120F 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

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

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-caption {
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: var(--muted);
}

/* ---------- reveal ---------- */
[data-reveal] { opacity: 1; }

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}

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

/* ---------- tablet / desktop ---------- */
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

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

  .rail-nav {
    top: var(--bar-h);
    bottom: 0;
    width: var(--rail-w);
    padding: 14px 0;
    transform: none;
    border-right: 1px solid var(--line);
    box-shadow: none;
    background: var(--ink-2);
  }

  .rail-link {
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 11px 6px;
    box-shadow: none;
  }

  .rail-link::before { display: none; }

  .rail-num { display: none; }

  .rail-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 13px;
    letter-spacing: .16em;
    line-height: 1.2;
  }

  .rail-link:hover,
  .rail-link:focus-visible {
    color: var(--white);
    box-shadow: inset 0 0 0 0 transparent, inset 2px 0 0 var(--cyan);
    background: rgba(33, 243, 200, .05);
  }

  .rail-link[aria-current="page"] {
    color: var(--cyan);
    box-shadow: inset 2px 0 0 var(--cyan);
    background: rgba(33, 243, 200, .07);
  }
}

@media (min-width: 1080px) {
  .footer-inner { grid-template-columns: 1.35fr 1fr 1fr 1fr 1.25fr; }
  .footer-brand { grid-column: auto; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .header-link { display: none; }
  .brand-name { font-size: 17px; }
  .brand-sub { font-size: 9.5px; letter-spacing: .1em; }
  .btn--sm { padding: 7px 11px; font-size: 12.5px; }
  .header-actions { gap: 8px; }
  .footer-legal { font-size: 12px; }
}

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

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

  .rail-nav { transition: none; }
  .scroll-progress-bar { transition: none; }
  [data-reveal],
  .js-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
