/* ==========================================================================
   趣体育赛事 · 共享样式 /assets/site.css
   深墨蓝底 + 草皮绿锚点 + 跑道橙编号 + 红黄功能色
   ========================================================================== */

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

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

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

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0B1220;
  --ink-2: #141E33;
  --grass: #2FBF6A;
  --grass-deep: #17864A;
  --track: #FF6B1A;
  --card-red: #E2342B;
  --card-yellow: #FFC61A;
  --paper: #F4F6F2;
  --mist: #C9D1D9;
  --graphite: #6B7785;
  --white: #FFFFFF;

  --rail: 88px;
  --max: 1200px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  --line: rgba(201, 209, 217, 0.14);
  --line-soft: rgba(201, 209, 217, 0.08);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font-sans: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 3. 基础排版 ---------- */
body {
  margin: 0;
  padding-left: var(--rail);
  background-color: var(--ink);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 44px); }
h2 { font-size: clamp(1.4rem, 2.4vw, 28px); }
h3 { font-size: clamp(1.15rem, 1.8vw, 22px); }

p { line-height: 1.75; }

strong { font-weight: 800; color: var(--white); }

::selection {
  background: var(--grass);
  color: #062015;
}

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

.site-header a:focus-visible,
.site-footer a:focus-visible {
  outline-offset: 2px;
}

/* ---------- 4. 通用容器与工具类 ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 32px;
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--mist);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2,
.prose h3 {
  color: var(--white);
  margin-top: 2em;
}

.prose a {
  color: var(--grass);
  border-bottom: 1px solid rgba(47, 191, 106, 0.4);
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
  list-style: disc;
}

.sr-only {
  position: absolute;
  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;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--graphite);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: rgba(201, 209, 217, 0.35);
}

.breadcrumb a {
  transition: color 0.18s var(--ease);
}

.breadcrumb a:hover {
  color: var(--grass);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
  transition: background-color 0.18s var(--ease),
              color 0.18s var(--ease),
              border-color 0.18s var(--ease),
              transform 0.18s var(--ease);
}

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

.btn--primary {
  background-color: var(--grass);
  color: #062015;
}

.btn--primary:hover {
  background-color: #3ad377;
}

.btn--ghost {
  border-color: rgba(201, 209, 217, 0.35);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: var(--grass);
  color: var(--grass);
}

.btn--orange {
  background-color: var(--track);
  color: #1a0d04;
}

.btn--orange:hover {
  background-color: #ff8244;
}

/* ---------- 6. 标签 / 卡片 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background-color: rgba(201, 209, 217, 0.12);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag--grass {
  background-color: rgba(47, 191, 106, 0.16);
  color: var(--grass);
}

.tag--live {
  background-color: rgba(255, 107, 26, 0.16);
  color: var(--track);
}

.tag--red {
  background-color: rgba(226, 52, 43, 0.16);
  color: var(--card-red);
}

.tag--yellow {
  background-color: rgba(255, 198, 26, 0.16);
  color: var(--card-yellow);
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--ink-2);
}

/* ---------- 7. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--ink-2);
  background-image: linear-gradient(135deg, #16223a 0%, #0B1220 100%);
}

.media-frame > img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--hero { aspect-ratio: 21 / 9; }

.media-frame__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(180deg, rgba(11, 18, 32, 0) 38%, rgba(11, 18, 32, 0.88) 100%);
}

/* ---------- 8. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background-color: var(--grass);
  color: #062015;
  font-size: 14px;
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 9. 页头 · 桌面侧轨 ---------- */
.site-header {
  position: fixed;
  top: 0;
  right: auto;
  bottom: 0;
  left: 0;
  z-index: 60;
  width: var(--rail);
}

.site-header__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 18px 6px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--line);
  background-color: var(--ink-2);
  background-image: linear-gradient(180deg, #101A2C 0%, #141E33 46%, #0B1220 100%);
  scrollbar-width: none;
}

.site-header__rail::-webkit-scrollbar {
  display: none;
}

.nav-scrim {
  display: none;
}

/* 品牌 */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 2px 0 6px;
  text-align: center;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background-image: linear-gradient(150deg, var(--grass) 0%, var(--grass-deep) 100%);
  color: #062015;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(47, 191, 106, 0.32);
}

.brand__name {
  writing-mode: vertical-rl;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.2;
  color: var(--white);
}

.brand__tagline {
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.22em;
  line-height: 1.2;
  color: var(--graphite);
}

/* 状态条 */
.rail-status {
  width: 100%;
  padding: 10px 4px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.65;
  text-align: center;
  word-break: break-all;
}

/* 侧轨导航 */
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.rail-nav__item {
  width: 100%;
}

.rail-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 2px;
  border-radius: 12px;
  color: var(--mist);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  transition: background-color 0.18s var(--ease),
              color 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}

.rail-nav__link:hover {
  background-color: rgba(201, 209, 217, 0.08);
  color: var(--white);
}

