/* ==========================================================================
   三亿体育入口 · 共享样式 /assets/site.css
   夜场墨绿 + 暖纸色 + 荧光青 + 赛场橙红
   ========================================================================== */

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

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

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

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

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

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

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

/* ---------- 2. 变量 ---------- */
:root {
  --night: #0B2A23;
  --night-2: #10382E;
  --moss: #1E5B4A;
  --cyan: #3BE8C0;
  --orange: #F0532F;
  --paper: #F5EFE2;
  --paper-2: #E4DAC6;
  --ink: #171A18;
  --ink-soft: #3A423D;
  --muted: #6E837A;
  --line: #B9D6CB;

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

  --shell: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-capsule: 0 20px 44px -30px rgba(11, 42, 35, .95);
  --shadow-raise: 0 14px 30px -22px rgba(11, 42, 35, .8);
}

/* ---------- 3. 中文排版基线 ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.012em;
  color: inherit;
}

h1 { font-size: clamp(32px, 4.4vw, 56px); }
h2 { font-size: clamp(24px, 3vw, 36px); }
h3 { font-size: clamp(19px, 2vw, 24px); }
h4 { font-size: 17px; }

p {
  max-width: 68ch;
  margin-bottom: 1.05em;
}

p:last-child { margin-bottom: 0; }

a { color: inherit; }

strong { font-weight: 700; }

::selection {
  background: var(--cyan);
  color: var(--night);
}

#main-content { scroll-margin-top: 108px; outline: none; }

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

.section--paper :focus-visible,
.site-footer :focus-visible { outline-color: var(--cyan); }

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

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

.section--paper {
  background: var(--paper);
  color: var(--ink);
}

.section--dark {
  background: var(--night);
  color: var(--paper);
}

.section--dark p { color: rgba(245, 239, 226, .82); }
.section--dark .meta-text { color: rgba(185, 214, 203, .78); }
.section--dark .lede { color: rgba(245, 239, 226, .84); }

.grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
}

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

/* ---------- 5. 工具类 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.02;
  letter-spacing: -.025em;
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.72;
  color: var(--ink-soft);
}

.meta-text {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--muted);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.link-inline {
  color: var(--moss);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color .18s var(--ease);
}

.link-inline:hover { color: var(--orange); }

/* ---------- 6. 编号章节标题 ---------- */
.chapter-head {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1.6vw, 18px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(20px, 3vw, 34px);
}

.section--dark .chapter-head { border-top-color: rgba(185, 214, 203, .22); }

.chapter-no {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--orange);
}

.chapter-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -.012em;
  line-height: 1.2;
}

/* ---------- 7. 切角面板 ---------- */
.panel {
  position: relative;
  background: var(--paper-2);
  padding: clamp(20px, 2.6vw, 32px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.panel--dark {
  background: var(--night-2);
  color: var(--paper);
}

.panel--dark p { color: rgba(245, 239, 226, .82); }
.panel--outline {
  background: transparent;
  border: 1px solid var(--line);
  clip-path: none;
}

/* ---------- 8. 图片容器（供页面阶段使用） ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--night-2);
  border-radius: 2px;
}

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

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

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

.media__caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 10px;
}

.section--dark .media__caption {
  color: rgba(185, 214, 203, .78);
  border-left-color: rgba(185, 214, 203, .3);
}

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
    color .18s var(--ease), border-color .18s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--orange);
  color: #FFF6F2;
}

.btn--primary:hover { background: #FF6540; }

.btn--dark {
  background: var(--night);
  color: var(--paper);
}

.btn--dark:hover { background: var(--night-2); }

.btn--ghost {
  border-color: var(--moss);
  color: var(--moss);
  background: transparent;
}

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

.section--dark .btn--ghost {
  border-color: rgba(185, 214, 203, .45);
  color: var(--paper);
}

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

/* ---------- 10. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  color: var(--muted);
}

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

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

.breadcrumb__sep {
  color: var(--line);
  user-select: none;
}

.section--dark .breadcrumb { color: rgba(185, 214, 203, .75); }
.section--dark .breadcrumb__sep { color: rgba(185, 214, 203, .4); }

/* ---------- 11. 滚动显现协议 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .34s var(--ease), transform .34s var(--ease);
}

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

/* ==========================================================================
   12. 头部 · 悬浮胶囊导航
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: clamp(10px, 1.4vw, 16px) clamp(12px, 3vw, 34px) 0;
  background: transparent;
  pointer-events: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 80;
  pointer-events: none;
  background: rgba(11, 42, 35, .18);
}

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

.skip-link {
  position: absolute;
  left: 50%;
  top: 10px;
  z-index: 90;
  transform: translate(-50%, -160%);
  padding: 11px 20px;
  background: var(--cyan);
  color: var(--night);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  pointer-events: auto;
  transition: transform .18s var(--ease);
}

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

.capsule {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 1.8vw, 26px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 8px 10px 8px 18px;
  border-radius: 999px;
  background: rgba(11, 42, 35, .94);
  border: 1px solid rgba(185, 214, 203, .16);
  box-shadow: var(--shadow-capsule);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: padding .2s var(--ease), background-color .2s var(--ease);
}

/* 品牌 */
.capsule__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--paper);
  transition: color .18s var(--ease);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--cyan);
  color: var(--night);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

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

