/* =========================================================
   乐竞体育 · LEJING SPORTS  /assets/site.css
   Shared shell: reset · tokens · masthead · footer · kit
   ========================================================= */

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

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

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

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

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

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

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

::selection { background: #3DF5C8; color: #04211B; }

/* ---------- 2. tokens ---------- */
:root {
  --ink: #06101D;
  --panel: #0B1A2B;
  --raise: #10263B;
  --mint: #3DF5C8;
  --orange: #FF6A2B;
  --violet: #7B61FF;
  --paper: #F2F7FA;
  --muted: #93A8BA;
  --line: #213B52;
  --haze: #A8FFF0;

  --wrap: 1240px;
  --radius: 18px;
  --radius-sm: 10px;

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

  --ease: cubic-bezier(.22, .68, 0, 1);
}

/* ---------- 3. base / 中文排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 620px at 8% -12%, rgba(61, 245, 200, .11), transparent 72%),
    radial-gradient(900px 560px at 96% 4%, rgba(123, 97, 255, .14), transparent 70%),
    radial-gradient(780px 520px at 50% 106%, rgba(255, 106, 43, .08), transparent 72%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.012em;
}

h1, h2 { text-wrap: balance; }

p { text-wrap: pretty; }

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

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

/* ---------- 4. 布局工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.wrap--narrow { max-width: 880px; }

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

.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.stack > * + * { margin-top: 18px; }

/* ---------- 5. 排版组件 ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mint);
}

.kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.section-head__title {
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
}

.lede {
  font-size: 17.5px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 62ch;
}

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

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.2;
  transition: transform .22s var(--ease), background-color .22s var(--ease),
    border-color .22s var(--ease), color .22s var(--ease);
}

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

.btn--primary { background: var(--mint); color: #04211B; }
.btn--primary:hover { background: var(--haze); }

.btn--accent { background: var(--orange); color: #1A0900; }
.btn--accent:hover { background: #FF8A57; }

.btn--ghost {
  background: rgba(16, 38, 59, .72);
  border-color: var(--line);
  color: var(--paper);
}
.btn--ghost:hover { border-color: rgba(61, 245, 200, .6); color: var(--mint); }

/* ---------- 7. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 38, 59, .6);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
}

.tag--mint { background: var(--mint); border-color: var(--mint); color: #04211B; font-weight: 700; }
.tag--orange { background: var(--orange); border-color: var(--orange); color: #1A0900; font-weight: 700; }
.tag--violet { background: rgba(123, 97, 255, .2); border-color: rgba(123, 97, 255, .55); color: #EDEBFF; }
.tag--muted { background: rgba(147, 168, 186, .1); border-color: var(--line); color: var(--muted); }

/* ---------- 8. 卡片 ---------- */
.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), rgba(11, 26, 43, .78));
  transition: transform .26s var(--ease), border-color .26s var(--ease),
    background-color .26s var(--ease);
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(61, 245, 200, .55);
  background: linear-gradient(160deg, var(--raise), rgba(16, 38, 59, .9));
}

.card:focus-within { border-color: rgba(255, 106, 43, .6); }

.card__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__title {
  margin-top: 10px;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.34;
}

.card__text {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--muted);
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.breadcrumb li { display: flex; align-items: center; gap: 9px; }
.breadcrumb li + li::before { content: "/"; color: var(--line); }
.breadcrumb a { transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--mint); }
.breadcrumb [aria-current="page"] { color: var(--haze); }

/* ---------- 10. 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(16, 38, 59, .95) 0%, rgba(11, 26, 43, .95) 46%, rgba(6, 16, 29, .95) 100%);
}

.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3  { aspect-ratio: 4 / 3; }
.media-frame--1x1  { aspect-ratio: 1 / 1; }
.media-frame--21x9 { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }

.media-frame img,
.media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 16, 29, .78);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--haze);
}

/* ---------- 11. 章节轨道 ---------- */
.chapter-track {
  position: fixed;
  left: 22px;
  top: 50%;
  z-index: 30;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  transform: translateY(-50%);
}

.chapter-track__label {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--muted);
}

.chapter-track a {
  padding: 5px 0;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--muted);
  transition: color .2s var(--ease);
}

.chapter-track a:hover { color: var(--paper); }
.chapter-track a[aria-current="location"] { color: var(--mint); }

/* ---------- 12. skip link / 阅读进度 ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 100;
  padding: 11px 22px;
  border-radius: 0 0 12px 12px;
  background: var(--mint);
  color: #04211B;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  transform: translate(-50%, -160%);
  transition: transform .24s var(--ease);
}

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

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: 2px;
  background: rgba(33, 59, 82, .55);
  pointer-events: none;
}

.reading-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--mint), var(--violet) 58%, var(--orange));
  transition: transform .18s linear;
}

/* ---------- 13. masthead ---------- */
.masthead {
  position: relative;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.masthead__ticker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg,
      rgba(61, 245, 200, .08) 0%,
      rgba(123, 97, 255, .07) 54%,
      rgba(255, 106, 43, .06) 100%);
}

.masthead__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(61, 245, 200, .14);
  animation: dot-pulse 3.4s var(--ease) infinite;
}

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(61, 245, 200, .1); }
  50%      { box-shadow: 0 0 0 8px rgba(61, 245, 200, .16); }
}

.masthead__note {
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--muted);
}

