/* 囚人科技 V6 — 桌面端：遗迹场景、器物图层与信息布局 */
html,
body {
  height: 100%;
}

body {
  overflow: hidden;
}

.scene {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 660px;
  overflow: hidden;
  isolation: isolate;
  background: #080909;
}

/* ---------- Layer 01 环境背景 ---------- */
.layer {
  position: absolute;
  inset: -3%;
}

.layer-env {
  z-index: 0;
  will-change: transform;
  transform: translate3d(calc(var(--px) * 10px), calc(var(--py) * 7px), 0);
  transition: transform .5s ease-out;
}

.env-media,
.env-media picture {
  position: absolute;
  inset: 0;
  display: block;
}

.env-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.02);
  filter: brightness(.97) saturate(1.04) contrast(1.02);
  transition: transform 2.6s cubic-bezier(.2, .7, .2, 1), object-position .9s ease;
  will-change: transform;
}

.scene.ready .env-media img {
  transform: scale(1.055);
}

/* ---------- Layer 02 远景氛围 ---------- */
.layer-atmos {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg, rgba(5, 6, 6, .44) 0%, rgba(5, 6, 6, .24) 22%, rgba(5, 6, 6, .08) 38%, transparent 55%),
    linear-gradient(180deg, rgba(4, 5, 5, .32) 0%, rgba(4, 5, 5, .1) 12%, transparent 26%),
    linear-gradient(0deg, rgba(4, 5, 4, .4) 0%, transparent 26%),
    radial-gradient(ellipse at 52% 46%, transparent 34%, rgba(0, 0, 0, .42) 100%),
    radial-gradient(ellipse at 8% 2%, rgba(255, 214, 150, .14), transparent 44%);
}

.layer-atmos::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 26% 38%, rgba(226, 196, 152, .09), transparent 52%),
    radial-gradient(ellipse at 74% 58%, rgba(118, 138, 126, .07), transparent 58%);
  filter: blur(3px);
  animation: mistDrift 28s ease-in-out infinite alternate;
}

/* ---------- Layer 03 项目器物 ---------- */
.artifacts {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.relic {
  position: absolute;
  left: var(--x);
  bottom: var(--b);
  width: var(--w);
  display: block;
  text-decoration: none;
  pointer-events: auto;
  isolation: isolate;
  opacity: 0;
  translate:
    calc(var(--px) * var(--depth, 1) * 18px)
    calc(var(--py) * var(--depth, 1) * 12px);
  transition: translate .45s cubic-bezier(.2, .7, .2, 1);
  will-change: translate;
}

.scene.ready .relic {
  opacity: 1;
  animation: relicReveal 1.2s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0s) both;
}

/* 接地：器物与石台/泥地接触的暗部（在本体图下方，形成局部遮蔽） */
.relic::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -4%;
  right: -2%;
  bottom: -1%;
  height: 13%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse at 52% 46%,
    rgba(0, 0, 0, .5) 0 24%,
    rgba(0, 0, 0, .26) 48%,
    transparent 80%);
  filter: blur(10px);
  transform: translateY(20%);
}

.relic-inner {
  position: relative;
  display: block;
  transform: rotate(var(--rot, 0deg));
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}

/* 接触点：器物与石台/泥地真正接触的那一小块，压得更深 */
.relic-inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 10%;
  right: 10%;
  bottom: -1%;
  height: 9%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .82) 0 30%, rgba(0, 0, 0, .34) 58%, transparent 80%);
  filter: blur(5px);
  transform: translateY(26%);
}

/* 环境光/尘埃：叠一层同图暖褐副本，只用纯渐变压低它 ——
   副本自带器物 alpha，因此只作用在器物像素上，不会在四周留下矩形色块。 */
