/* ==========================================================================
   HG13 赛场 · 共享样式表 /assets/site.css
   夜赛靛蓝底 + 蓝图方格 + 切角面板 + 荧光青柠单点强调
   ========================================================================== */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 2. Tokens ---------- */
:root {
  --indigo: #0E1430;
  --stand: #1B2350;
  --blueprint: #2A3566;
  --lime: #C8FF3E;
  --amber: #FF8A3D;
  --stand-red: #E4402F;
  --concrete: #7C8698;
  --ice: #F4F7FF;
  --ink: #05070F;

  --text-soft: #B6C0DA;
  --line: rgba(42, 53, 102, 0.72);
  --line-soft: rgba(42, 53, 102, 0.42);

  --font-display: "Archivo Narrow", "Arial Narrow", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "Courier New", monospace;

  --wrap: 1360px;
  --gutter: clamp(18px, 3vw, 40px);
  --gap: clamp(16px, 2.2vw, 28px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--indigo);
  background-image:
    linear-gradient(to right, rgba(42, 53, 102, 0.30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 53, 102, 0.30) 1px, transparent 1px);
  background-size: 88px 88px;
  background-attachment: fixed;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

@media (min-width: 1200px) {
  body { font-size: 17px; }
}

@media (max-width: 760px) {
  body { background-size: 54px 54px; background-attachment: scroll; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--ice);
}

h1 { font-size: clamp(38px, 6.2vw, 86px); letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: clamp(25px, 3.4vw, 44px); }
h3 { font-size: clamp(18px, 1.9vw, 24px); line-height: 1.2; }
h4 { font-size: 17px; line-height: 1.3; }

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

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

/* ---------- 4. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
  position: relative;
}

.section--tight { padding-block: clamp(30px, 4vw, 56px); }

.section--alt {
  background: linear-gradient(180deg, rgba(27, 35, 80, 0.78), rgba(14, 20, 48, 0));
}

.hairline {
  height: 1px;
  border: 0;
  background: var(--line);
  margin-block: clamp(24px, 3vw, 40px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

@media (max-width: 640px) {
  .grid { gap: 16px; }
}

.prose { max-width: 38em; }
.prose p { margin-bottom: 1.15em; color: var(--text-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ice); }

.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.72;
  color: var(--text-soft);
  max-width: 34em;
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-top: 3px solid var(--lime);
  border-bottom: 1px solid var(--blueprint);
  background: rgba(14, 20, 48, 0.95);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 120;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: top 0.18s var(--ease);
}

.skip-link:focus { top: 8px; text-decoration: none; }

/* 顶部信息条 */
.header-strip {
  background: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 7px;
  font-size: 12px;
  line-height: 1.5;
}

.strip-brand {
  color: var(--concrete);
  letter-spacing: 0.06em;
}

.strip-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.strip-sep { color: var(--blueprint); }

.strip-code { color: var(--concrete); }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stand-red);
  box-shadow: 0 0 0 3px rgba(228, 64, 47, 0.18);
  animation: livePulse 1.9s var(--ease) infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.32; }
}

@media (max-width: 680px) {
  .strip-brand { display: none; }
  .strip-inner { justify-content: flex-start; }
}

/* 命令栏 */
.cmd-bar { position: relative; }

.cmd-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--ice);
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}

.brand-text { display: block; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: condensed;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--concrete);
  text-transform: uppercase;
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 12px;
  border-bottom: 2px solid transparent;
  color: var(--text-soft);
  font-size: 14.5px;
  font-weight: 600;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.site-nav a:hover {
  color: var(--ice);
  border-bottom-color: var(--amber);
  text-decoration: none;
}

.nav-idx {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--concrete);
}

.site-nav a[aria-current="page"] {
  color: var(--lime);
  border-bottom-color: var(--lime);
  background: rgba(200, 255, 62, 0.05);
}

.site-nav a[aria-current="page"] .nav-idx { color: var(--lime); }

.site-nav a[aria-current="page"]::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}

.cmd-actions { flex: 0 0 auto; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--blueprint);
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: border-color 0.18s var(--ease);
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--lime);
  transition: transform 0.2s var(--ease), top 0.2s var(--ease),
    bottom 0.2s var(--ease);
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  bottom: 4px;
  transform: rotate(-45deg);
}

/* 阅读进度条 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(42, 53, 102, 0.55);
}

.read-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lime);
  transition: width 0.08s linear;
}

/* ---------- 6. Header · 移动端 ---------- */
@media (max-width: 1080px) {
  .cmd-inner {
    justify-content: space-between;
    gap: 12px;
  }

  .brand { margin-right: auto; }

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

  .cmd-actions .btn {
    padding: 9px 13px;
    font-size: 13px;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex: none;
    justify-content: flex-start;
    background: var(--stand);
    border-bottom: 1px solid var(--blueprint);
    box-shadow: 0 26px 44px rgba(5, 7, 15, 0.6);
    z-index: 5;
  }

  [data-site-header][data-open] .site-nav { display: block; }

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

  .site-nav a {
    justify-content: flex-start;
    padding: 15px var(--gutter);
    border-bottom: 1px solid var(--line-soft);
    border-left: 3px solid transparent;
    font-size: 15px;
  }

  .site-nav a:hover { border-bottom-color: var(--line-soft); }

  .site-nav a[aria-current="page"] {
    border-left-color: var(--lime);
    border-bottom-color: var(--line-soft);
  }
}

