/* ================================================
   云开·全站 — 共享样式 /assets/site.css
   设计基因：展览画册 × 赛事数据台 × 侧轨目录
   ================================================ */

/* ---------- 01 变量与重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg-dark: #0A1A3F;
  --color-bg-darker: #060F2B;
  --color-bg-light: #F5F7FA;
  --color-accent: #FF5A36;
  --color-accent-alt: #00D27A;
  --color-accent-green-dark: #008C54;
  --color-accent-secondary: #4A3B8C;
  --color-accent-wine: #8C2B3C;
  --color-text: #1F2933;
  --color-text-secondary: #6B7280;
  --color-border: #D1D9E6;
  --color-white: #FFFFFF;

  --font-base: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-data: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --header-height: 64px;
  --nav-width: 240px;
  --space-section: 96px;

  --transition-fast: 0.2s ease;
  --transition-mid: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  --z-header: 90;
  --z-nav: 100;
  --z-skip: 1000;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg-dark);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.3;
}

h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: 0.01em; }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: clamp(20px, 3vw, 24px); }

p { margin-bottom: 1em; }

a { color: var(--color-accent); }

ul, ol { padding: 0; }

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

main { display: block; }

/* ---------- 02 无障碍 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-skip);
  transform: translateY(-320%);
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(255, 90, 54, 0.4);
  transition: transform 0.25s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 03 布局容器与栅格 ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}
@media (min-width: 768px) {
  .container { padding: 32px 24px; }
}

#main-content {
  padding-top: var(--header-height);
  min-height: 100vh;
  background: var(--color-bg-light);
}

.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.section-gap { padding: 64px 0; }
@media (min-width: 768px) {
  .section-gap { padding: var(--space-section) 0; }
}

[id] { scroll-margin-top: calc(var(--header-height) + 24px); }

/* ---------- 04 按钮与面包屑 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn--primary:hover {
  box-shadow: 0 8px 24px rgba(255, 90, 54, 0.35);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn--ghost:hover {
  background: rgba(255, 90, 54, 0.08);
  transform: translateY(-2px);
}
.btn--dark {
  background: var(--color-bg-dark);
  color: var(--color-white);
}
.btn--dark:hover {
  background: var(--color-bg-darker);
  transform: translateY(-2px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-family: var(--font-data);
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 28px;
}
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li:not(:first-child)::before { content: "/"; color: var(--color-border); }
.breadcrumb a { color: var(--color-text-secondary); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--color-accent); }

/* ---------- 05 头部顶栏 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: var(--z-header);
  background: rgba(10, 26, 63, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 90, 54, 0.18);
}

.site-header__inner {
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
@media (max-width: 640px) {
  .site-header__inner { padding: 0 16px; gap: 10px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  font-weight: 900;
  font-size: 20px;
  line-height: 1.2;
  background: linear-gradient(120deg, var(--color-accent) 20%, var(--color-accent-alt) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-accent);
}

.brand__name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--color-white);
  white-space: nowrap;
}
@media (max-width: 420px) {
  .brand__name { font-size: 14px; }
}

.brand__version {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 90, 54, 0.12);
  border: 1px solid rgba(255, 90, 54, 0.35);
  color: var(--color-accent);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .brand__version { display: none; }
}

.reading-progress {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.reading-progress::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-alt);
  box-shadow: 0 0 0 0 rgba(0, 210, 122, 0.5);
  animation: yk-pulse 2.4s infinite;
  flex-shrink: 0;
}
@keyframes yk-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 210, 122, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(0, 210, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 210, 122, 0); }
}

.reading-progress__label {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  min-width: 34px;
  text-align: right;
  flex-shrink: 0;
}

.reading-progress__track {
  display: block;
  width: 120px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
@media (max-width: 560px) {
  .reading-progress__track { width: 72px; }
}

.reading-progress__bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-alt));
  transition: width 0.2s ease;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.nav-toggle:hover {
  background: rgba(255, 90, 54, 0.12);
  border-color: rgba(255, 90, 54, 0.5);
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-white);
}

/* ---------- 06 侧轨导航 / 移动抽屉 ---------- */
.site-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-nav);
  visibility: hidden;
  transition: visibility 0s linear 0.42s;
}
.site-nav[data-open] {
  visibility: visible;
  transition: visibility 0s;
}

.site-nav__scrim {
  position: absolute;
  inset: 0;
  background: rgba(6, 15, 43, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
  z-index: 1;
}
.site-nav[data-open] .site-nav__scrim {
  opacity: 1;
  pointer-events: auto;
}

.site-nav__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  z-index: 2;
  padding: 28px 18px 24px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.014) 0 10px, transparent 10px 20px),
    var(--color-bg-darker);
  transform: translateX(-100%);
  transition: transform var(--transition-mid);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.site-nav[data-open] .site-nav__panel {
  transform: translateX(0);
}

.site-nav__panel::-webkit-scrollbar { width: 6px; }
.site-nav__panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: var(--radius-pill); }

.site-nav__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.site-nav__close:hover { background: rgba(255, 90, 54, 0.25); color: var(--color-white); }

