/* =========================================
   /assets/site.css — im电竞娱乐 全局共享样式
   ========================================= */

/* ---------- 1. 变量 ---------- */
:root {
  --bg-deep: #0B1026;
  --bg-night: #151D3B;
  --purple: #7C5CFF;
  --orange: #FF6B35;
  --yellow: #FFD166;
  --cream: #F2EDE4;
  --ink: #211C15;
  --cyan: #21D4FD;

  --text-primary: #F2EDE4;
  --text-secondary: rgba(242, 237, 228, 0.72);
  --text-muted: rgba(242, 237, 228, 0.45);

  --font-display: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', 'Menlo', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 200ms;

  --space-lg: 80px;
  --space-md: 48px;
  --space-sm: 24px;
  --space-xs: 12px;

  --header-z: 200;
  --fixed-z: 300;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  background: var(--bg-deep);
  color: var(--text-primary);
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--purple);
}

ul,
ol {
  list-style: none;
}

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

/* ---------- 3. 工具类 ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-lead {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ---------- 4. 版式 ---------- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--purple);
}

.section-tag::before {
  content: '//';
  opacity: 0.6;
  font-weight: 400;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
  margin-top: 12px;
}

.section-heading__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--purple);
  margin-bottom: 8px;
}

.section-heading__text {
  display: block;
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: center;
  border: 1px solid transparent;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: currentColor;
  opacity: 0.08;
  z-index: -1;
  transition: width var(--duration) var(--ease);
}

.btn:hover::before {
  width: 100%;
}

.btn--primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
}

.btn--primary:hover {
  background: #6a4ce0;
  border-color: #6a4ce0;
}

.btn--ghost {
  background: transparent;
  color: var(--purple);
  border-color: rgba(124, 92, 255, 0.45);
}

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

.btn--orange {
  background: var(--orange);
  color: var(--bg-deep);
  border-color: var(--orange);
  font-weight: 500;
}

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

/* ---------- 6. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.breadcrumb__sep {
  color: rgba(124, 92, 255, 0.4);
  margin: 0 2px;
}

/* ---------- 7. 头部 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: -9999px;
  z-index: 400;
  background: var(--purple);
  color: #fff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  transition: left 0s;
}

.skip-link:focus {
  left: 0;
  outline: 3px solid var(--yellow);
  outline-offset: -1px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--header-z);
  background: var(--bg-deep);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* 滚动进度条 */
.header-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(124, 92, 255, 0.15);
  z-index: 400;
  pointer-events: none;
}

.header-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple) 0%, var(--cyan) 60%, var(--orange) 100%);
  box-shadow: 0 0 8px rgba(124, 92, 255, 0.4);
}

/* 上层条带 */
.header-top {
  background: var(--bg-night);
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent 31px, rgba(124, 92, 255, 0.06) 31px, rgba(124, 92, 255, 0.06) 32px);
  border-bottom: 1px solid rgba(124, 92, 255, 0.12);
}

.header-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.header-top__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-tagline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.header-tagline__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(33, 212, 253, 0.7);
  flex-shrink: 0;
}

.header-quick {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-quick a {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  position: relative;
  transition: color var(--duration) var(--ease);
}

.header-quick a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}

.header-quick a:hover {
  color: var(--text-primary);
}

.header-quick a:hover::after {
  transform: scaleX(1);
}

.header-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--bg-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px 3px 8px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  line-height: 1.6;
}

.header-version .mono {
  font-weight: 700;
  font-size: 11px;
}

/* 下层主导航 */
.header-main {
  background: var(--bg-deep);
  position: relative;
}

.header-main::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple) 30%, var(--orange) 70%, transparent 100%);
}

.header-main__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  background: var(--purple);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.04em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%);
  box-shadow: 2px 2px 12px rgba(124, 92, 255, 0.25);
}

.brand__text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

/* 导航 */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: inline-block;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--duration) var(--ease);
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--purple);
  font-weight: 500;
}

.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* 移动端导航按钮 */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 210;
  border: 1px solid transparent;
  transition: border-color var(--duration) var(--ease);
}

.nav-toggle:hover {
  border-color: rgba(124, 92, 255, 0.3);
}