@media (max-width: 560px) {
  .cmd-actions { display: none; }
  .brand-sub { display: none; }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(40px, 6vw, 88px);
  background: var(--ink);
  border-top: 1px solid var(--blueprint);
  font-size: 14.5px;
}

.site-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--lime) 0 18%,
    var(--amber) 18% 28%,
    var(--stand-red) 28% 34%,
    transparent 34% 100%
  );
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr);
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(44px, 6vw, 68px) clamp(30px, 4vw, 46px);
}

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

.footer-line {
  max-width: 32em;
  color: var(--text-soft);
  line-height: 1.72;
}

.footer-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--concrete);
}

.footer-facts li {
  padding: 4px 9px;
  border: 1px solid var(--line-soft);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.footer-col-title {
  margin-bottom: 15px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.footer-list li + li { margin-top: 9px; }

.footer-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-soft);
  font-size: 14.5px;
  transition: color 0.18s var(--ease);
}

.footer-list a::before {
  content: "";
  width: 6px;
  height: 1px;
  background: var(--blueprint);
  transition: width 0.18s var(--ease), background-color 0.18s var(--ease);
}

.footer-list a:hover {
  color: var(--lime);
  text-decoration: none;
}

.footer-list a:hover::before {
  width: 14px;
  background: var(--lime);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--concrete);
}

.footer-legal { color: #9AA5BE; }
.footer-note { color: var(--concrete); }

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

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--lime);
  color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.btn--primary:hover { background: #D9FF6B; }

.btn--ghost {
  border-color: var(--blueprint);
  color: var(--ice);
}

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

.btn--block { width: 100%; }

.is-pulse { animation: pulseEdge 0.55s var(--ease) 1; }

@keyframes pulseEdge {
  0% { box-shadow: 0 0 0 0 rgba(200, 255, 62, 0.55); }
  100% { box-shadow: 0 0 0 10px rgba(200, 255, 62, 0); }
}

/* ---------- 9. Tags & exhibit marks ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(200, 255, 62, 0.35);
  background: rgba(200, 255, 62, 0.06);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.tag--amber {
  border-color: rgba(255, 138, 61, 0.4);
  background: rgba(255, 138, 61, 0.08);
  color: var(--amber);
}

.tag--red {
  border-color: rgba(228, 64, 47, 0.45);
  background: rgba(228, 64, 47, 0.1);
  color: var(--stand-red);
}

.exhibit-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.exhibit-mark::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

/* ---------- 10. Panels & cards ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--stand);
  border: 1px solid var(--blueprint);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}

.panel--cut {
  border-left: 3px solid var(--lime);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(16px, 2vw, 24px);
  background: var(--stand);
  border: 1px solid var(--blueprint);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--amber);
}

/* ---------- 11. Media containers ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--stand);
  background-image:
    linear-gradient(135deg, rgba(42, 53, 102, 0.55) 25%, transparent 25%),
    linear-gradient(315deg, rgba(42, 53, 102, 0.55) 25%, transparent 25%);
  background-size: 18px 18px;
  border: 1px solid var(--blueprint);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.06);
}

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(5, 7, 15, 0) 0%, rgba(5, 7, 15, 0.88) 100%);
  color: var(--ice);
  font-size: 13px;
  line-height: 1.55;
}

/* ---------- 12. Score bar ---------- */
.scorebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  background: var(--stand);
  border-left: 3px solid var(--lime);
}

.scorebar-team {
  font-size: 15px;
  font-weight: 600;
  color: var(--ice);
}

.scorebar-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--lime);
}

/* ---------- 13. Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--blueprint);
}

.timeline > li {
  position: relative;
  padding-bottom: 26px;
}

.timeline > li:last-child { padding-bottom: 0; }

.timeline > li::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(200, 255, 62, 0.14);
}

.timeline-num {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--concrete);
}

/* ---------- 14. Stats & breadcrumb ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--lime);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--concrete);
}

.breadcrumb {
  border-bottom: 1px solid var(--line-soft);
  padding-block: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--concrete);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.breadcrumb li::after {
  content: "/";
  margin-left: 10px;
  color: var(--blueprint);
}

.breadcrumb li:last-child::after { content: ""; margin-left: 0; }

.breadcrumb a { color: var(--concrete); }
.breadcrumb a:hover { color: var(--lime); text-decoration: none; }

/* ---------- 15. Section highlight ---------- */
[data-section] { position: relative; }

[data-section][data-active] .exhibit-mark { color: var(--lime); }

[data-section][data-active] .exhibit-mark::after { background: var(--lime); }

/* ---------- 16. Reduced motion ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .card:hover { transform: none; }
  .read-progress-bar { transition: none; }
  .live-dot { animation: none; }
}
