/* ============================================================
   /assets/site.css — 爱游戏体育官网 共享外壳样式
   高原看台体系：夜空深蓝胶囊 + 米白呼吸 + 经幡五色点缀
   ============================================================ */

:root {
  --ink: #1B1F23;
  --night: #0E2A47;
  --plateau: #163E63;
  --sky: #E8F1F8;
  --bone: #F7F4EC;
  --paper: #FBF9F4;
  --stone: #6F7679;
  --moss: #5E7A5A;
  --clay: #B56A4A;
  --clay-deep: #9E5A3C;
  --red: #C8452F;
  --yellow: #E0A92B;
  --green: #2F8F6B;
  --blue: #2C6FB7;

  --line: rgba(27, 31, 35, 0.14);
  --line-strong: rgba(27, 31, 35, 0.3);
  --line-light: rgba(232, 241, 248, 0.18);

  --shell-max: 1200px;
  --shell-pad: clamp(16px, 4vw, 40px);
  --header-offset: clamp(96px, 10vw, 118px);

  --cut: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  --cut-sm: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-pill: 0 20px 44px -26px rgba(14, 42, 71, 0.82);
}

/* ========== reset ========== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(15px, 1.02vw, 17px);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection {
  background: rgba(224, 169, 43, 0.42);
  color: var(--ink);
}

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

.pill :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--yellow);
}

main { padding-top: var(--header-offset); }

/* ========== 通用容器与排版件 ========== */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.section { padding-block: clamp(40px, 6.5vw, 88px); }

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

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--clay);
}

.cut {
  clip-path: var(--cut);
  background: var(--sky);
  padding: clamp(20px, 3.4vw, 40px);
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    box-shadow 0.24s var(--ease), transform 0.24s var(--ease);
}

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

.btn--clay {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 12px 26px -18px rgba(181, 106, 74, 0.95);
}

.btn--clay:hover {
  background: var(--clay-deep);
  transform: translateY(-1px);
}

.btn--line {
  background: transparent;
  color: var(--plateau);
  box-shadow: inset 0 0 0 1px rgba(22, 62, 99, 0.34);
}

.btn--line:hover {
  background: var(--plateau);
  color: var(--bone);
  box-shadow: inset 0 0 0 1px var(--plateau);
  transform: translateY(-1px);
}

.btn--bone {
  background: var(--bone);
  color: var(--night);
}

/* ========== 标签 ========== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid rgba(44, 111, 183, 0.28);
  border-radius: 999px;
  background: var(--sky);
  color: var(--plateau);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.tag--clay {
  background: rgba(181, 106, 74, 0.12);
  border-color: rgba(181, 106, 74, 0.36);
  color: #8E4E33;
}

.tag--moss {
  background: rgba(94, 122, 90, 0.13);
  border-color: rgba(94, 122, 90, 0.4);
  color: #46593F;
}

/* ========== 面包屑 ========== */
.breadcrumbs {
  padding-bottom: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--stone);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--stone);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.breadcrumbs a:hover {
  color: var(--plateau);
  border-bottom-color: currentColor;
}

.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* ========== 长文容器 ========== */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
  color: #23282C;
}

.prose h2 {
  margin: 1.8em 0 0.6em;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.prose h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.1rem;
}

.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.2em; }
.prose li { list-style: disc; margin-bottom: 0.4em; }
.prose ol li { list-style: decimal; }

.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========== 图片容器基础规则（页面阶段放入图片占位） ========== */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--sky);
  background-image:
    repeating-linear-gradient(115deg, rgba(14, 42, 71, 0.055) 0 14px, transparent 14px 28px),
    linear-gradient(180deg, var(--sky), #DCE8F1);
  clip-path: var(--cut);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(14, 42, 71, 0.07), rgba(14, 42, 71, 0) 58%);
  pointer-events: none;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide { aspect-ratio: 16 / 7; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 8px 14px;
  background: rgba(14, 42, 71, 0.82);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ========== 显现协议 ========== */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

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

/* ========== 跳转链接 ========== */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--night);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 30px -18px rgba(14, 42, 71, 0.9);
  transform: translate(-50%, -220%);
  transition: transform 0.22s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ========== 页头 ========== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  padding: clamp(10px, 1.5vw, 18px) 0;
  transition: padding 0.32s var(--ease);
}

.site-header[data-scrolled="true"] {
  padding-top: 6px;
  padding-bottom: 6px;
}

.site-header__inner {
  position: relative;
  display: block;
}

.pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 26px);
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  background-color: var(--night);
  background-color: rgba(14, 42, 71, 0.94);
  color: var(--bone);
  box-shadow: var(--shadow-pill);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: padding 0.32s var(--ease), border-radius 0.32s var(--ease);
}

.site-header[data-scrolled="true"] .pill {
  padding-top: 6px;
  padding-bottom: 6px;
}

.pill__brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.pill__mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--yellow);
  color: var(--night);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
  transition: width 0.32s var(--ease), height 0.32s var(--ease);
}

.site-header[data-scrolled="true"] .pill__mark {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.pill__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.pill__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: rgba(232, 241, 248, 0.6);
}

.pill__nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
}

.pill__list {
  display: flex;
  align-items: center;
  gap: clamp(0px, 0.9vw, 12px);
}

.pill__link {
  position: relative;
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(247, 244, 236, 0.78);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.pill__link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

.pill__link:hover {
  color: #FFFFFF;
  background: rgba(232, 241, 248, 0.08);
}

.pill__link:hover::after { transform: scaleX(1); }

.pill__link[aria-current="page"] {
  color: #FFFFFF;
  font-weight: 700;
  background: rgba(232, 241, 248, 0.1);
}

.pill__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--yellow);
}

