/* =========================================================
   LEYU 体育主站 · Shared Site Kit
   夜场战术板 / 纵向章节长卷 / 暖纸与深墨
   ========================================================= */

:root {
  /* 色板（严格来自品牌系统） */
  --ink-900: #070B1F;
  --ink-800: #0E1633;
  --ink-700: #18224A;
  --paper: #F2ECE0;
  --paper-ink: #161B2E;
  --mute: #C9C2B4;
  --cyan: #35F0D0;
  --orange: #FF7A2F;
  --violet: #6C4BD8;
  --grass: #7FE38A;
  --hairline: #2A3563;

  /* 尺寸与节奏 */
  --wrap: 1240px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  /* 字号刻度 */
  --fs-num: clamp(72px, 12vw, 180px);
  --fs-h1: clamp(34px, 5.4vw, 56px);
  --fs-h2: clamp(24px, 3.2vw, 32px);
  --fs-body: 17px;
  --fs-small: 13px;
}

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

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

body {
  margin: 0;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(120% 80% at 50% -12%, rgb(108 75 216 / 0.20), transparent 62%),
    radial-gradient(90% 60% at 100% 0%, rgb(53 240 208 / 0.07), transparent 55%);
  background-repeat: no-repeat;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

ul, ol { margin: 0; padding: 0; }

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

a {
  color: inherit;
  text-decoration-color: rgb(53 240 208 / 0.45);
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-color: var(--cyan); }

button { font: inherit; color: inherit; }

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

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

/* ---------- 排版工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

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

.status-dot {
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgb(53 240 208 / 0.16);
}

/* ---------- 按钮 ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: var(--hairline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bd);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    color 0.18s var(--ease),
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

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

.btn--primary {
  --btn-bg: var(--orange);
  --btn-fg: var(--ink-900);
  --btn-bd: var(--orange);
}
.btn--primary:hover { --btn-bg: #ff9159; --btn-bd: #ff9159; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: var(--hairline);
}
.btn--ghost:hover {
  --btn-fg: var(--cyan);
  --btn-bd: var(--cyan);
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 22px 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

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

.crumbs__link {
  color: var(--mute);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.crumbs__link:hover { color: var(--cyan); }

.crumbs__sep { color: var(--hairline); }

.crumbs__item--current { color: var(--paper); }

/* ---------- 章节骨架 ---------- */
.section {
  position: relative;
  padding-block: clamp(56px, 7vw, 96px);
}

.section + .section { border-top: 1px solid var(--hairline); }

.section__head {
  display: grid;
  gap: 14px;
  max-width: 62ch;
}

.section__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--cyan);
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
}

.section__lede {
  font-size: var(--fs-body);
  line-height: 1.75;
  color: rgb(201 194 180 / 0.94);
  max-width: 38ch;
}

.section__body { margin-top: clamp(28px, 4vw, 44px); }

.display-num {
  display: block;
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: var(--fs-num);
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: rgb(242 236 224 / 0.13);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

/* 浅色章节 */
.paper-band {
  background: var(--paper);
  color: var(--paper-ink);
}
.paper-band .section__num,
.paper-band .eyebrow,
.paper-band .section__lede { color: #18224A; }
.paper-band .section__lede { color: rgb(22 27 46 / 0.82); }
.paper-band .rule { background: rgb(22 27 46 / 0.16); }

/* ---------- 栅格 ---------- */
.grid {
  display: grid;
  gap: var(--gutter);
  align-items: start;
}

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

.span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-6 { grid-column: span 6; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .span-12 { grid-column: 1 / -1; }
}

/* ---------- 图片容器 ---------- */
.figure {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background-color: var(--ink-700);
  background-image: repeating-linear-gradient(
    115deg,
    rgb(42 53 99 / 0.55) 0 1px,
    transparent 1px 9px
  ), linear-gradient(160deg, #0E1633 0%, #070B1F 78%);
}

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

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

.figure__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 18% 0%, rgb(53 240 208 / 0.18), transparent 56%),
    linear-gradient(180deg, rgb(7 11 31 / 0.04) 0%, rgb(7 11 31 / 0.74) 100%);
}

.figure__tag {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--mute);
}

/* ---------- 卡片面板 ---------- */
.surface {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: linear-gradient(160deg, rgb(24 34 74 / 0.94), rgb(14 22 51 / 0.94));
  box-shadow: 0 18px 48px -36px rgb(0 0 0 / 0.9);
}

.surface--flush { padding: 0; }

/* ---------- 分段切换 chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgb(242 236 224 / 0.76);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  cursor: pointer;
  transition:
    color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.chip:hover { color: var(--paper); border-color: var(--cyan); }

.chip[aria-pressed="true"] {
  color: var(--ink-900);
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 700;
}

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

html[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

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

/* 章节索引高亮（页面阶段由 data-chapter-link 使用） */
[data-chapter-link][aria-current="true"] {
  color: var(--cyan);
  font-weight: 700;
}

/* =========================================================
   页头
   ========================================================= */

.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--cyan);
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transition: top 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgb(7 11 31 / 0.97) 0%, rgb(14 22 51 / 0.92) 100%);
  border-bottom: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  background: transparent;
  overflow: hidden;
}

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

.masthead {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 16px var(--gutter) 0;
  transition: padding-top 0.32s var(--ease);
}

.site-header[data-collapsed] .masthead { padding-top: 8px; }

