/* ==========================================================================
   体育榜前十 — /assets/site.css
   共享外壳：框架式头部 / 索引页脚 / 基础组件
   ========================================================================== */

:root {
  --ink: #121212;
  --ink-2: #062A3A;
  --paper: #F3E9D7;
  --paper-2: #D8CBB8;
  --orange: #FF6B35;
  --blue: #004E89;
  --yellow: #FFD23F;
  --teal: #2EC4B6;
  --line: #3A3A3A;
  --white: #FFFFFF;

  --font-display: "Noto Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --font-stencil: "Impact", "Haettenschweiler", "Arial Narrow", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", Consolas, "Courier New", monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1320px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* 2. 布局壳 ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(36px, 6vw, 88px); }

.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.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)); }

/* 3. 头部框架 -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0 34%, var(--blue) 34% 68%, var(--yellow) 68% 100%);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; }

.header-top__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 16px var(--gutter) 13px;
}

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

.brand__mark {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 7px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-stencil);
  font-size: 26px;
  line-height: 1;
  transition: background-color .16s var(--ease);
}

.brand:hover .brand__mark { background: var(--yellow); }

.brand__text { display: flex; flex-direction: column; gap: 3px; }

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .09em;
  line-height: 1.1;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--yellow);
  line-height: 1;
}

.header-tagline {
  font-size: 13px;
  line-height: 1.5;
  color: var(--paper-2);
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--line);
  max-width: 20ch;
}

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 3.1 按钮 ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 0;
  background: none;
  color: inherit;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--yellow);
  border-color: var(--yellow);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--paper);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn--block { width: 100%; }

/* 3.2 移动目录按钮 ---------------------------------------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  cursor: pointer;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.nav-toggle:hover { border-color: var(--yellow); color: var(--yellow); }
.nav-toggle[aria-expanded="true"] { border-color: var(--orange); color: var(--orange); }

.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 3.3 编号索引轨 ------------------------------------------------------------ */
.site-nav {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding-inline: var(--gutter);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin-inline: auto;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 12px clamp(12px, 1.7vw, 26px);
  border-inline-start: 1px solid var(--line);
  color: var(--paper);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}

.nav-item:first-child .nav-link { border-inline-start: 0; }

.nav-link__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--yellow);
}

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

.nav-link:hover {
  background: rgba(255, 107, 53, .16);
  color: var(--white);
}

.nav-link[aria-current="page"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 3px 0 var(--orange);
}
.nav-link[aria-current="page"] .nav-link__num { color: var(--blue); }

/* 4. 页脚 ------------------------------------------------------------------ */
.site-footer {
  margin-top: clamp(56px, 9vw, 120px);
  background-color: var(--ink);
  background-image: repeating-linear-gradient(90deg, rgba(243, 233, 215, .04) 0 1px, transparent 1px 56px);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.footer-bars { display: grid; grid-template-columns: 5fr 3fr 2fr; height: 6px; }
.footer-bars span:nth-child(1) { background: var(--orange); }
.footer-bars span:nth-child(2) { background: var(--blue); }
.footer-bars span:nth-child(3) { background: var(--yellow); }

.footer-inner { padding-block: clamp(30px, 5vw, 64px) 0; }

.footer-masthead {
  padding-bottom: clamp(20px, 3vw, 34px);
  margin-bottom: clamp(24px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.footer-masthead__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.footer-masthead__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(42px, 10vw, 128px);
  line-height: .92;
  letter-spacing: -.02em;
}

.footer-masthead__sub {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--paper-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
  gap: clamp(20px, 3vw, 48px);
}

.footer-col__title {
  padding-bottom: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--yellow);
}

.footer-note {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--paper-2);
  max-width: 34ch;
}

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

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-block: 2px;
  color: var(--paper);
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.footer-link::before {
  content: "→";
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--orange);
  transition: color .16s var(--ease);
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--yellow);
  border-color: var(--yellow);
}
.footer-link:hover::before { color: var(--yellow); }

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

