/* ==========================================================================
   196体育站 — /assets/site.css
   深靛蓝夜空 · 看台暖橙 · 记分牌荧光青 · 奶油纸面章节
   ========================================================================== */

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

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

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

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

button { font: inherit; color: inherit; background: none; border: 0; }

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  --night: #0B1026;
  --night-2: #111A3A;
  --paper: #F4E9D8;
  --ink: #1C1510;
  --orange: #FF7A3D;
  --amber: #FFB000;
  --cyan: #2DE2C5;
  --ice: #E8EDF7;
  --steel: #6C7A99;
  --rust: #B23A1E;

  --line: rgba(108, 122, 153, 0.34);
  --line-strong: rgba(108, 122, 153, 0.62);
  --line-paper: rgba(28, 21, 16, 0.18);

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

  --shell: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 全局排版 ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 132px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.7;
  color: var(--ice);
  background-color: var(--night);
  background-image:
    linear-gradient(rgba(108, 122, 153, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 122, 153, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.02em;
  color: var(--ice);
}

h1 { font-size: clamp(2rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }

p { text-wrap: pretty; }

strong { font-weight: 800; }

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

#main-content { scroll-margin-top: 140px; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 4. 布局容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(46px, 7vw, 96px); }

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
}

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--night);
}

/* 5.1 跳转链接 */
.skip-link {
  position: fixed;
  left: 50%;
  top: 10px;
  z-index: 140;
  transform: translate(-50%, -180%);
  padding: 0.62rem 1.1rem;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--amber);
  text-decoration: none;
  transition: transform 0.18s var(--ease);
}

.skip-link:focus { transform: translate(-50%, 0); }

/* 5.2 滚动进度条 */
.scroll-meter {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 130;
  background: rgba(108, 122, 153, 0.22);
  pointer-events: none;
}

.scroll-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber), var(--orange));
  transition: width 0.08s linear;
}

/* 5.3 上层状态带 */
.header-rail {
  background: var(--night-2);
  border-bottom: 1px solid var(--line);
}

.rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 38px;
}

.rail-note {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--steel);
}

.rail-dot {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--cyan);
  animation: pulse-dot 2.6s var(--ease) infinite;
}

.rail-links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.6rem);
}

.rail-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--steel);
  text-decoration: none;
  padding-block: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.rail-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.rail-link--strong { color: var(--orange); }

.rail-link--strong:hover { color: var(--amber); border-bottom-color: var(--amber); }

/* 5.4 主栏 */
.header-main {
  background: var(--night);
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow 0.25s var(--ease);
}

[data-site-header][data-scrolled="true"] .header-main {
  box-shadow: 0 1px 0 var(--line-strong), 0 22px 34px -30px rgba(0, 0, 0, 0.95);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 clamp(14px, 2.4vw, 34px);
  min-height: var(--header-h);
}

/* 5.5 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
  color: var(--ice);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.brand:hover .brand-mark { background: var(--amber); }

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

.brand-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--ice);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--steel);
}

/* 5.6 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

.nav-toggle[aria-expanded="true"] { border-color: var(--orange); color: var(--orange); }

.nav-toggle-icon {
  display: grid;
  gap: 3px;
  width: 18px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
}

.nav-toggle-label { line-height: 1; }

/* 5.7 主导航 */
.site-nav { display: flex; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 1.6vw, 1.5rem);
}

.nav-item { display: block; }

.nav-link {
  display: inline-block;
  padding: 0.7rem 0.15rem;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ice);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav-link:hover { color: var(--orange); border-bottom-color: var(--orange); }

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

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 9vw, 140px);
  background-color: var(--night);
  background-image: radial-gradient(120% 90% at 82% -10%, rgba(45, 226, 197, 0.1), transparent 62%);
  color: var(--ice);
  overflow: hidden;
}

.footer-stripe {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--orange) 0 16%,
    var(--amber) 16% 24%,
    var(--cyan) 24% 34%,
    rgba(108, 122, 153, 0.45) 34% 100%
  );
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr) minmax(0, 0.9fr) minmax(0, 1.15fr);
  gap: clamp(26px, 3.6vw, 56px);
  padding-block: clamp(40px, 6vw, 76px);
}

.footer-brand { max-width: 42ch; }

