/* ==========================================================================
   悟空赛事 · 赛季轮次面板 — 共享站点样式 /assets/site.css
   1 重置  2 变量  3 中文排版  4 布局容器  5 基础组件
   6 侧边轨道头部  7 页脚  8 响应式  9 动效与无障碍
   ========================================================================== */

/* 1 重置 ---------------------------------------------------------------- */
*, *::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, dt, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* 2 变量 ---------------------------------------------------------------- */
:root {
  --gold: #F2B705;
  --gold-hi: #FFD75E;
  --ink: #0B1F33;
  --ink-card: #12314E;
  --ink-deep: #071A2B;
  --home: #E4572E;
  --away: #2EC4B6;
  --cloud: #F7F4EE;
  --mist: #A9B6C7;
  --slate: #16324A;
  --line: #3E6E8E;

  --paper: #F7F4EE;
  --paper-ink: #16324A;
  --paper-dim: #4E6274;

  --hairline: rgba(62, 110, 142, .45);
  --hairline-soft: rgba(62, 110, 142, .28);
  --gold-line: rgba(242, 183, 5, .55);

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow: 0 2px 8px rgba(7, 26, 43, .35);
  --rail-w: 104px;
  --bar-h: 64px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root { --paper: #0F2438; --paper-ink: #E9EFF5; --paper-dim: #A9B6C7; }
}

/* 3 中文排版 ------------------------------------------------------------ */
body {
  background: var(--ink);
  color: var(--cloud);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.display {
  font-size: clamp(2.75rem, 5.4vw, 3.75rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.005em;
  transform: skewX(-3deg);
  transform-origin: left bottom;
}
.h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 900; line-height: 1.2; letter-spacing: -.005em; }
.h3 { font-size: 1.375rem; font-weight: 500; line-height: 1.35; }
.lede { font-size: 1.0625rem; line-height: 1.75; color: var(--mist); max-width: 40ch; }
.mono { font-family: var(--font-mono); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-serif);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}

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

/* 4 布局容器 ------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.wrap--narrow { max-width: 760px; }
#main-content { display: block; scroll-margin-top: calc(var(--bar-h) + 8px); }

.section { position: relative; padding: 68px 0; }
.section--light { background: var(--paper); color: var(--paper-ink); }
.section--light .lede { color: var(--paper-dim); }
.section--light .eyebrow { color: #9A7400; }
.section--deep { background: var(--ink-deep); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 34px; }
.section-head .h2 { max-width: 24ch; }

.split { display: grid; grid-template-columns: 1fr; gap: 30px; }
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.divider { height: 1px; border: 0; background: var(--hairline-soft); }
.arc-divider {
  display: block; width: 100%; height: 44px;
  border-top: 3px solid var(--gold);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  opacity: .75;
}

/* 5 基础组件 ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  font-size: .875rem; font-weight: 500; letter-spacing: .04em;
  text-decoration: none; border: 1px solid transparent; background: transparent;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn--sm { padding: 7px 14px; font-size: .8125rem; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #0B1F33; }
.btn-gold:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn-ghost { border-color: var(--hairline); color: var(--cloud); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.section--light .btn-ghost { color: var(--paper-ink); border-color: rgba(22, 50, 74, .28); }
.section--light .btn-ghost:hover { color: #8A6A00; border-color: var(--gold); }

.card {
  position: relative;
  background: var(--ink-card);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card--light { background: var(--paper); color: var(--paper-ink); border-color: rgba(22, 50, 74, .14); }
.card-num { font-family: var(--font-serif); font-size: 12px; letter-spacing: .2em; color: var(--gold); display: block; margin-bottom: 10px; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  padding: 3px 9px; border: 1px solid var(--hairline); color: var(--mist);
}
.tag--gold { border-color: var(--gold-line); color: var(--gold); }
.tag--home { border-color: rgba(228, 87, 46, .6); color: var(--home); }
.tag--away { border-color: rgba(46, 196, 182, .6); color: var(--away); }

.breadcrumb { margin-bottom: 22px; }
.breadcrumb ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--line);
}
.breadcrumb li + li::before { content: "/"; }
.breadcrumb a { color: var(--mist); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-hi); }

.media-frame {
  position: relative; display: block; width: 100%; overflow: hidden;
  border: 1px solid var(--hairline);
  background:
    repeating-linear-gradient(135deg, rgba(62, 110, 142, .12) 0 1px, transparent 1px 13px),
    linear-gradient(180deg, #0E2740, var(--ink));
  box-shadow: var(--shadow);
}
.media-frame > img, .media-frame > svg { width: 100%; height: 100%; object-fit: cover; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.media-caption {
  margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--mist);
}
.section--light .media-caption { color: var(--paper-dim); }

/* 6 侧边轨道头部 -------------------------------------------------------- */
.skip-link {
  position: absolute; top: -60px; left: 12px; z-index: 300;
  padding: 10px 16px;
  background: var(--gold); color: #0B1F33;
  font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 10px; }

.site-rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail-w);
  z-index: 120; display: flex; flex-direction: column;
  padding: 16px 0 0;
  background: linear-gradient(180deg, #0B1F33 0%, #091B2D 58%, var(--ink-deep) 100%);
  border-right: 1px solid var(--hairline);
}

