/* ============================================================
   云开全站 / assets/site.css
   赛场之中自有坐标
   深空蓝 #0A1F3C · 荧光绿 #39FF14 · 金属银 #C0C0C0
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
  --color-deep: #0A1F3C;
  --color-neon: #39FF14;
  --color-silver: #C0C0C0;
  --color-navy: #1F3A5F;
  --color-teal: #0F4C5C;
  --color-wine: #7B1E3B;
  --color-indigo: #3D2C6E;
  --color-paper: #F2F4F8;

  --font-heading: Impact, "Montserrat Black", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-data: "Roboto Mono", "SF Mono", "Cascadia Mono", Consolas, monospace;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --container-w: 1280px;
  --header-h: 72px;
  --space-section: clamp(64px, 10vw, 128px);
  --radius-cut: 28px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-paper);
  background-color: var(--color-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

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

/* ---------- 基础排版 ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-paper);
  font-weight: 700;
}

h1 {
  font-size: 48px;
}

h2 {
  font-size: 32px;
}

h3 {
  font-size: 24px;
}

h4 {
  font-size: 20px;
}

p {
  overflow-wrap: break-word;
}

a {
  color: var(--color-neon);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

::selection {
  background: var(--color-neon);
  color: var(--color-deep);
}

.text-data {
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1.5;
}

.text-note {
  font-size: 13px;
  color: var(--color-silver);
  line-height: 1.6;
}

[data-year] {
  font-variant-numeric: tabular-nums;
}

/* ---------- 容器与布局 ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

.content-section {
  padding: var(--space-section) 0;
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.grid-bg {
  background-image:
    linear-gradient(to right, rgba(192, 192, 192, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(192, 192, 192, 0.1) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ---------- 无障碍跳转 ---------- */
.skip-link {
  position: fixed;
  top: -72px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--color-neon);
  color: var(--color-deep);
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.25s var(--ease);
}

.skip-link:focus {
  top: 0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---------- 头部 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header[data-scrolled="true"] {
  background: rgba(10, 31, 60, 0.94);
  border-bottom-color: rgba(192, 192, 192, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

body.menu-open .site-header {
  background: rgba(10, 31, 60, 0.98);
  border-bottom-color: transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  position: relative;
}

/* ---------- 品牌 ---------- */
.site-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
  color: var(--color-paper);
  text-decoration: none;
}

.site-brand__bracket {
  font-family: var(--font-data);
  font-size: 16px;
  line-height: 1;
  color: var(--color-silver);
  transition: color 0.25s ease;
}

.site-brand__code {
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-neon);
  transition: text-shadow 0.25s ease;
}

.site-brand__text {
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid rgba(192, 192, 192, 0.4);
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 0.12em;
  line-height: 1;
}

.site-brand:hover {
  color: var(--color-paper);
}

.site-brand:hover .site-brand__bracket {
  color: var(--color-neon);
}

.site-brand:hover .site-brand__code {
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

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

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__item {
  margin: 0;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(242, 244, 248, 0.8);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--color-neon);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s var(--ease);
}

.site-nav__link:hover {
  color: var(--color-paper);
}

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

.site-nav__link[aria-current="page"] {
  color: var(--color-paper);
}

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 11px 10px;
  background: transparent;
  border: 1px solid rgba(192, 192, 192, 0.35);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--color-neon);
}

.nav-toggle__line {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-paper);
  transition: transform 0.28s var(--ease), opacity 0.2s ease, background-color 0.2s ease;
}

.nav-toggle:hover .nav-toggle__line {
  background: var(--color-neon);
}

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

.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(-7px) rotate(-45deg);
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-silver) 0%, var(--color-neon) 130%);
  pointer-events: none;
  z-index: 2;
}

/* ---------- 移动端抽屉导航 ---------- */
@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: block;
    width: min(340px, 86vw);
    padding: calc(var(--header-h) + 32px) 32px 40px;
    background:
      linear-gradient(to bottom, rgba(57, 255, 20, 0.08), transparent 180px),
      var(--color-deep);
    border-left: 1px solid rgba(192, 192, 192, 0.2);
    box-shadow: -24px 0 48px rgba(0, 0, 0, 0.3);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
    overflow-y: auto;
  }

  .site-nav[data-open="true"] {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 4px;
    font-size: 18px;
    border-bottom: 1px solid rgba(192, 192, 192, 0.14);
  }

  .site-nav__link::after {
    left: auto;
    right: 0;
    bottom: 0;
    width: 3px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: center bottom;
  }

  .site-nav__link:hover::after,
  .site-nav__link[aria-current="page"]::after {
    transform: scaleY(1);
  }
}

body.menu-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(10, 31, 60, 0.72);
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--color-deep);
  border-top: 1px solid rgba(192, 192, 192, 0.16);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-neon) 0 32px, transparent 32px 48px);
  opacity: 0.7;
  pointer-events: none;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 48px;
}

