/* ==========================================================================
   长城体育 · 共享样式 /assets/site.css
   夜场烽火 + 档案轨道：深墨压底、暖纸成块、编号串联
   ========================================================================== */

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

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

body, h1, h2, h3, h4, h5, p, figure, blockquote, ul, ol, dl, dd, pre { 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; }
table { border-collapse: collapse; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0F1214;
  --ink-2: #1A1F22;
  --ink-3: #232A2E;
  --brick: #7A736A;
  --brick-lt: #A9A296;
  --ember: #E2571F;
  --red: #C0322C;
  --green: #2E9E68;
  --amber: #F0B03C;
  --paper: #F3EBDD;
  --paper-ink: #1C1C1A;
  --fg: #E7E1D6;

  --rail-w: 88px;
  --bar-h: 66px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-num: ui-monospace, "SFMono-Regular", "Menlo", "Consolas",
    "Liberation Mono", "Courier New", monospace;

  --dur: 160ms;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. Base typography ---------- */
body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: .01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-weight: 300; letter-spacing: -.02em; line-height: 1.18; }

p { line-height: 1.75; }

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

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Type utilities ---------- */
.display {
  font-size: clamp(2.75rem, 7.4vw, 5.5rem);
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: -.02em;
}
.h2 { font-size: clamp(1.55rem, 3.4vw, 2.35rem); font-weight: 300; }
.h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.label {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
}
.mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.idx {
  font-family: var(--font-num);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--brick-lt);
}
.on-paper { background: var(--paper); color: var(--paper-ink); }
.on-paper .idx { color: #6B655C; }
.on-paper .label { color: #554F47; }

/* ---------- 5. Layout containers ---------- */
.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 900px) { .wrap { padding-inline: 36px; } }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

.rule {
  height: 1px;
  border: 0;
  margin-block: 26px;
  background: linear-gradient(90deg, rgba(122,115,106,.55), rgba(122,115,106,0));
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn--solid { background: var(--ember); color: #0F1214; }
.btn--solid:hover { background: #F0723E; }
.btn--ghost { border-color: rgba(122,115,106,.55); color: var(--paper); }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn--line { border-color: var(--brick); color: var(--brick-lt); }
.btn--line:hover { border-color: var(--green); color: var(--green); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ---------- 7. Cards / tags / status ---------- */
.card {
  background: var(--ink-2);
  border: 1px solid rgba(122,115,106,.3);
  padding: 18px;
}
.card--paper {
  background: var(--paper);
  color: var(--paper-ink);
  border-color: #D9CFBE;
}
.card--paper .idx { color: #6B655C; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid currentColor;
  color: var(--brick-lt);
}
.tag--amber { color: var(--amber); }
.tag--red { color: var(--red); }
.tag--green { color: var(--green); }
.tag--ember { color: var(--ember); }

.led {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46,158,104,.18);
}
.led--green { background: var(--green); box-shadow: 0 0 0 3px rgba(46,158,104,.18); }
.led--amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(240,176,60,.2); }
.led--red { background: var(--red); box-shadow: 0 0 0 3px rgba(192,50,44,.22); }

@media (prefers-reduced-motion: no-preference) {
  .led { animation: led-breathe 3s ease-in-out infinite; }
}
@keyframes led-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: .42; }
}

/* ---------- 8. Media containers ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink-2);
  border: 1px solid rgba(122,115,106,.35);
}
.media 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; }

/* ---------- 9. Breadcrumbs ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  font-size: .75rem;
  letter-spacing: .02em;
  color: var(--brick-lt);
}
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "›"; color: var(--brick); }
.crumbs a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.crumbs a:hover { color: var(--paper); border-bottom-color: var(--ember); }
.crumbs [aria-current="page"] { color: var(--amber); }

/* ---------- 10. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  padding: 10px 18px;
  background: var(--amber);
  color: #0F1214;
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ==========================================================================
   11. SITE HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 300;
}

.rail {
  position: relative;
  display: block;
}

/* 进度线：移动端在状态条上方横向 */
.rail__progress {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(122,115,106,.22);
  overflow: hidden;
}
.rail__progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--ember), var(--amber));
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* 底部状态条 */
.rail__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding: 0 14px calc(env(safe-area-inset-bottom));
  background: #0E1113;
  border-block-start: 1px solid rgba(122,115,106,.34);
  box-shadow: 0 -14px 30px rgba(0,0,0,.55);
}

.rail__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--fg);
  min-width: 0;
}
.rail__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  background: var(--ember);
  color: #0F1214;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}
.rail__brandtext { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.rail__name { font-size: 13px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.rail__sub {
  font-family: var(--font-num);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--brick-lt);
  margin-top: 2px;
}
.rail__brand:hover .rail__name { color: var(--amber); }

.rail__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--brick-lt);
  white-space: nowrap;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(122,115,106,.5);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--amber); color: var(--amber); }
