/* ========================================
   悟空赛事 · 全站共享样式 /assets/site.css
   ======================================== */

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

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

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-light);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color 0.2s;
}

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

button {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ---------- CSS 变量 ---------- */
:root {
  --color-bg: #0A0E17;
  --color-bg-deep: #060A11;
  --color-card: #1A2332;
  --color-card-2: #141E2C;
  --color-orange: #FF6B00;
  --color-gold: #FFB800;
  --color-blue: #00D4FF;
  --color-gray: #8A94A6;
  --color-light: #F5F7FA;
  --color-white: #FFFFFF;
  --font-heading: Impact, Anton, "Arial Narrow", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --container: 1240px;
  --header-h: 80px;
  --radius: 12px;
  --cut: 18px;
  --dur: 0.25s;
  --ease: cubic-bezier(0.22, 0.68, 0, 1);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ---------- 基础排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.12;
  color: var(--color-white);
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 36px); }
h3 { font-size: 20px; }
h4 { font-size: 16px; }

p { margin-bottom: 1em; }

/* ---------- 通用工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.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-gradient {
  background: linear-gradient(90deg, var(--color-orange), var(--color-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -48px;
  left: 16px;
  z-index: 1300;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-gold));
  color: var(--color-bg);
  font-size: 14px;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--color-bg);
  outline: none;
}

/* ---------- 阅读进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1200;
  pointer-events: none;
}

.scroll-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-orange), var(--color-gold), var(--color-blue));
  will-change: width;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.14);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-orange) 0%, var(--color-gold) 45%, var(--color-blue) 100%);
  opacity: 0.7;
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--color-white);
}

.brand-arc {
  display: block;
  width: 46px;
  height: 32px;
  flex-shrink: 0;
  color: var(--color-orange);
  transition: color 0.2s;
}

.brand-arc-trail {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.brand-arc-dot {
  fill: currentColor;
  transition: fill 0.2s;
}

.brand:hover .brand-arc {
  color: var(--color-gold);
}

.brand:hover .brand-arc-dot {
  fill: var(--color-orange);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  white-space: nowrap;
  transition: color 0.2s;
}

.brand:hover .brand-text {
  color: var(--color-orange);
}

/* ---------- 移动端导航开关 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  border-color: rgba(255, 107, 0, 0.6);
  background: rgba(255, 107, 0, 0.08);
}

.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
}

.nav-toggle-lines span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--color-white);
  transition: transform 0.25s var(--ease), opacity 0.2s, background 0.2s;
}

.nav-toggle[data-open] .nav-toggle-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[data-open] .nav-toggle-lines span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[data-open] .nav-toggle-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-light);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-link:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.04);
}

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

.nav-link[aria-current="page"] {
  color: var(--color-orange);
}

.nav-cta {
  margin-left: 10px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, filter 0.2s, clip-path 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-orange), var(--color-gold));
  color: var(--color-bg);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-primary:hover {
  color: var(--color-bg);
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--color-blue);
  color: var(--color-blue);
  background: rgba(0, 212, 255, 0.06);
}

.btn-outline:hover {
  color: var(--color-blue);
  background: rgba(0, 212, 255, 0.12);
  transform: translateY(-2px);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  padding: 16px 0;
  font-size: 14px;
}

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

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-gray);
}

.breadcrumbs li::after {
  content: "/";
  color: var(--color-gray);
  opacity: 0.5;
  font-size: 12px;
}

.breadcrumbs li:last-child::after {
  display: none;
}

.breadcrumbs a {
  color: var(--color-blue);
}

.breadcrumbs a:hover {
  color: var(--color-light);
}

.breadcrumbs [aria-current="page"] {
  color: var(--color-light);
  font-weight: 500;
}

/* ---------- 章节 ---------- */
.section {
  padding-block: 56px;
}

.section--band {
  background: linear-gradient(180deg, var(--color-bg), var(--color-bg-deep));
  border-block: 1px solid rgba(0, 212, 255, 0.08);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-kicker {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-blue);
  margin-bottom: 8px;
}

.section-title {
  position: relative;
  padding-left: 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  max-width: 720px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8%;
  bottom: 8%;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--color-orange), var(--color-gold));
}