.masthead__link {
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--haze);
  border-bottom: 1px solid rgba(168, 255, 240, .35);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.masthead__link:hover { color: var(--mint); border-bottom-color: var(--mint); }

.masthead__plate {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: clamp(26px, 4vw, 48px) 20px clamp(18px, 2.6vw, 30px);
}

.masthead__plate::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(720px, 84%);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(61, 245, 200, .16) 0%,
    rgba(123, 97, 255, .09) 40%,
    transparent 68%);
  pointer-events: none;
}

.masthead__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.masthead__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .44em;
  text-transform: uppercase;
  color: var(--mint);
}

.masthead__wordmark {
  font-size: clamp(46px, 10vw, 128px);
  font-weight: 200;
  line-height: .95;
  letter-spacing: -.045em;
  color: var(--paper);
  background-image: linear-gradient(172deg, #FFFFFF 6%, #CFEDFF 46%, #7BE7CE 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity .25s var(--ease);
}

.masthead__brand:hover .masthead__wordmark { opacity: .86; }

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .masthead__wordmark {
    background-image: none;
    color: var(--paper);
    -webkit-text-fill-color: currentColor;
  }
}

.masthead__meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .26em;
  color: var(--muted);
}

/* ---------- 14. 吸顶导航轨道 ---------- */
.masthead__rail {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 29, .84);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}

html.is-scrolled .masthead__rail {
  background: rgba(6, 16, 29, .94);
  box-shadow: 0 22px 44px -32px #000;
}

.rail-inner {
  display: flex;
  justify-content: center;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 8px 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 38, 59, .72);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--paper);
}

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

.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}

.nav-toggle__text { line-height: 1; }

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

.nav-list a {
  display: block;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--muted);
  transition: color .2s var(--ease), background-color .2s var(--ease),
    border-color .2s var(--ease);
}

.nav-list a:hover {
  color: var(--paper);
  background: var(--raise);
  border-color: var(--line);
}

.nav-list a[aria-current="page"] {
  background: var(--mint);
  border-color: var(--mint);
  color: #04211B;
  font-weight: 700;
}

.nav-list a[aria-current="page"]:hover {
  background: var(--haze);
  border-color: var(--haze);
  color: #04211B;
}

/* ---------- 15. footer ---------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 26, 43, .68), rgba(6, 16, 29, .98));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr .9fr .85fr;
  gap: clamp(26px, 4vw, 56px);
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(38px, 5vw, 64px) 20px clamp(26px, 3.4vw, 40px);
}

.footer-brand__mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--paper);
}

.footer-brand__mark::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(61, 245, 200, .13);
}

.footer-brand__line {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}

.footer-nav__label,
.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-nav__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 20px;
  margin-top: 14px;
}

.footer-nav__list a {
  display: inline-block;
  font-size: 13.5px;
  line-height: 2;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-nav__list a:hover {
  color: var(--mint);
  border-bottom-color: rgba(61, 245, 200, .45);
}

.footer-contact__label { margin-bottom: 14px; }

.footer-contact__item {
  font-size: 13.5px;
  line-height: 1.7;
  letter-spacing: .03em;
  color: var(--paper);
}

.footer-contact__item + .footer-contact__item { margin-top: 7px; }

.footer-contact__link {
  color: var(--haze);
  border-bottom: 1px solid rgba(168, 255, 240, .4);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-contact__link:hover { color: var(--mint); border-bottom-color: var(--mint); }

.footer-bottom {
  border-top: 1px solid var(--line);
  background: rgba(6, 16, 29, .9);
}

.footer-bottom__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--muted);
}

/* ---------- 16. 显现 ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .72s var(--ease), transform .72s var(--ease);
}

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

/* ---------- 17. 响应式 ---------- */
@media (min-width: 1200px) {
  .chapter-track { display: flex; }
}

@media (max-width: 1024px) {
  .col-3 { grid-column: span 6; }
  .col-4 { grid-column: span 6; }
  .col-5 { grid-column: span 6; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 108px; }

  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
  .col-3, .col-4, .col-5 { grid-column: span 3; }
  .col-6, .col-7, .col-8, .col-9 { grid-column: span 6; }
  .col-12 { grid-column: span 6; }

  .masthead__ticker { gap: 8px 12px; padding: 10px 18px; }
  .masthead__note { font-size: 12px; letter-spacing: .1em; }

  .rail-inner { padding: 10px 18px; }

  .site-nav {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .nav-toggle { display: inline-flex; align-self: center; }

  .nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
  }

  .site-nav[data-open] .nav-list { display: flex; }

  .nav-list a {
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    font-size: 14.5px;
  }

  .site-nav[data-open] .nav-toggle__bars span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
  }
  .site-nav[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  .site-nav[data-open] .nav-toggle__bars span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
  }

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

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

  .grid { grid-template-columns: 1fr; }
  [class*="col-"] { grid-column: 1 / -1; }

  .masthead__plate { padding: 24px 18px 18px; }
  .masthead__meta { letter-spacing: .18em; font-size: 10px; }

  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-nav__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-bottom__inner { justify-content: flex-start; }
  .btn { width: 100%; }
}

/* ---------- 18. 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .has-js [data-reveal] { opacity: 1; transform: none; }
  .reading-progress__bar { transition: none; }
  .card:hover, .card:focus-within, .btn:hover { transform: none; }
}