.pill__list-cta { display: none; }

.pill__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pill__cta { display: inline-flex; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(232, 241, 248, 0.26);
  border-radius: 999px;
  background: rgba(232, 241, 248, 0.1);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.nav-toggle:hover {
  background: rgba(232, 241, 248, 0.18);
  border-color: rgba(232, 241, 248, 0.45);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.26s var(--ease), top 0.26s var(--ease), bottom 0.26s var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.pill[data-open="true"] .nav-toggle__bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.pill[data-open="true"] .nav-toggle__bars::after {
  bottom: 4px;
  transform: rotate(-45deg);
}

.nav-toggle__text { display: inline-block; }

/* 阅读进度细线 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(14, 42, 71, 0.08);
  overflow: hidden;
}

.read-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--red) 38%, var(--green) 68%, var(--blue));
}

/* ========== 页脚 ========== */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  background: var(--bone);
  color: var(--ink);
  border-top: 1px solid var(--line);
}

.footer-flag {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 6px;
}

.footer-flag span:nth-child(1) { background: var(--red); }
.footer-flag span:nth-child(2) { background: var(--yellow); }
.footer-flag span:nth-child(3) { background: var(--green); }
.footer-flag span:nth-child(4) { background: var(--blue); }
.footer-flag span:nth-child(5) { background: var(--stone); }

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.15fr;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(36px, 6vw, 76px);
}

.footer__lead { min-width: 0; }

.footer__eyebrow {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--stone);
}

.footer__brand {
  margin: 0;
  color: var(--night);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.footer__brand span {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--stone);
}

.footer__line {
  max-width: 32ch;
  margin: 16px 0 0;
  color: #3C4448;
  font-size: 15px;
  line-height: 1.75;
}

.footer__back { margin-top: 20px; }

.footer__col { min-width: 0; }

.footer__title {
  margin: 0 0 14px;
  color: var(--clay);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
}

.footer__links {
  display: grid;
  gap: 10px;
}

.footer__links a {
  display: inline-block;
  color: var(--ink);
  font-size: 15px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer__links a:hover {
  color: var(--plateau);
  border-bottom-color: var(--clay);
}

.footer__contact { min-width: 0; }

.footer__mono {
  margin: 0 0 6px;
  color: var(--plateau);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.footer__note {
  margin: 10px 0 0;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.7;
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease),
    border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

.to-top:hover {
  background: var(--plateau);
  border-color: var(--plateau);
  color: var(--bone);
  transform: translateY(-2px);
}

.to-top__arrow {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.24s var(--ease);
}

.to-top:hover .to-top__arrow {
  transform: rotate(45deg) translate(2px, 2px);
}

.footer__base {
  background: var(--night);
  color: rgba(247, 244, 236, 0.72);
}

.footer__base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.03em;
}

.footer__base-inner p { margin: 0; }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__legal a {
  color: rgba(247, 244, 236, 0.72);
  border-bottom: 1px solid rgba(247, 244, 236, 0.24);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer__legal a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--yellow);
}

/* ========== 响应式：平板 ========== */
@media (max-width: 1080px) {
  .pill__link { font-size: 13px; padding: 8px 7px; }
  .pill__link::after { left: 7px; right: 7px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__lead { grid-column: 1 / -1; }
}

/* ========== 响应式：导航折叠 ========== */
@media (max-width: 920px) {
  .pill__cta { display: none; }
  .nav-toggle { display: inline-flex; }

  .pill__nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 10px;
    border: 1px solid var(--line-light);
    border-radius: 24px;
    background: var(--night);
    box-shadow: 0 26px 52px -28px rgba(14, 42, 71, 0.95);
  }

  .pill[data-open="true"] .pill__nav { display: block; }

  .pill__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .pill__link {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px;
  }

  .pill__link::after {
    left: 14px;
    right: auto;
    bottom: 9px;
    width: 18px;
    transform-origin: left center;
  }

  .pill__link:hover { background: rgba(232, 241, 248, 0.08); }

  .pill__list-cta {
    display: block;
    margin-top: 8px;
  }

  .pill__list-cta .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
  }

  .footer__base-inner { justify-content: flex-start; }
}

/* ========== 响应式：手机 ========== */
@media (max-width: 640px) {
  .pill { padding: 8px 10px 8px 12px; gap: 8px; }
  .pill__mark { width: 36px; height: 36px; }
  .pill__name { font-size: 14px; }
  .pill__tag { letter-spacing: 0.16em; }
  .nav-toggle { padding: 8px 12px; }
  .nav-toggle__text { display: none; }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer__line { max-width: none; }
  .footer__base-inner { font-size: 12px; }
  .footer__legal { gap: 12px; }
}

@media (max-width: 420px) {
  .pill__wordmark { display: none; }
}

/* ========== 打印友好 ========== */
@media print {
  .site-header,
  .footer-flag,
  .to-top,
  .read-progress { display: none !important; }

  body { background: #FFFFFF; color: #000000; }
  main { padding-top: 0; }
  .site-footer { border-top: 1px solid #999999; }
  .footer__base { background: #FFFFFF; color: #000000; }
  .footer__legal a { color: #000000; }
}

/* ========== 动效偏好 ========== */
@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;
    scroll-behavior: auto !important;
  }

  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .to-top:hover { transform: none; }
}
