/* =========================================================
   天博赛场 · /assets/site.css
   共享外壳：设计变量 / 中文排版 / 左轨页头 / 轻量页脚 / 基础组件
   设计语言：夜场转播台——深墨蓝底、信号橙操作点、草皮绿数据点
   ========================================================= */

:root {
  --ink: #0B1420;
  --panel: #131F2E;
  --track: #1B2C40;
  --orange: #FF6A2A;
  --orange-deep: #C94A16;
  --green: #3DDC97;
  --mint: #A7F3D0;
  --paper: #F4EBDD;
  --text: #EAF2F8;
  --muted: #9FB0C0;
  --line: #2A3B4F;
  --amber: #FFD166;

  --rail-w: 15.5rem;
  --header-h: 3.75rem;
  --gutter: clamp(1rem, 3.2vw, 2.75rem);
  --maxw: 74rem;

  --font-display: "Barlow Condensed", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 0 rgba(234, 242, 248, .04), 0 14px 34px -20px rgba(0, 0, 0, .95);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

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

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: clamp(.95rem, .9rem + .18vw, 1.05rem);
  line-height: 1.75;
  color: var(--text);
  background-color: var(--ink);
  background-image:
    radial-gradient(70rem 38rem at 88% -8%, rgba(255, 106, 42, .085), transparent 62%),
    radial-gradient(56rem 34rem at 2% 104%, rgba(61, 220, 151, .07), transparent 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
main { display: block; }
a { color: inherit; }
button { font: inherit; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }

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

::selection { background: rgba(255, 106, 42, .35); color: #fff; }

/* ---------- 中文排版 ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .01em;
  text-wrap: balance;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.12rem, 1.9vw, 1.45rem); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: .98;
  letter-spacing: -.012em;
  margin: 0;
}

.lede {
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  line-height: 1.85;
  color: #C6D5E2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 .8rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  flex: none;
}

.annotation {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
}

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

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

.section { padding-block: clamp(2.25rem, 5vw, 4rem); }

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 1rem);
}

.grid {
  display: grid;
  gap: clamp(.8rem, 1.6vw, 1.3rem);
}
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 47.9375rem) {
  .grid--12 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

.dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, .16);
}

/* ---------- 面板 / 标签 ---------- */
.panel {
  position: relative;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: linear-gradient(180deg, rgba(27, 44, 64, .58), rgba(19, 31, 46, .88));
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.panel:hover {
  transform: translateY(-3px);
  border-color: #3A5170;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .22rem .55rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(27, 44, 64, .65);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tag--live {
  color: var(--green);
  border-color: rgba(61, 220, 151, .42);
  background: rgba(61, 220, 151, .1);
}
.tag--data {
  color: var(--mint);
  border-color: rgba(167, 243, 208, .3);
  background: rgba(167, 243, 208, .08);
}
.tag--key {
  color: var(--ink);
  border-color: var(--orange);
  background: var(--orange);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .68rem 1rem;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), transform .16s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  color: #0B1420;
  background: var(--orange);
  border-color: var(--orange);
}
.btn--primary:hover {
  color: #fff;
  background: var(--orange-deep);
  border-color: var(--orange-deep);
}
.btn--ghost {
  color: var(--text);
  background: rgba(27, 44, 64, .5);
  border-color: var(--line);
}
.btn--ghost:hover {
  background: rgba(27, 44, 64, .95);
  border-color: #3A5170;
}
.btn--block { width: 100%; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; gap: .45rem; }
.breadcrumb li + li::before { content: "/"; color: #3A5170; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* ---------- 可复用图片容器（页面阶段放图） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(61, 220, 151, .16), transparent 58%),
    radial-gradient(90% 80% at 92% 104%, rgba(255, 106, 42, .2), transparent 56%),
    linear-gradient(160deg, #182742, #0B1420 72%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(234, 242, 248, .045) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* =========================================================
   页头 · 左侧轨道
   ========================================================= */
.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 200;
  padding: .6rem 1rem;
  font-weight: 700;
  text-decoration: none;
  color: #0B1420;
  background: var(--amber);
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform .18s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  outline-offset: 2px;
}

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  background: linear-gradient(180deg, #10202F 0%, #0B1420 56%, #09121B 100%);
  border-right: 1px solid var(--line);
}
.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(255, 106, 42, .6) 0%,
    rgba(61, 220, 151, .28) 42%,
    transparent 88%);
  pointer-events: none;
}

.rail-bar {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.35rem 1.15rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  text-decoration: none;
  color: var(--text);
}
.brand__mark {
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1;
}
.brand__slash { color: var(--orange); }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
}
.brand__meta {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .45rem .7rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(27, 44, 64, .72);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) 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(-6px) rotate(-45deg); }

