/* =========================================================
   亿动赛事 · 共享样式表 /assets/site.css
   01 重置  02 令牌  03 排版  04 布局壳  05 按钮  06 标签
   07 卡片  08 图片容器  09 面包屑  10 头部  11 页脚
   12 筛选  13 动效与无障碍
   ========================================================= */

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

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

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

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

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

a { color: inherit; }

button { font: inherit; }

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

/* ---------- 02 令牌 ---------- */
:root {
  --yd-night: #07110E;
  --yd-deep: #050C0A;
  --yd-panel: #0E1F19;
  --yd-edge: #14261F;
  --yd-paper: #E9E2D0;
  --yd-black: #1A1A17;
  --yd-cyan: #35F2C0;
  --yd-amber: #FF9A3C;
  --yd-red: #B4432B;
  --yd-mist: #8FA39B;
  --yd-text: #C9D4CE;

  --yd-max: 1280px;
  --yd-gutter: clamp(16px, 4vw, 40px);
  --yd-radius: 2px;

  --yd-font-head: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --yd-font-body: var(--yd-font-head);
  --yd-font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --yd-shadow: 0 1px 0 rgba(0, 0, 0, .4);
  --yd-shadow-nav: -24px 0 48px rgba(0, 0, 0, .5);
}

/* ---------- 03 排版 ---------- */
body {
  font-family: var(--yd-font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--yd-text);
  background-color: var(--yd-night);
  background-image:
    linear-gradient(180deg, rgba(20, 38, 31, .55), rgba(7, 17, 14, 0) 440px),
    repeating-linear-gradient(90deg, rgba(20, 38, 31, .34) 0 1px, transparent 1px 72px);
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

h1, .yd-h1 {
  font-family: var(--yd-font-head);
  font-weight: 600;
  font-stretch: condensed;
  letter-spacing: -.02em;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.02;
  color: var(--yd-paper);
}

h2, .yd-h2 {
  font-family: var(--yd-font-head);
  font-weight: 600;
  font-stretch: condensed;
  letter-spacing: -.015em;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  color: var(--yd-paper);
}

h3, .yd-h3 {
  font-family: var(--yd-font-head);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--yd-paper);
}

p { font-size: 1rem; }
p + p { margin-top: 1.2em; }

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

::selection {
  background: var(--yd-cyan);
  color: var(--yd-night);
}

.yd-mono {
  font-family: var(--yd-font-mono);
  font-weight: 500;
  font-size: .875em;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}

.yd-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--yd-mist);
  line-height: 1;
}

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

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

.yd-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--yd-cyan);
  color: var(--yd-night);
  font-family: var(--yd-font-mono);
  font-size: .8125rem;
  letter-spacing: .06em;
  border-radius: var(--yd-radius);
  transition: top .16s ease;
}
.yd-skip:focus-visible { top: 12px; }

/* ---------- 04 布局壳 ---------- */
.yd-shell {
  width: 100%;
  max-width: var(--yd-max);
  margin: 0 auto;
  padding-left: var(--yd-gutter);
  padding-right: var(--yd-gutter);
}

.yd-shell--wide { max-width: 1500px; }
.yd-shell--narrow { max-width: 860px; }

.yd-section {
  position: relative;
  padding: clamp(44px, 6vw, 88px) 0;
}

.yd-section__num {
  display: inline-block;
  font-family: var(--yd-font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--yd-red);
  margin-bottom: 10px;
}

.yd-section__title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  font-weight: 600;
  font-stretch: condensed;
  letter-spacing: -.015em;
  color: var(--yd-paper);
}

.yd-section__lede {
  max-width: 62ch;
  margin-top: 12px;
  font-size: 1.0625rem;
  color: var(--yd-mist);
}

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

/* 暖纸长卷阅读区 */
.yd-paper {
  background: var(--yd-paper);
  color: var(--yd-black);
  background-image:
    repeating-linear-gradient(0deg, rgba(26, 26, 23, .035) 0 1px, transparent 1px 34px);
}

.yd-paper h1, .yd-paper h2, .yd-paper h3,
.yd-paper .yd-h1, .yd-paper .yd-h2, .yd-paper .yd-h3,
.yd-paper .yd-section__title { color: var(--yd-black); }

