/* =========================================================
   安博赛场 · 共享样式 /assets/site.css
   高原竞技档案台：夜蓝底 + 橙红信号 + 青绿状态
   ========================================================= */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- tokens ---------- */
:root {
  --navy-950: #07101F;
  --navy-900: #0B1426;
  --navy-800: #12203A;
  --navy-700: #1B2B4A;
  --mist: #9DB2CF;
  --snow: #F5F7FA;
  --amber: #FF5A3C;
  --amber-deep: #C53C26;
  --mint: #2EE6B8;
  --mint-deep: #0F8F72;
  --violet: #7C5CFF;
  --line: #2A3A55;
  --line-soft: rgba(42, 58, 85, 0.62);

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shell: 1280px;
  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --header-h: 76px;
  --rail-h: 38px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --radius: 2px;
  --shadow-panel: 0 24px 80px rgba(0, 0, 0, 0.28);
}

/* ---------- base ---------- */
body {
  font-family: var(--font-body);
  font-size: clamp(16px, 0.35vw + 15px, 17.5px);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--snow);
  background-color: var(--navy-950);
  background-image:
    radial-gradient(920px 500px at 82% -10%, rgba(124, 92, 255, 0.13), transparent 70%),
    radial-gradient(760px 440px at 4% 0%, rgba(255, 90, 60, 0.08), transparent 68%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--snow);
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); line-height: 1.32; }
h4 { font-size: 1.05rem; line-height: 1.45; letter-spacing: 0; }

::selection { background: var(--amber); color: #0A0F1A; }

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

/* ---------- utilities ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(2.5rem, 6vw, 5.25rem); }
.prose { max-width: 68ch; }
.prose p { margin-block: 0 1.15em; color: var(--mist); }
.prose p:last-child { margin-block-end: 0; }
.prose h2, .prose h3 { margin-block: 1.8em 0.6em; }
.is-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--amber);
}
.divider { height: 1px; background: var(--line); border: 0; }

/* ---------- layout grid ---------- */
.grid-12 {
  --gap: clamp(1rem, 2vw, 1.75rem);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.15rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease), transform 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--amber); color: #0A0F1A; border-color: var(--amber); }
.btn--primary:hover { background: var(--amber-deep); border-color: var(--amber-deep); color: var(--snow); }
.btn--ghost { background: transparent; color: var(--snow); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--mint); color: var(--mint); }
.btn--block { width: 100%; }

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tag--amber { color: var(--amber); border-color: rgba(255, 90, 60, 0.45); background: rgba(255, 90, 60, 0.08); }
.tag--mint { color: var(--mint); border-color: rgba(46, 230, 184, 0.4); background: rgba(46, 230, 184, 0.07); }
.tag--violet { color: var(--violet); border-color: rgba(124, 92, 255, 0.45); background: rgba(124, 92, 255, 0.09); }

/* ---------- media containers ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06);
  opacity: 0.58;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 16, 31, 0.18), rgba(7, 16, 31, 0.76));
  pointer-events: none;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media__caption {
  position: absolute;
  z-index: 1;
  inset-block-end: 0;
  inset-inline: 0;
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-block: 0 1.75rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mist);
}
.breadcrumb a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.breadcrumb a:hover { color: var(--snow); border-bottom-color: var(--amber); }
.breadcrumb__sep { color: var(--line); }
.breadcrumb [aria-current="page"] { color: var(--snow); }

/* ---------- toc ---------- */
.toc {
  display: grid;
  gap: 0.15rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.toc a {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--mist);
  text-decoration: none;
  border-left: 1px solid var(--line);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.toc a:hover { color: var(--snow); border-left-color: var(--mist); }
.toc a[aria-current="true"] {
  color: var(--snow);
  border-left-color: var(--amber);
  background: rgba(255, 90, 60, 0.09);
}

/* ---------- main shell ---------- */
.site-main {
  display: block;
  position: relative;
  padding-block-start: calc(var(--header-h) + var(--rail-h) + clamp(1rem, 3vw, 2.5rem));
}
.site-main--flush { padding-block-start: 0; }

/* =========================================================
   HEADER
   ========================================================= */
.skip-link {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 300;
  padding: 0.7rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-950);
  background: var(--snow);
  border-radius: var(--radius);
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  color: var(--snow);
  background: rgba(7, 16, 31, 0.32);
  border-bottom: 1px solid rgba(42, 58, 85, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
.site-header.is-solid {
  background: rgba(11, 20, 38, 0.97);
  border-bottom-color: var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

.site-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(42, 58, 85, 0.45);
  z-index: 2;
}
.site-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber) 62%, var(--mint) 100%);
  transition: width 0.1s linear;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 2rem);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}
.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--navy-700), var(--navy-900) 70%);
  border-radius: var(--radius);
  transition: border-color 0.18s var(--ease);
}
.brand:hover .brand__mark { border-color: var(--amber); }
.brand__mark-line {
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--amber);
  border-left: 2px solid var(--amber);
  transform: translate(2px, 2px);
}
.brand__mark::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 5px;
  height: 5px;
  background: var(--mint);
  border-radius: 50%;
}
.brand__text { display: block; line-height: 1.1; }
.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--snow);
}
.brand__sub {
  display: block;
  margin-top: 0.28rem;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--mist);
}
.brand--footer .brand__mark { width: 42px; height: 42px; }
.brand--footer .brand__name { font-size: 1.25rem; }

/* nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.4rem);
  margin-inline-start: auto;
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 1.1vw, 1rem);
}
.site-nav__item { position: relative; }
.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0.38rem;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0.38rem;
  right: 0.38rem;
  bottom: 0.1rem;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s var(--ease);
}
.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--snow); }
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--snow); font-weight: 700; }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__foot { display: none; }
.site-nav__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

/* nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--snow);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--mist); }
.nav-toggle__box { display: grid; gap: 4px; width: 16px; }
.nav-toggle__bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--snow);
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}
.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mist);
}
.site-header[data-open] .nav-toggle__box .nav-toggle__bar:first-child {
  transform: translateY(2.75px) rotate(45deg);
  background: var(--amber);
}
.site-header[data-open] .nav-toggle__box .nav-toggle__bar:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
  background: var(--amber);
}
.site-header[data-open] .nav-toggle__label { color: var(--amber); }

/* status rail */
.status-rail {
  display: flex;
  align-items: center;
  height: var(--rail-h);
  padding-inline: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
  overflow: hidden;
  white-space: nowrap;
}
.status-rail__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.status-rail__item:not(:last-child) {
  padding-inline-end: 1.1rem;
  margin-inline-end: 1.1rem;
  border-right: 1px solid var(--line-soft);
}
.status-rail__item.is-mono { margin-inline-start: auto; color: var(--mist); letter-spacing: 0.16em; }
.status-rail__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mist);
  flex: 0 0 auto;
}
.status-rail__dot--mint { background: var(--mint); box-shadow: 0 0 0 3px rgba(46, 230, 184, 0.14); }
.status-rail__dot--amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 90, 60, 0.14); }
.status-rail__dot--violet { background: var(--violet); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.16); }

/* ---------- header responsive ---------- */
@media (max-width: 959px) {
  :root { --header-h: 66px; --rail-h: 0px; }
  .site-header__actions { display: none; }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.75rem var(--gutter) 1.6rem;
    background: var(--navy-900);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-panel);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .site-header[data-open] { background: rgba(11, 20, 38, 0.98); }
  .site-header[data-open] .site-nav { display: flex; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .site-nav__item { width: 100%; }
  .site-nav__link {
    display: block;
    padding: 0.9rem 0.1rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .site-nav__link::after { display: none; }
  .site-nav__link:hover,
  .site-nav__link:focus-visible { color: var(--snow); }
  .site-nav__link[aria-current="page"] { color: var(--amber); border-bottom-color: var(--amber); }
  .site-nav__foot { display: grid; gap: 0.6rem; margin-top: 1.3rem; }
  .site-nav__meta { margin-top: 0.25rem; line-height: 1.7; white-space: normal; }
  .status-rail { display: none; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 0.94rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.55fr 0.75fr 0.75fr 1.15fr;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line-soft);
}
.site-footer__brand { display: grid; gap: 1.1rem; align-content: start; }
.site-footer__summary {
  max-width: 40ch;
  color: var(--mist);
  line-height: 1.8;
}
.site-footer__code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(157, 178, 207, 0.66);
}
.site-footer__col { display: grid; gap: 0.9rem; align-content: start; }
.site-footer__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--snow);
  line-height: 1.4;
}
.site-footer__title::before {
  content: "";
  width: 12px;
  height: 1px;
  background: var(--amber);
}
.site-footer__links { display: grid; gap: 0.55rem; }
.site-footer__links a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.site-footer__links a:hover { color: var(--snow); border-bottom-color: var(--amber); }

.site-footer__contact { display: grid; gap: 0.9rem; align-content: start; }
.site-footer__contact-list { display: grid; gap: 0.55rem; }
.site-footer__contact-list li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.9rem;
  line-height: 1.7;
}
.site-footer__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(157, 178, 207, 0.7);
}
.site-footer__contact-list .is-mono { color: var(--snow); font-size: 0.86rem; word-break: break-all; }
.site-footer__note {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.82rem;
  line-height: 1.75;
  color: rgba(157, 178, 207, 0.8);
}
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 1.15rem var(--gutter) 1.6rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(157, 178, 207, 0.72);
}
.site-footer__legal a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.site-footer__legal a:hover { color: var(--snow); border-bottom-color: var(--mint); }
.site-footer__icp { color: rgba(157, 178, 207, 0.72); }

@media (max-width: 1023px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__contact { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 1.9rem; }
  .site-footer__brand,
  .site-footer__contact { grid-column: auto; }
  .site-footer__base { flex-direction: column; align-items: flex-start; }
}

/* ---------- reveal ---------- */
html[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}
html[data-reveal-ready] [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html[data-reveal-ready] [data-reveal] { opacity: 1; transform: none; }
  .site-progress__bar { transition: none; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .site-progress, .skip-link { display: none !important; }
  body { background: #fff; color: #111; }
  .site-main { padding-block-start: 0; }
}
