/* ==========================================================================
   九游赛场 · 共享外壳样式 /assets/site.css
   夜间球场灯光下的数据指挥台
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  background: var(--deep);
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); }

/* ---------------------------------------------------------------- 变量 */

:root {
  --deep: #071326;
  --deep-2: #0b1c33;
  --tactical: #0d2542;
  --violet-a: #1b1238;
  --violet-b: #2a1b55;
  --cyan: #38f2d0;
  --cyan-08: rgba(56, 242, 208, 0.08);
  --cyan-14: rgba(56, 242, 208, 0.14);
  --cyan-35: rgba(56, 242, 208, 0.35);
  --orange: #ff7a3d;
  --orange-soft: #ff9463;
  --ice: #eaf4ff;
  --mist: #8fa6c2;
  --green: #2fe08a;
  --red: #ff5c7a;
  --line: #24405f;
  --pale: #d7e7f5;

  --font-display: "DIN Condensed", "Barlow Condensed", "Noto Sans SC",
    "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --shell: 1264px;
  --gutter: clamp(16px, 4vw, 44px);
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------------------------------------------------------------- 焦点 */

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

::selection {
  background: var(--cyan);
  color: #04121a;
}

/* ---------------------------------------------------------------- 通用 */

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

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

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

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

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

.btn-primary {
  background: var(--orange);
  color: #1a0c04;
  box-shadow: 0 6px 18px rgba(255, 122, 61, 0.24);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--orange-soft);
  color: #1a0c04;
}

.btn-ghost {
  background: var(--cyan-08);
  border-color: var(--cyan-35);
  color: var(--cyan);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--cyan-14);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------------------------------------------------------------- 面包屑 */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }

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

.breadcrumbs a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumbs a:hover { color: var(--cyan); border-color: var(--cyan-35); }

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

/* ---------------------------------------------------------------- 正文 */

.prose {
  max-width: 72ch;
  color: var(--ice);
  font-size: 1.02rem;
  line-height: 1.8;
}

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

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.18;
  color: var(--ice);
}

.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin-top: 2em; }
.prose h3 { font-size: clamp(1.2rem, 1.9vw, 1.4rem); margin-top: 1.7em; }

.prose p { color: var(--pale); }

.prose a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid var(--cyan-35); }
.prose a:hover { border-color: var(--cyan); }

.prose ul,
.prose ol {
  padding-left: 1.25em;
  color: var(--pale);
}

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

.prose strong { color: var(--cyan); font-weight: 700; }

.prose blockquote {
  border-left: 2px solid var(--orange);
  padding: 0.2em 0 0.2em 1.1em;
  color: var(--mist);
}

/* ---------------------------------------------------------------- 栅格 */

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

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

.grid--split {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
}

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

/* ---------------------------------------------------------------- 图片容器 */

.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--violet-a) 0%, var(--violet-b) 52%, var(--tactical) 100%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(56, 242, 208, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 242, 208, 0.11) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 12%, #000 0%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 78% 12%, #000 0%, transparent 78%);
  opacity: 0.75;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

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

.media-caption {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}

/* ---------------------------------------------------------------- 滚动显现 */

[data-reveal] {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}

html[data-reveal-active] [data-reveal]:not([data-revealed]) {
  opacity: 0;
  transform: translateY(18px);
}

/* ==========================================================================
   页头 · 命令栏
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 19, 38, 0.94);
  border-bottom: 1px solid var(--line);
  color: var(--ice);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s var(--ease);
}

.site-header[data-condensed] {
  box-shadow: 0 14px 32px rgba(2, 8, 18, 0.55);
}

/* 跳转链接 */
.skip-link {
  position: absolute;
  top: 10px;
  left: var(--gutter);
  z-index: 130;
  padding: 0.6rem 1rem;
  border-radius: 3px;
  background: var(--cyan);
  color: #04121a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.22s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 2px;
}

/* 滚动进度 */
.scroll-meter {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(36, 64, 95, 0.45);
}

.scroll-meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--cyan) 0%, #6ad6ff 52%, var(--orange) 100%);
  transition: transform 0.15s linear;
}

/* 主体行 */
.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 26px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 13px var(--gutter);
  transition: padding 0.26s var(--ease);
}

.site-header[data-condensed] .header-shell { padding-block: 7px; }

/* 品牌 */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
  color: var(--ice);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  background: linear-gradient(150deg, var(--cyan) 0%, #1f9c8a 55%, var(--orange) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.brand-mark-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #071326;
  box-shadow: 0 0 0 3px rgba(7, 19, 38, 0.4);
}

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

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: var(--ice);
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  line-height: 1.4;
  color: var(--cyan);
  opacity: 0.82;
}

/* 同步提示 */
.command-note {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.03em;
  color: var(--mist);
  transition: opacity 0.26s var(--ease);
}

.command-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(56, 242, 208, 0.55);
  animation: command-pulse 2.6s ease-out infinite;
}

@keyframes command-pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 242, 208, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(56, 242, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 242, 208, 0); }
}

.site-header[data-condensed] .command-note { opacity: 0; }