.yd-paper .yd-section__lede { color: #5C665F; }
.yd-paper .yd-label { color: #6E7C74; }
.yd-paper .yd-rule { background: rgba(26, 26, 23, .14); }
.yd-paper .yd-card {
  background: rgba(26, 26, 23, .04);
  border-color: rgba(26, 26, 23, .16);
  box-shadow: none;
}

/* ---------- 05 按钮 ---------- */
.yd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--yd-edge);
  border-radius: var(--yd-radius);
  background: var(--yd-panel);
  color: var(--yd-text);
  font-family: var(--yd-font-body);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.yd-btn:hover {
  border-color: var(--yd-cyan);
  color: var(--yd-cyan);
  background: rgba(53, 242, 192, .06);
}

.yd-btn--accent {
  background: var(--yd-amber);
  border-color: var(--yd-amber);
  color: #1A1A17;
}
.yd-btn--accent:hover {
  background: #FFB066;
  border-color: #FFB066;
  color: #1A1A17;
}

.yd-btn--ghost {
  background: transparent;
  border-color: rgba(53, 242, 192, .5);
  color: var(--yd-cyan);
}
.yd-btn--ghost:hover {
  background: rgba(53, 242, 192, .1);
  border-color: var(--yd-cyan);
}

.yd-btn--sm {
  padding: 7px 12px;
  font-size: .8125rem;
}

/* ---------- 06 标签 ---------- */
.yd-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--yd-edge);
  border-radius: var(--yd-radius);
  background: rgba(143, 163, 155, .08);
  color: var(--yd-mist);
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  line-height: 1.6;
  white-space: nowrap;
}

.yd-tag--amber {
  border-color: rgba(255, 154, 60, .4);
  background: rgba(255, 154, 60, .1);
  color: var(--yd-amber);
}

.yd-tag--red {
  border-color: rgba(180, 67, 43, .5);
  background: rgba(180, 67, 43, .14);
  color: #E2795C;
}

/* ---------- 07 卡片 ---------- */
.yd-card {
  position: relative;
  padding: 18px 20px;
  background: var(--yd-panel);
  border: 1px solid var(--yd-edge);
  border-radius: var(--yd-radius);
  box-shadow: var(--yd-shadow);
  transition: border-color .15s ease;
}

.yd-card:hover { border-color: rgba(53, 242, 192, .35); }

/* ---------- 08 图片容器 ---------- */
.yd-media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--yd-edge);
  border-radius: var(--yd-radius);
  aspect-ratio: 16 / 9;
  background-color: var(--yd-panel);
  background-image:
    linear-gradient(135deg, rgba(20, 38, 31, .95), rgba(7, 17, 14, .95)),
    repeating-linear-gradient(45deg, rgba(53, 242, 192, .07) 0 6px, transparent 6px 14px);
}

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

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

.yd-media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 8px 12px;
  background: rgba(5, 12, 10, .78);
  border-top: 1px solid var(--yd-edge);
  color: var(--yd-text);
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  line-height: 1.5;
}

/* ---------- 09 面包屑 ---------- */
.yd-crumbs { padding-top: 20px; }

.yd-crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--yd-font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--yd-mist);
}

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

.yd-crumbs__link { color: var(--yd-mist); }
.yd-crumbs__link:hover { color: var(--yd-cyan); }

.yd-crumbs__sep { color: #3C4F48; }

/* ---------- 10 头部 ---------- */
.yd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 17, 14, .94);
  border-bottom: 1px solid var(--yd-edge);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}

.yd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--yd-max);
  margin: 0 auto;
  padding: 16px var(--yd-gutter) 14px;
  transition: padding .2s ease;
}

.yd-header[data-shrink] .yd-header__inner {
  padding-top: 8px;
  padding-bottom: 7px;
}

.yd-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.yd-brand__link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yd-brand__rule {
  width: 2px;
  height: 20px;
  flex: none;
  background: var(--yd-cyan);
}

.yd-brand__name {
  font-family: var(--yd-font-head);
  font-weight: 600;
  font-stretch: condensed;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--yd-paper);
}

.yd-brand__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  letter-spacing: .04em;
  line-height: 1;
  color: var(--yd-mist);
}

.yd-brand__round { white-space: nowrap; }

.yd-status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--yd-cyan);
  box-shadow: 0 0 0 3px rgba(53, 242, 192, .16);
  animation: yd-pulse 2.6s ease-in-out infinite;
}

@keyframes yd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.yd-nav { display: block; }

.yd-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px;
}

.yd-nav__item { display: block; }

.yd-nav__link {
  display: block;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--yd-radius);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--yd-text);
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.yd-nav__link:hover {
  color: var(--yd-cyan);
  border-color: var(--yd-edge);
  background: var(--yd-panel);
}

.yd-nav__link[aria-current="page"] {
  color: var(--yd-cyan);
  border-color: rgba(53, 242, 192, .45);
  background: rgba(53, 242, 192, .07);
}

.yd-nav__hint { display: none; }

.yd-nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--yd-edge);
  border-radius: var(--yd-radius);
  background: transparent;
  color: var(--yd-cyan);
  font-family: var(--yd-font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.yd-nav-toggle:hover {
  border-color: var(--yd-cyan);
  background: rgba(53, 242, 192, .06);
}

.yd-nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 2px;
  background: currentColor;
  flex: none;
}

.yd-nav-toggle__bars::before,
.yd-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform .18s ease, top .18s ease, opacity .18s ease;
}

.yd-nav-toggle__bars::before { top: -5px; }
.yd-nav-toggle__bars::after { top: 5px; }

.yd-nav-toggle[aria-expanded="true"] .yd-nav-toggle__bars { background: transparent; }
.yd-nav-toggle[aria-expanded="true"] .yd-nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.yd-nav-toggle[aria-expanded="true"] .yd-nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

