/* 显影官网 · 首页第五稿骨架
   气质像一位设计师的作品集：米白纸面、石墨色字、大留白；只有开场和收藏室是暗的
   标题宋体（Noto Serif SC），正文黑体细一号，英文小标 Cormorant 斜体 */
:root {
  --paper: #f3efe8; --paper-2: #ece7de; --ink: #23201d; --sub: #6e665d; --line: rgba(35, 32, 29, .14);
  --dark: #0c0b0a; --dark-ink: #ece5d6;
  --pad: clamp(22px, 6vw, 72px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 300 15px/1.9 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif; -webkit-font-smoothing: antialiased; text-wrap: pretty; }
body.is-gated { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }

/* 待写的字：虚线框，后面小字注明写什么 */
.todo { display: inline; padding: 1px 8px; border: 1px dashed currentColor; border-radius: 3px; opacity: .5; font-size: .9em; letter-spacing: .04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.todo::after { content: '　' attr(data-todo); font-size: .8em; }

/* ---------- 开场 ---------- */
.gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden; background: var(--dark); color: var(--dark-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none; }
.gate__light { position: absolute; inset: -6%; width: 112%; height: 112%; opacity: 0; filter: blur(28px); }
/* 四周压暗，光只在中间一带流动 */
.gate::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 75% 65% at 50% 50%, transparent 30%, rgba(12, 11, 10, .75) 100%); }
.gate__dust { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.gate__dawn { z-index: 2; }
.gate.is-open { background: transparent; pointer-events: none; }
.gate.is-open::before, .gate.is-open .gate__light, .gate.is-open .gate__dawn, .gate.is-open .gate__grain, .gate.is-open .gate__dust { display: none; }
.gate__wm, .gate__hint { z-index: 3; }
.gate__dawn { position: absolute; inset: 0; background: var(--paper); clip-path: circle(0 at 50% 50%); }
.gate__wm { position: relative; width: min(52vw, 340px); color: var(--dark-ink); opacity: 0; will-change: filter, transform; }
.gate__wm svg { width: 100%; height: auto; overflow: visible; }
.gate__hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 9svh); text-align: center; font-size: 13px; line-height: 1; letter-spacing: .5em; padding-left: .5em; color: rgba(236, 229, 214, .72); opacity: 0; }
.gate__hint i { display: block; width: 1px; height: 34px; margin: 0 auto 18px; background: linear-gradient(rgba(236, 229, 214, 0), rgba(236, 229, 214, .55)); transform-origin: top; animation: breathe 2.8s ease-in-out infinite; }
.gate__hint small { display: block; margin-top: 11px; font: italic 500 13px/1 'Cormorant Garamond', serif; letter-spacing: .18em; opacity: .55; }
@keyframes breathe { 0%, 100% { transform: scaleY(.35); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }
.gate__grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .07; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); } }

