/* =========================================================
   安博赛场 · 共享样式表 /assets/site.css
   堆叠画板 · 框架式导航 · 高原赛场夜航色彩体系
   ========================================================= */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

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

a { color: inherit; text-decoration: none; }

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

button, input, select, textarea { font: inherit; color: inherit; }

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

table { border-collapse: collapse; width: 100%; }

[hidden] { display: none !important; }

/* ---------- 2. Tokens ---------- */
:root {
  --navy: #0B1F3A;
  --navy-2: #10294A;
  --cream: #F4EDE0;
  --cream-2: #FBF6EA;
  --ink: #1A1512;
  --slate: #6E7B8B;
  --signal: #00E08A;
  --referee: #FFD400;
  --ice: #7FD8FF;
  --molten: #FF6A2C;
  --white: #FFFFFF;

  --edge: 18px;
  --frame-h: 60px;
  --panel-gap: 16px;
  --radius: 3px;
  --cut: 14px;

  --font-head: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-body: var(--font-head);
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas,
    "Liberation Mono", "Roboto Mono", monospace;

  --frame-shadow: 0 16px 40px -30px rgba(11, 31, 58, 0.85);
}

@media (min-width: 768px) {
  :root { --edge: 32px; --frame-h: 66px; }
}

@media (min-width: 1200px) {
  :root { --edge: 72px; --frame-h: 72px; }
}

/* ---------- 3. Base / 中文排版 ---------- */
body {
  min-height: 100vh;
  padding-inline: var(--edge);
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0.06em;
}

h1 { font-size: clamp(30px, 5.2vw, 54px); }
h2 { font-size: clamp(24px, 3.2vw, 36px); }
h3 { font-size: clamp(18px, 2vw, 24px); letter-spacing: 0.05em; }
h4 { font-size: 16px; letter-spacing: 0.05em; }

strong { font-weight: 700; }

.num,
[data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.01em;
}

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

::selection {
  background: var(--signal);
  color: var(--navy);
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: 8px;
  left: var(--edge);
  z-index: 200;
  padding: 9px 16px;
  background-color: var(--referee);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  transform: translateY(-220%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 5. 框架式头部 ---------- */
.frame {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--frame-h);
  z-index: 120;
  background-color: var(--navy);
  border-bottom: 1px solid rgba(0, 224, 138, 0.32);
  box-shadow: var(--frame-shadow);
}

.frame__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding-inline: var(--edge);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-height: 44px;
}

.brand__mark {
  width: 12px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 2px;
  background-image: linear-gradient(180deg, var(--signal) 0 60%, var(--referee) 60% 100%);
  box-shadow: 0 0 14px rgba(0, 224, 138, 0.5);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cream);
  white-space: nowrap;
}

.brand__suffix {
  display: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(244, 237, 224, 0.5);
  white-space: nowrap;
}

@media (min-width: 1080px) {
  .brand__suffix { display: block; }
}

/* 状态灯 */
.frame__status {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid rgba(244, 237, 224, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(244, 237, 224, 0.62);
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .frame__status { display: flex; }
}

.pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background-color: var(--signal);
  box-shadow: 0 0 0 0 rgba(0, 224, 138, 0.55);
  animation: pulse-beat 1.2s ease-in-out infinite;
}

@keyframes pulse-beat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 224, 138, 0.5); opacity: 1; }
  50% { box-shadow: 0 0 0 7px rgba(0, 224, 138, 0); opacity: 0.55; }
}

/* 滚动进度 */
.frame__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background-image: linear-gradient(90deg, var(--signal), var(--referee));
  pointer-events: none;
}

