/* =========================================================
   金多宝赛场 · 共享 Site Kit
   夜间赛场指挥台 / 蓝图网格 / 金铜锚点
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --ink: #061A16;
  --ink-2: #0C2B24;
  --ink-3: #0A231D;
  --gold: #C8953F;
  --gold-lite: #E7C77B;
  --cyan: #42E0D0;
  --orange: #F08A3C;
  --ivory: #F6F2E7;
  --mist: #A8B8B0;
  --line: #315046;
  --line-soft: rgba(49, 80, 70, 0.62);
  --line-faint: rgba(49, 80, 70, 0.34);

  --font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;

  --shell: 1320px;
  --gutter: clamp(16px, 4vw, 52px);
  --header-h: 78px;
  --radius-tag: 3px;
  --scroll-progress: 0;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--ink);
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: clamp(15px, 0.32vw + 14.2px, 17px);
  line-height: 1.85;
  color: var(--ivory);
  background-color: var(--ink);
  background-image:
    radial-gradient(115% 70% at 84% -10%, rgba(200, 149, 63, 0.15), transparent 62%),
    radial-gradient(72% 52% at 0% 2%, rgba(66, 224, 208, 0.07), transparent 58%),
    linear-gradient(rgba(49, 80, 70, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 80, 70, 0.14) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 76px 76px, 76px 76px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-position: center top, left top, 0 0, 0 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
a { color: inherit; }

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

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ivory);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); letter-spacing: 0.01em; }
h4 { font-size: 1.02rem; letter-spacing: 0.04em; }

strong { color: var(--ivory); font-weight: 700; }
small { font-size: 0.82em; color: var(--mist); }

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

/* ---------- 4. 焦点与无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  transform: translateY(-180%);
  display: inline-block;
  padding: 0.78em 1.25em;
  background: var(--gold);
  color: var(--ink);
  font: 700 0.9rem/1 var(--font-body);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 0.18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--ivory);
  outline-offset: 2px;
}

/* ---------- 5. 布局容器与栅格 ---------- */
.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.section {
  padding-block: clamp(52px, 8vw, 116px);
}

.section-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: clamp(28px, 4vw, 52px);
  border-top: 1px solid var(--line-soft);
  padding-top: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  display: block;
}

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--rail {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1024px) {
  .grid--rail {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.92em 1.6em;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ivory);
  font: 700 0.92rem/1 var(--font-body);
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.btn--gold:hover { background: var(--gold-lite); border-color: var(--gold-lite); }
.btn--line {
  border-color: var(--line);
  color: var(--ivory);
}
.btn--line:hover { border-color: var(--gold); color: var(--gold-lite); }
.btn--cyan {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(66, 224, 208, 0.06);
}
.btn--cyan:hover { background: rgba(66, 224, 208, 0.16); }

/* ---------- 7. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  padding: 0.34em 0.7em;
  border: 1px solid var(--line);
  border-radius: var(--radius-tag);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: var(--mist);
  background: rgba(12, 43, 36, 0.7);
  white-space: nowrap;
}
.tag--home { color: var(--cyan); border-color: rgba(66, 224, 208, 0.55); }
.tag--away { color: var(--orange); border-color: rgba(240, 138, 60, 0.55); }
.tag--live {
  color: var(--ink);
  background: var(--orange);
  border-color: var(--orange);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--mist);
}
.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.breadcrumb a:hover { color: var(--cyan); border-bottom-color: rgba(66, 224, 208, 0.6); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb [aria-current="page"] { color: var(--gold-lite); }

/* ---------- 9. 正文 ---------- */
.prose {
  max-width: 66ch;
  color: var(--ivory);
}
.prose p { margin: 0 0 1.15em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.6em; color: var(--gold-lite); }
.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(66, 224, 208, 0.45);
}
.prose a:hover { border-bottom-color: var(--cyan); }
.prose ul,
.prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 0.4em 0 0.4em 1.2em;
  border-left: 2px solid var(--gold);
  color: var(--mist);
}

/* ---------- 10. 图片容器基础（页面阶段填充图片） ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.06);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 26, 22, 0) 44%, rgba(6, 26, 22, 0.74) 100%);
}
.media--tall { aspect-ratio: 3 / 4; }
.media--wide { aspect-ratio: 21 / 9; }
.media-caption {
  display: block;
  margin-top: 0.7em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--mist);
}

/* ---------- 11. 页头：框架式索引条 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(6, 26, 22, 0.94);
  border-bottom: 1px solid var(--line);
  color: var(--ivory);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

.header-rail {
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--line) 0 1px,
    transparent 1px 26px
  );
  border-bottom: 1px solid rgba(49, 80, 70, 0.4);
  opacity: 0.85;
}

.scroll-meter {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: calc(var(--scroll-progress, 0) * 100%);
  max-width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width 0.12s linear;
}

.header-inner {
  width: min(calc(100% - var(--gutter) * 2), var(--shell));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.2vw, 34px);
}

/* 品牌铭牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding-block: 10px;
  text-decoration: none;
  color: var(--ivory);
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold-lite);
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(150deg, rgba(200, 149, 63, 0.2), rgba(200, 149, 63, 0) 68%);
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-name {
  font-family: var(--font-head);
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
  line-height: 1;
}

/* 主导航 */
.site-nav {
  margin-left: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.3vw, 22px);
  list-style: none;
}
.nav-item { display: block; }
.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 12px 2px 10px;
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(168, 184, 176, 0.55);
  transition: color 0.18s var(--ease);
}
.nav-label { display: inline-block; }
.nav-link:hover { color: var(--gold-lite); }
.nav-link:hover .nav-idx { color: var(--cyan); }
.nav-link[aria-current="page"] {
  color: var(--gold-lite);
  border-bottom-color: var(--gold);
}
.nav-link[aria-current="page"] .nav-idx { color: var(--cyan); }