/* ---------- 顶栏 ---------- */
.top { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 16px) var(--pad) 14px; transition: background .5s, color .5s, transform .5s; }
.top.is-solid { background: rgba(243, 239, 232, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top.is-dark { color: var(--dark-ink); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top__wm { width: 62px; }
/* 二级页面左上角的「← 返回」，和字标之间一根细线 */
.top__left { display: flex; align-items: center; gap: 16px; }
.top__back { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px 8px 0; margin: -8px 0; border-right: 1px solid color-mix(in srgb, currentColor 28%, transparent); font-size: 13px; letter-spacing: .08em; opacity: .78; transition: opacity .3s; }
.top__back:hover { opacity: 1; }
.top__back svg { width: 18px; height: 10px; transition: transform .3s; }
.top__back:hover svg { transform: translateX(-3px); }
@media (max-width: 520px) { .top__back span { display: none; } .top__back { padding-right: 14px; } .top__left { gap: 14px; } }
.top__wm svg, .foot__wm svg { width: 100%; height: auto; }
.top__nav { display: flex; gap: clamp(14px, 3vw, 36px); font-size: 13px; letter-spacing: .08em; }
.top__nav a { opacity: .78; transition: opacity .3s; }
.top__nav a:hover { opacity: 1; }
.is-gated .top { opacity: 0; }

/* ---------- 区块 ---------- */
.sec { position: relative; padding: clamp(96px, 16vh, 180px) var(--pad); }
.label { display: flex; align-items: baseline; gap: 12px; font-size: 13px; letter-spacing: .2em; color: var(--sub); }
.label em { font: italic 500 17px/1 'Cormorant Garamond', serif; letter-spacing: .06em; color: var(--ink); }
.label b { margin-left: auto; font: 500 12px/1 'Cormorant Garamond', serif; letter-spacing: .2em; }
.label::after { content: ''; flex: 0 0 28px; height: 1px; background: currentColor; opacity: .5; order: 1; align-self: center; }
.label em { order: 0; } .label b { order: 3; }

/* 自述：一大段宋体，留足白 */
.about { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 120px; }
.about__text { margin-top: 40px; max-width: 30em; font: 400 clamp(19px, 4.6vw, 30px)/1.95 'Noto Serif SC', serif; letter-spacing: .04em; }
.about__text p + p { margin-top: 1.1em; }

/* 作品：每个系列一件，正面在前、背面斜在后面 */
.works { overflow-x: clip; }
.works__list { margin-top: clamp(48px, 9vh, 96px); display: grid; gap: clamp(110px, 18vh, 200px); }
.work { display: grid; gap: 38px; }
.work__art { position: relative; display: block; width: min(68vw, 400px); margin: 0 auto; aspect-ratio: 55 / 85; }
.work__art::before { content: ''; position: absolute; inset: -22% -40%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 16%, transparent), transparent); pointer-events: none; }
.work__card { position: absolute; inset: 0; border-radius: 3.6% / 2.3%; overflow: hidden; box-shadow: 0 1px 2px rgba(30, 24, 18, .12), 0 22px 40px -18px rgba(30, 24, 18, .42), 0 50px 80px -50px rgba(30, 24, 18, .4); }
.work__card img { width: 100%; height: 100%; object-fit: cover; }
.work__back { transform: translate(14%, 4%) rotate(6deg); }
.work__front { transform: rotate(-2deg); }
.work__meta { max-width: 400px; margin: 0 auto; width: 100%; }
.work__no { font: italic 500 15px/1 'Cormorant Garamond', serif; letter-spacing: .12em; color: var(--sub); }
.work__title { margin-top: 14px; font: 500 clamp(30px, 8vw, 44px)/1.2 'Noto Serif SC', serif; letter-spacing: .2em; }
.work__en { margin-top: 6px; font: italic 500 16px/1.4 'Cormorant Garamond', serif; letter-spacing: .04em; color: var(--sub); }
.work__line { margin-top: 20px; font: 400 16px/1.9 'Noto Serif SC', serif; letter-spacing: .06em; }
.work__cap { margin-top: 14px; font-size: 12px; letter-spacing: .08em; color: var(--sub); line-height: 1.7; }
.work__go { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; font-size: 13px; letter-spacing: .2em; padding-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--sub); }
.work__go i { font-style: normal; transition: transform .4s; }
.work:hover .work__go i { transform: translateX(4px); }

/* 手记：一行一篇，细线隔开 */
.notes__list { list-style: none; margin-top: 48px; border-top: 1px solid var(--line); }
.notes__list li { display: grid; grid-template-columns: 44px 1fr; gap: 6px 10px; padding: 28px 0 30px; border-bottom: 1px solid var(--line); }
.notes__no { font: italic 500 15px/1.8 'Cormorant Garamond', serif; color: var(--sub); }
.notes__list h3 { font: 500 19px/1.6 'Noto Serif SC', serif; letter-spacing: .06em; }
.notes__list p { grid-column: 2; font-size: 14px; color: var(--sub); }
.notes__tip { margin-top: 18px; font-size: 12px; letter-spacing: .1em; color: var(--sub); opacity: .7; }

/* 收藏室入口：唯一的暗场。滑到这里纸面的灯慢慢熄掉，No.000 从背光剪影里显影出来（进度由 home.js 按滑动算）
   锚点 #collection 放在显影完的位置：从顶栏或收藏室「返回」过来，直接看到照亮的画框和入口 */