.masthead__top {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand toggle";
  align-items: center;
  gap: 10px 16px;
  padding-bottom: 12px;
  transition: padding-bottom 0.32s var(--ease);
}

.site-header[data-collapsed] .masthead__top { padding-bottom: 8px; }

.masthead__brand {
  grid-area: brand;
  justify-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--paper);
  text-decoration: none;
  line-height: 1;
}

.masthead__wordmark {
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: font-size 0.32s var(--ease);
}

.site-header[data-collapsed] .masthead__wordmark { font-size: 18px; }

.masthead__suffix {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--mute);
}

.masthead__meta {
  display: none;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--mute);
  white-space: nowrap;
}

.masthead__meta--left { grid-area: meta-left; justify-self: start; }
.masthead__meta--right { grid-area: meta-right; justify-self: end; }

.masthead__tagline { color: rgb(201 194 180 / 0.92); }

.masthead__utility { color: rgb(242 236 224 / 0.78); }

/* 移动端汉堡 */
.nav-toggle {
  grid-area: toggle;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--paper);
  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__icon {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
  flex: none;
}

.nav-toggle__bar {
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: top 0.22s var(--ease), transform 0.22s var(--ease);
}

.nav-toggle__bar:nth-child(1) { top: 1px; }
.nav-toggle__bar:nth-child(2) { top: 8px; }

.site-header[data-open="true"] .nav-toggle__bar:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}
.site-header[data-open="true"] .nav-toggle__bar:nth-child(2) {
  top: 5px;
  transform: rotate(-45deg);
}

.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
}

/* 栏目 */
.masthead__nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.34s var(--ease);
}

.site-header[data-open="true"] .masthead__nav { max-height: 30rem; }

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 4px 0 16px;
  border-top: 1px solid var(--hairline);
}

.nav-list__item { border-bottom: 1px solid rgb(42 53 99 / 0.6); }
.nav-list__item:last-child { border-bottom: 0; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 2px;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: rgb(242 236 224 / 0.78);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.nav-link:hover { color: var(--paper); }

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s var(--ease);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] { color: var(--cyan); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* 平板 / 桌面 */
@media (min-width: 960px) {
  html { scroll-padding-top: 132px; }

  .masthead { padding-top: 20px; }

  .masthead__top {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "meta-left brand meta-right";
    padding-bottom: 16px;
  }

  .masthead__meta { display: inline-flex; }

  .masthead__brand { justify-self: center; }

  .masthead__wordmark { font-size: 24px; letter-spacing: 0.1em; }

  .site-header[data-collapsed] .masthead__wordmark { font-size: 20px; }

  .nav-toggle { display: none; }

  .masthead__nav {
    max-height: none;
    overflow: visible;
    transition: none;
  }

  .nav-list {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: clamp(16px, 2.6vw, 38px);
    padding: 0 0 14px;
    border-top: 0;
  }

  .nav-list__item { border-bottom: 0; }

  .nav-link {
    display: inline-flex;
    min-height: 0;
    padding: 8px 2px;
    font-size: 14.5px;
    letter-spacing: 0.06em;
  }

  .nav-link::after { bottom: 2px; }
}

@media (min-width: 1200px) {
  .nav-list { gap: 42px; }
}

/* =========================================================
   页脚
   ========================================================= */

.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 120px);
  padding-block: clamp(48px, 6vw, 80px) 30px;
  color: var(--paper);
  border-top: 1px solid var(--hairline);
  background:
    radial-gradient(90% 130% at 10% 0%, rgb(108 75 216 / 0.24), transparent 62%),
    radial-gradient(70% 90% at 92% 8%, rgb(53 240 208 / 0.08), transparent 58%),
    linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 72%);
}

.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 32px;
}

.footer-lede {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 36ch;
}

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--paper);
  text-decoration: none;
  line-height: 1;
}

.footer-brand__mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.footer-brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--mute);
}

.footer-intro {
  font-size: 15px;
  line-height: 1.8;
  color: rgb(201 194 180 / 0.94);
}

.footer-col { border-top: 1px solid var(--hairline); padding-top: 18px; }

.footer-col__title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--cyan);
  margin-bottom: 14px;
}

.footer-col__list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  padding-block: 3px;
  font-size: 15px;
  color: rgb(242 236 224 / 0.78);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible { color: var(--cyan); }

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin-top: clamp(32px, 4vw, 46px);
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}

.footer-contact__label {
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.footer-contact__value {
  color: var(--paper);
  letter-spacing: 0.02em;
  word-break: break-all;
}

.footer-contact__note { color: var(--mute); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 28px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--mute);
}

.footer-bottom__legal { letter-spacing: 0.04em; }

.footer-bottom__meta { letter-spacing: 0.02em; }

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-lede { grid-column: 1 / -1; max-width: 44ch; }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
    gap: 32px 40px;
  }
  .footer-lede { grid-column: auto; }
  .footer-col { border-top: 0; padding-top: 0; }
  .footer-col__title { padding-bottom: 14px; border-bottom: 1px solid var(--hairline); }
}

/* =========================================================
   小屏微调
   ========================================================= */

@media (max-width: 640px) {
  :root { --gutter: 18px; --fs-body: 16px; }
  .section__head { max-width: none; }
  .section__lede { max-width: none; }
  .footer-bottom { flex-direction: column; }
}

/* =========================================================
   动效降级
   ========================================================= */

@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;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .btn:hover,
  .chip:hover { transform: none; }

  .header-progress__bar { transition: none; }
}