.nav-toggle__bars { position: relative; width: 16px; height: 10px; flex: none; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ember);
  transition: transform var(--dur) var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.site-header[data-open] .nav-toggle__bars::before { transform: translateY(4px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: translateY(-4px) rotate(-45deg); }

/* 移动端抽屉 */
.railnav {
  position: fixed;
  inset-inline: 0;
  inset-block-end: calc(var(--bar-h) + env(safe-area-inset-bottom));
  z-index: 1;
  max-height: calc(100dvh - var(--bar-h) - env(safe-area-inset-bottom) - 16px);
  overflow-y: auto;
  padding: 16px 18px 22px;
  background: linear-gradient(180deg, #131719 0%, #0B0E10 100%);
  border-block-start: 1px solid rgba(122,115,106,.45);
  box-shadow: 0 -20px 44px rgba(0,0,0,.6);
  visibility: hidden;
  transform: translateY(calc(100% + var(--bar-h) + 60px));
  transition: transform .32s var(--ease), visibility 0s linear .32s;
}
.site-header[data-open] .railnav {
  visibility: visible;
  transform: translateY(0);
  transition: transform .32s var(--ease), visibility 0s linear 0s;
}

.railnav__list { display: flex; flex-direction: column; gap: 2px; }

.railnav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  text-decoration: none;
  color: #DDD6C9;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-inline-start: 2px solid transparent;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.railnav__link:hover { background: rgba(122,115,106,.16); color: var(--paper); }
.railnav__link[aria-current="page"] {
  background: rgba(240,176,60,.12);
  color: var(--amber);
  border-inline-start-color: var(--amber);
}

.railnav__idx {
  font-family: var(--font-num);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .14em;
  opacity: .72;
  flex: none;
}
.railnav__txt { font-weight: 800; letter-spacing: .04em; }

.railnav__cta {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  padding: 12px 10px;
  background: var(--ember);
  color: #0A0D0F;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .06em;
  text-align: center;
  text-decoration: none;
  transition: background var(--dur) var(--ease);
}
.railnav__cta:hover { background: #F0723E; }

/* 移动端主内容让位 */
@media (max-width: 899px) {
  body { padding-block-end: calc(var(--bar-h) + env(safe-area-inset-bottom) + 12px); }
}

/* ---------- 桌面端：左侧纵向轨道 ---------- */
@media (min-width: 900px) {
  body { padding-inline-start: var(--rail-w); }

  .site-header {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: var(--rail-w);
    z-index: 300;
  }

  .rail {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 18px 0 16px;
    background: linear-gradient(180deg, #151A1D 0%, #0C0F11 62%, #0A0D0F 100%);
    border-inline-end: 1px solid rgba(122,115,106,.32);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }

  .rail__progress {
    position: absolute;
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 2px;
    height: auto;
  }
  .rail__progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--amber), var(--ember));
    transform: scaleY(var(--p, 0));
    transform-origin: 50% 0;
  }

  .rail__bar {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .rail__brand {
    flex-direction: column;
    gap: 8px;
    width: 100%;
    justify-content: center;
  }
  .rail__mark { width: 40px; height: 40px; font-size: 19px; }
  .rail__brandtext { align-items: center; }
  .rail__name { font-size: 12px; letter-spacing: .14em; }
  .rail__sub { display: none; }

  .rail__status {
    flex-direction: column;
    gap: 5px;
    font-size: 9px;
    letter-spacing: .1em;
  }

  .nav-toggle { display: none; }

  .railnav {
    position: static;
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    visibility: visible;
    transform: none;
    transition: none;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .railnav__list {
    width: 100%;
    padding: 0 6px;
    gap: 2px;
  }

  .railnav__link {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 4px;
    font-size: .75rem;
    border-inline-start: 2px solid transparent;
  }
  .railnav__idx { font-size: .5625rem; opacity: .62; }
  .railnav__txt { font-size: .75rem; letter-spacing: .02em; white-space: nowrap; }

  .railnav__cta {
    width: calc(100% - 16px);
    margin: 14px 8px 0;
    padding: 10px 6px;
    font-size: .75rem;
    letter-spacing: .04em;
  }
}

/* ==========================================================================
   12. SITE FOOTER
   ========================================================================== */

.site-footer {
  position: relative;
  background: #0B0E10;
  border-block-start: 1px solid rgba(122,115,106,.3);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(122,115,106,.055) 0 1px,
    transparent 1px 12px
  );
}
.site-footer > * { position: relative; }

.footer-shell {
  display: grid;
  gap: 30px;
  padding-block: 48px 40px;
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-mark {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 200;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--paper);
}
.footer-mark::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--ember), var(--amber));
}
.footer-tagline {
  font-size: .875rem;
  line-height: 1.7;
  color: var(--brick-lt);
  max-width: 26ch;
}
.footer-domain {
  font-size: .6875rem;
  letter-spacing: .16em;
  color: var(--brick);
  margin-top: 2px;
}

.footer-cols { display: grid; gap: 24px; }
@media (min-width: 560px) {
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

.footer-col__head {
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--brick);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(122,115,106,.28);
}
.footer-col__list { display: flex; flex-direction: column; gap: 8px; }

.footer-link {
  display: inline-block;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: #CFC8BB;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-link:hover { color: var(--amber); border-bottom-color: var(--amber); }

.footer-contact { display: flex; flex-direction: column; gap: 6px; }
.footer-contact__line {
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--brick-lt);
  word-break: break-word;
}
.footer-contact__line:first-of-type {
  font-family: var(--font-num);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--paper);
}

.footer-base {
  background: #080B0C;
  border-block-start: 1px solid rgba(122,115,106,.26);
}
.footer-base__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-block: 20px 28px;
}
.footer-note {
  font-size: .75rem;
  line-height: 1.7;
  color: var(--brick-lt);
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--brick);
}
.footer-copy { white-space: nowrap; }
.footer-icp {
  font-family: var(--font-num);
  letter-spacing: .04em;
  white-space: nowrap;
}

@media (min-width: 760px) {
  .footer-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .footer-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.75fr) minmax(0, .9fr);
    gap: 44px;
    padding-block: 60px 48px;
  }
  .footer-brand { grid-column: auto; }
}
@media (min-width: 860px) {
  .footer-base__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-block: 20px 22px;
  }
  .footer-note { max-width: 620px; }
}

/* ==========================================================================
   13. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn:hover { transform: none; }
  .railnav { transition: none; }
}
