/* ============================================================
   诺亚体育官网 · /assets/site.css
   共享层：重置、变量、排版、命令栏、页脚、通用组件
   ============================================================ */

/* ---------- 1. 重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: #071A16;
}

body,
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; }
main { display: block; }

:focus-visible {
  outline: 2px solid #16E0C0;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #071A16;
  --panel: #0C2A23;
  --panel-2: #0E332A;
  --neon: #16E0C0;
  --neon-soft: #7FF3E0;
  --flame: #FF7A2F;
  --amber: #FFC24B;
  --paper: #F2F7F5;
  --line: #1E4A40;
  --muted: #8FA8A2;
  --glass: rgba(12, 42, 35, 0.62);

  --font-display: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --bar-h: 66px;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(1150px 620px at 82% -6%, rgba(22, 224, 192, 0.13), transparent 62%),
    radial-gradient(860px 480px at -4% 1%, rgba(255, 122, 47, 0.08), transparent 60%);
  background-repeat: no-repeat;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 { font-size: clamp(2rem, 6vw, 5rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 1.9vw, 1.4rem); }
h4 { font-size: 1rem; }

p { line-height: 1.75; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: clamp(1.75rem, 8vw, 2.6rem); }
}

/* ---------- 4. 通用容器与工具 ---------- */
.wrap,
.cmdbar__inner,
.sitefoot__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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;
}

.divider {
  height: 1px;
  border: 0;
  background: var(--line);
  margin-block: clamp(1.6rem, 4vw, 2.6rem);
}

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

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 200;
  padding: 0.75rem 1.1rem;
  background: var(--neon);
  color: #04201A;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 0 0 10px 10px;
  transition: top 0.22s ease;
}
.skip-link:focus { top: 0; }

/* ---------- 6. 命令栏 ---------- */
.cmdbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.24s ease, box-shadow 0.24s ease;
}
.cmdbar[data-pinned] {
  background: rgba(7, 26, 22, 0.86);
  box-shadow: 0 18px 34px -26px rgba(0, 0, 0, 0.95);
}
.cmdbar[data-nav-open] { background: var(--panel); }

.cmdbar__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  min-height: var(--bar-h);
}

.cmdbar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.cmdbar__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

/* 品牌署名 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--paper);
  flex: 0 0 auto;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--neon), #0E8F7C);
  color: #04201A;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(22, 224, 192, 0.35), 0 8px 20px -10px rgba(22, 224, 192, 0.85);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-size: 1.02rem; font-weight: 800; letter-spacing: 0.01em; }
.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.brand--lg .brand__mark { width: 42px; height: 42px; font-size: 1.15rem; border-radius: 11px; }
.brand--lg .brand__name { font-size: 1.2rem; }
.brand--lg .brand__sub { font-size: 0.72rem; }

/* 实时状态胶囊 */
.live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.66rem;
  border: 1px solid rgba(255, 122, 47, 0.42);
  border-radius: 999px;
  background: rgba(255, 122, 47, 0.1);
  color: var(--flame);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.live__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.18);
  animation: livePulse 1.9s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.68); }
}

/* ---------- 7. 导航 ---------- */
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.15rem, 1vw, 0.85rem);
}
.nav__item { flex: 0 0 auto; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.5rem 0.2rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav__link:hover,
.nav__link:focus-visible { color: var(--paper); }

.nav__index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0;
  color: var(--neon);
  opacity: 0.42;
  transition: opacity 0.2s ease;
}
.nav__link:hover .nav__index { opacity: 0.75; }

.nav__link[aria-current="page"] {
  color: var(--neon);
  border-bottom-color: var(--neon);
  font-weight: 700;
}
.nav__link[aria-current="page"] .nav__index { opacity: 1; }

.nav__foot { display: none; }
.nav__footline {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 搜索框 */
.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 26, 22, 0.5);
  transition: border-color 0.2s ease;
}
.search:focus-within { border-color: rgba(22, 224, 192, 0.55); }
.search__icon {
  position: relative;
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}
.search__icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 1.5px;
  background: var(--muted);
  transform: rotate(45deg);
}
.search__input {
  width: 150px;
  border: 0;
  background: transparent;
  font-size: 0.84rem;
  color: var(--paper);
  outline: none;
}
.search__input::placeholder { color: rgba(143, 168, 162, 0.8); }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}
.btn--live {
  background: var(--flame);
  color: #1A0A02;
  box-shadow: 0 10px 24px -14px rgba(255, 122, 47, 0.95);
}
.btn--live:hover { background: #FF8F4E; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--neon-soft);
}
.btn--ghost:hover {
  border-color: var(--neon);
  color: var(--neon);
  background: rgba(22, 224, 192, 0.08);
}
.btn--sm { padding: 0.44rem 0.85rem; font-size: 0.78rem; }
.btn--block { width: 100%; }

/* ---------- 9. 移动导航按钮 ---------- */
.navtoggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(22, 224, 192, 0.06);
  cursor: pointer;
  place-items: center;
  grid-auto-flow: row;
  gap: 4px;
  align-content: center;
}
.navtoggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--neon-soft);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.navtoggle[aria-expanded="true"] .navtoggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bar:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] .navtoggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 10. 命令栏滚动进度 ---------- */
.cmdbar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--neon), var(--flame));
  pointer-events: none;
}

/* ---------- 11. 响应式：命令栏 ---------- */
@media (max-width: 1280px) {
  .search { display: none; }
}

