/* ==========================================================================
   买球网中心 · /assets/site.css
   共享外壳：顶部横向工具栏 + 左侧纵向轨道导航 + 深色页脚
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 20px);
}

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

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

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

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

a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #1B2622;
  --paper: #F7F2E8;
  --sand: #E8DCC8;
  --mint: #CFE3DB;

  --green-900: #0F3F35;
  --green-700: #1F6F5C;
  --green-500: #2E8B74;

  --orange: #F26B3A;
  --orange-deep: #C94E22;
  --focus: #FFD166;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --bar-h: 72px;
  --rail-w: 268px;
  --pad: clamp(20px, 4vw, 56px);
  --gap: clamp(16px, 2.6vw, 30px);
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- 3. Base ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--paper);
  padding-top: var(--bar-h);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.012em;
}

strong, b { font-weight: 800; }

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

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

.visually-hidden {
  position: absolute;
  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. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 12px 22px;
  border-radius: var(--radius);
  background-color: var(--green-900);
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

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

/* ---------- 5. 顶部工具栏 ---------- */
.site-header {
  position: relative;
  z-index: 90;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  height: var(--bar-h);
  padding: 0 var(--pad);
  background-color: var(--paper);
  border-bottom: 1px solid rgba(15, 63, 53, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 3px;
  background-color: var(--green-700);
  overflow: hidden;
}

.brand__mark::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  background-color: var(--orange);
}

.brand__mark::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 10px;
  width: 17px;
  height: 3px;
  background-color: var(--paper);
  box-shadow: 0 -6px 0 0 rgba(247, 242, 232, 0.55);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand__sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--green-700);
  white-space: nowrap;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
}

/* 检索胶囊 */
.search {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  padding: 0 14px 0 15px;
  border: 1px solid rgba(15, 63, 53, 0.24);
  border-radius: 999px;
  background-color: var(--sand);
  transition: border-color 0.2s var(--ease),
              background-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.search::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 9px;
  border: 2px solid var(--green-700);
  border-radius: 50%;
  opacity: 0.8;
  transition: border-color 0.2s var(--ease);
}

.search:focus-within {
  border-color: var(--green-700);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.55);
}

.search__input {
  width: 172px;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  outline: none;
}

.search__input::placeholder {
  color: rgba(27, 38, 34, 0.52);
  font-weight: 500;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease),
              color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}

.btn--signal {
  background-color: var(--orange);
  color: var(--ink);
}

.btn--signal:hover {
  background-color: var(--orange-deep);
  color: var(--paper);
}

.btn--ghost {
  border-color: rgba(15, 63, 53, 0.34);
  color: var(--green-700);
  background-color: transparent;
}

.btn--ghost:hover {
  background-color: var(--green-700);
  border-color: var(--green-700);
  color: var(--paper);
}

.header-cta { flex: 0 0 auto; }

/* 移动端栏目开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 15px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 63, 53, 0.3);
  border-radius: 999px;
  background-color: transparent;
  color: var(--green-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover { border-color: var(--orange); color: var(--orange-deep); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* 滚动进度 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  pointer-events: none;
}

/* ---------- 6. 左侧轨道导航 ---------- */
.rail {
  position: fixed;
  top: var(--bar-h);
  left: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  height: calc(100vh - var(--bar-h));
  padding: 34px 20px 26px;
  overflow-y: auto;
  background-color: var(--green-900);
  border-right: 1px solid rgba(232, 220, 200, 0.12);
}

.rail__eyebrow {
  margin-bottom: 20px;
  padding-left: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(232, 220, 200, 0.5);
}

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

.rail__link {
  position: relative;
  display: block;
  padding: 12px 12px 12px 28px;
  border-radius: 2px;
  color: rgba(232, 220, 200, 0.78);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 12px;
  height: 2px;
  background-color: var(--orange);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}

.rail__link:hover {
  color: var(--paper);
  background-color: rgba(232, 220, 200, 0.07);
}

.rail__link:hover::before {
  transform: translateY(-50%) scaleX(1);
}

.rail__link[aria-current="page"] {
  color: var(--paper);
  background-color: rgba(46, 139, 116, 0.34);
}

.rail__link[aria-current="page"]::before {
  transform: translateY(-50%) scaleX(1);
}

.rail__foot {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(232, 220, 200, 0.15);
}

.rail__note {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(232, 220, 200, 0.58);
}

.rail__call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.rail__call::after {
  content: "→";
  font-weight: 900;
  transition: transform 0.2s var(--ease);
}

.rail__call:hover {
  color: var(--focus);
  border-bottom-color: currentColor;
}

.rail__call:hover::after { transform: translateX(3px); }

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  padding: clamp(40px, 6vw, 74px) var(--pad) 0;
  background-color: var(--green-900);
  color: var(--sand);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(64px, 12vw, 160px);
  height: 3px;
  background-color: var(--orange);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 2.4fr);
  gap: clamp(32px, 5vw, 76px);
  max-width: 1240px;
}

