/* ============================================================
   火狐体育主站 · 共享站点样式
   文件路径：/assets/site.css
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #F4EFE6;
}

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

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

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

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

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

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

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0B0E11;
  --paper: #F4EFE6;
  --orange: #FF5A1F;
  --burnt: #B9360B;
  --steel: #7C8FA6;
  --lime: #B8FF3D;
  --carbon: #1B232C;
  --line: #D9D0C3;
  --deep: #12161B;
  --signal: #FF3B30;

  --rail-collapsed: 72px;
  --rail-open: 232px;
  --topbar-h: 60px;

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

  --ease-out: cubic-bezier(.2, .7, .3, 1);
  --dur: 240ms;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1280px;
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--deep);
  background: var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(40px, 7vw, 112px); font-weight: 300; line-height: .96; letter-spacing: -0.035em; }
h2 { font-size: clamp(26px, 4.2vw, 52px); font-weight: 400; line-height: 1.06; }
h3 { font-size: clamp(19px, 2.2vw, 26px); font-weight: 600; line-height: 1.32; }
h4 { font-size: 17px; font-weight: 600; line-height: 1.45; }

p { max-width: 72ch; }

strong, b { font-weight: 600; }

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

/* ---------- 4. 工具类 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--steel);
}

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

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 32px);
}

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

@media (max-width: 1023px) {
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .grid--12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { margin: 1.8em 0 .55em; }
.prose h3 { margin: 1.5em 0 .45em; }
.prose a {
  color: var(--burnt);
  border-bottom: 1px solid currentColor;
  transition: color 160ms var(--ease-out);
}
.prose a:hover { color: var(--orange); }
.prose ul { list-style: none; margin-bottom: 1.1em; }
.prose li {
  position: relative;
  padding-left: 20px;
  margin-bottom: .5em;
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 10px;
  height: 1px;
  background: var(--orange);
}

/* ---------- 5. 按钮 / 标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .04em;
  border-radius: 0;
  background: var(--orange);
  color: var(--ink);
  border: 1px solid var(--orange);
  transition: background var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.btn:hover { background: var(--paper); color: var(--burnt); border-color: var(--burnt); }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(244, 239, 230, .35);
}
.btn--ghost:hover { background: var(--orange); color: var(--ink); border-color: var(--orange); }

.btn--sm { padding: 9px 16px; font-size: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--steel);
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  transition: color 160ms var(--ease-out),
              border-color 160ms var(--ease-out),
              background 160ms var(--ease-out);
}
.chip:hover { color: var(--burnt); border-color: var(--burnt); }
.chip.is-active,
.chip[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
  font-weight: 600;
}

/* ---------- 6. 面板 / 媒体容器 ---------- */
.panel {
  background: var(--carbon);
  color: var(--paper);
  border: 1px solid rgba(217, 208, 195, .16);
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: 0;
}
.panel--paper {
  background: var(--paper);
  color: var(--deep);
  border-color: var(--line);
}

.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--carbon);
  border: 1px solid rgba(217, 208, 195, .22);
  border-radius: 0;
}
.media img,
.media picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--wide { aspect-ratio: 21 / 9; }

.media--blueprint::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(244, 239, 230, .12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 239, 230, .12) 1px, transparent 1px);
  background-size: 40px 40px;
}

.media__tag {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  padding: 4px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  background: var(--orange);
  color: var(--ink);
}

/* ---------- 7. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--steel);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li::after { content: "/"; color: rgba(124, 143, 166, .55); }
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: inherit; transition: color 160ms var(--ease-out); }
.breadcrumb a:hover { color: var(--orange); }

/* ---------- 8. 桌面端轨道占位 ---------- */
@media (min-width: 900px) {
  body { padding-left: var(--rail-collapsed); }

  body::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--rail-collapsed);
    background: var(--ink);
    z-index: 40;
    pointer-events: none;
  }
}

/* ---------- 9. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -130%);
  padding: 12px 22px;
  background: var(--orange);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: transform 160ms var(--ease-out);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* ---------- 10. Header shell ---------- */
.site-header { position: relative; }