.relic-fog {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .62;
  filter: saturate(.45) sepia(.55) brightness(.62) contrast(.9) blur(.8px);
  -webkit-mask-image: linear-gradient(0deg,
    #000 0%, rgba(0, 0, 0, .78) 12%, rgba(0, 0, 0, .38) 28%, rgba(0, 0, 0, .1) 42%, transparent 56%);
  mask-image: linear-gradient(0deg,
    #000 0%, rgba(0, 0, 0, .78) 12%, rgba(0, 0, 0, .38) 28%, rgba(0, 0, 0, .1) 42%, transparent 56%);
  transition: opacity .5s ease;
}

.relic:hover .relic-fog,
.relic:focus-visible .relic-fog {
  opacity: .34;
}

.relic-inner::after {
  content: "";
  position: absolute;
  inset: -5%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 56%, rgba(255, 198, 122, .18), transparent 68%);
  mix-blend-mode: screen;
  transition: opacity .5s ease;
}

.relic:hover .relic-inner::after,
.relic:focus-visible .relic-inner::after {
  opacity: 1;
}

.relic-art {
  display: block;
  width: 100%;
  height: auto;
  /* 底缘 6% 极轻渐隐：打散 PNG 的硬直切边，让底部“没入”地面 */
  -webkit-mask-image: linear-gradient(0deg,
    rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .38) 2%, rgba(0, 0, 0, .88) 6.5%, #000 11%);
  mask-image: linear-gradient(0deg,
    rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .38) 2%, rgba(0, 0, 0, .88) 6.5%, #000 11%);
  /* 统一左上金色阳光：降低对比、略偏暖，加左上暖色轮廓光与右下软投影 */
  filter:
    brightness(1.01) saturate(1.02) contrast(.97) sepia(.06)
    drop-shadow(-3px -4px 10px rgba(255, 198, 128, .2))
    drop-shadow(12px 18px 22px rgba(12, 8, 5, .42));
  transition: filter .55s ease;
  animation: relicFloat var(--float-dur, 8s) ease-in-out var(--float-delay, 0s) infinite alternate;
}

.relic:hover .relic-inner,
.relic:focus-visible .relic-inner {
  transform: rotate(var(--rot, 0deg)) scale(1.035);
}

.relic:hover .relic-art,
.relic:focus-visible .relic-art,
.relic.is-current .relic-art {
  filter:
    brightness(1.08) saturate(1.05) contrast(.99) sepia(.04)
    drop-shadow(-3px -5px 12px rgba(255, 210, 150, .3))
    drop-shadow(0 0 26px rgba(226, 178, 106, .28))
    drop-shadow(12px 18px 22px rgba(12, 8, 5, .38));
}

.relic:focus-visible {
  outline: none;
}

.relic:focus-visible .relic-inner {
  outline: 1px solid var(--gold);
  outline-offset: 8px;
}

/* 器物标签：独立图层，位于前景遮挡之上 */
.layer-labels {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* 接地阴影 / 环境光遮蔽：与标签同层，因此压在前景岩壁之上，
   器物看起来是“落”在前景地面上，而不是被前景切断 */
.ground-anchor {
  position: absolute;
  left: var(--x);
  bottom: var(--b);
  width: var(--w);
  pointer-events: none;
  translate:
    calc(var(--px) * var(--depth, 1) * 18px)
    calc(var(--py) * var(--depth, 1) * 12px);
  transition: translate .45s cubic-bezier(.2, .7, .2, 1);
}

.ground-shadow {
  position: absolute;
  left: -12%;
  right: -10%;
  bottom: -7%;
  height: 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%,
    rgba(0, 0, 0, .76) 0 16%,
    rgba(0, 0, 0, .5) 34%,
    rgba(0, 0, 0, .22) 56%,
    transparent 82%);
  filter: blur(12px);
}

.ground-haze {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -14%;
  height: 24%;
  background: linear-gradient(0deg, rgba(84, 63, 40, .18) 0%, rgba(74, 56, 36, .07) 42%, transparent 78%);
  filter: blur(7px);
}

.label-anchor {
  position: absolute;
  left: var(--x);
  bottom: var(--b);
  width: var(--w);
  translate:
    calc(var(--px) * var(--depth, 1) * 18px)
    calc(var(--py) * var(--depth, 1) * 12px);
  transition: translate .45s cubic-bezier(.2, .7, .2, 1);
}

/* 器物标签（置于器物下方，避免与标题、未明之核重叠） */
.relic-label {
  position: absolute;
  z-index: 2;
  left: 4%;
  top: calc(100% + 6px);
  padding: 4px 42px 4px 13px;
  border-left: 1px solid var(--line);
  width: max-content;
  max-width: 170%;
  background: radial-gradient(ellipse 92% 130% at 16% 50%, rgba(4, 5, 5, .72), rgba(4, 5, 5, .42) 52%, rgba(4, 5, 5, 0) 84%);
  text-shadow:
    0 0 3px rgba(0, 0, 0, .95),
    0 2px 5px rgba(0, 0, 0, .95),
    0 0 12px rgba(0, 0, 0, .9),
    0 0 30px rgba(0, 0, 0, .65);
  transition: opacity .45s ease;
}

.relic-label::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #dfc79e;
  box-shadow: 0 0 14px 3px rgba(212, 174, 112, .5);
}

