/* ============================================================================
   封面页 —— 全屏人像 + 「研究什麼」触发器 + 下弹登录面板
   ========================================================================== */

/* ---- 背景：人像铺满整页，不留任何边界 ----
   登录页**不放任何底图** —— 林彪肖像已经铺满，再垫一层是浪费一次请求。
   .paper 只留一个与纸色相同的纯色（不是渐变图），作用是照片还没下完时
   不出现白屏闪烁；照片一到位就被完全盖住。 */
.paper {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--paper);
}

.portrait {
  position: fixed;
  inset: 0;
  z-index: 1;
  /* 封面：林彪#0001_web.jpg —— 与公募指增登录同一张；文件名含 #，URL 里必须编码成 %23。 */
  background-image: url("/figure/%E6%9E%97%E5%BD%AA%230001_web.jpg");
  background-repeat: no-repeat;
  background-position: 50% 40%;  /* 林彪肖像构图：中上 */
  background-size: cover;
  animation: drift 24s var(--ease) forwards;
}

/* 极缓推移：24 秒走完 2%，之后完全静止。全页唯一持续动效。 */
@keyframes drift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.00); }
}

/* 色调统一层：只有 3% 暖色，压 JPEG 痕迹，不产生任何边界。 */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: rgba(196, 164, 132, 0.03);
}

/* ---- 触发器：页面唯一常驻的文字 ---- */
.cover .brand {
  position: fixed;
  z-index: 5;
  top: 34px;
  left: max(6%, 32px);
}

/* ---- 下弹登录面板 ---- */
.panel {
  position: fixed;
  z-index: 4;
  top: 96px;
  right: max(6%, 32px);
  width: var(--panel-w);
  padding: 36px 40px 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 220ms ease, transform 260ms var(--ease), visibility 0s linear 260ms;
}
/* 默认隐藏但保留在文档流里：用 visibility 而非 display，过渡才生效 */
.panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 260ms var(--ease), visibility 0s;
}

.brand-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--ink);
}

.panel-foot {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-deep);
}

/* ---- 站点标识水印 ----
   压在右下角，不透明度很低。它是"落款"，不是第二个视觉重点。
   透明度用变量暴露出来，方便一眼找到并调整。 */
.cover-mark {
  --mark-opacity: 0.12;
  position: fixed;
  z-index: 3;
  right: max(6%, 32px);
  bottom: 30px;
  width: 76px;
  height: 76px;
  opacity: var(--mark-opacity);
  pointer-events: none;   /* 纯装饰，不能挡住任何可点区域 */
  user-select: none;
  animation: rise 600ms var(--ease) 360ms both;
}

/* ---- 页脚 ---- */
.page-foot {
  position: fixed;
  z-index: 3;
  left: max(6%, 32px);
  bottom: 32px;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.9;
  color: var(--ink-faint);
  animation: rise 600ms var(--ease) 240ms both;
}
.page-foot .seal {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 8px;
  vertical-align: -0.1em;
  background: var(--cinnabar);
  border-radius: 2px;
}
/* 备案号：链到工信部查询页 */
.page-foot .icp:empty { display: none; }
.page-foot .icp-link,
.panel-icp .icp-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.panel-icp {
  display: none;
  margin: 14px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-align: right;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 窄屏 ---- */
@media (max-width: 900px) {
  .portrait { background-position: 50% 38%; }

  .cover .brand { top: 24px; left: 24px; font-size: 24px; }

  /* 手机上没有「右侧」可用，面板改成贴底整宽 */
  .panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 28px 24px 30px;
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(16px);
  }
  .panel.is-open { transform: translateY(0); }
  .panel::before { left: 24px; right: 24px; }

  .brand-title { font-size: 24px; }
  .submit { height: 50px; }
  /* 窄屏：登录面板收起时仍显示备案号；面板展开后由 .panel-icp 承接 */
  .page-foot { left: 24px; right: 24px; bottom: 16px; font-size: 11px; }
  body.cover:has(#panel.is-open) .page-foot { display: none; }
  #panel.is-open .panel-icp { display: block; }
  .cover-mark { display: none; }   /* 窄屏底部被面板占满，水印让位 */
}
