/* 终末地 / 明日方舟官网式动效：开场、快门转场、右侧分区编号、背景巨字、分层滑入 */
:root {
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ak-ease: cubic-bezier(0.7, 0, 0.3, 1);
  --ak-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 开场：十字发丝线 + 底部细进度条 + LOADING ~ 百分比 */
.boot { position: fixed; inset: 0; z-index: 100; background: radial-gradient(80% 70% at 50% 45%, #121620, #07090d 70%); transition: opacity 0.9s var(--ak-ease), visibility 0.9s; }
.boot.out { opacity: 0; visibility: hidden; }
.boot-mark { position: absolute; left: 6%; top: 50%; transform: translateY(-50%); font: 700 clamp(56px, 9vw, 128px)/0.9 var(--display); letter-spacing: -0.05em; color: #fff; animation: akIn 1s var(--ak-out) both; }
.boot-mark span { color: var(--accent); }
.boot-mark small { display: block; margin-top: 14px; font: 500 11px var(--mono); letter-spacing: 0.5em; color: rgba(255, 255, 255, 0.55); }
.boot .bk-h { position: absolute; left: 0; right: 0; top: 13.5%; height: 1px; background: rgba(255, 255, 255, 0.14); transform-origin: left; animation: bkLine 1.1s var(--ak-ease) both; }
.boot .bk-v { position: absolute; top: 0; bottom: 0; right: 10%; width: 1px; background: rgba(255, 255, 255, 0.14); transform-origin: top; animation: bkLineV 1.1s var(--ak-ease) 0.15s both; }
.boot .bk-bar { position: absolute; left: 33%; right: 10%; bottom: 29%; }
.boot .bk-track { position: relative; height: 3px; background: rgba(255, 255, 255, 0.12); }
.boot .bk-track::after { content: ""; position: absolute; right: -3px; top: -2px; width: 7px; height: 7px; background: rgba(255, 255, 255, 0.5); }
.boot .bk-track i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 14px rgba(75, 207, 255, 0.6); }
.boot .bk-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font: 400 10px var(--mono); letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.5); }
.boot .bk-meta b { color: #fff; font-weight: 500; }
.boot .bk-copy { position: absolute; left: 6%; bottom: 29%; transform: translateY(6px); font: 600 10px var(--mono); letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.5); }
@keyframes bkLine { from { transform: scaleX(0); } }
@keyframes bkLineV { from { transform: scaleY(0); } }
@media (max-width: 700px) { .boot .bk-bar { left: 10%; } .boot .bk-copy { display: none; } }

/* 快门转场：深色面板带一条浅蓝亮边扫过，盖住画面时跳到目标分区 */
.shutter { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: none; background: #0b0e14; }
.shutter.on { display: block; }
.shutter::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px); }
.shutter .sh-edge { position: absolute; top: 0; bottom: 0; right: -2px; width: 3px; background: var(--accent); box-shadow: 0 0 28px rgba(75, 207, 255, 0.7); }
.shutter.rev .sh-edge { right: auto; left: -2px; }
.shutter .sh-text { position: absolute; left: 8%; bottom: 14%; color: #fff; }
.shutter .sh-text b { display: block; font: 700 clamp(64px, 11vw, 160px)/0.9 var(--display); letter-spacing: -0.05em; }
.shutter .sh-text span { display: block; margin-top: 14px; font: 700 clamp(18px, 2.4vw, 34px) var(--display); letter-spacing: 0.12em; color: var(--accent); }
.shutter .sh-text em { display: block; margin-top: 6px; font: 400 13px var(--mono); font-style: normal; letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.55); }

/* 右侧分区编号：01 / 05 + 竖排标签，切换时数字翻牌 */
.hud-rail { position: fixed; right: 0; top: 0; bottom: 0; width: 64px; z-index: 12; pointer-events: none; display: none; }
@media (min-width: 1180px) { .hud-rail { display: block; } }
.hud-rail .hr-line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.1); }
.hud-rail .hr-num { position: absolute; top: 44%; right: 14px; text-align: right; overflow: hidden; }
.hud-rail .hr-num b { display: block; font: 700 30px/1 var(--display); letter-spacing: -0.04em; color: #fff; }
.hud-rail .hr-num span { font: 400 10px var(--mono); color: rgba(255, 255, 255, 0.5); letter-spacing: 0.1em; }
.hud-rail .hr-label { position: absolute; top: calc(44% + 56px); right: 18px; writing-mode: vertical-rl; font: 600 10px var(--mono); letter-spacing: 0.3em; color: var(--accent-soft); }
.hud-rail .hr-label em { font-style: normal; font-family: var(--sans); letter-spacing: 0.2em; margin-top: 8px; color: rgba(255, 255, 255, 0.5); }

/* 背景巨字：首页底部描边超大英文缓慢横移 */
.marquee { position: absolute; left: 0; right: 0; bottom: -3vw; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0.08; }
.marquee div { display: flex; width: max-content; animation: marq 60s linear infinite; }
.marquee span { font: 800 22vw/1 var(--display); letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1.5px #fff; padding-right: 6vw; white-space: nowrap; }
@keyframes marq { to { transform: translateX(-50%); } }

/* 顶栏链接：中文 + 英文小字 */
.nav-link .nl-en { margin-left: 6px; font: 500 9px var(--mono); letter-spacing: 0.22em; color: rgba(255, 255, 255, 0.45); transition: color 0.3s, letter-spacing 0.4s var(--ak-out); }
.nav-link:hover .nl-en, .nav-link[aria-current="location"] .nl-en { color: var(--accent-soft); letter-spacing: 0.3em; }
.nav-cta .nl-en { color: rgba(4, 18, 28, 0.6); }

/* 分区内容：进入视野时分层从左滑入，离开视野时反向退出（可逆） */
.ak-ready .ak {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ak-ready .ak-in .ak { opacity: 1; transform: none; transition-duration: 0.9s; transition-delay: calc(var(--i, 0) * 70ms); }
.ak-ready .kicker.accent.ak { clip-path: inset(0 100% 0 0); transition-property: opacity, transform, clip-path; transition-timing-function: ease, cubic-bezier(0.16, 1, 0.3, 1), steps(14); }
.ak-ready .ak-in .kicker.accent.ak { clip-path: inset(0 0 0 0); }
/* 退出时不等待、反向更快；进入时按顺序依次滑入 */
@keyframes akIn { from { opacity: 0; transform: translateX(-28px); } }

@media (prefers-reduced-motion: reduce) {
  .boot, .shutter { display: none !important; }
  .marquee div { animation: none; }
  .ak-ready .ak { opacity: 1; transform: none; clip-path: none; transition: none; }
}
@media (max-width: 1100px) and (min-width: 701px) { .nav-link .nl-en { display: none; } }