.relic-index {
  display: block;
  font: 9px/1 var(--sans);
  letter-spacing: .22em;
  color: var(--gold);
}

.relic-name {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .14em;
  white-space: nowrap;
}

.relic-desc {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: .12em;
  color: #c9bfb1;
  white-space: normal;
}

.relic-status {
  flex: none;
  padding: 2px 5px;
  border: 1px solid rgba(199, 164, 119, .4);
  font: 9px/1.4 var(--sans);
  letter-spacing: .16em;
  color: var(--gold);
  text-shadow: none;
}

.relic-go {
  position: absolute;
  right: 0;
  top: 2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  color: var(--gold);
  font: 13px/1 var(--sans);
  transition: background .35s, color .35s, border-color .35s;
}

.relic:hover .relic-go,
.relic:focus-visible .relic-go,
.label-anchor.is-hot .relic-go {
  background: rgba(199, 164, 119, .16);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* 未明之核：按红线缩小 50%，从右上角移到沙盘右上方远景（层级低于器物层） */
.relic-unknown {
  position: absolute;
  z-index: 1;
  right: 8.5%;
  top: 41.5%;
  width: 5.8%;
  opacity: .9;
  pointer-events: none;
  isolation: isolate;
  translate:
    calc(var(--px) * .35 * 18px)
    calc(var(--py) * .35 * 12px);
  transition: translate .6s ease-out;
}

.relic-unknown::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(4, 5, 5, .62), transparent 68%);
  filter: blur(8px);
}

.relic-unknown::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .55) 0 30%, transparent 76%);
  filter: blur(9px);
  pointer-events: none;
}

.relic-unknown img {
  position: relative;
  width: 100%;
  height: auto;
  filter:
    brightness(1) saturate(1.04) contrast(.98) sepia(.05)
    drop-shadow(-2px -3px 8px rgba(255, 190, 118, .2))
    drop-shadow(0 6px 14px rgba(0, 0, 0, .78))
    drop-shadow(0 0 18px rgba(226, 176, 104, .22));
  animation: corePulse 9s ease-in-out infinite alternate;
}

.unknown-label {
  position: absolute;
  right: calc(100% + 10px);
  top: 34%;
  padding: 4px 8px 4px 10px;
  white-space: nowrap;
  font: 9px/1.6 var(--sans);
  letter-spacing: .18em;
  text-align: right;
  color: var(--gold-bright);
  opacity: .95;
  border-right: 1px solid var(--line);
  background: radial-gradient(ellipse at 82% 50%, rgba(4, 5, 5, .6), rgba(4, 5, 5, 0) 80%);
  text-shadow:
    0 0 3px rgba(0, 0, 0, .95),
    0 2px 5px rgba(0, 0, 0, .95),
    0 0 12px rgba(0, 0, 0, .9);
}

/* ---------- Layer 04 前景遮挡 ----------
   独立导出的前景岩壁/苔藓层（带 alpha），与背景同尺寸同取景、底部对齐，
   与背景共用同一套 cover / 位移参数，因此像素级同步；器物下半部被真实前景压住。 */
.layer-fore {
  z-index: 4;
  inset: -3%;
  pointer-events: none;
  transform: translate3d(calc(var(--px) * 10px), calc(var(--py) * 7px), 0);
  transition: transform .5s ease-out;
}