.season-tag {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(59, 232, 192, .42);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--cyan);
  white-space: nowrap;
}

/* 导航 */
.capsule__nav {
  flex: 0 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

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

.nav-list a {
  display: block;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  color: rgba(245, 239, 226, .76);
  transition: color .16s var(--ease), background-color .16s var(--ease);
}

.nav-list a:hover {
  color: var(--paper);
  background: rgba(59, 232, 192, .14);
}

.nav-list a[aria-current="page"] {
  background: var(--cyan);
  color: var(--night);
  font-weight: 700;
}

.nav-list a[aria-current="page"]:hover {
  background: var(--cyan);
  color: var(--night);
}

/* 右侧动作 */
.capsule__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ghost-btn {
  padding: 9px 15px;
  border: 1px solid rgba(185, 214, 203, .26);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  color: rgba(245, 239, 226, .84);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

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

.cta-btn {
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  background: var(--orange);
  color: #FFF6F2;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background-color .18s var(--ease), transform .18s var(--ease);
}

.cta-btn:hover {
  background: #FF6540;
  transform: translateY(-1px);
}

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(185, 214, 203, .28);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--cyan);
  background: rgba(59, 232, 192, .1);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}

.nav-toggle__bars { position: relative; }

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }

/* 滚动折叠：只保留品牌、检索与下载 */
.site-header[data-collapsed] .season-tag { display: none; }

/* ==========================================================================
   13. 头部响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-toggle { display: grid; }

  .capsule {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 14px;
    border-radius: 22px;
  }

  .capsule__brand {
    flex: 1 1 auto;
    order: 1;
  }

  .capsule__actions {
    order: 2;
    flex: 0 0 auto;
  }

  .capsule__nav {
    order: 3;
    flex: 1 1 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid rgba(185, 214, 203, .16);
  }

  .capsule__nav[data-open="true"] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .nav-list a {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15.5px;
  }

  .site-header[data-collapsed] .capsule__nav { display: none; }
}

@media (max-width: 560px) {
  .site-header { padding-inline: 10px; }

  .brand__name { font-size: 14px; }

  .ghost-btn {
    padding: 9px 12px;
    font-size: 13px;
  }

  .cta-btn {
    padding: 11px 15px;
    font-size: 13px;
  }

  .capsule__actions { gap: 6px; }
}

/* ==========================================================================
   14. 页脚 · 编辑部目录式索引
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--night);
  color: rgba(245, 239, 226, .84);
  padding-block: clamp(44px, 6vw, 84px) clamp(22px, 3vw, 36px);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(59, 232, 192, 0) 48%, var(--orange) 100%);
}

.footer-shell {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid rgba(185, 214, 203, .18);
}

.brand--footer .brand__mark {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

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

.footer-masthead__note {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .05em;
  color: rgba(185, 214, 203, .72);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3.2vw, 46px);
  padding-block: clamp(26px, 4vw, 46px);
}

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

.footer-col__title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(185, 214, 203, .16);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-list {
  display: grid;
  gap: 9px;
  list-style: none;
  padding: 0;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.5;
  text-decoration: none;
  color: rgba(245, 239, 226, .8);
  transition: color .16s var(--ease), transform .16s var(--ease);
}

.footer-list a::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 1px;
  background: rgba(185, 214, 203, .5);
  transition: width .18s var(--ease), background-color .18s var(--ease);
}

.footer-list a:hover {
  color: var(--cyan);
  transform: translateX(2px);
}

.footer-list a:hover::before {
  width: 20px;
  background: var(--cyan);
}

.footer-list--meta li {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: .02em;
  color: rgba(185, 214, 203, .78);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 26px;
  padding-top: clamp(16px, 2.4vw, 24px);
  border-top: 1px solid rgba(185, 214, 203, .14);
}

.footer-base__item {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: rgba(185, 214, 203, .62);
}

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

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-masthead { align-items: flex-start; }
  .footer-base { justify-content: flex-start; }
}

/* ==========================================================================
   15. 通用栅格与响应式
   ========================================================================== */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
  .panel { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); }
}

/* ==========================================================================
   16. 动效降级
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

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

  .scroll-progress__bar { transition: none; }
}