.footer-brand__code {
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--color-neon);
  margin-bottom: 10px;
}

.footer-brand__name {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: 0.14em;
  line-height: 1.2;
  color: var(--color-paper);
}

.footer-brand__slogan {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--color-silver);
}

.footer-brand__trust {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(192, 192, 192, 0.25);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(192, 192, 192, 0.85);
  max-width: 340px;
}

.footer-nav__title,
.footer-contact__title {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-silver);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer-nav__index {
  color: var(--color-neon);
  margin-right: 8px;
}

.footer-nav__list li {
  margin-bottom: 10px;
}

.footer-nav__link {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: 14px;
  color: rgba(242, 244, 248, 0.75);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.22s ease;
}

.footer-nav__link::before {
  content: "→";
  position: absolute;
  left: -14px;
  color: var(--color-neon);
  opacity: 0;
  transition: opacity 0.2s ease, left 0.22s ease;
}

.footer-nav__link:hover {
  color: var(--color-neon);
  padding-left: 16px;
}

.footer-nav__link:hover::before {
  left: 0;
  opacity: 1;
}

.footer-contact__item {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(192, 192, 192, 0.75);
}

.footer-contact__value {
  display: block;
  margin-top: 2px;
  font-family: var(--font-data);
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-paper);
  word-break: break-all;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 32px;
  border-top: 1px solid rgba(192, 192, 192, 0.14);
}

.footer-meta__copy,
.footer-meta__icp {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(192, 192, 192, 0.7);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 26px;
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn--solid {
  background: var(--color-neon);
  color: var(--color-deep);
}

.btn--solid:hover {
  background: var(--color-paper);
  color: var(--color-deep);
}

.btn--line {
  background: transparent;
  border-color: rgba(192, 192, 192, 0.55);
  color: var(--color-silver);
}

.btn--line:hover {
  border-color: var(--color-neon);
  color: var(--color-neon);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 0;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--color-silver);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "→";
  margin: 0 10px;
  color: var(--color-neon);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--color-silver);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* ---------- 索引标签与标题 ---------- */
.index-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-neon);
  text-transform: uppercase;
}

.index-label::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--color-neon);
}

.section-heading {
  margin-bottom: 40px;
}

.section-heading__index {
  display: block;
  margin-bottom: 10px;
}

.section-heading__title {
  font-size: 32px;
}

/* ---------- 切角面板 ---------- */
.cut-panel {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  background: var(--color-navy);
  border: 1px solid rgba(192, 192, 192, 0.18);
  clip-path: polygon(0 0, calc(100% - var(--radius-cut)) 0, 100% var(--radius-cut), 100% 100%, var(--radius-cut) 100%, 0 calc(100% - var(--radius-cut)));
}

.cut-panel--teal {
  background: var(--color-teal);
}

.cut-panel--wine {
  background: var(--color-wine);
}

.cut-panel--indigo {
  background: var(--color-indigo);
}

.cut-panel--deep {
  background: var(--color-deep);
  border-color: rgba(192, 192, 192, 0.25);
}

/* ---------- 数据数字 ---------- */
.data-num {
  font-family: var(--font-data);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-neon);
  font-variant-numeric: tabular-nums;
}

.data-num__suffix {
  font-size: 0.5em;
  color: var(--color-silver);
  margin-left: 2px;
}

/* ---------- 滑动下划线链接 ---------- */
.link-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(to right, var(--color-neon), var(--color-neon));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s var(--ease), color 0.2s ease;
}

.link-underline:hover {
  color: var(--color-neon);
  background-size: 100% 2px;
}

/* ---------- 图片容器 ---------- */
.img-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  width: 100%;
  background-color: var(--color-navy);
  background-image:
    linear-gradient(rgba(192, 192, 192, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 192, 192, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  border: 1px solid rgba(192, 192, 192, 0.2);
  clip-path: polygon(0 0, calc(100% - 32px) 0, 100% 32px, 100% 100%, 32px 100%, 0 calc(100% - 32px));
  overflow: hidden;
}

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

.img-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 8px 16px;
  background: rgba(10, 31, 60, 0.86);
  border-top: 1px solid rgba(192, 192, 192, 0.2);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--color-silver);
}

/* ---------- 首屏章节容器 ---------- */
.page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  padding: calc(var(--header-h) + 72px) 0 72px;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: calc(var(--header-h) + 24px);
  right: -80px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(192, 192, 192, 0.2);
  transform: rotate(45deg);
  pointer-events: none;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

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

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 20px;
  }

  .section-heading__title {
    font-size: 24px;
  }

  .page-hero::before {
    width: 160px;
    height: 160px;
    right: -48px;
  }

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

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ---------- 减弱动效 ---------- */
@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;
  }

  .site-nav,
  .scroll-progress,
  .site-nav__link::after,
  .footer-nav__link,
  .nav-toggle,
  .btn,
  .link-underline {
    transition: none;
  }
}
