/* 囚人科技 V6 — 基础层：变量、重置与通用 UI */
:root {
  --ivory: #e9e2d7;
  --muted: #aaa094;
  --gold: #c7a477;
  --gold-bright: #e4c99e;
  --gold-soft: rgba(199, 164, 119, .45);
  --line: rgba(215, 190, 151, .38);
  --dark: #080909;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --px: 0;
  --py: 0;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--dark);
  color: var(--ivory);
  font-family: var(--serif);
  -webkit-text-size-adjust: 100%;
  /* 阻止横滑/下拉触发浏览器返回与刷新手势 */
  overscroll-behavior: none;
}

body {
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 顶部导航 */
.header {
  position: absolute;
  z-index: 12;
  top: 0;
  left: 0;
  width: 100%;
  padding: 4.8% 4.5% 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  opacity: .92;
  /* 青铜本体偏暗，页头背景偏暖亮：略提亮 + 轻投影，保证 28–42px 下绿锈细节可辨、不发黑 */
  filter: brightness(1.28) saturate(1.1) contrast(1.02) drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
}

.brand-name {
  font-size: 22px;
  letter-spacing: .28em;
  line-height: 1.25;
  white-space: nowrap;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
}

.brand-name small {
  display: block;
  margin-top: 7px;
  font: 11px/1 var(--sans);
  letter-spacing: .28em;
  color: var(--muted);
}

.navigation {
  display: flex;
  align-items: center;
  gap: 40px;
  pointer-events: auto;
}

.navigation button,
.navigation a {
  position: relative;
  padding: 11px 0;
  border: 0;
  background: none;
  color: #c8c0b5;
  font: 13px/1 var(--sans);
  letter-spacing: .2em;
  text-decoration: none;
  cursor: pointer;
  transition: color .3s;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .85);
}

.navigation button::after,
.navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .3s;
}

.navigation button:hover,
.navigation a:hover {
  color: var(--ivory);
}

.navigation button:hover::after,
.navigation a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 12px 8px;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
}

.menu-toggle span {
  display: block;
  height: 1.5px;
  margin: 6px 0;
  background: var(--ivory);
  transition: transform .35s, opacity .35s;
}

/* 弹层：项目详情 / 项目档案 / 关于我们 */
.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 4, 4, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, visibility 0s linear .35s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .35s ease, visibility 0s linear 0s;
}

.panel {
  position: relative;
  width: min(560px, 94vw);
  max-height: 86svh;
  overflow-y: auto;
  padding: 44px 46px;
  border: 1px solid rgba(201, 168, 119, .42);
  background: linear-gradient(135deg, rgba(39, 35, 29, .97), rgba(7, 9, 8, .99));
  box-shadow: 0 30px 100px #000;
}

.close {
  position: absolute;
  right: 18px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  color: #c5b69f;
  font: 24px/1 var(--sans);
  cursor: pointer;
}

.close:hover {
  color: var(--ivory);
}

.tag {
  font: 10px/1.6 var(--sans);
  letter-spacing: .26em;
  color: var(--gold);
}

.panel h2 {
  margin: 13px 0;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: .18em;
}

.panel-body p {
  margin: 0;
  font-size: 13px;
  line-height: 2.1;
  color: #c1b8aa;
}

.status {
  margin-top: 22px;
  font: 10px/1.8 var(--sans);
  letter-spacing: .2em;
  color: #a89a83;
}

.status.is-developing {
  color: var(--gold);
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 18px;
  border: 1px solid var(--gold-soft);
  background: rgba(18, 16, 13, .55);
  color: var(--gold-bright);
  font: 12px/1 var(--sans);
  letter-spacing: .2em;
  text-decoration: none;
  transition: background .3s, border-color .3s;
}

.panel-link:hover,
.panel-link:focus-visible {
  background: rgba(199, 164, 119, .16);
  border-color: var(--gold);
  outline: none;
}

.panel-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(199, 164, 119, .38);
}

.panel-note {
  margin: 14px 0 0;
  font: 10px/1.8 var(--sans);
  letter-spacing: .18em;
  color: #8d8273;
}

.archive-list {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.archive-list li {
  border-bottom: 1px solid rgba(215, 190, 151, .2);
}

.archive-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 17px 2px;
  border: 0;
  background: none;
  color: var(--ivory);
  text-align: left;
  cursor: pointer;
  transition: color .3s;
}

.archive-item:hover {
  color: var(--gold-bright);
}

.archive-item .num {
  width: 28px;
  font: 9px/1 var(--sans);
  letter-spacing: .12em;
  color: var(--gold);
}

.archive-item .name {
  flex: 1;
  font-size: 17px;
  letter-spacing: .14em;
}

.archive-item .state {
  font: 9px/1 var(--sans);
  letter-spacing: .16em;
  color: var(--muted);
}

.archive-item .state.is-developing {
  color: var(--gold);
}

/* 手机版菜单（默认隐藏） */
.mobile-menu {
  position: fixed;
  z-index: 45;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 0 9%;
  background: rgba(6, 7, 7, .96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, visibility 0s linear .35s;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.mobile-menu button,
.mobile-menu a {
  padding: 20px 2px;
  border: 0;
  border-bottom: 1px solid rgba(215, 190, 151, .22);
  background: none;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: .18em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mobile-menu-note {
  margin-top: 42px;
  font: 10px/2.2 var(--sans);
  letter-spacing: .2em;
  color: #8d8377;
}

.noscript {
  position: absolute;
  z-index: 60;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--gold);
}