.footer-statement {
  margin-top: 1.15rem;
  font-size: 0.94rem;
  line-height: 1.75;
  color: rgba(232, 237, 247, 0.82);
}

.footer-note {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--steel);
}

.footer-actions { margin-top: 1.5rem; }

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

.footer-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--steel);
}

.footer-title::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--orange);
}

.footer-list { display: grid; gap: 0.1rem; }

.footer-link {
  display: inline-block;
  padding-block: 0.34rem;
  font-size: 0.92rem;
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}

.footer-link:hover { color: var(--orange); border-bottom-color: var(--orange); }

.footer-text {
  padding-block: 0.34rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: rgba(232, 237, 247, 0.86);
  overflow-wrap: anywhere;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
  padding-block: 1.15rem 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--steel);
}

.footer-copy { letter-spacing: 0.08em; }

.footer-icp { color: var(--steel); }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.5em;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.btn-primary:hover { background: #FFC53A; border-color: #FFC53A; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ice);
}

.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  padding-top: clamp(18px, 3vw, 30px);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--steel);
}

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

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--steel);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.breadcrumb a:hover { color: var(--cyan); }

.breadcrumb [aria-current="page"] { color: var(--ice); }

/* ---------- 9. 章节底色与网格 ---------- */
.sheet {
  background: var(--paper);
  color: var(--ink);
}

.sheet h1,
.sheet h2,
.sheet h3,
.sheet h4 {
  color: var(--ink);
}

.sheet a { color: var(--rust); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

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

.panel {
  padding: clamp(18px, 2.6vw, 30px);
  background: var(--night-2);
  border: 1px solid var(--line);
}

.sheet .panel {
  background: rgba(28, 21, 16, 0.05);
  border-color: var(--line-paper);
}

/* ---------- 10. 图片容器（页面阶段放置 img） ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--night-2);
  border: 1px solid var(--line);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06) brightness(0.92);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(11, 16, 38, 0.16) 0 1px,
    transparent 1px 3px
  );
  opacity: 0.55;
}

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

.media-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.45rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ice);
  background: rgba(11, 16, 38, 0.86);
  border-top: 1px solid var(--line);
}

/* ---------- 11. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.26rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--steel);
  border: 1px solid var(--line-strong);
}

.tag--home { color: var(--orange); border-color: var(--orange); }
.tag--away { color: var(--cyan); border-color: var(--cyan); }

/* ---------- 12. 正文长栏 ---------- */
.prose {
  max-width: 68ch;
  font-size: 1.01rem;
  line-height: 1.8;
}

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

.prose h2 {
  margin-top: 2.1em;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.prose h3 { margin-top: 1.7em; }

.prose ul { display: grid; gap: 0.5em; }

.prose ul li {
  position: relative;
  padding-left: 1.2em;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 8px;
  height: 1px;
  background: var(--cyan);
}

.sheet .prose ul li::before { background: var(--rust); }

/* ---------- 13. 显现协议 ---------- */
[data-reveal] {
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

[data-reveal-state="hidden"] {
  opacity: 0;
  transform: translateY(16px);
}

[data-reveal-state="shown"] {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 动画 ---------- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45, 226, 197, 0.5); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(45, 226, 197, 0); }
}

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

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }

  .site-header { position: relative; }

  .header-inner { padding-block: 0.85rem; gap: 0; min-height: 0; }

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

  .site-nav {
    display: none;
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.85rem;
    border-top: 1px solid var(--line);
  }

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

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

  .nav-item + .nav-item { border-top: 1px solid var(--line); }

  .nav-link {
    display: block;
    padding: 0.95rem 0.2rem;
    font-size: 1rem;
    border-bottom: 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
  }

  .nav-link:hover,
  .nav-link[aria-current="page"] { border-left-color: currentColor; border-bottom: 0; }

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

@media (max-width: 720px) {
  .rail-inner { justify-content: flex-start; min-height: 34px; }
  .rail-links { display: none; }
  .rail-note { font-size: 0.64rem; letter-spacing: 0.1em; }

  .scroll-meter { height: 2px; }
}

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

  .footer-inner { grid-template-columns: 1fr; }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .brand-tag { display: none; }
}

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

  [data-reveal],
  [data-reveal-state="hidden"],
  [data-reveal-state="shown"] {
    opacity: 1 !important;
    transform: none !important;
  }

  .rail-dot { animation: none; }
}
