/* ==========================================================================
   KAIYUN体育 · 共享站点样式 /assets/site.css
   主题：夜场记分屏 —— 深夜球场绿 / 信号橙 / 记分牌白 / 电子蓝
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-deep);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.005em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
dl, dd { margin: 0; }

/* 2. Tokens --------------------------------------------------------------- */
:root {
  --c-deep: #0B2B22;
  --c-turf: #14513C;
  --c-lamp: #1F7A55;
  --c-orange: #FF6A1A;
  --c-orange-soft: #FFB27A;
  --c-white: #F4F7F2;
  --c-blue: #2FA8FF;
  --c-ink: #05130F;
  --c-muted: #6E8A80;
  --c-yellow: #FFD166;

  --font-display: "Barlow Condensed", "Oswald", "Haettenschweiler", "Impact",
    "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "PingFang SC", "Noto Sans SC", "Source Han Sans SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Menlo", "Consolas",
    "Liberation Mono", "Courier New", monospace;

  --w-page: 1320px;
  --pad: clamp(18px, 4vw, 40px);
  --h-header: 66px;

  --r-s: 6px;
  --r-m: 14px;
  --r-l: 28px;

  --line: rgba(244, 247, 242, 0.12);
  --line-soft: rgba(244, 247, 242, 0.08);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* 3. Focus & a11y --------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--c-blue);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--c-orange);
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 0 0 10px 10px;
  transition: top 0.18s var(--ease);
}
.skip-link:focus-visible {
  top: 0;
  outline-color: var(--c-white);
}

/* 4. Header / 命令栏 ------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--c-deep);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.24s var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  pointer-events: none;
  opacity: 0.55;
  background: repeating-linear-gradient(
    90deg,
    rgba(244, 247, 242, 0.28) 0 2px,
    transparent 2px 18px
  );
}

.site-header[data-scrolled] {
  box-shadow: 0 10px 28px rgba(5, 19, 15, 0.55);
}

.cmdbar {
  position: relative;
  width: 100%;
  max-width: var(--w-page);
  margin-inline: auto;
  padding: 0 var(--pad);
  min-height: var(--h-header);
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 10px 0;
  color: var(--c-white);
}

.brand__mark {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
  background: var(--c-turf);
  border: 2px solid var(--c-orange);
  border-radius: 10px;
}
.brand__mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(244, 247, 242, 0.34);
  border-radius: 4px;
}
.brand__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--c-orange);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.03em;
  color: var(--c-white);
}
.brand__note {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--c-muted);
}

.brand--footer .brand__name { font-size: 22px; }

/* 导航 */
.nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0px, 0.8vw, 8px);
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 11px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: rgba(244, 247, 242, 0.72);
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav__link:hover {
  color: var(--c-white);
  background: rgba(244, 247, 242, 0.06);
}
.nav__link[aria-current="page"] {
  color: var(--c-white);
}
.nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--c-orange);
}
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-orange);
}

.nav__meta { display: none; }

/* 工具区 */
.cmdbar__tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: clamp(6px, 1.2vw, 16px);
  padding-left: clamp(10px, 1.6vw, 20px);
  border-left: 1px solid var(--line);
}

.status-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 209, 102, 0.34);
  background: rgba(255, 209, 102, 0.1);
  color: var(--c-yellow);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sync {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--c-blue);
  white-space: nowrap;
}
.sync__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(47, 168, 255, 0.16);
}
.sync:hover .sync__text {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cmdbar__cta {
  padding: 9px 16px;
  font-size: 13px;
}

/* 移动端切换按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  flex: none;
  margin-left: auto;
  padding: 9px 13px;
  border: 1px solid rgba(244, 247, 242, 0.22);
  border-radius: var(--r-s);
  color: var(--c-white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: border-color 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--c-orange); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--c-orange);
  transition: transform 0.2s var(--ease), top 0.2s var(--ease), bottom 0.2s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.site-header[data-open] .nav-toggle__bars::before {
  top: 5px;
  transform: rotate(45deg);
}
.site-header[data-open] .nav-toggle__bars::after {
  bottom: 5px;
  transform: rotate(-45deg);
}

/* 5. Footer / 记分牌 ------------------------------------------------------ */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 9vw, 110px);
  padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 34px);
  background: var(--c-ink);
  color: rgba(244, 247, 242, 0.72);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.6;
  background: repeating-linear-gradient(
    90deg,
    var(--c-orange) 0 20px,
    transparent 20px 40px
  );
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 1.45fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: start;
}

.footer__brand { min-width: 0; }

.footer__sign {
  margin-top: 18px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(244, 247, 242, 0.58);
}

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

.footer__col { min-width: 0; }

.footer__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--c-orange);
}

.footer__links li + li { margin-top: 1px; }

.footer__links a {
  display: inline-block;
  padding: 7px 0;
  font-size: 14px;
  color: rgba(244, 247, 242, 0.72);
  transition: color 0.16s var(--ease), transform 0.16s var(--ease);
}
.footer__links a:hover {
  color: var(--c-white);
  transform: translateX(3px);
}

.footer__contact {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  margin-top: clamp(32px, 5vw, 54px);
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--line-soft);
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(22px, 4vw, 48px);
}
.contact-list__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.contact-list dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--c-muted);
}
.contact-list dd {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--c-white);
  word-break: break-word;
}

.contact-note {
  max-width: 36ch;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(244, 247, 242, 0.48);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(26px, 4vw, 40px);
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(244, 247, 242, 0.5);
}
.footer__copy { margin: 0; }
.footer__legal {
  color: var(--c-muted);
  font-variant-numeric: tabular-nums;
}