@media (max-width: 1120px) {
  .navtoggle { display: grid; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 28px 44px -24px rgba(0, 0, 0, 0.8);
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
    padding: 0.4rem var(--gutter) 1.3rem;
  }
  .nav[data-open] { display: flex; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__item { border-bottom: 1px solid rgba(30, 74, 64, 0.55); }
  .nav__item:last-child { border-bottom: 0; }

  .nav__link {
    width: 100%;
    padding: 0.85rem 0.2rem;
    border-bottom: 0;
    font-size: 1rem;
  }
  .nav__link[aria-current="page"] { color: var(--neon); }
  .nav__link[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -0.4rem;
    top: 50%;
    width: 3px;
    height: 18px;
    margin-top: -9px;
    border-radius: 3px;
    background: var(--neon);
  }

  .nav__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(30, 74, 64, 0.7);
  }
}

@media (max-width: 640px) {
  .brand__sub { display: none; }
  .live { font-size: 0.66rem; padding: 0.24rem 0.52rem; }
  .cmdbar__actions .btn--live { padding: 0.5rem 0.72rem; font-size: 0.76rem; }
}

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

/* ---------- 12. 页脚 ---------- */
.sitefoot {
  position: relative;
  margin-top: clamp(3.5rem, 9vw, 6.5rem);
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.sitefoot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon), var(--flame), transparent);
  opacity: 0.55;
}
.sitefoot__inner {
  padding-top: clamp(2.4rem, 5vw, 3.6rem);
  padding-bottom: 1.6rem;
}

.sitefoot__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.sitefoot__claim {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 40ch;
}
.sitefoot__top .btn { margin-left: auto; }

.sitefoot__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2.3rem;
  padding-top: 2.2rem;
  border-top: 1px solid rgba(30, 74, 64, 0.6);
}

.footcol { min-width: 0; }
.footcol__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--neon-soft);
}
.footcol__title::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--flame);
  flex: 0 0 auto;
}

.footcol__list { display: grid; gap: 0.55rem; }
.footcol__link {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.18s ease;
}
.footcol__link:hover,
.footcol__link:focus-visible { color: var(--neon); }

.footnote {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}
.footnote--break { word-break: break-word; }
.footnote--dim { opacity: 0.72; }

.sitefoot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.4rem;
  margin-top: 2.2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(30, 74, 64, 0.6);
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 860px) {
  .sitefoot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sitefoot__top .btn { margin-left: 0; }
}
@media (max-width: 480px) {
  .sitefoot__grid { grid-template-columns: minmax(0, 1fr); gap: 1.7rem; }
}

/* ---------- 13. 章节与标题区 ---------- */
.section { padding-block: clamp(2.4rem, 6vw, 4.5rem); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.7rem 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.section__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section__lead {
  margin-left: auto;
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.92rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--neon);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--neon);
  flex: 0 0 auto;
}

/* ---------- 14. 面包屑 ---------- */
.crumbs { margin-block: 1.2rem 0.4rem; }
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.crumbs__link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}
.crumbs__link:hover,
.crumbs__link:focus-visible { color: var(--neon); }
.crumbs__sep { color: rgba(143, 168, 162, 0.55); }

/* ---------- 15. 网格 ---------- */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: grid; gap: 0.9rem; }

@media (max-width: 900px) {
  .grid--2,
  .grid--3,
  .grid--split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 16. 面板与资料卡 ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
}
.panel--glass {
  background: var(--glass);
  border-color: rgba(22, 224, 192, 0.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.15rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}
.card:hover,
.card:focus-visible {
  border-color: rgba(22, 224, 192, 0.5);
  background: var(--panel-2);
  transform: translateY(-3px);
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- 17. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(127, 243, 224, 0.12);
  color: var(--neon-soft);
  border: 1px solid rgba(127, 243, 224, 0.25);
}
.tag--neon {
  background: rgba(22, 224, 192, 0.14);
  color: var(--neon);
  border-color: rgba(22, 224, 192, 0.35);
}
.tag--flame {
  background: rgba(255, 122, 47, 0.14);
  color: var(--flame);
  border-color: rgba(255, 122, 47, 0.35);
}
.tag--amber {
  background: rgba(255, 194, 75, 0.14);
  color: var(--amber);
  border-color: rgba(255, 194, 75, 0.35);
}

/* ---------- 18. 正文排版 ---------- */
.prose {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.85;
  color: #D8E6E2;
}
.prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; color: var(--paper); }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.5em; color: var(--paper); }
.prose p + p { margin-top: 1.05em; }
.prose ul,
.prose ol { margin-top: 0.9em; padding-left: 1.15em; }
.prose ul li { list-style: none; position: relative; padding-left: 1em; margin-bottom: 0.5em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 2px;
  background: var(--neon);
}
.prose ol { list-style: decimal; }
.prose ol li { margin-bottom: 0.5em; }
.prose a {
  color: var(--neon-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose strong { color: var(--paper); }

/* ---------- 19. 图片容器 ---------- */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #0E332A 0%, #071A16 100%);
}
.figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure--wide { aspect-ratio: 16 / 9; }
.figure--tall { aspect-ratio: 3 / 4; }
.figure--square { aspect-ratio: 1 / 1; }
.figure--strip { aspect-ratio: 21 / 9; }
.figure__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  font-size: 0.76rem;
  color: var(--paper);
  background: linear-gradient(to top, rgba(7, 26, 22, 0.92), transparent);
}

/* ---------- 20. 显现动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
.reveal[data-step="1"] { transition-delay: 0.06s; }
.reveal[data-step="2"] { transition-delay: 0.12s; }
.reveal[data-step="3"] { transition-delay: 0.18s; }
.reveal[data-step="4"] { transition-delay: 0.24s; }
.reveal[data-step="5"] { transition-delay: 0.3s; }

/* ---------- 21. 降低动效偏好 ---------- */
@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;
  }
  .reveal { opacity: 1; transform: none; }
  .cmdbar__progress { display: none; }
  .live__dot { animation: none; }
  .card:hover,
  .card:focus-visible,
  .btn--live:hover { transform: none; }
}