.fore-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  /* 与背景层同一缩放与取景，保证前景与背景像素同步 */
  transform: scale(1.02);
  transition: transform 2.6s cubic-bezier(.2, .7, .2, 1), object-position .9s ease;
  /* 近景轻微柔化并压暗，削弱与背景的清晰度/亮度断差 */
  filter: blur(.6px) brightness(.9) saturate(.96) contrast(.96);
}

.scene.ready .fore-media {
  transform: scale(1.055);
}

/* ---------- Layer 05 动态氛围 ---------- */
.light-follow {
  position: absolute;
  z-index: 6;
  left: 0;
  top: 0;
  width: 48vmin;
  height: 48vmin;
  pointer-events: none;
  transform:
    translate3d(var(--mx, 0px), var(--my, 0px), 0)
    translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 208, 140, .16), rgba(255, 190, 110, .05) 44%, transparent 70%);
  mix-blend-mode: screen;
  opacity: .85;
  will-change: transform;
  transition: transform .18s ease-out;
}

.layer-dust {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  mix-blend-mode: screen;
}

.layer-dust::before,
.layer-dust::after {
  content: "";
  position: absolute;
  inset: -12%;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 34%, rgba(255, 226, 178, .9), transparent 62%),
    radial-gradient(1px 1px at 42% 18%, rgba(255, 226, 178, .7), transparent 62%),
    radial-gradient(2px 2px at 66% 54%, rgba(255, 226, 178, .55), transparent 62%),
    radial-gradient(1px 1px at 84% 28%, rgba(255, 226, 178, .8), transparent 62%),
    radial-gradient(1.5px 1.5px at 30% 78%, rgba(255, 226, 178, .5), transparent 62%),
    radial-gradient(1px 1px at 57% 88%, rgba(255, 226, 178, .65), transparent 62%);
  background-size: 420px 380px;
  animation: dustDrift 34s linear infinite;
}

.layer-dust::after {
  background-size: 260px 300px;
  opacity: .5;
  animation-duration: 52s;
  animation-direction: reverse;
}

/* ---------- 标题与文案 ---------- */
.hero {
  position: absolute;
  z-index: 10;
  left: 7.8%;
  top: 17%;
  max-width: 34%;
  pointer-events: none;
  animation: fadeUp 1.4s cubic-bezier(.2, .7, .2, 1) both;
}

.kicker {
  font: 9px/1.6 var(--sans);
  letter-spacing: .36em;
  color: var(--gold);
  text-shadow: 0 2px 12px #000, 0 0 24px rgba(0, 0, 0, .8);
}

.hero h1 {
  margin: 16px 0 13px;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 400;
  letter-spacing: .22em;
  text-shadow: 0 3px 26px rgba(0, 0, 0, .9), 0 0 60px rgba(0, 0, 0, .55);
}

.tagline {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: .12em;
  color: #d3cabd;
  text-shadow: 0 2px 14px #000, 0 0 30px rgba(0, 0, 0, .7);
}

.hero-note {
  margin: 11px 0 0;
  font-size: 11px;
  line-height: 2;
  letter-spacing: .1em;
  color: #b2a898;
  text-shadow: 0 2px 12px #000, 0 0 26px rgba(0, 0, 0, .7);
}

.rule {
  width: 34px;
  height: 1px;
  margin-top: 21px;
  background: var(--gold);
}

/* ---------- 底部信息 ---------- */
.footer {
  position: absolute;
  z-index: 10;
  left: 4.5%;
  right: 4.5%;
  bottom: 4%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  color: #aaa196;
  font: 9px/1.6 var(--sans);
  letter-spacing: .27em;
}

.scroll {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scroll i {
  width: 1px;
  height: 32px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollPulse 3.2s ease-in-out infinite;
}

.motto {
  font: 12px/1.6 var(--serif);
  letter-spacing: .16em;
  color: #c4b9a8;
}

.archive-count {
  white-space: nowrap;
}

/* 手机版元素在桌面端隐藏 */
.slides,
.slide-dots {
  display: none;
}
