/* ============================================================
   CSYVII — 开场动画（Opening Animation）
   只在 index.html / index-en.html 引用，不进入详情页。
   不改动 style.css 的任何既有规则。

   时间轴（总 4.5 秒）
     0.0–0.50s  暖白背景渐显
     0.50–1.45s CSYVII. 字标缓慢出现
     1.45–2.10s 一条细线自左展开
     2.10–2.95s 副标题淡入
     2.95–3.45s 三行静止，留一口气
     3.45–3.75s 字标与副标题退场
     3.75–4.50s 遮罩淡出，首页自然显现
   ============================================================ */

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper, #F6F3EE);
  color: var(--ink, #1F1D1A);
  animation:
    intro-paper 0.5s ease forwards,
    intro-leave 0.75s cubic-bezier(0.22, 1, 0.36, 1) 3.75s forwards;
}

/* 纸底由更浅的暖白沉到正片底色，读起来是「渐显」而不是白闪 */
@keyframes intro-paper {
  from { background: #FBFAF7; }
  to   { background: var(--paper, #F6F3EE); }
}

/* 淡出后锁死可见性，避免透明遮罩拦住点击 */
@keyframes intro-leave {
  0%   { opacity: 1; }
  99%  { visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

.intro-inner {
  text-align: center;
  /* 3.75s 遮罩开始淡出前先退场，避免字标叠在首页内容上 */
  animation: intro-clear 0.3s ease 3.45s forwards;
}

@keyframes intro-clear {
  to { opacity: 0; transform: translateY(-4px); }
}

.intro-word {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  /* 桌面 11vw→104px 封顶，移动端落到 56px 下限，两档都不小于 56px */
  font-size: clamp(56px, 11vw, 104px);
  line-height: 1;
  /* 大字号下 0.22em 字距会散，收到 0.18em */
  letter-spacing: 0.18em;
  /* 字距会在末字母后留白，补一个同等缩进把字标推回视觉中心 */
  text-indent: 0.18em;
  opacity: 0;
  animation: intro-fade 0.95s ease 0.5s forwards;
}

.intro-rule {
  display: block;
  width: min(300px, 46vw);
  height: 1px;
  margin: 30px auto 0;
  background: var(--rule, #DBD3C6);
  transform: scaleX(0);
  transform-origin: left center;
  animation: intro-rule 0.65s cubic-bezier(0.22, 1, 0.36, 1) 1.45s forwards;
}

.intro-sub {
  margin: 28px 0 0;
  font-family: "Noto Sans SC", "Cormorant Garamond", sans-serif;
  font-weight: 300;
  /* 副标题不能压在 11.5px：和 104px 字标并排时会被读成脚注 */
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.6;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3, #867F74);
  opacity: 0;
  animation: intro-fade 0.85s ease 2.1s forwards;
}

@keyframes intro-fade {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes intro-rule {
  to { transform: scaleX(1); }
}

/* ---------- 跳过 ---------- */

.intro-skip {
  position: absolute;
  right: clamp(10px, 3vw, 26px);
  bottom: clamp(10px, 3vw, 24px);
  /* 视觉上只是两个小字，触控区要真的到 44px */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 12px 14px;
  border: 0;
  background: none;
  font-family: "Noto Sans SC", "Cormorant Garamond", sans-serif;
  font-weight: 300;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3, #867F74);
  cursor: pointer;
  opacity: 0;
  animation:
    intro-fade 0.5s ease 0.8s forwards,
    intro-clear 0.3s ease 3.45s forwards;
  transition: color 0.3s ease;
}

.intro-skip:hover { color: var(--clay, #8A5A3B); }

.intro-skip:focus-visible {
  outline: 1px solid var(--clay, #8A5A3B);
  outline-offset: 2px;
}

/* ---------- 减少动态偏好：整段不播 ---------- */

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
}
