/* ============================================================
   新宝体育中心 · 共享样式 /assets/site.css
   场地墨绿 + 冷灰画布 + 红黄判罚色 · 侧轨导航 · 连续画布
   ============================================================ */

/* ---------- 1. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5,
p, ul, ol, li, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

img, svg, video, picture { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; }

table { width: 100%; border-collapse: collapse; }

[hidden] { display: none !important; }

[id] { scroll-margin-top: calc(var(--topbar-h) + 18px); }

/* ---------- 2. 变量 ---------- */
:root {
  /* 场地色阶 */
  --c-ink: #0B211B;
  --c-ink-2: #14352C;
  --c-glass: rgba(11, 33, 27, 0.62);
  --c-canvas: #F4F6F5;
  --c-surface: #FFFFFF;
  --c-line: #CFD8D4;
  --c-title: #0F1A17;
  --c-muted: #55635E;

  /* 判罚色 */
  --c-red: #D62B20;
  --c-red-deep: #A81C14;
  --c-yellow: #F0C000;
  --c-teal: #2F7A63;

  /* 深底文字 */
  --c-on-dark: #DCE6E2;
  --c-on-dark-dim: #8FA49C;
  --c-hairline: rgba(207, 216, 212, 0.16);

  /* 字体 */
  --f-display: "Arial Narrow", "Helvetica Neue Condensed", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --f-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  /* 尺寸 */
  --rail-w: 264px;
  --rail-w-mini: 74px;
  --topbar-h: 46px;
  --gutter: clamp(18px, 4vw, 46px);
  --radius: 3px;
  --shadow-lift: 0 18px 48px rgba(11, 33, 27, 0.14);
}

