/* ══════════════════════════════════════════════════════════
   入口页 · Across the Great Wall
   独立样式，不复用主站 tokens —— 这页要有自己的呼吸
   ══════════════════════════════════════════════════════════ */

:root {
  --ink:        #05060a;   /* 底 */
  --ink-2:      #0a0e17;
  --bronze:     #c9a227;   /* 青铜 */
  --bronze-hi:  #f2d377;   /* 青铜高光 */
  --jade:       #3fd6b0;   /* 青玉 */
  --azure:      #6aa9ff;   /* 远天 */
  --paper:      #eef3fb;   /* 主文字 */
  --paper-dim:  #7f8da3;   /* 次文字 */
  --line:       rgba(150, 180, 230, .12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── 画布层 ── */
#stage {
  position: fixed; inset: 0;
  display: block;
  z-index: 1;
  cursor: crosshair;
}

/* ── 背景：极光 + 网格 + 暗角，全部在画布之下 ── */
.veil {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}

.veil--grid {
  background-image:
    linear-gradient(to right,  var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 78% 68% at 50% 46%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 46%, #000 20%, transparent 100%);
  opacity: .55;
}

.veil--aurora {
  background:
    radial-gradient(ellipse 62% 44% at 22% 18%, rgba(106,169,255,.16), transparent 62%),
    radial-gradient(ellipse 54% 40% at 82% 76%, rgba(201,162,39,.13), transparent 64%),
    radial-gradient(ellipse 46% 36% at 62% 26%, rgba(63,214,176,.09), transparent 66%);
  filter: blur(28px);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-2.5%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -2.5%, 0) scale(1.02); }
}

.veil--vignette {
  background: radial-gradient(ellipse 74% 66% at 50% 48%, transparent 42%, rgba(0,0,0,.72) 100%);
}

/* 颗粒感，压住渐变的塑料味 */
.veil--grain {
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ══ 文字层 ══ */
.hud {
  position: fixed; inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 4.2vh, 46px) clamp(22px, 4.2vw, 62px);
}

.hud__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--paper-dim);
  opacity: 0;
  animation: fadeDown 1.1s .3s cubic-bezier(.16,1,.3,1) forwards;
}

.hud__top b {
  color: var(--bronze);
  font-weight: 500;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}

/* ── 中央铭牌 ── */
.core {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 8px;
  /* 上移：让出画面下三分之一给长城，避免文案被烽火台穿过 */
  padding-bottom: clamp(90px, 17vh, 190px);
}

.core__quote {
  margin: 0;
  max-width: 15ch;
  /* 基准取 min(vw, vh*1.55)：矮而宽的屏幕（如 1366x873 缩放 150%）不会把标题撑爆 */
  font-size: clamp(1.4rem, min(4.4vw, 6.4vh), 3.4rem);
  font-weight: 250;
  line-height: 1.24;
  letter-spacing: -.018em;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", serif;
  text-wrap: balance;
}

/* 逐词升起 */
.core__quote .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.42em) rotate(1.2deg);
  animation: riseIn .95s cubic-bezier(.16,1,.3,1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes riseIn {
  to { opacity: 1; transform: none; }
}

.core__quote em {
  font-style: normal;
  background: linear-gradient(102deg, var(--bronze-hi) 8%, var(--bronze) 46%, var(--jade) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* 让渐变缓慢流动 */
  background-size: 220% auto;
  animation: sheen 9s linear infinite;
}

@keyframes sheen {
  to { background-position: 220% center; }
}

.core__cn {
  margin: clamp(13px, 2.1vh, 24px) 0 0;
  font-size: clamp(.76rem, 1.5vw, .95rem);
  letter-spacing: .34em;
  color: var(--paper-dim);
  opacity: 0;
  animation: fadeDown 1.2s 1.5s cubic-bezier(.16,1,.3,1) forwards;
}

/* ── 入口按钮 ── */
.core__enter {
  margin-top: clamp(20px, 3.2vh, 38px);
  pointer-events: auto;
  opacity: 0;
  animation: fadeDown 1.1s 1.85s cubic-bezier(.16,1,.3,1) forwards;
}

.enter {
  --glow: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .72em;
  padding: 1.02em 2.1em;
  border: 1px solid rgba(201,162,39,.42);
  border-radius: 2px;
  background: rgba(201,162,39,.05);
  color: var(--paper);
  font-size: clamp(.78rem, 1.4vw, .9rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .45s, background .45s, box-shadow .55s, transform .35s;
  box-shadow: 0 0 0 rgba(201,162,39,0);
}

.enter::before {
  /* 扫光 */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 22%, rgba(242,211,119,.16) 50%, transparent 78%);
  transform: translateX(-130%);
  transition: transform .95s cubic-bezier(.16,1,.3,1);
}

.enter:hover {
  border-color: var(--bronze);
  background: rgba(201,162,39,.1);
  transform: translateY(-2px);
  box-shadow: 0 0 34px -6px rgba(201,162,39,.42), inset 0 0 22px -10px rgba(242,211,119,.5);
}

.enter:hover::before { transform: translateX(130%); }

.enter:active { transform: translateY(0); }

.enter__arrow {
  display: inline-block;
  transition: transform .45s cubic-bezier(.16,1,.3,1);
}

.enter:hover .enter__arrow { transform: translateX(5px); }

/* ── 底部状态 ── */
.hud__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--paper-dim);
  opacity: 0;
  animation: fadeDown 1.1s 2.1s cubic-bezier(.16,1,.3,1) forwards;
}

.hud__bottom .hint {
  display: flex;
  align-items: center;
  gap: .6em;
}

.hud__bottom .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 10px var(--jade);
  animation: beat 2.4s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* ── 无障碍 / 降级 ── */
@media (prefers-reduced-motion: reduce) {
  .veil--aurora, .core__quote em, .hud__bottom .pulse, .enter::before { animation: none; }
  .core__quote .w, .hud__top, .core__cn, .core__enter, .hud__bottom {
    opacity: 1; transform: none; animation: none;
  }
}

@media (max-width: 640px) {
  html, body { overflow: auto; }
  .hud { position: absolute; min-height: 100vh; }
  /* 竖屏：标题略缩、行距收紧，给长城留出下三分之一 */
  .core__quote { max-width: 100%; font-size: clamp(1.35rem, 7.6vw, 2.1rem); line-height: 1.24; }
  .hud__top span:last-child, .hud__bottom .lat { display: none; }
  /* 副标题不许折行：字号跟着视口缩 */
  .core__cn {
    font-size: clamp(0.62rem, 2.9vw, 0.86rem);
    letter-spacing: 0.18em;
    white-space: nowrap;
  }
  .core { padding-bottom: clamp(70px, 15vh, 150px); }
  .core__enter { margin-top: clamp(16px, 2.6vh, 28px); }
}

/* 屏幕很矮（横屏手机等）：文字整体上提，别压住长城 */
@media (max-height: 520px) {
  .core { padding-bottom: clamp(40px, 9vh, 90px); }
  .core__quote { font-size: clamp(1rem, 3.4vw, 1.7rem); }
  .core__cn { font-size: clamp(0.55rem, 1.5vw, 0.75rem); }
}


/* ── 触屏设备：把「移动鼠标」换成「轻触屏幕」 ── */
.hint__touch { display: none; font-weight: inherit; }
@media (hover: none), (pointer: coarse) {
  .hint__mouse { display: none; }
  .hint__touch { display: inline; }
}
/* 触屏上的鼠标提示语在竖屏也收紧一点 */
@media (max-width: 640px) {
  .hud__bottom .hint { letter-spacing: 0.06em; }
}
