/* ============================================================
   小鸟体育赛事 · 共享样式 /assets/site.css
   纵向赛道长卷 · 侧边轨道导航 · 切角面板与运动轨迹
   ============================================================ */

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

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

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

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

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

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

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

/* ---------- 2. Design tokens ---------- */
:root {
  /* 品牌色板 */
  --c-green: #00A86B;
  --c-green-deep: #00885A;
  --c-yellow: #FFD100;
  --c-ink: #1B2228;
  --c-white: #FFFFFF;
  --c-orange: #FF5A36;
  --c-mint: #7FE0B0;
  --c-mist: #E9EEF1;
  --c-night: #0D1B16;
  --c-glow: #C8F7E1;

  --ink-72: rgba(27, 34, 40, .74);
  --ink-52: rgba(27, 34, 40, .52);
  --line: #DCE4E8;

  /* 字体栈 */
  --font-head: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "Roboto Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 结构尺度 */
  --rail-w: 212px;
  --topbar-h: 64px;
  --cut: 18px;
  --wrap-max: 1240px;
  --radius-s: 3px;
  --shadow-1: 0 18px 40px -26px rgba(27, 34, 40, .55);
  --ease: cubic-bezier(.32, .72, 0, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-ink);
  background: var(--c-white);
  padding-left: var(--rail-w);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.022em;
  color: var(--c-ink);
  margin-bottom: .55em;
}
h1 { font-size: clamp(32px, 4.4vw, 58px); font-weight: 900; }
h2 { font-size: clamp(25px, 3vw, 38px); }
h3 { font-size: clamp(19px, 1.7vw, 25px); }
h4 { font-size: 17px; font-weight: 700; }

p { margin-bottom: 1em; }

a { color: var(--c-green-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-green); }

strong, b { font-weight: 700; }

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

:focus-visible {
  outline: 2px solid var(--c-orange);
  outline-offset: 2px;
  border-radius: 2px;
}
.site-rail :focus-visible,
.site-foot :focus-visible { outline-color: var(--c-yellow); }

/* ---------- 4. 工具类 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 44px);
}

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

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(26px, 3.6vw, 50px); }

.prose {
  max-width: 44em;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-72);
}
.prose p { margin-bottom: 1.15em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose strong { color: var(--c-ink); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--c-green);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--c-yellow);
  flex: none;
}

.rule-band {
  width: 72px;
  height: 4px;
  background: linear-gradient(90deg, var(--c-green), var(--c-mint) 46%, var(--c-yellow));
  margin-bottom: 22px;
}

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-s);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .2s;
}
.btn--primary {
  background: linear-gradient(120deg, var(--c-green), #00C77F);
  color: #04170E;
}
.btn--primary:hover { color: #04170E; transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  box-shadow: inset 0 0 0 2px var(--c-ink);
}
.btn--ghost:hover {
  background: var(--c-yellow);
  color: var(--c-ink);
  box-shadow: inset 0 0 0 2px var(--c-yellow);
  transform: translateY(-2px);
}

/* ---------- 6. 卡片 ---------- */
.card {
  position: relative;
  display: block;
  padding: 26px 26px 24px;
  background: var(--c-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: transform .22s var(--ease), border-color .22s, background .22s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--c-mint);
  background: linear-gradient(180deg, var(--c-white), #F3FBF7);
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-72); font-size: 15px; margin-bottom: 0; }

/* ---------- 7. 图片容器（页面阶段放 <img> 用） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-glow), var(--c-mint) 52%, var(--c-yellow));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  isolation: isolate;
}
.media-frame > img { width: 100%; height: 100%; object-fit: cover; }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg,
    transparent 40%,
    rgba(255, 255, 255, .18) 40%,
    rgba(255, 255, 255, .18) 46%,
    transparent 46%);
  pointer-events: none;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--tilt { transform: rotate(-1.1deg); }

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-52);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li::after { content: "/"; color: var(--c-mint); }
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: var(--ink-72); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-green); }

/* ---------- 9. 主题筛选 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; }

.filter-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--c-white);
  color: var(--ink-72);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .18s var(--ease);
}
.filter-btn:hover {
  border-color: var(--c-mint);
  color: var(--c-ink);
  transform: translateY(-1px);
}
.filter-btn[aria-pressed="true"] {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: var(--c-yellow);
}

[data-filter-item][hidden] { display: none !important; }

/* ---------- 10. 滚动显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 11. 跳至主要内容 ---------- */
.skip-link {
  position: fixed;
  left: 14px;
  top: -80px;
  z-index: 120;
  padding: 11px 18px;
  background: var(--c-yellow);
  color: var(--c-ink);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 2px;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 14px; color: var(--c-ink); }

/* ============================================================
   侧边轨道导航（Header）
   ============================================================ */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 70;
  display: flex;
  flex-direction: column;
  padding: 26px 18px 22px;
  color: var(--c-mist);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, var(--c-mint), var(--c-green) 26%, var(--c-yellow) 68%, var(--c-orange)) right center / 3px 100% no-repeat,
    radial-gradient(150% 55% at 0% 0%, rgba(0, 168, 107, .35), transparent 62%),
    linear-gradient(180deg, #0D1B16 0%, #10231B 50%, #0A1611 100%);
}

.rail-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--c-white);
}
.brand:hover { color: var(--c-white); }

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  background:
    linear-gradient(135deg, transparent 44%, rgba(255, 255, 255, .95) 44%, rgba(255, 255, 255, .95) 52%, transparent 52%),
    linear-gradient(135deg, transparent 64%, rgba(255, 255, 255, .58) 64%, rgba(255, 255, 255, .58) 71%, transparent 71%),
    linear-gradient(140deg, var(--c-green), var(--c-mint));
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.3;
  color: var(--c-white);
}
.brand-line {
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--c-mint);
}