.section-no {
  font-family: var(--font-heading);
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 107, 0, 0.45);
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: linear-gradient(160deg, var(--color-card), var(--color-card-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.35);
}

.card-cut {
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.15;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-gray);
}

.card-body > :last-child {
  margin-bottom: 0;
}

/* ---------- 角标 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(255, 184, 0, 0.1);
  color: var(--color-gold);
  border: 1px solid rgba(255, 184, 0, 0.28);
  white-space: nowrap;
}

.badge--orange {
  background: rgba(255, 107, 0, 0.1);
  color: var(--color-orange);
  border-color: rgba(255, 107, 0, 0.28);
}

.badge--blue {
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-blue);
  border-color: rgba(0, 212, 255, 0.28);
}

/* ---------- 正文排版 ---------- */
.prose {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--color-gray);
}

.prose h2 {
  font-size: 24px;
  margin: 32px 0 12px;
  color: var(--color-white);
}

.prose h3 {
  font-size: 18px;
  margin: 24px 0 10px;
  color: var(--color-white);
}

.prose p {
  margin-bottom: 16px;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 20px;
  list-style: disc;
}

.prose li {
  margin-bottom: 6px;
}

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

.prose a:hover {
  color: var(--color-orange);
}

/* ---------- 主内容锚点 ---------- */
#main-content {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

#main-content:focus {
  outline: none;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  background: var(--color-bg-deep);
  color: var(--color-light);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-orange) 0%, var(--color-gold) 45%, var(--color-blue) 100%);
  opacity: 0.85;
  z-index: 2;
}

.site-footer > .container {
  position: relative;
  z-index: 1;
}

.footer-glow {
  position: absolute;
  right: -140px;
  bottom: -140px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent 65%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 0.9fr;
  gap: 48px;
  padding-block: 56px 40px;
}

.footer-brand,
.footer-nav,
.footer-contact,
.footer-legal {
  min-width: 0;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-tagline {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-light);
  margin: 0 0 10px;
}

.footer-trust {
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-gray);
  margin: 0;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.footer-heading::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-orange), var(--color-gold));
}

.footer-list {
  display: grid;
  gap: 12px;
}

.footer-list a {
  color: var(--color-gray);
  font-size: 14px;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-list a:hover {
  color: var(--color-orange);
  padding-left: 4px;
}

.footer-contact-item {
  color: var(--color-gray);
  font-size: 14px;
  line-height: 1.6;
}

.footer-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gray);
  opacity: 0.8;
  margin-bottom: 2px;
}

.footer-value {
  color: var(--color-light);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-all;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
  color: var(--color-gray);
}

.footer-bottom p {
  margin: 0;
}

.footer-note {
  text-align: right;
  max-width: 640px;
}

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 500;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-orange), var(--color-gold));
  color: var(--color-bg);
  box-shadow: 0 10px 28px rgba(255, 107, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s, filter 0.2s;
}

.back-top svg {
  width: 20px;
  height: 20px;
}

.back-top-icon {
  display: block;
}

.back-top:hover {
  filter: brightness(1.1);
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ---------- 滚动显现 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

/* ---------- 焦点可见 ---------- */
:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn-primary:focus-visible {
  clip-path: none;
}

.btn-primary:focus-visible {
  color: var(--color-bg);
}

/* ---------- 平板 / 移动端 ---------- */
@media (max-width: 960px) {
  :root {
    --header-h: 72px;
  }

  .container {
    padding-inline: 20px;
  }

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

  html.js .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
    padding: 16px;
    background: rgba(20, 30, 44, 0.98);
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
  }

  html.js .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  html.js .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
  }

  html.js .nav-link {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
  }

  html.js .nav-link::after {
    display: none;
  }

  html.js .nav-cta {
    margin: 10px 0 0;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }

  .section {
    padding-block: 44px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 26px;
  }
}

@media (max-width: 580px) {
  .container {
    padding-inline: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

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

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

  .back-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  .brand-text {
    font-size: 22px;
  }

  .brand-arc {
    width: 40px;
    height: 28px;
  }

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

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

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

  .nav-toggle-lines span {
    transition: none;
  }

  html.js .site-nav {
    transition: none;
  }

  .back-top {
    transition: none;
  }

  .skip-link {
    transition: none;
  }
}
