/* ============================================================
   长志 × 敬楠 · 翻相册式全屏叙事（方向 2）
   设计变量 + 基础 + 场景骨架 + 首屏 + 计时器 + 胶片质感
   ============================================================ */

:root {
  --ground: #f2ede1;        /* 暖纸面（安静页） */
  --surface: #e9e1d0;
  --paper: #faf6ec;
  --ink: #231f1a;
  --ink-soft: #6f6757;
  --foil: #a8432a;          /* 赭红 强调色 */
  --cream: #fdf8f0;         /* 照片场景上的文字 */
  --hairline: #cbc1a8;
  --veil-dark: rgba(20, 12, 8, 0.68);
  --shadow-book: 0 18px 40px rgba(40, 30, 22, 0.22);
  --font-display: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --font-body: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --font-hand: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 全站胶片颗粒（普通噪点层，不启用混合模式——避免整页持续 GPU 混合造成卡顿） */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

::selection { background: var(--foil); color: var(--paper); }

/* ---------- 顶部阅读进度线（react-bits 风格：克制的一抹赭红） ---------- */
.progress-rail {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 95;
  pointer-events: none;
}

.progress-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--foil), #c96a47 70%, #e8a283);
  box-shadow: 0 0 12px rgba(168, 67, 42, 0.55);
  will-change: transform;
}

/* ---------- 场景骨架 ---------- */
.scenes {
  position: relative;
  z-index: 1;
}

.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  /* 屏外场景跳过渲染，打开时只画首屏附近，减少卡顿 */
  content-visibility: auto;
  contain-intrinsic-size: auto 100svh;
}

.scene-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scene-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.08);
}

.scene-live {
  filter: none;
}

.scene.active .scene-photo {
  animation: kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}

.scene-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 12, 8, 0.28) 0%, rgba(20, 12, 8, 0.06) 34%, var(--veil-dark) 100%);
}

.scene-veil.veil-center {
  background: radial-gradient(ellipse at 50% 46%, rgba(20, 12, 8, 0.34) 0%, rgba(20, 12, 8, 0.72) 100%);
}

.scene-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 76px 30px 64px;
}

.scene-content.left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: 780px;
}

.scene-content.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@keyframes kenburns {
  from { transform: scale(1.08) translate(0, 0); }
  to   { transform: scale(1.34) translate(-2.2%, -1.6%); }
}

/* ---------- FadeContent：场景内容进入视口时渐显上浮 ---------- */
.scene .scene-content > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.scene.active .scene-content > * {
  opacity: 1;
  transform: translateY(0);
}

.scene.active .scene-content > *:nth-child(1) { transition-delay: 0.04s; }
.scene.active .scene-content > *:nth-child(2) { transition-delay: 0.12s; }
.scene.active .scene-content > *:nth-child(3) { transition-delay: 0.2s; }
.scene.active .scene-content > *:nth-child(4) { transition-delay: 0.28s; }
.scene.active .scene-content > *:nth-child(5) { transition-delay: 0.36s; }
.scene.active .scene-content > *:nth-child(6) { transition-delay: 0.44s; }
.scene.active .scene-content > *:nth-child(7) { transition-delay: 0.52s; }
.scene.active .scene-content > *:nth-child(8) { transition-delay: 0.6s; }

/* ---------- 首屏 ---------- */
.hero-label {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(253, 248, 240, 0.86);
  margin-bottom: 24px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  animation: labelIn 1s ease 0.15s both;
}

/* ShinyText：一道柔光周期扫过首屏小标题 */
.hero-label::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 42%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 240, 224, 0.6), transparent);
  animation: sheen 5.5s ease-in-out 1.6s infinite;
}

@keyframes sheen {
  0%, 58% { left: -65%; }
  100%    { left: 140%; }
}

@keyframes labelIn {
  from { opacity: 0; transform: translateY(10px); letter-spacing: 0.52em; }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.9rem, 10vw, 5.2rem);
  letter-spacing: 0.12em;
  line-height: 1.15;
  color: var(--cream);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.55);
}

.amp {
  color: #ffc2a6;
  font-weight: 400;
  margin: 0 0.08em;
}

/* BlurText：首屏标题逐字从模糊到清晰 */
.bchar {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.42em) scale(1.08);
  filter: blur(12px);
  animation: bcharIn 1.05s cubic-bezier(0.22, 0.7, 0.2, 1) forwards;
  animation-delay: calc(0.35s + var(--i) * 0.09s);
}

.amp .bchar {
  color: inherit;
}

@keyframes bcharIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.countdown {
  margin-top: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  color: rgba(253, 248, 240, 0.9);
}

.cd-line {
  font-size: clamp(1.45rem, 4.6vw, 2.05rem);
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.cd-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cd-clock {
  font-size: clamp(1.1rem, 3.8vw, 1.45rem);
  letter-spacing: 0.16em;
  color: rgba(253, 248, 240, 0.92);
  border-bottom: 1px solid rgba(253, 248, 240, 0.4);
  padding-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.cd-sec {
  color: #ffc2a6;
  transition: opacity 0.2s;
}

.cd-sec.off { opacity: 0.35; }

.hero-date {
  margin-top: 20px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(253, 248, 240, 0.85);
}

.hero-stamp {
  margin-top: 28px;
  display: inline-block;
  padding: 9px 24px;
  border: 1.5px solid rgba(255, 194, 166, 0.9);
  border-radius: 3px;
  color: #ffd9c4;
  font-family: var(--font-display);
  letter-spacing: 0.34em;
  font-size: 13px;
  transform: rotate(-2deg);
  background: rgba(20, 12, 8, 0.22);
  animation: stampIn 0.9s cubic-bezier(0.22, 0.7, 0.2, 1) 1.25s both;
}

@keyframes stampIn {
  from { opacity: 0; transform: rotate(-9deg) scale(1.35); }
  to   { opacity: 1; transform: rotate(-2deg) scale(1); }
}

.scroll-hint {
  margin-top: 46px;
  color: rgba(253, 248, 240, 0.88);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.3em;
  border-bottom: 1px solid rgba(253, 248, 240, 0.5);
  padding-bottom: 6px;
  animation: hint-drift 2.2s ease-in-out infinite;
}

@keyframes hint-drift {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50%      { transform: translateY(7px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scene.active .scene-photo { animation: none; }
  .scroll-hint { animation: none; }
  .hero-label, .hero-label::after { animation: none; }
  .hero-stamp { animation: none; }
  .bchar {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
  .scene .scene-content > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