/* 页头工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.76em 1.05em;
  border: 1px solid var(--gold);
  color: var(--gold-lite);
  background: linear-gradient(180deg, rgba(200, 149, 63, 0.16), rgba(200, 149, 63, 0));
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
.header-cta:hover {
  background: var(--gold);
  border-color: var(--gold-lite);
  color: var(--ink);
}

/* 移动索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0.62em 0.8em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold); color: var(--gold-lite); }
.nav-toggle-bar {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s var(--ease);
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-5px) rotate(-45deg);
}
.nav-toggle-label { display: inline-block; }

/* 页头响应式 */
@media (max-width: 1023px) {
  .header-inner {
    min-height: 66px;
    flex-wrap: wrap;
    gap: 8px;
    padding-block: 4px;
  }
  .brand { padding-block: 8px; }
  .brand-mark { width: 36px; height: 36px; font-size: 1rem; }
  .brand-sub { display: none; }
  .header-tools { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .header-cta { padding: 0.66em 0.85em; font-size: 0.78rem; }

  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    border-top: 1px solid transparent;
    transition: max-height 0.3s var(--ease), visibility 0.3s var(--ease),
      border-color 0.3s var(--ease);
  }
  .site-nav[data-open] {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    visibility: visible;
    border-top-color: var(--line);
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0 16px;
  }
  .nav-link {
    padding: 15px 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-faint);
    justify-content: flex-start;
    gap: 12px;
  }
  .nav-link[aria-current="page"] { border-bottom-color: var(--gold); }
  .nav-idx { font-size: 0.68rem; }
}

@media (max-width: 480px) {
  .header-cta { display: none; }
}

/* ---------- 12. 页脚：值班台 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 140px);
  background: linear-gradient(180deg, var(--ink-2) 0%, #071d18 72%, #05150f 100%);
  border-top: 1px solid var(--line);
  color: var(--mist);
}

.footer-rule {
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--gold) 0 16%,
    rgba(200, 149, 63, 0.28) 16% 48%,
    rgba(66, 224, 208, 0.42) 78%,
    transparent 100%
  );
}

.footer-shell {
  padding-block: clamp(38px, 5.5vw, 72px) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(230px, 1.2fr);
  gap: clamp(24px, 4vw, 56px);
}

.footer-brand { min-width: 0; }
.footer-mark {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--gold-lite);
}
.footer-line {
  margin: 0;
  max-width: 32ch;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--mist);
}
.footer-coord {
  margin: 20px 0 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  line-height: 1.6;
  color: rgba(168, 184, 176, 0.48);
}

.footer-col { min-width: 0; }
.footer-col-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--gold);
}

.footer-list {
  list-style: none;
  display: grid;
  gap: 10px;
}
.footer-list a {
  display: inline-block;
  color: var(--ivory);
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.footer-list a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(66, 224, 208, 0.55);
}
.footer-list a[aria-current="page"] { color: var(--gold-lite); }

.contact-list {
  list-style: none;
  display: grid;
  gap: 12px;
}
.contact-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 0.88rem;
  line-height: 1.7;
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 2.4;
  color: rgba(168, 184, 176, 0.6);
}
.contact-value {
  color: var(--ivory);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.footer-baseline {
  margin-top: clamp(30px, 4vw, 56px);
  padding-block: 20px 30px;
  border-top: 1px solid var(--line-faint);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 28px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  line-height: 1.8;
  color: rgba(168, 184, 176, 0.72);
}
.footer-copy { margin: 0; }
.footer-note { margin: 0; }

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .footer-brand { grid-column: auto; }
  .footer-baseline { flex-direction: column; align-items: flex-start; }
}

/* ---------- 13. 动效协议 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

[data-toc-link] {
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease),
    background-color 0.16s var(--ease);
}
[data-toc-link].is-active {
  color: var(--gold-lite);
  border-color: var(--gold);
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 130;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(12, 43, 36, 0.92);
  color: var(--gold-lite);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  border-color: var(--gold);
  background: var(--ink-2);
}

/* ---------- 14. 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .to-top {
    transform: none;
  }
}

/* ---------- 15. 打印简版 ---------- */
@media print {
  .site-header,
  .site-footer,
  .to-top { display: none !important; }
  body {
    background: #fff;
    color: #111;
  }
  a { color: #111; text-decoration: underline; }
}