.site-nav__index {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-nav__item { position: relative; }

.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  transition: background 0.2s, color 0.2s;
}
.site-nav__link:hover {
  background: linear-gradient(90deg, rgba(255, 90, 54, 0.14), rgba(74, 59, 140, 0.06));
  color: var(--color-white);
}

.site-nav__num {
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--color-accent);
  min-width: 22px;
}

.site-nav__label {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.site-nav__link[aria-current="page"] {
  background: linear-gradient(90deg, rgba(255, 90, 54, 0.22), rgba(255, 90, 54, 0.04));
  color: var(--color-white);
}
.site-nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}
.site-nav__link[aria-current="page"] .site-nav__num {
  color: var(--color-accent);
  text-shadow: 0 0 14px rgba(255, 90, 54, 0.45);
}

.site-nav__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-nav__meta {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
}

[data-nav-close] { cursor: pointer; }

/* 桌面端：侧边轨道导航 */
@media (min-width: 1024px) {
  body { padding-left: var(--nav-width); }

  .nav-toggle { display: none; }

  .site-nav {
    inset: var(--header-height) auto 0 0;
    width: var(--nav-width);
    visibility: visible;
    transition: none;
    background: var(--color-bg-darker);
    overflow-y: auto;
  }
  .site-nav__scrim { display: none; }
  .site-nav__close { display: none; }
  .site-nav__panel {
    position: static;
    width: auto;
    height: 100%;
    padding: 36px 20px 24px;
    transform: none;
    background: transparent;
  }
}

/* ---------- 07 页脚 ---------- */
.site-footer {
  background: var(--color-bg-darker);
  color: rgba(255, 255, 255, 0.78);
}

.site-footer p { margin-bottom: 0; }

.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
}
@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: 5fr 7fr; gap: 48px; }
}

.site-footer__brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.site-footer__brand-link {
  color: var(--color-white);
  font-weight: 800;
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer__brand-link:hover { color: var(--color-accent); }

.site-footer__mark {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--color-accent) 10%, var(--color-accent-alt) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-accent);
}

.site-footer__kicker {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.site-footer__tagline {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--color-white);
}

.site-footer__trust {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  border-left: 2px solid rgba(255, 90, 54, 0.5);
  padding-left: 14px;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 640px) {
  .site-footer__cols { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .site-footer__cols { grid-template-columns: repeat(3, 1fr); }
}

.site-footer__heading {
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 14px;
}

.site-footer__heading--spaced { margin-top: 28px; }

.site-footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.site-footer__list a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.site-footer__list a:hover {
  color: var(--color-accent);
  border-color: rgba(255, 90, 54, 0.4);
}

.site-footer__list--meta li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  overflow-wrap: anywhere;
}

.site-footer__label {
  font-family: var(--font-data);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  min-width: 32px;
  flex-shrink: 0;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 28px;
  font-family: var(--font-data);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
}

.site-footer__icp { margin: 0; }

/* ---------- 08 共享内容组件 ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card--dark {
  background: var(--color-bg-dark);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-accent-secondary);
  background: rgba(74, 59, 140, 0.08);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}
.tag--orange { color: var(--color-accent); background: rgba(255, 90, 54, 0.1); }
.tag--green { color: var(--color-accent-green-dark); background: rgba(0, 210, 122, 0.12); }

.notice {
  border-left: 3px solid var(--color-accent-secondary);
  background: rgba(74, 59, 140, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.quote-mark {
  background: var(--color-accent-wine);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.5;
}

.chapter { padding: 64px 0; }
@media (min-width: 768px) {
  .chapter { padding: var(--space-section) 0; }
}

.chapter__index {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  color: var(--color-bg-dark);
  -webkit-text-stroke: 1.5px var(--color-accent-secondary);
  letter-spacing: -0.02em;
}

.chapter__title {
  font-size: 28px;
  font-weight: 900;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-dark);
  color: var(--color-white);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(10, 26, 63, 0.28);
}
.preview-card__num {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}
.preview-card__title {
  font-weight: 900;
  font-size: 20px;
  line-height: 1.35;
}
.preview-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat__value {
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  color: var(--color-bg-dark);
}
.stat__value--green { color: var(--color-accent-green-dark); }
.stat__value--orange { color: var(--color-accent); }
.stat__label {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, var(--color-accent-secondary) 140%);
  background-size: cover;
  background-position: center;
}
.figure--landscape { aspect-ratio: 16 / 9; }
.figure--portrait { aspect-ratio: 3 / 4; }
.figure--square { aspect-ratio: 1 / 1; }
.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-index {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.article-index__title {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}
.article-index__link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
}
.article-index__link:hover { background: var(--color-bg-light); color: var(--color-accent); }
.article-index__link.is-active {
  background: rgba(255, 90, 54, 0.12);
  color: var(--color-accent);
}

/* ---------- 09 滚动显现与低动态 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@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;
    transition-delay: 0s !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .reading-progress::before { animation: none; }
  .btn:hover, .btn--primary:hover, .btn--ghost:hover, .btn--dark:hover,
  .preview-card:hover { transform: none; }
}