/* 切换按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

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

.nav-toggle[aria-expanded="true"] {
  border-color: var(--cyan);
  background: var(--cyan-14);
  color: var(--cyan);
}

.nav-toggle-bars {
  display: block;
  width: 16px;
  height: 10px;
  flex: none;
  background-image: linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan)),
    linear-gradient(var(--cyan), var(--cyan));
  background-repeat: no-repeat;
  background-size: 100% 2px, 100% 2px, 100% 2px;
  background-position: 0 0, 0 50%, 0 100%;
}

.nav-toggle-label { line-height: 1; }

/* 主导航 */
.primary-nav { flex: none; }

.nav-index {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-index li { display: block; }

.nav-index a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  padding: 0.5rem 0.68rem;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--mist);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.nav-index a:hover,
.nav-index a:focus-visible {
  color: var(--ice);
  background: var(--cyan-08);
  border-color: var(--line);
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: #4b6b8f;
  transition: color 0.2s var(--ease);
}

.nav-index a:hover .nav-idx { color: var(--cyan); }

.nav-index a[aria-current="page"] {
  color: var(--cyan);
  background: var(--cyan-14);
  border-color: var(--cyan-35);
}

.nav-index a[aria-current="page"] .nav-idx { color: var(--cyan); }

/* 右侧直达 */
.header-utility {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.util-link {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.util-link:hover { color: var(--cyan); border-color: var(--cyan-35); }

.util-cta { padding: 0.5rem 0.9rem; font-size: 0.84rem; }

/* 状态轨 */
.header-rail {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 7px var(--gutter) 8px;
  border-top: 1px solid rgba(36, 64, 95, 0.65);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  transition: padding 0.26s var(--ease);
}

.site-header[data-condensed] .header-rail { padding-block: 4px; }

.rail-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.rail-item:first-child { color: var(--ice); }

.rail-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3d5b7d;
}

.rail-dot--live {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.18);
}

/* ==========================================================================
   页脚
   ========================================================================== */

.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: linear-gradient(180deg, #071326 0%, #0b1c33 42%, #0d2542 100%);
  border-top: 1px solid var(--line);
  color: var(--mist);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(56, 242, 208, 0.15) 40%, var(--orange) 100%);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) minmax(0, 2fr);
  gap: clamp(32px, 5vw, 76px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 74px) var(--gutter) clamp(30px, 4vw, 48px);
}

.footer-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.brand-lockup--footer .brand-name { font-size: 1.3rem; }

.footer-tagline {
  max-width: 30ch;
  color: var(--pale);
  font-size: 0.95rem;
  line-height: 1.75;
  opacity: 0.86;
}

.footer-cta { margin-top: 2px; }

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px);
}

.footer-col h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-list {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list a {
  color: var(--ice);
  font-size: 0.93rem;
  text-decoration: none;
  opacity: 0.82;
  transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}

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

.footer-list--contact { gap: 13px; }

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

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.75;
}

.contact-value {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ice);
  opacity: 0.86;
  word-break: break-word;
}

.footer-base {
  border-top: 1px solid var(--line);
  background: rgba(4, 11, 22, 0.45);
}

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 16px var(--gutter) 22px;
  font-size: 0.78rem;
  color: var(--mist);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.footer-base-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-base-links a {
  color: var(--mist);
  font-size: 0.78rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-base-links a:hover {
  color: var(--cyan);
  border-color: var(--cyan-35);
}

/* ==========================================================================
   响应式
   ========================================================================== */

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

@media (max-width: 1179px) {
  .command-note { display: none; }
  .header-utility .util-link { display: none; }

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

  .primary-nav {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    display: none;
    max-height: min(72vh, 540px);
    overflow-y: auto;
    padding: 12px var(--gutter) 22px;
    background: linear-gradient(165deg, var(--violet-a) 0%, #071326 58%, #0a2138 100%);
    border-block: 1px solid var(--line);
    box-shadow: 0 26px 48px rgba(2, 8, 18, 0.6);
  }

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

  .nav-index {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-index a {
    width: 100%;
    padding: 13px 12px;
    font-size: 1rem;
    border: 1px solid transparent;
    border-bottom: 1px solid rgba(36, 64, 95, 0.55);
    border-radius: 0;
  }

  .nav-index a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--cyan);
    border-radius: 0;
  }

  .nav-idx { font-size: 0.7rem; }

  .header-rail { font-size: 0.62rem; letter-spacing: 0.1em; }
}

@media (max-width: 620px) {
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 1.04rem; }
  .brand-sub { font-size: 0.52rem; letter-spacing: 0.18em; }
  .util-cta { padding: 0.46rem 0.72rem; font-size: 0.8rem; }
  .nav-toggle-label { display: none; }
  .nav-toggle { padding: 0.5rem 0.6rem; }
  .footer-columns { grid-template-columns: minmax(0, 1fr); }
  .footer-base-inner { justify-content: flex-start; }
}

@media (max-width: 400px) {
  .header-rail { gap: 10px; font-size: 0.58rem; }
}

/* ==========================================================================
   动效降级
   ========================================================================== */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal],
  html[data-reveal-active] [data-reveal]:not([data-revealed]) {
    opacity: 1;
    transform: none;
  }

  .command-pulse,
  .rail-dot--live {
    animation: none;
    box-shadow: none;
  }
}
