/* ============================================================
   K1体育3915 · 共享站点样式 /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, figure, blockquote, dl, dd { margin: 0; }

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

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

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

button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

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

hr { border: 0; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #05070A;
  --carbon: #0B1018;
  --graphite: #161F2B;
  --ice: #EAF4F8;
  --mist: #8FA0AE;
  --silver: #C7D3DB;
  --mint: #35F2D0;
  --mint-deep: #0F6B62;
  --violet: #9B7BFF;
  --lava: #FF7A45;

  --line: rgba(199, 211, 219, 0.14);
  --line-soft: rgba(199, 211, 219, 0.08);
  --mint-08: rgba(53, 242, 208, 0.08);
  --mint-16: rgba(53, 242, 208, 0.16);
  --mint-40: rgba(53, 242, 208, 0.4);
  --violet-30: rgba(155, 123, 255, 0.3);

  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gap: clamp(16px, 2vw, 28px);
  --shell: 1440px;
  --pad: clamp(18px, 3.6vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 中文排版与基底 ---------- */
body {
  font-family: var(--font-sans);
  font-size: clamp(15px, 0.5vw + 13.8px, 17px);
  line-height: 1.75;
  color: var(--ice);
  background-color: var(--ink);
  background-image:
    radial-gradient(1000px 560px at 82% -10%, rgba(53, 242, 208, 0.1), transparent 62%),
    radial-gradient(820px 520px at 4% 2%, rgba(155, 123, 255, 0.1), transparent 60%),
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.03em;
  color: var(--ice);
}

p { text-wrap: pretty; }

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

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

.visually-hidden {
  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. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -140px;
  left: clamp(12px, 3vw, 28px);
  z-index: 300;
  display: inline-block;
  padding: 11px 20px;
  background: var(--mint);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: top 0.18s var(--ease);
}

.skip-link:focus { top: 14px; }

.skip-link:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: -4px;
}

/* ---------- 5. 命令栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 16, 24, 0.94);
  border-bottom: 1px solid var(--graphite);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.command-bar {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 30px);
  min-height: 76px;
  padding: 0 var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 8px 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--mint);
  color: #04110F;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}

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

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ice);
}

.brand-tagline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--mist);
}

/* 导航 */
.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--silver);
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--mist);
  padding-top: 3px;
  transition: color 0.18s var(--ease);
}

.nav-text { white-space: nowrap; }

.nav-link:hover {
  color: var(--ice);
  background: var(--mint-08);
}

.nav-link[aria-current="page"] {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

.nav-link[aria-current="page"] .nav-index { color: var(--mint); }

/* 状态区 */
.command-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  animation: status-pulse 3.2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(53, 242, 208, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(53, 242, 208, 0.04); }
}

.status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
  white-space: nowrap;
}

/* 移动按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--silver);
  background: rgba(22, 31, 43, 0.85);
  border: 1px solid var(--graphite);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.nav-toggle:hover { color: var(--ice); background: rgba(22, 31, 43, 1); }

.nav-toggle:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: -4px;
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle-label { white-space: nowrap; }

.site-header[data-open] .nav-toggle { color: var(--mint); }
.site-header[data-open] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 6. 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--mint);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover {
  background: var(--ice);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: -4px;
}

.btn--quick {
  padding: 9px 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.btn--ghost {
  background: transparent;
  color: var(--mint);
  box-shadow: inset 0 0 0 1px var(--mint-40);
}

.btn--ghost:hover {
  background: rgba(53, 242, 208, 0.1);
  color: var(--mint);
}

/* ---------- 7. 章节与容器 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(44px, 6.5vw, 92px); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
  margin-bottom: clamp(24px, 3vw, 44px);
}

.chapter-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
}

.chapter-index::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--mint);
}

.display-large {
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  color: var(--ice);
  text-wrap: balance;
}

.section-title {
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.04em;
  color: var(--ice);
}

.section-lede {
  max-width: 68ch;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.8;
  color: var(--mist);
}

/* ---------- 8. 网格 ---------- */
.grid {
  display: grid;
  gap: var(--gap);
}

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

.grid--split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

