/* ============================================================
   opening.css —— 开场：自动旋转的照片环（点击进入分类故事）
   复用 base.css 的字体、pathfinder、corner、micro、颗粒与光标；
   环上每张 = 一张照片，点击进入它所属分类的滚动叙事。
   ============================================================ */

html,
body {
  height: 100%;
  overflow: hidden;
  background: #f6f5f1;
}

body.opening {
  min-height: 100%;
}

/* ---------------- 照片环 ---------------- */

.opening-stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow: hidden;
}

.opening-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.opening-ring__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(96vw, 1100px);
  height: min(96vw, 1100px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(214, 202, 178, .22), rgba(246, 245, 241, 0) 68%);
  pointer-events: none;
}

.open-frame {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 2px;
  cursor: pointer;
  outline: none;
  will-change: transform;
  transition: filter .3s ease;
  opacity: 0;
  transition: opacity .9s cubic-bezier(.22, .61, .36, 1);
  -webkit-tap-highlight-color: transparent;
}

.open-frame__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-deep);
  box-shadow:
    0 0 0 1px rgba(20, 23, 26, .14),
    0 10px 22px -16px rgba(20, 18, 16, .45);
  transition: box-shadow .45s var(--ease), transform .45s var(--ease);
}

.open-frame.is-in { opacity: 1; }

.open-frame.is-hover {
  z-index: 300 !important;
}
.open-frame.is-hover .open-frame__img {
  transform: scale(1.06);
  box-shadow:
    0 0 0 1px rgba(20, 23, 26, .22),
    0 30px 58px -26px rgba(20, 18, 16, .6),
    0 0 42px -10px rgba(214, 190, 148, .38);
}
.open-frame:focus-visible .open-frame__img {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* ---------------- 中心宣言 ---------------- */

.opening-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 72vw);
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

.opening-center__title {
  margin: 0;
  font-size: clamp(22px, 2.1vw, 33px);
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: -.018em;
  color: var(--ink);
}

.opening-center__sub {
  display: block;
  margin-top: 22px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.opening-center__state {
  display: block;
  margin-top: 26px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold, #a07e42);
  min-height: 1.4em;
  transition: opacity .25s ease;
}

/* ---------------- 底部提示 ---------------- */

.opening-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(42px, 7vh, 76px);
  transform: translateX(-50%);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  white-space: nowrap;
  z-index: 4;
  pointer-events: none;
}
.opening-hint b {
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------------- 进入分类时的过渡 ---------------- */

.leave-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #f6f5f1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .38s var(--ease);
}
body.is-leaving .leave-mask {
  opacity: 1;
  pointer-events: auto;
}
body.is-leaving .opening-ring,
body.is-leaving .opening-center {
  transition: transform .38s var(--ease), opacity .38s var(--ease);
  transform: scale(1.03);
  opacity: .9;
}

/* pathfinder 在开场只是装饰：不可点 */
.pathfinder {
  pointer-events: none;
}

@media (max-width: 820px) {
  .opening-center__title { font-size: 19px; }
  .opening-center__sub { font-size: 8.5px; letter-spacing: .18em; margin-top: 16px; }
  .opening-center__state { margin-top: 18px; font-size: 9px; }
  .opening-hint { flex-direction: column; gap: 4px; bottom: 8vh; }
}

@media (prefers-reduced-motion: reduce) {
  .open-frame__img { transition: none; }
}


.opening-center__more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: clamp(18px, 3vh, 30px);
  padding-bottom: 4px;
  pointer-events: auto;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(20, 23, 26, .46);
  text-decoration: none;
  border-bottom: 1px solid rgba(20, 23, 26, .16);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.opening-center__more:hover { color: var(--ink); border-color: rgba(20, 23, 26, .5); }

@media (max-width: 820px) {
  .opening-center__more { margin-top: 16px; font-size: 8.5px; }
}


/* 中心宣言：极轻的呼吸 */
.opening-center__title {
  animation: centerBreathe 11s ease-in-out infinite alternate;
}
@keyframes centerBreathe {
  from { opacity: .9; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .open-frame { transition: none; opacity: 1; }
  .opening-center__title { animation: none; }
}


.opening-center__play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(14px, 2.2vh, 22px);
  padding: 9px 16px;
  pointer-events: auto;
  border: 1px solid rgba(20, 23, 26, .22);
  border-radius: 999px;
  color: rgba(20, 23, 26, .66);
  text-decoration: none;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: rgba(246, 245, 241, .5);
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.opening-center__play span { font-size: 8px; letter-spacing: .18em; color: rgba(20, 23, 26, .34); }
.opening-center__play:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.opening-center__play:hover span { color: rgba(246, 245, 241, .6); }

@media (max-width: 820px) {
  .opening-center__play { margin-top: 12px; padding: 8px 13px; font-size: 8.5px; }
}