.nav-toggle__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 20px;
}

.nav-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
  background: var(--purple);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-3.5px) rotate(-45deg);
  background: var(--purple);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--bg-deep);
  border-top: 1px solid rgba(124, 92, 255, 0.08);
  margin-top: var(--space-lg);
}

.site-footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--purple) 25%, var(--orange) 60%, transparent 100%);
  opacity: 0.8;
}

.footer-main {
  display: grid;
  grid-template-columns: 4fr 4fr 4fr;
  gap: 48px;
  padding: 64px 0 48px;
}

.footer-col--brand .footer-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: inline-block;
  margin-bottom: 16px;
  position: relative;
}

.footer-col--brand .footer-brand::before {
  content: '▮';
  color: var(--purple);
  margin-right: 6px;
  font-size: 14px;
  vertical-align: 2px;
}

.footer-summary {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(124, 92, 255, 0.12);
}

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

.footer-list li {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-list li .mono {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-list li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--orange);
  margin-top: 8px;
  flex-shrink: 0;
}

.footer-list a {
  color: var(--text-secondary);
  position: relative;
}

.footer-list a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: var(--purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}

.footer-list a:hover {
  color: var(--purple);
}

.footer-list a:hover::after {
  transform: scaleX(1);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 32px;
  border-top: 1px solid rgba(242, 237, 228, 0.06);
}

.footer-copy {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
}

.footer-trust {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  text-align: right;
}

/* ---------- 9. 数据网格 ---------- */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.15);
}

.data-grid__cell {
  background: var(--bg-deep);
  padding: 20px;
  min-height: 96px;
}

.data-grid__value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.2;
}

.data-grid__label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 300;
}

/* ---------- 10. 图片容器 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-night) 0%, var(--bg-deep) 100%);
}

.img-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.08) 0%, transparent 55%);
  pointer-events: none;
}

.img-frame--ratio-16x9 {
  aspect-ratio: 16 / 9;
}

.img-frame--ratio-4x3 {
  aspect-ratio: 4 / 3;
}

.img-frame--ratio-1x1 {
  aspect-ratio: 1 / 1;
}

.img-frame--ratio-3x4 {
  aspect-ratio: 3 / 4;
}

.img-frame img,
.img-frame__content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 11. 滚动监听高亮 ---------- */
.is-scroll-active {
  color: var(--purple) !important;
  font-weight: 500 !important;
}

.is-scroll-active::after {
  transform: scaleX(1) !important;
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  .footer-main {
    gap: 32px;
  }

  .brand__text {
    font-size: 17px;
  }

  .site-nav a {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 48px;
    --space-md: 32px;
  }

  .container {
    padding: 0 16px;
  }

  .header-top__inner {
    min-height: 32px;
  }

  .header-quick {
    display: none;
  }

  .header-main__inner {
    min-height: 60px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-night);
    padding: 8px 20px 20px;
    border-bottom: 2px solid var(--purple);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility var(--duration) var(--ease);
    gap: 0;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a {
    display: block;
    padding: 13px 8px;
    font-size: 15px;
    border-bottom: 1px solid rgba(242, 237, 228, 0.05);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .site-nav a::after {
    content: '';
    position: absolute;
    left: 8px;
    right: auto;
    bottom: auto;
    top: auto;
    width: 2px;
    height: 0%;
    background: var(--purple);
    transform: none;
    transition: height var(--duration) var(--ease);
  }

  .site-nav a:hover::after,
  .site-nav a[aria-current="page"]::after {
    height: 60%;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0 32px;
  }

  .footer-summary {
    max-width: none;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-trust {
    text-align: left;
  }

  .data-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .header-tagline span:last-child {
    display: none;
  }

  .brand__text {
    font-size: 16px;
  }

  .data-grid {
    grid-template-columns: 1fr;
  }

  .data-grid__value {
    font-size: 22px;
  }

  .footer-col {
    padding-bottom: 8px;
  }
}

/* ---------- 13. 焦点可见 ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
  border-radius: 0;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ---------- 14. 减少动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .site-nav {
    transition: none !important;
  }

  .header-progress {
    display: none;
  }
}
