/* =========================================================
   南宫赛场 · Site Kit 共享样式 (/assets/site.css)
   夜战深蓝底 + 蓝图网格 + 荧光青/信号橙状态语义
   ========================================================= */

:root {
  --bg: #0A1626;
  --panel: #10243D;
  --grid: #1E3A57;
  --cyan: #35E0E8;
  --orange: #FF7A1A;
  --green: #58D68D;
  --paper: #F2F6FA;
  --mist: #A9B8C9;
  --light: #E6EDF5;
  --warn: #F2C94C;

  --font-sans: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo,
    Consolas, "Liberation Mono", monospace;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC",
    Georgia, "Times New Roman", serif;

  --max: 1240px;
  --radius: 0px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --line: 1px solid var(--grid);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

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

button { font: inherit; }

::selection {
  background: var(--cyan);
  color: #06131F;
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(30, 58, 87, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 87, 0.34) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  background-position: -1px -1px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--paper);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

p { line-height: 1.8; }

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover { color: #6FF0F5; }

strong { font-weight: 700; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-serif); }

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

.section { padding-block: clamp(40px, 6vw, 80px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  border-bottom: var(--line);
  padding-bottom: 14px;
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section-head h2 { letter-spacing: -0.02em; }

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.index-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--mist);
  border: var(--line);
  padding: 3px 8px;
  line-height: 1.5;
  white-space: nowrap;
}

.rule {
  height: 1px;
  border: 0;
  background: var(--grid);
  margin-block: clamp(18px, 3vw, 28px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }

/* ---------- header ---------- */
.skip-link {
  position: absolute;
  left: clamp(16px, 3vw, 32px);
  top: -80px;
  z-index: 200;
  background: var(--cyan);
  color: #06131F;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 10px;
  color: #06131F;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10, 22, 38, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--line);
}

.header-inner {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--paper);
  flex-shrink: 0;
}

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

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(53, 224, 232, 0.24);
  pointer-events: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-name {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  color: var(--mist);
  line-height: 1.2;
  white-space: nowrap;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--grid);
  flex-shrink: 0;
}

.timeline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.timeline-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.timeline-link__dot {
  width: 6px;
  height: 6px;
  background: var(--orange);
  display: inline-block;
  flex-shrink: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}

.primary-nav { position: static; }

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

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 10px;
  font-size: 0.8rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--mist);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(53, 224, 232, 0.07);
}

.nav-link[aria-current="page"] {
  color: var(--cyan);
  border-color: var(--grid);
  background: rgba(53, 224, 232, 0.09);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--cyan);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: var(--line);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.status-chip:hover {
  color: var(--paper);
  border-color: var(--cyan);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
  animation: statusPulse 2.6s var(--ease) infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 224, 232, 0.55); }
  55% { box-shadow: 0 0 0 6px rgba(53, 224, 232, 0); }
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 40px;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--panel);
  border: var(--line);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
  background: var(--cyan);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
  background: var(--cyan);
}

.header-ticks {
  height: 5px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--grid) 0 1px,
    transparent 1px 22px
  );
  opacity: 0.9;
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  background: var(--panel);
  border-top: var(--line);
  margin-top: clamp(48px, 7vw, 96px);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--cyan) 0 18px,
    transparent 18px 44px
  );
  opacity: 0.55;
}

.footer-inner {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(30px, 4vw, 52px) clamp(16px, 3vw, 32px) clamp(20px, 3vw, 30px);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 18px;
  border-bottom: var(--line);
}

.footer-brand-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.footer-top-link {
  font-size: 0.82rem;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 224, 232, 0.4);
  padding-bottom: 2px;
}

.footer-top-link:hover { border-bottom-color: var(--cyan); }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(24px, 3.5vw, 38px);
}

.footer-col { min-width: 0; }

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 12px;
}

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

.footer-list a {
  color: var(--mist);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.footer-list a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-underline-offset: 4px;
}

.footer-contact li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--mist);
  line-height: 1.65;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: rgba(169, 184, 201, 0.65);
  min-width: 2.6em;
  padding-top: 2px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 18px;
  border-top: var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.footer-icp { color: rgba(169, 184, 201, 0.8); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72em 1.3em;
  border: 1px solid var(--grid);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #06131F;
}

