:root {
  --ink: #0b0a09;
  --ink-2: #14120f;
  --paper: #f3eee4;
  --paper-dim: rgba(243, 238, 228, 0.62);
  --paper-faint: rgba(243, 238, 228, 0.32);
  --line: rgba(243, 238, 228, 0.14);
  --amber: #c8a46a;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --latin: "Baskerville", "Didot", "Times New Roman", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* 顶部导航 */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 3vh, 28px) var(--gutter);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.brand {
  font-family: var(--serif); font-size: clamp(16px, 1.6vw, 20px);
  letter-spacing: 0.32em; color: var(--paper); text-decoration: none;
}
.nav-link {
  font-family: var(--serif); font-size: 14px; letter-spacing: 0.24em;
  color: var(--paper-dim); text-decoration: none; padding: 8px 0;
  border-bottom: 1px solid transparent; transition: color .4s, border-color .4s;
}
.nav-link:hover { color: var(--paper); border-color: var(--paper-faint); }

/* 主标题 */
.headline { text-align: center; pointer-events: none; }
.headline h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 5.2vw, 76px); letter-spacing: 0.16em; line-height: 1.3;
  margin-right: -0.16em; /* 抵消末字字距，让视觉居中 */
}
.headline p {
  margin-top: clamp(14px, 2.2vh, 24px);
  font-family: var(--serif); font-size: clamp(14px, 1.3vw, 18px);
  letter-spacing: 0.4em; color: var(--paper-dim); margin-right: -0.4em;
}
.headline .latin {
  display: block; margin-top: 10px;
  font-family: var(--latin); font-style: italic; letter-spacing: 0.12em;
  font-size: clamp(11px, 0.9vw, 13px); color: var(--paper-faint);
}
.reveal { opacity: 0; transform: translateY(14px); filter: blur(6px);
  animation: reveal 2.2s var(--ease) forwards; }
@keyframes reveal { to { opacity: 1; transform: none; filter: none; } }

/* 胶片颗粒 */
.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* 视频播放弹窗 */
.player {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: var(--gutter);
  background: rgba(6, 5, 4, 0.94); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s;
}
.player.open { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.player figure {
  width: min(100%, 1280px); display: flex; flex-direction: column; align-items: center; gap: 18px;
  transform: scale(.96); transition: transform .8s var(--ease);
}
.player.open figure { transform: none; }
.player video { width: 100%; max-height: 78vh; background: #000; outline: none; }
.player.portrait video { width: auto; height: 78vh; max-width: 100%; }
.player figcaption {
  font-family: var(--serif); letter-spacing: 0.3em; color: var(--paper-dim); font-size: 15px;
}
.player-close {
  position: absolute; top: clamp(12px, 3vh, 28px); right: var(--gutter);
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--paper-dim); transition: color .3s, transform .4s var(--ease);
}
.player-close:hover { color: var(--paper); transform: rotate(90deg); }

/* 仅预览用：方案切换条 */
.switcher {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(20, 18, 15, 0.72); backdrop-filter: blur(12px);
  border: 1px solid var(--line); font-size: 12px;
}
.switcher a {
  padding: 6px 12px; border-radius: 999px; color: var(--paper-dim); text-decoration: none;
  white-space: nowrap; transition: background .3s, color .3s;
}
.switcher a:hover { color: var(--paper); }
.switcher a.on { background: var(--paper); color: var(--ink); }

@media (max-width: 560px) {
  .headline h1 { letter-spacing: 0.1em; margin-right: -0.1em; }
  .headline p { letter-spacing: 0.24em; margin-right: -0.24em; }
  .switcher { max-width: calc(100vw - 16px); font-size: 11px; top: 64px; }
  .switcher a { padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}