/* 移动抽屉按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(127, 224, 176, .35);
  border-radius: 999px;
  color: var(--c-mint);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle-bar {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), top .22s var(--ease);
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after { top: 5px; }

.site-rail[data-open="true"] .nav-toggle-bar { background: transparent; }
.site-rail[data-open="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.site-rail[data-open="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

/* 轨道主体 */
.rail-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 28px;
  gap: 20px;
}

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

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 2px;
  color: #B3C2BB;
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color .18s, background .18s;
}
.rail-link:hover {
  color: var(--c-white);
  background: rgba(127, 224, 176, .10);
}
.rail-num {
  flex: none;
  min-width: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: rgba(127, 224, 176, .55);
  transition: color .18s;
}
.rail-label { white-space: nowrap; }

.rail-link[aria-current="page"] {
  color: var(--c-white);
  background: linear-gradient(90deg, rgba(0, 168, 107, .38), rgba(0, 168, 107, 0) 88%);
  box-shadow: inset 3px 0 0 var(--c-green);
}
.rail-link[aria-current="page"] .rail-num { color: var(--c-yellow); }

/* 轨道底端 */
.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(127, 224, 176, .18);
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--c-mint);
}
.rail-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--c-yellow);
  animation: pulseDot 2.4s ease-in-out infinite;
}
.rail-status .mono { color: var(--c-yellow); }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 209, 0, .38); }
  50% { box-shadow: 0 0 0 7px rgba(255, 209, 0, 0); }
}

.rail-cta {
  display: block;
  padding: 12px 14px;
  text-align: center;
  background: linear-gradient(120deg, var(--c-green), #00C77F);
  color: #03150D;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: filter .18s, transform .18s var(--ease);
}
.rail-cta:hover {
  color: #03150D;
  filter: brightness(1.09);
  transform: translateY(-1px);
}

/* ============================================================
   页脚
   ============================================================ */
.site-foot {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  color: #AEBDB6;
  background:
    radial-gradient(90% 70% at 8% 0%, rgba(0, 168, 107, .26), transparent 62%),
    radial-gradient(70% 60% at 100% 100%, rgba(255, 209, 0, .10), transparent 60%),
    linear-gradient(180deg, #0D1B16 0%, #08130F 100%);
}
.site-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--c-green), var(--c-mint) 30%, var(--c-yellow) 66%, var(--c-orange) 100%);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr .9fr .9fr 1.35fr;
  gap: 40px;
  padding-block: clamp(48px, 6vw, 78px) clamp(34px, 4vw, 54px);
}

.foot-name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.015em;
  color: var(--c-white);
  margin-bottom: 8px;
}
.foot-slogan {
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--c-mint);
}
.foot-note {
  max-width: 30em;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(174, 189, 182, .85);
}

.foot-col-title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: #6E817A;
}

.foot-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #C6D3CC;
  font-size: 14.5px;
  text-decoration: none;
  transition: color .18s;
}
.foot-links a::before {
  content: "";
  width: 0;
  height: 2px;
  background: var(--c-yellow);
  transition: width .2s var(--ease);
}
.foot-links a:hover { color: var(--c-white); }
.foot-links a:hover::before { width: 14px; }

.foot-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.65;
}
.foot-contact li { display: flex; gap: 10px; }
.foot-label {
  flex: none;
  width: 42px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--c-mint);
}
.foot-value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #C6D3CC;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-block: 20px 30px;
  border-top: 1px solid rgba(127, 224, 176, .16);
  font-size: 12.5px;
  color: #7C8E87;
}
.foot-copy { color: #9FAFA9; }
.foot-icp { font-size: 12px; }
.foot-mini { margin-left: auto; }

/* ============================================================
   响应式
   ============================================================ */
@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --rail-w: 186px; }
  .rail-label { font-size: 14px; }
}

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

  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }
  body.is-nav-open { overflow: hidden; }

  .site-rail {
    top: 0;
    bottom: auto;
    width: 100%;
    height: var(--topbar-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    overflow: visible;
    background:
      linear-gradient(90deg, var(--c-mint), var(--c-green) 30%, var(--c-yellow) 70%, var(--c-orange)) bottom center / 100% 3px no-repeat,
      radial-gradient(140% 220% at 0% 0%, rgba(0, 168, 107, .38), transparent 60%),
      linear-gradient(180deg, #0D1B16, #0A1611);
  }

  .rail-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .nav-toggle { display: inline-flex; }

  .rail-body {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    margin-top: 0;
    padding: 18px 18px 34px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, #0D1B16, #12241C);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s var(--ease);
  }
  .site-rail[data-open="true"] .rail-body {
    transform: none;
    visibility: visible;
  }

  .rail-list { gap: 0; }
  .rail-link {
    padding: 15px 12px;
    font-size: 16.5px;
    border-bottom: 1px solid rgba(127, 224, 176, .12);
    border-radius: 0;
  }
  .rail-link[aria-current="page"] {
    background: linear-gradient(90deg, rgba(0, 168, 107, .34), rgba(0, 168, 107, 0) 92%);
  }
  .rail-num { font-size: 11px; }

  .rail-foot { margin-top: 26px; padding-top: 20px; }
  .rail-cta { padding: 14px; font-size: 15px; }

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

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 28px;
  }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px 20px 20px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .foot-mini { margin-left: 0; }
  .foot-base { gap: 6px 18px; }
  .brand-line { display: none; }
  .rail-link { font-size: 16px; }
}

/* ---------- 12. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