.btn--primary:hover {
  background: #66EDF2;
  border-color: #66EDF2;
  color: #06131F;
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
}

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

.btn--orange {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A0A00;
}

.btn--orange:hover {
  background: #FF9445;
  border-color: #FF9445;
  color: #1A0A00;
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  padding-block: 14px;
}

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

.breadcrumbs li + li::before {
  content: "/";
  color: var(--grid);
}

.breadcrumbs a {
  color: var(--mist);
  text-decoration: none;
}

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

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

/* ---------- panels ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: var(--line);
  padding: clamp(16px, 2.4vw, 26px);
}

.panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  pointer-events: none;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  border-bottom: var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- data & status ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--mist);
  line-height: 1.6;
}

.tag--cyan {
  color: var(--cyan);
  border-color: rgba(53, 224, 232, 0.45);
  background: rgba(53, 224, 232, 0.08);
}

.tag--orange {
  color: var(--orange);
  border-color: rgba(255, 122, 26, 0.45);
  background: rgba(255, 122, 26, 0.09);
}

.tag--green {
  color: var(--green);
  border-color: rgba(88, 214, 141, 0.45);
  background: rgba(88, 214, 141, 0.09);
}

/* ---------- text ---------- */
.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.75;
  color: #C9D8E7;
  max-width: 62ch;
}

.prose {
  max-width: 70ch;
  font-size: 1rem;
  line-height: 1.85;
  color: #D6E2EE;
}

.prose > * + * { margin-top: 1em; }

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.12rem;
  color: var(--cyan);
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
  display: grid;
  gap: 0.45em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--cyan); }

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(53, 224, 232, 0.45);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--orange);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--paper);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(53, 224, 232, 0.1);
  padding: 1px 5px;
  color: var(--cyan);
}

/* ---------- media ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border: var(--line);
  background: linear-gradient(150deg, #10243D 0%, #0A1626 72%);
  aspect-ratio: 16 / 10;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: linear-gradient(transparent, rgba(6, 19, 31, 0.9));
}

/* ---------- filter ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(16px, 2.4vw, 24px);
}

.filter-btn {
  padding: 7px 12px;
  background: transparent;
  border: var(--line);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background 0.18s var(--ease);
}

.filter-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.filter-btn[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A0A00;
  font-weight: 700;
}

[data-filter-item][hidden] { display: none; }

/* ---------- motion (shared) ---------- */
[data-reveal] {
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

html.js [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(14px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 140;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  pointer-events: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1079px) {
  .nav-toggle { display: flex; }

  .timeline-link,
  .header-divider { display: none; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--panel);
    border-top: var(--line);
    border-bottom: var(--line);
    padding: 6px clamp(16px, 4vw, 28px) 18px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(2, 8, 16, 0.62);
  }

  .primary-nav[data-open="true"] {
    display: block;
    animation: navDrop 0.22s var(--ease);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    display: block;
    padding: 14px 6px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(30, 58, 87, 0.7);
  }

  .nav-link[aria-current="page"] {
    border-color: rgba(53, 224, 232, 0.25);
    border-left: 2px solid var(--cyan);
    padding-left: 12px;
    background: rgba(53, 224, 232, 0.08);
  }

  .nav-link[aria-current="page"]::after { display: none; }
}

@media (max-width: 960px) {
  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-9 { grid-column: span 12; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 62px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; font-size: 0.72rem; }
  .brand-name { font-size: 0.94rem; letter-spacing: 0.06em; }
  .brand-tagline { font-size: 0.55rem; letter-spacing: 0.2em; }
  .status-chip { padding: 6px 9px; font-size: 0.62rem; }
  .status-chip__text { display: none; }
  .footer-bottom { justify-content: flex-start; }
  .breadcrumbs { font-size: 0.68rem; }
}

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

  [data-reveal],
  html.js [data-reveal]:not(.is-visible) {
    opacity: 1 !important;
    transform: none !important;
  }

  .status-dot { animation: none; }
  .scroll-progress { transition: none; }
}