.rail-nav__num {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(107, 119, 133, 0.9);
  transition: color 0.18s var(--ease);
}

.rail-nav__label {
  display: block;
}

.rail-nav__link[aria-current="page"] {
  background-image: linear-gradient(90deg, rgba(47, 191, 106, 0.24) 0%, rgba(47, 191, 106, 0.05) 100%);
  box-shadow: inset 3px 0 0 0 var(--grass);
  color: var(--white);
}

.rail-nav__link[aria-current="page"] .rail-nav__num {
  color: var(--grass);
}

.rail-nav__cta {
  display: block;
  width: 100%;
  padding: 10px 4px;
  border-radius: var(--radius-pill);
  background-color: var(--grass);
  color: #062015;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  transition: background-color 0.18s var(--ease);
}

.rail-nav__cta:hover {
  background-color: #3ad377;
}

/* 抽屉按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: rgba(201, 209, 217, 0.06);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

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

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

.site-header[data-open="true"] .nav-toggle__bars i:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle__bars i:nth-child(2) {
  opacity: 0;
}

.site-header[data-open="true"] .nav-toggle__bars i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 96px;
  padding-top: 60px;
  border-top: 1px solid var(--line);
  background-color: var(--ink);
  background-image: linear-gradient(180deg, #0B1220 0%, #0E1729 60%, #0B1220 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--grass) 0 44px,
    transparent 44px 88px
  );
  opacity: 0.55;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr);
  gap: 48px;
  padding-bottom: 44px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
}

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background-image: linear-gradient(150deg, var(--grass) 0%, var(--grass-deep) 100%);
  color: #062015;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.footer-brand__tagline {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--grass);
}

.footer-brand__meta {
  max-width: 30ch;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--graphite);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

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

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__link {
  font-size: 14px;
  color: var(--mist);
  transition: color 0.18s var(--ease);
}

.footer-col__link:hover {
  color: var(--grass);
}

.footer-col__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--graphite);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-contact__line {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--white);
}

.footer-contact__addr {
  font-size: 13px;
  color: var(--mist);
}

.footer-contact__note {
  font-size: 12px;
  color: var(--graphite);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-block: 22px 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--graphite);
}

.footer-base__legal {
  color: var(--mist);
}

.footer-base__year {
  margin-left: auto;
}

/* ---------- 11. 滚动显现（JS 增强） ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

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

/* ---------- 12. 平板 ---------- */
@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ---------- 13. 移动端 ---------- */
@media (max-width: 900px) {
  html {
    scroll-padding-top: 84px;
  }

  body {
    padding-left: 0;
  }

  body.nav-open {
    overflow: hidden;
  }

  .site-header {
    position: sticky;
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
  }

  .site-header__rail {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 12px;
    height: auto;
    padding: 10px 18px 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background-image: linear-gradient(180deg, #101A2C 0%, #141E33 100%);
  }

  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }

  .brand__mark {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 11px;
  }

  .brand__name {
    writing-mode: horizontal-tb;
    font-size: 16px;
    letter-spacing: 0.06em;
  }

  .brand__tagline {
    display: none;
  }

  .rail-status {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    padding: 0;
    border: 0;
    font-size: 10px;
    letter-spacing: 0.03em;
    line-height: 1.5;
    text-align: left;
    word-break: normal;
  }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1;
    background-color: rgba(11, 18, 32, 0.74);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
  }

  .site-header[data-open="true"] .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .rail-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: min(320px, 86vw);
    height: 100vh;
    height: 100dvh;
    padding: 88px 22px 32px;
    gap: 18px;
    justify-content: flex-start;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    background-color: var(--ink-2);
    background-image: linear-gradient(180deg, #141E33 0%, #0B1220 100%);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.32s var(--ease), visibility 0.32s var(--ease);
  }

  .site-header[data-open="true"] .rail-nav {
    transform: translateX(0);
    visibility: visible;
  }

  .rail-nav__list {
    gap: 4px;
  }

  .rail-nav__link {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 17px;
  }

  .rail-nav__num {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .rail-nav__link[aria-current="page"] {
    background-image: linear-gradient(90deg, rgba(47, 191, 106, 0.22) 0%, rgba(47, 191, 106, 0.04) 100%);
    box-shadow: inset 3px 0 0 0 var(--grass);
  }

  .rail-nav__cta {
    padding: 14px 18px;
    font-size: 15px;
    letter-spacing: 0.04em;
  }

  .container {
    padding-inline: 18px;
  }

  .site-footer {
    margin-top: 64px;
    padding-top: 44px;
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .footer-base__year {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .footer-nav {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    padding: 14px 20px;
  }
}

/* ---------- 14. 低高度桌面隐藏状态条 ---------- */
@media (min-width: 901px) and (max-height: 700px) {
  .rail-status {
    display: none;
  }
}

/* ---------- 15. 减少动态 ---------- */
@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;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: opacity 0.18s linear;
  }

  .rail-nav {
    transition: none;
  }
}