.site-footer__chip {
  display: block;
  width: 46px;
  height: 5px;
  margin-bottom: 18px;
  background-color: var(--orange);
}

.site-footer__name {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--paper);
}

.site-footer__line {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(232, 220, 200, 0.52);
}

.site-footer__note {
  margin-top: 18px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(232, 220, 200, 0.7);
}

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

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

.footer-col__title {
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(232, 220, 200, 0.46);
}

.footer-col__list {
  display: grid;
  gap: 9px;
}

.footer-col__list a {
  position: relative;
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: rgba(232, 220, 200, 0.88);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-col__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background-color: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}

.footer-col__list a:hover { color: #FFFFFF; }
.footer-col__list a:hover::after { transform: scaleX(1); }

.footer-contact {
  display: grid;
  gap: 13px;
}

.footer-contact > div {
  display: grid;
  gap: 2px;
}

.footer-contact dt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(232, 220, 200, 0.42);
}

.footer-contact dd {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(232, 220, 200, 0.92);
  overflow-wrap: anywhere;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: 1240px;
  margin-top: clamp(32px, 5vw, 58px);
  padding: 20px 0 30px;
  border-top: 1px solid rgba(232, 220, 200, 0.16);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(232, 220, 200, 0.6);
}

.site-footer__hours { letter-spacing: 0.04em; }

/* ---------- 8. 通用排版工具 ---------- */
.display {
  font-size: clamp(36px, 6.4vw, 78px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.022em;
}

.numeral {
  font-size: clamp(46px, 8vw, 96px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--orange);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green-500);
}

.section-label::before {
  content: "";
  width: 26px;
  height: 2px;
  background-color: var(--orange);
}

/* 正文窄栏 */
.prose {
  max-width: 66ch;
  font-size: 17px;
  line-height: 1.9;
}

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

.prose h2 {
  margin-top: 2.1em;
  font-size: clamp(23px, 3vw, 32px);
}

.prose h3 {
  margin-top: 1.7em;
  font-size: 20px;
  font-weight: 800;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
  list-style: disc;
}

.prose ol { list-style: decimal; }

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

.prose a {
  color: var(--green-700);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}

.prose a:hover { color: var(--orange-deep); }

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green-700);
}

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

.breadcrumb li + li::before {
  content: "/";
  color: rgba(27, 38, 34, 0.32);
  font-weight: 400;
}

.breadcrumb a {
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 111, 92, 0.38);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumb a:hover {
  color: var(--orange-deep);
  border-bottom-color: var(--orange);
}

/* ---------- 9. 网格与卡片 ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}

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

.card {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(15, 63, 53, 0.14);
  border-radius: var(--radius);
  background-color: #FFFFFF;
}

.card--sand {
  background-color: var(--sand);
  border-color: transparent;
}

.card--green {
  background-color: var(--green-700);
  border-color: transparent;
  color: var(--paper);
}

.card--green a { color: var(--paper); }

/* ---------- 10. 响应式图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(15, 63, 53, 0.16);
  border-radius: var(--radius);
  background-color: var(--mint);
}

.media-frame > img,
.media-frame > svg,
.media-frame > picture,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.main-content { display: block; }

/* ---------- 11. 桌面 / 平板 / 手机 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
}

@media (max-width: 1023px) {
  :root { --bar-h: 64px; }

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

  .search { flex: 1 1 auto; min-width: 0; }

  .search__input { width: 100%; }

  .header-cta {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }

  html.nav-open { overflow: hidden; }

  .rail {
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - var(--bar-h));
    padding: 24px var(--pad) 30px;
    border-right: 0;
    border-bottom: 1px solid rgba(232, 220, 200, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity 0.22s var(--ease),
                transform 0.22s var(--ease),
                visibility 0.22s linear;
  }

  .rail[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .rail__eyebrow { margin-bottom: 14px; padding-left: 4px; }

  .rail__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .rail__link {
    padding: 14px 12px 14px 28px;
    font-size: 16px;
  }

  .rail__foot { margin-top: 22px; }

  .site-footer__inner { grid-template-columns: 1fr; }

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

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

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

  .topbar { gap: 8px; padding: 0 16px; }

  .brand__sub { display: none; }

  .topbar__tools { gap: 8px; }

  .search { padding: 0 12px 0 13px; }

  .footer-contact dd { font-size: 13.5px; }
}

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

  .nav-toggle__label { display: none; }

  .nav-toggle { padding: 0 13px; }

  .rail__list { grid-template-columns: 1fr; }

  .site-footer__nav { grid-template-columns: 1fr; }

  .site-footer__base { flex-direction: column; }
}

/* ---------- 12. 降低动效 ---------- */
@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;
  }

  .scroll-meter { transition: none !important; }
}