/* 6. Layout helpers ------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid {
  display: grid;
  gap: clamp(18px, 3vw, 32px);
}
.grid--split {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.grid--split-rev {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.section-head__kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--c-orange);
}
.section-head__title {
  font-size: clamp(30px, 4.4vw, 52px);
  color: var(--c-white);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--c-orange-soft);
}
.eyebrow--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.28em;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 247, 242, 0.2);
  background: rgba(244, 247, 242, 0.04);
  color: rgba(244, 247, 242, 0.8);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.tag--orange {
  border-color: rgba(255, 106, 26, 0.42);
  background: rgba(255, 106, 26, 0.1);
  color: var(--c-orange-soft);
}
.tag--blue {
  border-color: rgba(47, 168, 255, 0.42);
  background: rgba(47, 168, 255, 0.1);
  color: var(--c-blue);
}

/* 7. Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 2px solid transparent;
  border-radius: var(--r-s);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn--solid {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: var(--c-ink);
}
.btn--solid:hover {
  background: var(--c-orange-soft);
  border-color: var(--c-orange-soft);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  border-color: rgba(244, 247, 242, 0.3);
  color: var(--c-white);
}
.btn--ghost:hover {
  border-color: var(--c-orange);
  color: var(--c-orange-soft);
  transform: translateY(-2px);
}
.btn--blue {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: var(--c-ink);
}
.btn--blue:hover {
  background: #6cc2ff;
  border-color: #6cc2ff;
  transform: translateY(-2px);
}

/* 8. Breadcrumb ----------------------------------------------------------- */
.breadcrumb {
  padding: 18px 0 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--c-muted);
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb__item a { color: rgba(244, 247, 242, 0.66); }
.breadcrumb__item a:hover { color: var(--c-orange-soft); }
.breadcrumb__item [aria-current="page"] { color: var(--c-white); }
.breadcrumb__sep { color: rgba(244, 247, 242, 0.28); }

/* 9. Prose ---------------------------------------------------------------- */
.prose {
  max-width: 34em;
  font-size: 17px;
  line-height: 1.85;
  color: rgba(244, 247, 242, 0.82);
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2em;
  font-size: clamp(26px, 3vw, 34px);
  color: var(--c-white);
}
.prose h3 {
  margin-top: 1.7em;
  font-size: clamp(20px, 2.2vw, 24px);
  color: var(--c-white);
}
.prose p { max-width: 34em; }
.prose ul { list-style: none; padding-left: 0; }
.prose li {
  position: relative;
  padding-left: 20px;
  margin-top: 0.5em;
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 9px;
  height: 2px;
  background: var(--c-orange);
}
.prose a {
  color: var(--c-orange-soft);
  border-bottom: 1px solid rgba(255, 178, 122, 0.42);
}
.prose strong { color: var(--c-white); }

.surface--light {
  background: var(--c-white);
  color: var(--c-ink);
}
.surface--light .prose { color: rgba(5, 19, 15, 0.86); }
.surface--light .prose h2,
.surface--light .prose h3,
.surface--light .prose strong { color: var(--c-ink); }
.surface--light .prose a {
  color: #B84A0E;
  border-bottom-color: rgba(184, 74, 14, 0.42);
}

/* 10. Media containers ---------------------------------------------------- */
.media {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  overflow: hidden;
  background: linear-gradient(155deg, var(--c-turf) 0%, var(--c-deep) 78%);
}

.media__frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.media__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(244, 247, 242, 0.08) 0 1px,
    transparent 1px 52px
  );
}

.media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--c-muted);
}

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

/* 11. Data table ---------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(244, 247, 242, 0.86);
}
.data-table th,
.data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  border-bottom-color: rgba(244, 247, 242, 0.24);
}
.data-table tbody tr:hover { background: rgba(244, 247, 242, 0.04); }

/* 12. Injected UI (JS) ---------------------------------------------------- */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 90;
  pointer-events: none;
  background: rgba(244, 247, 242, 0.07);
}
.read-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--c-blue) 0%, var(--c-orange) 78%);
  transition: transform 0.09s linear;
}

.totop {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 106, 26, 0.55);
  background: var(--c-turf);
  color: var(--c-white);
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 0 12px 28px rgba(5, 19, 15, 0.55);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s, background 0.2s var(--ease);
}
.totop[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.totop:hover { background: var(--c-lamp); }

/* 13. Responsive ---------------------------------------------------------- */
@media (max-width: 1079px) {
  .nav-toggle { display: inline-flex; }
  .cmdbar__tools { display: none; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
    padding: 8px var(--pad) 26px;
    background: var(--c-deep);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 48px rgba(5, 19, 15, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
      visibility 0.2s;
  }

  .site-header[data-open] .nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav__link {
    padding: 14px 10px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav__link[aria-current="page"]::after { display: none; }

  .nav__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 18px 10px 0;
  }
}

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

  .footer__top { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer__contact { grid-template-columns: minmax(0, 1fr); }
  .contact-note { max-width: none; }
}

@media (max-width: 720px) {
  :root { --h-header: 58px; }

  .brand__mark { width: 30px; height: 30px; border-radius: 9px; }
  .brand__name { font-size: 17px; }
  .brand__note { font-size: 10px; letter-spacing: 0.2em; }

  .footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }

  .prose { font-size: 16px; }
}

@media (max-width: 520px) {
  .nav-toggle__text { display: none; }
  .nav-toggle { padding: 9px 11px; }

  .footer__bottom { justify-content: flex-start; }
  .contact-list { gap: 14px; }
  .contact-list dd { font-size: 13px; }
}

/* 14. Reduced motion ------------------------------------------------------ */
@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;
  }

  .read-progress__fill { transition: none; }
  .btn:hover,
  .btn--solid:hover,
  .btn--ghost:hover,
  .btn--blue:hover,
  .footer__links a:hover { transform: none; }
}