.footer-contact__row { display: grid; gap: 3px; }

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange);
}

.footer-contact__value {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(28px, 4vw, 56px);
  padding-block: 20px 30px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--paper-2);
}

/* 5. 通用组件 -------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  background: var(--orange);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding-bottom: 16px;
  margin-bottom: clamp(20px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
}

.section-head__title { font-size: clamp(28px, 4.4vw, 48px); }

.section-head__note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--paper-2);
  max-width: 42ch;
}

.chapter-num {
  font-family: var(--font-stencil);
  font-size: clamp(48px, 9vw, 110px);
  line-height: .8;
  letter-spacing: .02em;
  color: var(--orange);
}
@supports (-webkit-text-stroke: 1px #000) {
  .chapter-num { color: transparent; -webkit-text-stroke: 1.5px var(--orange); }
}

.panel {
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper-2);
}
.panel--ink { background: var(--ink-2); color: var(--paper); border-color: var(--line); }
.panel--accent { background: var(--orange); color: var(--ink); border-color: var(--orange); }

.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 107, 53, .28), transparent 55%, rgba(0, 78, 137, .38));
  pointer-events: none;
}
.media > img,
.media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--diagonal { clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
}
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; color: var(--paper-2); }
.breadcrumb__item:not(:last-child)::after { content: "/"; color: var(--line); }
.breadcrumb__item[aria-current="page"] { color: var(--paper); }
.breadcrumb__link { color: var(--paper-2); text-decoration: none; }
.breadcrumb__link:hover { color: var(--yellow); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--orange);
}
.tag--blue { color: var(--blue); }
.tag--yellow { color: var(--yellow); }
.tag--teal { color: var(--teal); }

.rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block: clamp(22px, 4vw, 48px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--paper-2);
}
.rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }

.accordion__trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  color: var(--paper);
  transition: color .16s var(--ease);
}
.accordion__trigger:hover { color: var(--yellow); }

.accordion__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--orange);
}

.accordion__icon {
  position: relative;
  flex: 0 0 auto;
  margin-inline-start: auto;
  width: 14px;
  height: 14px;
  color: currentColor;
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform .2s var(--ease);
}
.accordion__icon::before { inset: 6px 0 auto 0; height: 2px; }
.accordion__icon::after { inset: 0 auto 0 6px; width: 2px; }

.accordion__item[data-open="true"] .accordion__trigger { color: var(--yellow); }
.accordion__item[data-open="true"] .accordion__icon::after { transform: scaleY(0); }

.accordion__panel {
  padding-bottom: 22px;
  max-width: 70ch;
  font-size: 16px;
  color: var(--paper-2);
}
.accordion__panel > * + * { margin-top: 12px; }

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 100;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* 6. 响应式 ---------------------------------------------------------------- */
@media (max-width: 1080px) {
  .header-tagline { display: none; }
}

@media (max-width: 960px) {
  body.nav-open { overflow: hidden; }

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

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: 75vh;
    overflow-y: auto;
    padding-inline: 0;
    background: var(--ink);
    border-top: 1px solid var(--orange);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
    z-index: 90;
  }

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

  .nav-list { flex-direction: column; max-width: none; }
  .nav-item { width: 100%; }

  .nav-link {
    width: 100%;
    padding: 16px 24px;
    border-inline-start: 0;
    border-top: 1px solid var(--line);
    font-size: 16px;
  }

  .nav-item:first-child .nav-link { border-top: 0; }

  .nav-link[aria-current="page"] {
    box-shadow: inset 5px 0 0 var(--orange);
  }

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

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

  .brand__mark { min-width: 40px; height: 40px; font-size: 22px; }
  .brand__name { font-size: 17px; letter-spacing: .06em; }
  .brand__sub { letter-spacing: .18em; }

  .btn { padding: 10px 14px; font-size: 13px; }
  .nav-toggle { padding: 9px 11px; }
  .nav-toggle__label { display: none; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-legal { flex-direction: column; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .site-nav { transition: none; }
}