.rail-progress {
  position: absolute; top: 0; right: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  transform: scaleY(0); transform-origin: top center;
  pointer-events: none;
}

.rail-brand {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 2px 8px 16px;
  border-bottom: 1px solid var(--hairline-soft);
}
.brand-mark { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--cloud); }
.brand-glyph { display: block; width: 42px; height: 42px; flex: none; }
.brand-glyph path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.brand-glyph circle { fill: var(--gold); }
.brand-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brand-cn {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 15px; font-weight: 900; letter-spacing: .12em; line-height: 1;
}
.brand-en { display: none; font-family: var(--font-mono); font-size: 9px; letter-spacing: .22em; color: var(--line); }
.rail-tag {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 10.5px; letter-spacing: .2em; color: var(--line);
}

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--hairline); color: var(--cloud);
  font-size: 13px; letter-spacing: .06em;
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold-hi); }
.nav-toggle-bars { position: relative; display: block; width: 16px; height: 2px; background: var(--gold); }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: var(--gold);
  transition: transform .2s var(--ease);
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.site-rail[data-open] .nav-toggle-bars { background: transparent; }
.site-rail[data-open] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.site-rail[data-open] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.rail-drawer { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.rail-nav { flex: 1 1 auto; min-height: 0; }

.rail-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 12px 8px;
}
.rail-link {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  min-height: 88px; padding: 11px 4px 12px;
  text-decoration: none; color: var(--mist);
  border: 1px solid transparent;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.rail-link:hover { color: var(--gold-hi); background: rgba(242, 183, 5, .07); border-color: rgba(242, 183, 5, .35); }
.rail-link:focus-visible { color: var(--gold-hi); border-color: var(--gold); outline: none; }
.rail-link[aria-current="page"] {
  color: var(--gold);
  background: linear-gradient(180deg, rgba(242, 183, 5, .18), rgba(242, 183, 5, .04));
  border-color: rgba(242, 183, 5, .65);
}
.rail-link[aria-current="page"] .rail-index { color: var(--gold); }
.rail-link[aria-current="page"]::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--gold);
}
.rail-index { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--line); }
.rail-label {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 12.5px; font-weight: 500; letter-spacing: .14em; line-height: 1;
}
.rail-link::after {
  content: attr(data-label);
  position: absolute; left: calc(100% + 12px); top: 50%;
  transform: translate(-6px, -50%);
  padding: 6px 12px; white-space: nowrap;
  writing-mode: horizontal-tb; letter-spacing: .04em;
  background: var(--ink-card); color: var(--cloud);
  border: 1px solid var(--gold-line); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; z-index: 5;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.rail-link:hover::after, .rail-link:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

.rail-foot {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 14px 10px 18px;
  border-top: 1px solid var(--hairline-soft);
}
.status-chip {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .7; box-shadow: 0 0 0 0 rgba(242, 183, 5, .5); }
  50% { opacity: 1; box-shadow: 0 0 0 7px rgba(242, 183, 5, 0); }
}
.status-text { font-size: 10px; line-height: 1.5; color: var(--mist); }
.device-hint { font-size: 9.5px; line-height: 1.45; color: var(--away); text-align: center; }
.rail-cta { width: 100%; padding: 9px 6px; font-size: 12px; }