/* --- 移动端顶部条 --- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(244, 239, 230, .14);
  position: sticky;
  top: 0;
  z-index: 70;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.topbar__mark {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 50% 100%, 0 74%);
}

.topbar__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(244, 239, 230, .3);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.nav-toggle:hover { border-color: var(--orange); color: var(--orange); }

.nav-toggle__glyph {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}
.nav-toggle__glyph::before,
.nav-toggle__glyph::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 220ms var(--ease-out), top 220ms var(--ease-out);
}
.nav-toggle__glyph::before { top: 0; }
.nav-toggle__glyph::after { top: 8px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph::before { top: 4px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__glyph::after { top: 4px; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .topbar { display: none; }
}

/* --- 轨道导航 --- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-collapsed);
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  border-right: 1px solid rgba(244, 239, 230, .14);
  overflow: hidden auto;
  scrollbar-width: thin;
  transition: width var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.rail__progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 0;
  background: var(--orange);
  z-index: 2;
  pointer-events: none;
}

.rail__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 23px;
  min-height: var(--topbar-h);
  border-bottom: 1px solid rgba(244, 239, 230, .14);
  flex: none;
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rail__mark {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 50% 100%, 0 74%);
}

.rail__wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: opacity 160ms var(--ease-out);
}

.rail__badge {
  flex: none;
  padding: 2px 6px;
  border: 1px solid rgba(184, 255, 61, .45);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  white-space: nowrap;
  transition: opacity 160ms var(--ease-out);
}

.rail__nav {
  flex: 1 1 auto;
  padding: 10px 0;
}

.rail__list { display: flex; flex-direction: column; }

.rail__item { border-bottom: 1px solid rgba(244, 239, 230, .08); }

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 23px;
  color: rgba(244, 239, 230, .76);
  transition: color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--orange);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 200ms var(--ease-out);
}
.rail__link:hover { color: var(--paper); background: rgba(244, 239, 230, .05); }
.rail__link[aria-current="page"] { color: var(--paper); background: rgba(255, 90, 31, .13); }
.rail__link[aria-current="page"]::before { transform: scaleY(1); }

.rail__idx {
  flex: none;
  width: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--steel);
  transition: color 160ms var(--ease-out);
}
.rail__link[aria-current="page"] .rail__idx { color: var(--lime); }

.rail__label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 160ms var(--ease-out);
}

.rail__quick {
  flex: none;
  padding: 14px 23px 6px;
  border-top: 1px solid rgba(244, 239, 230, .12);
  transition: opacity 160ms var(--ease-out);
}
.rail__quick-title {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--steel);
  white-space: nowrap;
}
.rail__quick-list { display: flex; flex-direction: column; gap: 7px; }
.rail__quick-link {
  display: inline-block;
  font-size: 13px;
  color: rgba(244, 239, 230, .72);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.rail__quick-link:hover { color: var(--orange); border-bottom-color: var(--orange); }

.rail__cta {
  flex: none;
  display: block;
  margin: 14px 23px 20px;
  padding: 11px 12px;
  background: var(--orange);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-align: center;
  white-space: nowrap;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.rail__cta:hover { background: var(--paper); color: var(--burnt); }

.rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(11, 14, 17, .64);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease-out), visibility var(--dur) var(--ease-out);
}

/* --- 桌面端：展开为章节索引 --- */
@media (min-width: 900px) {
  .rail:hover,
  .rail:focus-within,
  .rail[data-expanded="true"] { width: var(--rail-open); }

  .rail__label,
  .rail__wordmark,
  .rail__badge { opacity: 0; }

  .rail:hover .rail__label,
  .rail:focus-within .rail__label,
  .rail[data-expanded="true"] .rail__label,
  .rail:hover .rail__wordmark,
  .rail:focus-within .rail__wordmark,
  .rail[data-expanded="true"] .rail__wordmark,
  .rail:hover .rail__badge,
  .rail:focus-within .rail__badge,
  .rail[data-expanded="true"] .rail__badge { opacity: 1; }

  .rail__quick { opacity: 0; pointer-events: none; }
  .rail:hover .rail__quick,
  .rail:focus-within .rail__quick,
  .rail[data-expanded="true"] .rail__quick { opacity: 1; pointer-events: auto; }

  .rail__cta { background: transparent; color: var(--steel); border: 1px solid rgba(124, 143, 166, .4); }
  .rail:hover .rail__cta,
  .rail:focus-within .rail__cta,
  .rail[data-expanded="true"] .rail__cta {
    background: var(--orange);
    color: var(--ink);
    border-color: var(--orange);
  }

  .rail-scrim { display: none; }
}

/* --- 移动端：抽屉 --- */
@media (max-width: 899px) {
  .rail {
    width: min(84vw, 320px);
    z-index: 95;
    transform: translateX(-101%);
    transition: transform var(--dur) var(--ease-out);
  }
  .rail[data-open="true"] { transform: translateX(0); }

  .rail-scrim[data-open="true"] { opacity: 1; visibility: visible; }

  html[data-nav-lock="on"] { overflow: hidden; }
}

/* ---------- 11. Footer shell ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid rgba(244, 239, 230, .16);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(124, 143, 166, .13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124, 143, 166, .13) 1px, transparent 1px);
  background-size: 64px 64px;
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding-bottom: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid rgba(244, 239, 230, .14);
}

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-brand__mark {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 50% 100%, 0 74%);
}
.footer-brand__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
}
.footer-brand__line {
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.72;
  color: rgba(244, 239, 230, .62);
}
.footer-brand__cert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 5px 10px;
  border: 1px solid rgba(184, 255, 61, .42);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--lime);
}
.footer-brand__dot {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(184, 255, 61, .18);
}

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(244, 239, 230, .12);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .18em;
  color: var(--steel);
}
.footer-col__list { display: flex; flex-direction: column; gap: 9px; }

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(244, 239, 230, .74);
  transition: color 160ms var(--ease-out);
}
.footer-link::before {
  content: "";
  width: 10px;
  height: 1px;
  flex: none;
  background: var(--orange);
  transform: scaleX(.4);
  transform-origin: left;
  transition: transform 200ms var(--ease-out);
}
.footer-link:hover { color: var(--paper); }
.footer-link:hover::before { transform: scaleX(1); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px 32px;
  padding: clamp(20px, 3vw, 32px) 0;
  border-bottom: 1px solid rgba(244, 239, 230, .14);
}
.footer-contact__item { display: flex; flex-direction: column; gap: 3px; }
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--steel);
}
.footer-contact__val {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(244, 239, 230, .86);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 22px;
}
.footer-bottom__copy,
.footer-bottom__icp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--steel);
}
.footer-bottom__note {
  flex-basis: 100%;
  max-width: 92ch;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(124, 143, 166, .88);
}

@media (max-width: 899px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 559px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- 12. 焦点与动效偏好 ---------- */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
.rail a:focus-visible,
.rail button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -2px;
}
.footer-link:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

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