.rail-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem 1.1rem 1.25rem;
  overflow-y: auto;
}
.rail-nav::-webkit-scrollbar { width: 4px; }
.rail-nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.rail-nav__label {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .75rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: #6C8199;
}
.rail-nav__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail-nav__list a {
  position: relative;
  display: block;
  padding: .58rem .55rem .58rem .9rem;
  font-size: .95rem;
  font-weight: 500;
  color: #B9C9D8;
  text-decoration: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.rail-nav__list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--orange);
  transform: translateY(-50%);
  transition: height .2s var(--ease);
}
.rail-nav__list a:hover {
  color: var(--text);
  background: rgba(27, 44, 64, .6);
}
.rail-nav__list a:hover::before { height: 50%; }
.rail-nav__list a[aria-current="page"] {
  padding-right: 1.7rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 106, 42, .18), rgba(255, 106, 42, 0));
}
.rail-nav__list a[aria-current="page"]::before { height: 72%; }
.rail-nav__list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: .6rem;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, .18);
  transform: translateY(-50%);
}

.rail-cta {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: 1rem;
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.rail-foot__link {
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
}
.rail-foot__link:hover { color: var(--text); text-decoration: underline; }
.rail-foot__status {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: .55rem 0 0;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--muted);
}

.nav-scrim {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 75;
  background: rgba(4, 9, 16, .66);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}
.nav-scrim[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}
@media (min-width: 64rem) {
  .nav-scrim { display: none; }
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  color: var(--text);
  background: linear-gradient(180deg, rgba(19, 31, 46, .92) 0%, #09111A 100%);
  border-top: 1px solid var(--line);
}
.footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.25rem) var(--gutter) 1.4rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.footer__brand .brand {
  flex-direction: row;
  align-items: baseline;
  gap: .6rem;
  margin-bottom: .8rem;
}
.footer__brand .brand__name { font-size: 1.15rem; letter-spacing: .1em; }
.footer__tagline {
  max-width: 27ch;
  margin: 0 0 1rem;
  font-size: .92rem;
  color: #B9C9D8;
}
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  font-size: .85rem;
  color: var(--muted);
}
.footer__contact-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem;
  word-break: break-word;
}
.footer__contact-item .mono {
  font-size: .64rem;
  letter-spacing: .18em;
  color: #6C8199;
}

.footer__title {
  margin: 0 0 .85rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #7E93A8;
}
.footer__list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer__list a {
  font-size: .92rem;
  color: #C6D5E2;
  text-decoration: none;
}
.footer__list a:hover { color: var(--orange); text-decoration: underline; }

.footer__address {
  margin: 0 0 .7rem;
  font-size: .9rem;
  line-height: 1.7;
  color: #C6D5E2;
}
.footer__note {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.5rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-top: 1.1rem;
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer__copy,
.footer__icp {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}
.footer__legal a {
  color: var(--muted);
  text-decoration: none;
}
.footer__legal a:hover { color: var(--text); text-decoration: underline; }
@media (min-width: 64rem) {
  .footer__icp { margin-inline-start: auto; }
}

/* =========================================================
   滚动进度（JS 注入于 body 内的 .rail-progress）
   ========================================================= */
.rail-progress {
  position: fixed;
  top: 0;
  left: calc(var(--rail-w) - 2px);
  z-index: 78;
  width: 2px;
  height: 0;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(180deg, var(--green), var(--orange));
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.rail-progress[data-visible="true"] { opacity: 1; }
@media (max-width: 63.9375rem) {
  .rail-progress { display: none; }
}

/* =========================================================
   页面显现
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    transition: opacity .55s var(--ease), transform .55s var(--ease);
  }
  [data-reveal].is-pending {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* =========================================================
   响应式：平板与手机
   ========================================================= */
@media (min-width: 64rem) {
  body { padding-left: var(--rail-w); }
}

@media (max-width: 63.9375rem) {
  body.is-nav-open { overflow: hidden; }

  .site-header {
    position: sticky;
    top: 0;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    min-height: var(--header-h);
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 20, 32, .95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .site-header::after { display: none; }

  .rail-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: var(--header-h);
    padding: .55rem 1rem;
    border-bottom: 0;
  }

  .brand {
    flex-direction: row;
    align-items: baseline;
    gap: .6rem;
  }
  .brand__mark { font-size: .8rem; }
  .brand__name { font-size: 1.12rem; letter-spacing: .08em; }
  .brand__meta { display: none; }

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

  .rail-nav {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(88vw, 21rem);
    padding: 1.25rem 1.15rem 1.5rem;
    background: linear-gradient(180deg, #101C2A 0%, #0B1420 82%);
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .95);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform .22s var(--ease), visibility 0s linear .22s;
  }
  .rail-nav[data-open="true"] {
    transform: none;
    visibility: visible;
    transition: transform .22s var(--ease), visibility 0s linear 0s;
  }

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

@media (max-width: 47.9375rem) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__base { flex-direction: column; align-items: flex-start; gap: .55rem; }
  .footer__legal { gap: .9rem; }
}

/* =========================================================
   降低动效
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .panel:hover { transform: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span { transform: none; }
}