.collection { position: relative; height: 270vh; }
.collection__anchor { position: absolute; left: 0; top: calc(136vh + 40px); }
.collection__stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.collection__dark { position: absolute; inset: 0; background: #050404; opacity: 0; }   /* 和展厅截图的底色一样，图的边缘才看不出来 */
.collection__inner { position: relative; display: grid; justify-items: center; text-align: center; color: var(--dark-ink); }
.collection__pic { position: relative; width: min(92vw, 52svh, 560px); aspect-ratio: 1000 / 1118; }
.collection__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* 四边慢慢淡进暗处：上边是背光的光晕，下边是展台 */
  -webkit-mask: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .55) 5%, #000 9%, #000 82%, transparent), linear-gradient(to right, transparent, rgba(0, 0, 0, .55) 6%, #000 13%, #000 87%, rgba(0, 0, 0, .55) 94%, transparent);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .55) 5%, #000 9%, #000 82%, transparent), linear-gradient(to right, transparent, rgba(0, 0, 0, .55) 6%, #000 13%, #000 87%, rgba(0, 0, 0, .55) 94%, transparent);
  mask-composite: intersect; }
.collection__sil, .collection__lit { opacity: 0; }
.collection__inner { -webkit-tap-highlight-color: transparent; outline-offset: 8px; }
.collection__txt { margin-top: clamp(4px, 2vh, 22px); opacity: 0; transform: translateY(18px); }
/* 烫金的「收藏室」：金色渐变 + 箔面颗粒；显影完以后一道光从左往右扫过去，鼠标移上来再扫一次 */
.collection__title { display: block; width: min(64vw, 400px); height: auto; overflow: visible; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .8)) drop-shadow(0 0 18px rgba(201, 160, 90, .12)); }
.collection__sheen { transform-box: fill-box; translate: -140% 0; }
.collection.is-lit .collection__sheen { animation: ct-sheen 2.2s cubic-bezier(.45, .05, .25, 1) .2s 1 both; }
.collection.is-lit .collection__inner:hover .collection__sheen { animation: ct-sheen2 1.6s cubic-bezier(.45, .05, .25, 1) 1 both; }
@keyframes ct-sheen { from { translate: -140% 0; } to { translate: 420% 0; } }
@keyframes ct-sheen2 { from { translate: -140% 0; } to { translate: 420% 0; } }
/* 离开时从暗慢慢回到纸面，不一刀切 */
.collection__tail { height: 34vh; background: linear-gradient(#050404, var(--paper)); }
/* 静态版：不黏住、不走进度，直接是照亮的样子 */
.collection.is-static { height: auto; }
.collection.is-static .collection__stick { position: relative; height: auto; padding: 16vh 0 8vh; }
.collection.is-static .collection__anchor { top: 0; }

/* 问答 */
.qa__list { margin-top: 44px; border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; position: relative; padding: 24px 40px 24px 0; font: 500 16px/1.6 'Noto Serif SC', serif; letter-spacing: .05em; cursor: pointer; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ''; position: absolute; right: 4px; top: 50%; width: 11px; height: 11px; margin-top: -8px; border-right: 1px solid var(--sub); border-bottom: 1px solid var(--sub); transform: rotate(45deg); transition: transform .4s; }
.qa details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.qa details p { padding: 0 0 26px; font-size: 14px; color: var(--sub); max-width: 40em; }

/* 页脚 */
.foot { padding: 90px var(--pad) calc(env(safe-area-inset-bottom) + 48px); border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; letter-spacing: .14em; color: var(--sub); }
.foot__wm { width: 76px; margin: 0 auto 26px; color: var(--ink); }
.foot__url { margin-top: 4px; font: 500 13px/1.8 'Cormorant Garamond', serif; letter-spacing: .2em; }
.foot small { display: block; margin-top: 22px; font-size: 10.5px; letter-spacing: .22em; opacity: .7; }

/* 进场：往上浮一点 */
.rise { opacity: 0; transform: translateY(28px); }

/* ---------- 电脑 ---------- */
@media (min-width: 900px) {
  .top__wm { width: 74px; }
  .sec { padding-left: max(var(--pad), calc((100vw - 1160px) / 2)); padding-right: max(var(--pad), calc((100vw - 1160px) / 2)); }
  .about { display: grid; grid-template-columns: 200px 1fr; align-content: center; column-gap: 48px; }
  .about .label { align-self: start; margin-top: 18px; }
  .about__text { margin-top: 0; }
  .work { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 8vw; }
  .work__art { width: min(26vw, 360px); }
  .work__meta { margin: 0; max-width: 380px; }
  .work:nth-child(even) .work__art { order: 2; }
  .notes__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; border-top: 0; }
  .notes__list li { border-top: 1px solid var(--line); border-bottom: 0; }
  .qa__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; border-top: 0; align-items: start; }
  .qa details { border-top: 1px solid var(--line); border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .gate__grain, .gate__hint i { animation: none; }
}