/* 7 页脚 ---------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: 72px;
  padding-bottom: 26px;
  background: var(--ink-deep);
  color: var(--mist);
  overflow: hidden;
}
.footer-arc {
  display: block; width: 100%; height: 52px;
  border-top: 3px solid var(--gold-line);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.footer-inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding: 4px 20px 32px;
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
.footer-mark {
  display: inline-block;
  font-size: 24px; font-weight: 900; color: var(--cloud);
  text-decoration: none;
  transform: skewX(-3deg); transform-origin: left bottom;
}
.footer-mark:hover { color: var(--gold-hi); }
.footer-sub { margin-top: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--line); }
.footer-meta { margin-top: 14px; font-size: 13px; color: var(--mist); }
.footer-meta .mono { color: var(--gold); }

.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 26px; }
.footer-col-title {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 12px;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; color: var(--gold);
}
.col-num { font-family: var(--font-serif); font-size: 11px; letter-spacing: .1em; color: var(--line); }
.footer-list { display: flex; flex-direction: column; gap: 9px; }
.footer-list a {
  font-size: 14px; color: var(--mist); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-list a:hover, .footer-list a:focus-visible { color: var(--gold-hi); border-bottom-color: var(--gold); }

.footer-contact {
  display: flex; flex-wrap: wrap; gap: 12px 34px;
  padding: 20px max(20px, calc((100% - var(--maxw)) / 2));
  border-top: 1px solid var(--hairline-soft);
  border-bottom: 1px solid var(--hairline-soft);
}
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13.5px; }
.contact-label { font-family: var(--font-serif); font-size: 11px; letter-spacing: .2em; color: var(--line); }
.contact-value { color: var(--cloud); }
.btn-copy {
  padding: 4px 10px;
  font-size: 11px; letter-spacing: .1em;
  border: 1px solid var(--gold-line); color: var(--gold);
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn-copy:hover { background: rgba(242, 183, 5, .12); }
.btn-copy[data-copied] { border-color: var(--away); color: var(--away); }

.footer-bottom {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding: 18px 20px 4px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--line);
}
.footer-legal { letter-spacing: .04em; }
.footer-copy { font-family: var(--font-mono); letter-spacing: .04em; }

/* 8 响应式 -------------------------------------------------------------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 84px 0; }
}

@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  #main-content { scroll-margin-top: 0; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 5fr 7fr; gap: 48px; }
  .split--wide { grid-template-columns: 4fr 8fr; }
  .footer-inner { grid-template-columns: minmax(200px, 4fr) 8fr; gap: 48px; }
  .section { padding: 96px 0; }
}

@media (min-width: 1024px) and (max-height: 780px) {
  .rail-tag { display: none; }
  .brand-cn { font-size: 13px; }
  .rail-link { min-height: 80px; padding: 9px 4px 10px; }
  .rail-foot { padding: 10px 10px 12px; }
}

@media (max-width: 1023px) {
  body { padding-left: 0; padding-top: var(--bar-h); }

  .site-rail {
    right: 0; bottom: auto; width: auto; height: var(--bar-h);
    flex-direction: row; align-items: center; gap: 10px;
    padding: 0 14px;
    border-right: 0; border-bottom: 1px solid var(--hairline);
  }
  .rail-progress {
    top: auto; bottom: 0; left: 0; right: 0;
    width: auto; height: 3px;
    background: linear-gradient(90deg, var(--gold-hi), var(--gold));
    transform: scaleX(0); transform-origin: left center;
  }

  .rail-brand {
    flex: 1 1 auto; min-width: 0;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 0; border-bottom: 0;
  }
  .brand-mark { flex-direction: row; align-items: center; gap: 10px; }
  .brand-glyph { width: 30px; height: 30px; }
  .brand-text { align-items: flex-start; gap: 2px; }
  .brand-cn { writing-mode: horizontal-tb; text-orientation: mixed; font-size: 15px; letter-spacing: .06em; }
  .brand-en { display: block; }
  .rail-tag { display: none; }

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

  .rail-drawer {
    position: fixed; top: var(--bar-h); left: 0; right: 0;
    max-height: 0; overflow: hidden;
    background: #0B1F33;
    border-bottom: 1px solid var(--hairline);
    transition: max-height .3s var(--ease);
  }
  .site-rail[data-open] .rail-drawer {
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
  }

  .rail-list { grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; }
  .rail-link {
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px;
    min-height: 48px; padding: 12px 10px;
  }
  .rail-label { writing-mode: horizontal-tb; text-orientation: mixed; font-size: 14px; letter-spacing: .06em; }
  .rail-link::after { content: none; }
  .rail-link[aria-current="page"]::before { inset: 0 auto 0 0; }

  .rail-foot {
    flex-direction: row; align-items: center; gap: 12px;
    padding: 14px 12px 16px;
    border-top: 1px solid var(--hairline-soft);
  }
  .status-chip { flex-direction: row; align-items: center; gap: 8px; text-align: left; }
  .status-text { font-size: 11.5px; }
  .device-hint { font-size: 11px; }
  .rail-cta { width: auto; margin-left: auto; padding: 9px 16px; font-size: 13px; }
}

/* 9 动效与无障碍 -------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .status-dot { animation: none; opacity: 1; }
  .rail-link::after { transition: none; }
}