.yd-band {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: var(--yd-edge);
}

.yd-band__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--yd-cyan), var(--yd-amber));
  transition: width .12s linear;
}

/* ---------- 11 页脚 ---------- */
.yd-footer {
  margin-top: 0;
  background: var(--yd-deep);
  border-top: 1px solid var(--yd-edge);
  color: var(--yd-text);
}

.yd-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(40px, 6vw, 72px) 0 clamp(22px, 3vw, 36px);
}

.yd-footer__col { min-width: 0; }

.yd-footer__brand {
  font-family: var(--yd-font-head);
  font-weight: 600;
  font-stretch: condensed;
  font-size: 1.375rem;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--yd-paper);
}

.yd-footer__desc {
  margin-top: 10px;
  max-width: 30ch;
  font-size: .9375rem;
  line-height: 1.7;
  color: var(--yd-mist);
}

.yd-footer__icp {
  margin-top: 16px;
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--yd-mist);
}

.yd-footer__title {
  margin-bottom: 14px;
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yd-mist);
}

.yd-footer__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yd-footer__link {
  display: inline-block;
  padding: 3px 0;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--yd-text);
  transition: color .15s ease;
}

.yd-footer__link:hover { color: var(--yd-cyan); }

.yd-footer__list--plain li {
  font-size: .875rem;
  line-height: 1.7;
  color: var(--yd-mist);
}

.yd-footer__list--plain .yd-mono {
  font-size: .8125rem;
  color: var(--yd-text);
  word-break: break-all;
}

.yd-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--yd-edge);
}

.yd-footer__legal .yd-footer__link {
  font-size: .8125rem;
  color: var(--yd-mist);
}

.yd-footer__legal .yd-footer__link:hover { color: var(--yd-cyan); }

.yd-footer__status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 16px 0 28px;
  border-top: 1px solid var(--yd-edge);
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--yd-mist);
}

/* ---------- 12 筛选 ---------- */
.yd-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.yd-filter__btn {
  padding: 7px 13px;
  border: 1px solid var(--yd-edge);
  border-radius: var(--yd-radius);
  background: transparent;
  color: var(--yd-mist);
  font-family: var(--yd-font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}

.yd-filter__btn:hover {
  color: var(--yd-text);
  border-color: var(--yd-mist);
}

.yd-filter__btn[aria-pressed="true"] {
  background: var(--yd-cyan);
  border-color: var(--yd-cyan);
  color: var(--yd-night);
  font-weight: 500;
}

.yd-filter__count {
  margin-left: auto;
  font-family: var(--yd-font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--yd-mist);
}

.yd-paper .yd-filter__btn { border-color: rgba(26, 26, 23, .2); color: #5C665F; }
.yd-paper .yd-filter__btn:hover { border-color: var(--yd-black); color: var(--yd-black); }
.yd-paper .yd-filter__btn[aria-pressed="true"] {
  background: var(--yd-black);
  border-color: var(--yd-black);
  color: var(--yd-paper);
}
.yd-paper .yd-filter__count { color: #6E7C74; }

.is-hidden { display: none !important; }

/* ---------- 13 动效与无障碍 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}

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

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

@media (max-width: 1080px) {
  .yd-footer__grid { grid-template-columns: 1.4fr 1fr 1.4fr; }
  .yd-footer__col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 952px) {
  .yd-header__inner {
    align-items: center;
    padding-top: 12px;
    padding-bottom: 10px;
  }

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

  .yd-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 110;
    width: min(342px, 88vw);
    height: 100%;
    padding: 92px 22px 32px;
    background: var(--yd-panel);
    border-left: 1px solid var(--yd-edge);
    box-shadow: var(--yd-shadow-nav);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
  }

  .yd-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  .yd-nav__list {
    flex-direction: column;
    gap: 6px;
    justify-content: flex-start;
  }

  .yd-nav__link {
    padding: 13px 14px;
    border-color: var(--yd-edge);
    font-size: 1rem;
  }

  .yd-nav__hint {
    display: block;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--yd-edge);
    font-family: var(--yd-font-mono);
    font-size: .6875rem;
    line-height: 1.9;
    letter-spacing: .04em;
    color: var(--yd-mist);
  }

  body[data-nav-open] { overflow: hidden; }

  body[data-nav-open]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(5, 12, 10, .64);
  }

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

@media (max-width: 880px) {
  .yd-grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .yd-footer__grid { grid-template-columns: 1fr; }
  .yd-footer__col:last-child { grid-column: auto; }
  .yd-footer__desc { max-width: none; }
  .yd-footer__legal { gap: 6px 14px; }
}

@media (max-width: 620px) {
  h1, .yd-h1 { font-size: clamp(2.1rem, 10vw, 3rem); }
  .yd-brand__name { font-size: 1.125rem; }
  .yd-brand__status { font-size: .625rem; }
  .yd-grid--3,
  .yd-grid--4 { grid-template-columns: 1fr; }
  .yd-filter__count { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

  .yd-status-dot { animation: none; }
}
