@font-face {
  font-family: "Suben Serif";
  src: url("../assets/fonts/noto-serif-sc-400.v2.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Suben Serif";
  src: url("../assets/fonts/noto-serif-sc-600.v2.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Suben Latin";
  src: url("../assets/fonts/cormorant-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #f3eee4;
  --ink: #1f1d1a;
  --ink-2: rgba(31, 29, 26, .68);
  --ink-3: rgba(31, 29, 26, .42);
  --line: rgba(31, 29, 26, .22);
  --brass: #a68a5b;
  --cinnabar: #9e3b2e;
  --serif: "Suben Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  /* 用户输入的文字不在本地子集里，整段改用完整字体，避免同一句里混两种字形 */
  --serif-input: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --latin: "Suben Latin", "Cormorant Garamond", "Times New Roman", serif;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(16px, 4vw, 56px);

  /* 与对话页同一套：色块代替线框 */
  --fill: rgba(31, 29, 26, .055);
  --fill-hover: rgba(31, 29, 26, .095);
  --raised: #fbf8f2;
  --raised-line: rgba(31, 29, 26, .09);
  --raised-shadow: 0 1px 2px rgba(60, 42, 24, .05), 0 10px 32px -14px rgba(60, 42, 24, .22);
  --radius: 2px;      /* 方正为主，只留极小倒角防止边缘发虚 */
  --radius-lg: 2px;
  --scroll-thumb: rgba(31, 29, 26, .16);
}

/* 全站滚动条：细、半透明 */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, textarea, input { font: inherit; color: inherit; }
textarea, input { font-family: var(--serif-input); }
ul, ol { list-style: none; margin: 0; padding: 0; }
p, h1 { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 1px solid var(--brass); outline-offset: 4px; }

/* 全站胶片颗粒 */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .4 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 顶部导航：透明压在照片上 */
.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: 48px;
  padding: 28px var(--gutter);
  animation: fade-in 1.2s var(--ease-out) .1s both;
}
.brand { display: flex; align-items: baseline; gap: 12px; margin-right: auto; }
.brand-cn { font-size: 22px; font-weight: 600; letter-spacing: .28em; }
.brand-en {
  font-family: var(--latin); font-size: 12px; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase; color: rgba(31, 29, 26, .5);
}
.nav-links { display: flex; gap: 40px; }
.nav-links a, .nav-login {
  position: relative; font-size: 14px; letter-spacing: .24em; color: var(--ink-2);
  transition: color .4s var(--ease-out);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: .24em; bottom: -6px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
/* 登录：文字 + 铜色细线，和导航同一种语气，只用细线标出它是一个动作 */
.nav-login {
  padding: 4px 0 5px .24em;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  transition: color .4s var(--ease-out), border-color .4s var(--ease-out);
}
.nav-login:hover { border-color: var(--ink); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 720px) {
  .nav { padding: 20px var(--gutter); gap: 20px; }
  .nav-links { display: none; }
  .brand-cn { font-size: 20px; }
  .nav-login { font-size: 13px; padding: 6px 12px 6px 15px; }
}