.grid--split-rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.grid--cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- 9. 面板 / 标签 / 数据 ---------- */
.panel {
  position: relative;
  background: var(--graphite);
  border: 1px solid var(--line);
  padding: clamp(18px, 2vw, 28px);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.panel--flat {
  background: var(--carbon);
  border-color: var(--line-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--mint);
  background: var(--mint-08);
  border: 1px solid var(--mint-40);
}

.tag--violet {
  color: var(--violet);
  background: rgba(155, 123, 255, 0.12);
  border-color: rgba(155, 123, 255, 0.42);
}

.tag--lava {
  color: var(--lava);
  background: rgba(255, 122, 69, 0.12);
  border-color: rgba(255, 122, 69, 0.45);
}

.data-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.rule-slant {
  height: 1px;
  background: linear-gradient(90deg, var(--mint-40), var(--violet-30) 45%, transparent);
  transform: skewY(-1.4deg);
  transform-origin: left center;
}

/* ---------- 10. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-color: var(--carbon);
  background-image: repeating-linear-gradient(135deg, rgba(53, 242, 208, 0.055) 0 1px, transparent 1px 16px);
  border: 1px solid var(--line-soft);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.4s var(--ease);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(5, 7, 10, 0.62) 0%, rgba(5, 7, 10, 0) 52%, rgba(53, 242, 208, 0.18) 100%);
}

.media-frame:hover img {
  transform: translate(3px, -2px) scale(1.02);
  filter: brightness(1.1);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tilt { transform: rotate(-1.2deg); }

/* ---------- 11. 面包屑与正文 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

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

.breadcrumbs li + li::before {
  content: "/";
  color: rgba(143, 160, 174, 0.5);
}

.breadcrumbs a { color: var(--silver); }
.breadcrumbs a:hover { color: var(--mint); }
.breadcrumbs [aria-current="page"] { color: var(--ice); }

.prose {
  max-width: 72ch;
  line-height: 1.8;
  color: var(--silver);
}

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

.prose h2,
.prose h3 {
  color: var(--ice);
  margin-top: 1.7em;
}

.prose h2 { font-size: clamp(1.4rem, 2vw, 1.9rem); }
.prose h3 { font-size: clamp(1.15rem, 1.4vw, 1.35rem); }

.prose a {
  color: var(--mint);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose strong { color: var(--ice); font-weight: 600; }

.prose blockquote {
  padding-left: 1em;
  border-left: 2px solid var(--mint);
  color: var(--mist);
}

/* ---------- 12. 阅读进度与显现 ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  background: linear-gradient(90deg, var(--mint) 0%, var(--violet) 58%, var(--lava) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--carbon);
  border-top: 1px solid var(--graphite);
}

.site-footer::before {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -40%;
  width: 62%;
  height: 280px;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(53, 242, 208, 0.09), transparent);
}

.footer-accent {
  height: 2px;
  background: linear-gradient(90deg, var(--mint) 0%, rgba(53, 242, 208, 0) 42%, var(--violet) 72%, var(--lava) 100%);
}

.footer-wrap {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--pad) clamp(28px, 3vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
}

.footer-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--ice);
}

.footer-note {
  max-width: 32ch;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--mist);
}

.footer-cta {
  margin-top: 6px;
  padding: 10px 18px;
  font-size: 12.5px;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

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

.footer-group-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
  border-bottom: 1px solid var(--line);
}

.footer-links li + li { margin-top: 9px; }

.footer-link {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--silver);
  transition: color 0.18s var(--ease), padding-left 0.18s var(--ease);
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--mint);
  transform: translateY(-50%);
  transition: width 0.18s var(--ease);
}

.footer-link:hover {
  color: var(--mint);
  padding-left: 16px;
}

.footer-link:hover::before { width: 10px; }

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

.footer-contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.footer-contact-list li:first-child { padding-top: 0; }
.footer-contact-list li:last-child { border-bottom: 0; }

.footer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-value {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ice);
  word-break: break-word;
}

.footer-value--mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--silver);
}

.footer-base {
  position: relative;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 18px var(--pad) 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.footer-copy { margin: 0; }

.footer-icp {
  display: inline-flex;
  align-items: center;
  color: var(--silver);
}

.footer-icp::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--violet);
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1180px) {
  .status-text { display: none; }
  .nav-link { padding: 10px 9px; font-size: 12.5px; }
}

@media (max-width: 1100px) {
  .footer-wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  }
  .footer-lead { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
  .footer-contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
}

@media (max-width: 980px) {
  .command-bar {
    flex-wrap: wrap;
    gap: 10px 12px;
    min-height: 66px;
    padding-block: 10px;
  }

  .brand { order: 1; }

  .nav-toggle {
    order: 2;
    display: inline-flex;
    margin-left: auto;
  }

  .command-status {
    order: 3;
    margin-left: 0;
    gap: 8px;
  }

  .site-nav {
    order: 4;
    flex: 1 0 100%;
    width: 100%;
    display: none;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--graphite);
  }

  .site-header[data-open] .site-nav {
    display: block;
    animation: nav-in 0.2s var(--ease) both;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 13px 12px;
    font-size: 14px;
    border-bottom: 1px solid rgba(22, 31, 43, 0.9);
    border-left: 2px solid transparent;
  }

  .nav-link[aria-current="page"] {
    border-bottom-color: rgba(22, 31, 43, 0.9);
    border-left-color: var(--mint);
    background: rgba(53, 242, 208, 0.07);
  }

  .grid--split,
  .grid--split-rev {
    grid-template-columns: minmax(0, 1fr);
  }

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

@keyframes nav-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
  .footer-wrap { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact-list { grid-template-columns: minmax(0, 1fr); }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .brand-mark { width: 36px; height: 36px; font-size: 13px; }
  .brand-name { font-size: 14px; }
  .brand-tagline { display: none; }
  .nav-toggle { padding: 10px; gap: 0; }
  .nav-toggle-label { display: none; }
  .btn--quick { padding: 8px 12px; font-size: 11px; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 13px; letter-spacing: 0.04em; }
  .brand { gap: 8px; }
}

/* ---------- 15. 动效偏好 ---------- */
@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;
  }

  .status-dot { animation: none; box-shadow: 0 0 0 3px rgba(53, 242, 208, 0.16); }

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

  .media-frame:hover img { transform: none; }
  .btn:hover { transform: none; }
  .site-header[data-open] .site-nav { animation: none; }
}