/* ---------- 6. 导航 ---------- */
.nav {
  position: fixed;
  top: var(--frame-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  padding: 14px var(--edge) 40px;
  overflow-y: auto;
  background-color: var(--navy);
  border-top: 1px solid rgba(0, 224, 138, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.nav[data-open] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 4px;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cream);
  border-bottom: 1px solid rgba(244, 237, 224, 0.12);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.nav__link::after {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background-color: transparent;
  transition: background-color 0.18s ease;
}

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

.nav__link[aria-current="page"]::after {
  background-color: var(--referee);
}

@media (min-width: 900px) {
  .nav {
    position: static;
    margin-left: auto;
    padding: 0;
    overflow: visible;
    background: none;
    border: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: row;
    align-items: center;
    gap: 2px;
  }

  .nav__link {
    position: relative;
    min-height: 38px;
    padding: 0 13px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(244, 237, 224, 0.72);
    border: 1px solid transparent;
    border-radius: var(--radius);
  }

  .nav__link:hover {
    color: var(--cream);
    border-color: var(--signal);
  }

  .nav__link::after {
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 4px;
    width: auto;
  }

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

/* ---------- 7. 移动菜单按钮 ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(244, 237, 224, 0.28);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: border-color 0.18s ease, color 0.18s ease;
}

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

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 10px;
  flex: 0 0 auto;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background-color: currentColor;
  transition: transform 0.2s ease;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(4.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-4.25px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
}

/* ---------- 8. 主内容容器 ---------- */
.site-main {
  padding-top: calc(var(--frame-h) + var(--panel-gap));
  padding-bottom: var(--panel-gap);
}

/* ---------- 9. 堆叠画板 ---------- */
.panel {
  position: relative;
  padding: clamp(24px, 4.2vw, 58px);
}

.panel + .panel {
  margin-top: var(--panel-gap);
}

.panel--dark {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(127, 216, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 216, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--cream);
}

.panel--deep {
  background-color: var(--navy-2);
  background-image: linear-gradient(rgba(127, 216, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 56px;
  color: var(--cream);
}

.panel--cream {
  background-color: var(--cream-2);
  background-image: repeating-linear-gradient(
    135deg,
    rgba(26, 21, 18, 0.026) 0 1px,
    transparent 1px 9px
  );
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(26, 21, 18, 0.09);
}

/* ---------- 10. 展览标签与区块头 ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

.label::before {
  content: "";
  width: 14px;
  height: 2px;
  flex: 0 0 auto;
  background-color: var(--molten);
}

.panel--dark .label,
.panel--deep .label {
  color: rgba(244, 237, 224, 0.62);
}

.panel--dark .label::before,
.panel--deep .label::before {
  background-color: var(--signal);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 28px;
  margin-bottom: 28px;
}

.section-head__title {
  font-size: clamp(22px, 2.6vw, 32px);
}

.section-head__note {
  max-width: 46ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
}

.panel--dark .section-head__note,
.panel--deep .section-head__note {
  color: rgba(244, 237, 224, 0.6);
}

/* ---------- 11. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

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

.btn--solid {
  background-color: var(--signal);
  border-color: var(--signal);
  color: var(--navy);
}

.btn--solid:hover {
  background-color: var(--referee);
  border-color: var(--referee);
  color: var(--ink);
}

.btn--ghost {
  color: var(--cream);
  border-color: rgba(244, 237, 224, 0.36);
}

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

.btn--outline {
  color: var(--navy);
  border-color: rgba(11, 31, 58, 0.34);
}

.btn--outline:hover {
  color: var(--molten);
  border-color: var(--molten);
}

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.breadcrumb__link {
  transition: color 0.16s ease;
}

.breadcrumb__link:hover {
  color: var(--molten);
}

.breadcrumb__sep {
  color: rgba(110, 123, 139, 0.55);
}

/* ---------- 13. 正文窄栏 ---------- */
.prose {
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.8;
}

.prose p + p { margin-top: 1.05em; }

.prose h2 {
  margin: 2.2em 0 0.7em;
  font-size: clamp(22px, 2.4vw, 30px);
}

.prose h3 {
  margin: 1.8em 0 0.6em;
  font-size: 19px;
}

.prose ul,
.prose ol {
  margin: 1em 0;
  padding-left: 1.35em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li + li { margin-top: 0.45em; }

.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--molten);
}

.prose a:hover { color: var(--molten); }

.panel--dark .prose,
.panel--deep .prose,
.panel--dark .prose a,
.panel--deep .prose a {
  color: var(--cream);
}

/* ---------- 14. 网格 ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.cut-card {
  clip-path: polygon(
    var(--cut) 0,
    100% 0,
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    0 100%,
    0 var(--cut)
  );
}

/* ---------- 15. 图片容器基础 ---------- */
.figure {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--navy-2);
  background-image: linear-gradient(
    140deg,
    #0B1F3A 0%,
    #10294A 46%,
    rgba(0, 109, 72, 0.9) 100%
  );
}

.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--3x2  { aspect-ratio: 3 / 2; }
.figure--1x1  { aspect-ratio: 1 / 1; }

.figure--cut {
  clip-path: polygon(
    0 0,
    calc(100% - 22px) 0,
    100% 22px,
    100% 100%,
    22px 100%,
    0 calc(100% - 22px)
  );
}

.figure__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.panel--dark .figure__caption,
.panel--deep .figure__caption {
  color: rgba(244, 237, 224, 0.55);
}

/* ---------- 16. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-bottom: 24px;
  padding: clamp(30px, 4vw, 54px) clamp(22px, 3.4vw, 56px) 22px;
  overflow: hidden;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(127, 216, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 216, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  color: rgba(244, 237, 224, 0.72);
  border-top: 2px solid var(--signal);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

.site-footer__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px 26px;
}

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; max-width: 60ch; }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 26px 34px;
  }
  .site-footer__brand { grid-column: auto; max-width: 38ch; }
}

.site-footer__brand { position: relative; }

.site-footer__line {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--cream);
}

.site-footer__meta {
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--signal);
}

.site-footer__note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(244, 237, 224, 0.56);
}

.site-footer__heading {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--referee);
}

.site-footer__list {
  display: grid;
  gap: 10px;
}

.site-footer__link {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(244, 237, 224, 0.72);
  transition: color 0.16s ease;
}

.site-footer__link:hover { color: var(--signal); }

.site-footer__contact {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(244, 237, 224, 0.15);
}

.site-footer__contact-line {
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: rgba(244, 237, 224, 0.7);
}

.site-footer__contact-key {
  display: inline-block;
  min-width: 5.2em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(244, 237, 224, 0.42);
}

.site-footer__contact .site-footer__note {
  max-width: 68ch;
}

.site-footer__base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(244, 237, 224, 0.15);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(244, 237, 224, 0.45);
}

.site-footer__legal { color: rgba(244, 237, 224, 0.55); }

/* ---------- 17. 滚动显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js [data-reveal="in"] {
  opacity: 1;
  transform: none;
}

/* ---------- 18. 动效降级 ---------- */
@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;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .frame__progress { transition: none; }
}