/* ---------- 3. 基础排版 ---------- */
body {
  padding-top: var(--topbar-h);
  background: var(--c-canvas);
  color: var(--c-title);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

p { max-width: 68ch; }

.num,
[data-mono] {
  font-family: var(--f-mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

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

/* ---------- 4. 焦点与跳转链接 ---------- */
:focus-visible {
  outline: 2px solid var(--c-yellow);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  background: var(--c-yellow);
  color: var(--c-ink);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

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

/* ---------- 5. 页头外壳 ---------- */
.site-header { position: relative; }

/* 5.1 顶部细条 */
.topbar {
  position: fixed;
  z-index: 50;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 var(--gutter);
  background: var(--c-ink-2);
  border-bottom: 1px solid var(--c-hairline);
  color: var(--c-on-dark);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  transition: left 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar__start,
.topbar__end {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__brand {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
}

.topbar__season {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  color: var(--c-on-dark-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__login {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 13px;
  background: rgba(244, 246, 245, 0.08);
  border: 1px solid rgba(244, 246, 245, 0.24);
  border-radius: var(--radius);
  color: var(--c-on-dark);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.topbar__login:hover {
  background: rgba(244, 246, 245, 0.18);
  border-color: rgba(244, 246, 245, 0.5);
  color: #FFFFFF;
}

.dot {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(47, 122, 99, 0.26);
}

.dot--pulse { animation: dotPulse 2.6s ease-in-out infinite; }

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(47, 122, 99, 0.26); }
  50%      { box-shadow: 0 0 0 7px rgba(47, 122, 99, 0); }
}

/* 5.2 移动菜单键 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px;
  background: transparent;
  border: 1px solid rgba(207, 216, 212, 0.3);
  border-radius: var(--radius);
  color: var(--c-on-dark);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.nav-toggle:hover { border-color: rgba(207, 216, 212, 0.6); background: rgba(255, 255, 255, 0.06); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s ease;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after  { top: 5px; }

.site-header[data-open="true"] .nav-toggle__bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle__bars::after  { transform: translateY(-5px) rotate(-45deg); }

/* 5.3 侧边轨道 */
.rail {
  position: fixed;
  z-index: 70;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  width: min(86vw, 322px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 16px 20px;
  background: var(--c-ink);
  border-right: 1px solid rgba(207, 216, 212, 0.1);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-103%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header[data-open="true"] .rail { transform: none; }

.rail-scrim {
  position: fixed;
  z-index: 65;
  top: var(--topbar-h);
  right: 0; bottom: 0; left: 0;
  background: rgba(11, 33, 27, 0.62);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.site-header[data-open="true"] .rail-scrim { opacity: 1; visibility: visible; }

/* 5.4 轨道品牌 */
.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--c-hairline);
  color: #FFFFFF;
  text-decoration: none;
  transition: padding 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.rail__mark {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  background: var(--c-red);
  box-shadow: inset 0 -4px 0 var(--c-yellow);
  border-radius: 2px;
  color: #FFFFFF;
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.rail__brandtext { min-width: 0; }

.rail__name {
  display: block;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.rail__sub {
  display: block;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--c-on-dark-dim);
  text-transform: uppercase;
}

/* 5.5 轨道导航 */
.rail__nav {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--c-on-dark-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, padding 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link__idx {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--c-on-dark-dim);
  transition: color 0.18s ease;
}

.nav-link__label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  background: var(--c-glass);
  color: #FFFFFF;
}

.nav-link:hover .nav-link__idx { color: var(--c-yellow); }

.nav-link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(214, 43, 32, 0.28), rgba(214, 43, 32, 0.02) 84%);
  border-left-color: var(--c-red);
  color: #FFFFFF;
}

.nav-link[aria-current="page"] .nav-link__idx { color: var(--c-yellow); }

/* 5.6 轨道底部 */
.rail__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--c-hairline);
}

.rail__collapse {
  padding: 8px 10px;
  background: transparent;
  border: 1px solid rgba(207, 216, 212, 0.24);
  border-radius: var(--radius);
  color: var(--c-on-dark-dim);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.rail__collapse:hover { color: #FFFFFF; border-color: rgba(207, 216, 212, 0.55); }

/* ---------- 6. 通用组件 ---------- */
.container {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section__title {
  font-size: clamp(26px, 3.4vw, 34px);
  margin-bottom: 10px;
  color: var(--c-title);
}

.section__lede {
  color: var(--c-muted);
  font-size: 17px;
  max-width: 62ch;
}

.grid {
  display: grid;
  gap: clamp(14px, 1.8vw, 22px);
}

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

/* 6.1 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn--red {
  background: var(--c-red);
  color: #FFFFFF;
}

.btn--red:hover { background: var(--c-red-deep); }

.btn--yellow {
  background: var(--c-yellow);
  color: var(--c-ink);
}

.btn--yellow:hover { background: #FFD733; }

.btn--ghost {
  background: transparent;
  border-color: rgba(207, 216, 212, 0.4);
  color: #FFFFFF;
}

.btn--ghost:hover {
  background: var(--c-glass);
  border-color: rgba(207, 216, 212, 0.7);
}

.btn--block { width: 100%; }

/* 6.2 状态角标 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag--red    { background: var(--c-red);    color: #FFFFFF; }
.tag--yellow { background: var(--c-yellow); color: var(--c-ink); }
.tag--teal   { background: var(--c-teal);   color: #FFFFFF; }
.tag--ghost  { background: transparent; border: 1px solid var(--c-line); color: var(--c-muted); }

/* 6.3 面包屑 */
.breadcrumb {
  margin-bottom: 22px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

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

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

.breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--c-line);
}

.breadcrumb a {
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.breadcrumb a:hover {
  color: var(--c-red);
  border-bottom-color: var(--c-red);
}

.breadcrumb [aria-current="page"] { color: var(--c-title); font-weight: 700; }

/* ---------- 7. 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--c-ink-2);
  border-radius: var(--radius);
}

.media > img,
.media > picture,
.media > picture > img,
.media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--1x1  { aspect-ratio: 1 / 1; }

.media--tilt {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}

.media__ph {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(240, 192, 0, 0.14) 0 12%, transparent 12% 100%),
    linear-gradient(150deg, var(--c-ink-2) 0%, var(--c-ink) 58%, #1C3F34 100%);
}

.media__badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
}

.media__caption {
  position: absolute;
  z-index: 2;
  right: 0; bottom: 0; left: 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(11, 33, 27, 0.88), rgba(11, 33, 27, 0));
  color: var(--c-on-dark);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 104px);
  padding: clamp(40px, 6vw, 74px) var(--gutter) 26px;
  background: var(--c-ink);
  color: var(--c-on-dark);
  border-top: 3px solid var(--c-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(26px, 4vw, 54px);
  max-width: 1360px;
  margin-inline: auto;
}

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

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6E817A;
}

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

.footer-links a {
  display: inline-block;
  padding: 5px 0;
  color: #CBD8D3;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #FFFFFF;
  border-bottom-color: var(--c-yellow);
}

.footer-contact {
  display: grid;
  gap: 12px;
  font-size: 15px;
  color: #CBD8D3;
}

.footer-contact__label {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6E817A;
}

.footer-note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.7;
  color: #7C8F88;
}

.legacy {
  border-top: 1px solid var(--c-hairline);
  padding-top: 12px;
}

.legacy summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #9FB1AA;
  transition: color 0.16s ease;
}

.legacy summary::-webkit-details-marker { display: none; }

.legacy summary::before {
  content: "+";
  font-size: 14px;
  color: var(--c-yellow);
}

.legacy[open] summary::before { content: "–"; }

.legacy summary:hover { color: #FFFFFF; }

.legacy .footer-links { margin-top: 10px; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  max-width: 1360px;
  margin: clamp(32px, 5vw, 58px) auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--c-hairline);
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #7C8F88;
}

.footer-base__brand {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #DCE6E2;
}

.footer-base__icp { color: #8FA49C; }

.footer-base__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.footer-base__legal a {
  color: #8FA49C;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-base__legal a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--c-yellow);
}

.footer-base__copy { color: #6E817A; }

/* ---------- 9. 筛选与入场 ---------- */
[data-filter-item].is-entering {
  animation: filterIn 0.18s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes filterIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ---------- 10. 断点 ---------- */
@media (min-width: 1080px) {
  body {
    padding-left: var(--rail-w);
    transition: padding-left 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body[data-rail="mini"] { --rail-w: var(--rail-w-mini); }

  .topbar { left: var(--rail-w); }

  .rail {
    top: 0;
    width: var(--rail-w);
    transform: none;
    overflow: visible;
    overflow-x: hidden;
    transition: width 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .rail-scrim { display: none; }

  .nav-toggle,
  .topbar__brand { display: none; }

  body[data-rail="mini"] .rail__brandtext,
  body[data-rail="mini"] .nav-link__label { display: none; }

  body[data-rail="mini"] .rail__brand {
    justify-content: center;
    padding-inline: 0;
  }

  body[data-rail="mini"] .nav-link {
    justify-content: center;
    padding-inline: 0;
  }

  body[data-rail="mini"] .rail__cta { display: none; }

  body[data-rail="mini"] .rail__collapse { font-size: 0; }
  body[data-rail="mini"] .rail__collapse::before {
    content: "»";
    font-size: 14px;
  }
}

@media (max-width: 1079.98px) {
  .rail__collapse { display: none; }
  .rail__cta { margin-top: 4px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .topbar {
    gap: 10px;
    font-size: 11px;
  }

  .topbar__season { display: none; }

  .section__lede { font-size: 16px; }

  .footer-base { gap: 10px 18px; }
  .footer-base__legal { margin-left: 0; width: 100%; }
}

@media (min-width: 641px) and (max-width: 1079.98px) {
  .nav-toggle__text { display: inline; }
}

/* ---------- 11. 降低动效 ---------- */
@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;
    scroll-behavior: auto !important;
  }

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

  [data-filter-item].is-entering { animation: none; }
}
