/* ============================================================
   weeeeeeishang · archive.css
   册页 · BOOKLET
   ------------------------------------------------------------
   概念：整站就是一本印在宣纸上的册子。
   纸 = 底色，纤维 = 贴图，墨 = 近黑，靛蓝 = 印色，朱红 = 印泥。
   颜色取自作者自己的平面作品（宣纸底 + 靛蓝 + 朱红）。

   规则（tasteskill house style）：
   - 不用等宽字体，不用微型大写标签，不用装饰编号
   - 不用 1px 细线，用间距与色阶分层
   - 不用渐变、静态阴影、玻璃拟态
   - 正文 16px，五档字号，一组页边距，一个圆角（直角）
   ============================================================ */

:root{
  /* ---- 纸 ---- */
  --paper:      #E5DFD1;   /* 宣纸底 */
  --paper-2:    #DBD4C3;   /* 纸上第二层 */
  --paper-3:    #CFC7B2;   /* 纸上第三层 */
  --paper-4:    #E9E3D4;   /* 纸上的卡片 */

  /* ---- 墨 ---- */
  --ink:        #15120E;
  --ink-2:      #221E17;
  --ink-3:      #2E291F;

  /* ---- 纸上字 ---- */
  --tx:         #15120E;
  --tx-2:       #423C30;
  --tx-3:       #5C5445;

  /* ---- 墨底字 ---- */
  --on-ink:     #E5DFD1;
  --on-ink-2:   #ADA491;
  --on-ink-3:   #837C6B;

  /* ---- 印色 ---- */
  --indigo:     #2B3A96;   /* 靛蓝，纸上（印墨色：比屏幕蓝更沉，纸面对比 7.4:1） */
  --indigo-ink: #7B84F0;   /* 靛蓝，墨底上 */
  --indigo-dp:  #1F296F;
  --seal:       #B22E2E;   /* 朱红，印泥 */

  /* ---- 字体 ---- */
  --sans: "Archivo", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;

  /* ---- 字号（五档） ---- */
  --t-display: clamp(42px, 5.2vw, 72px);
  --t-title:   clamp(26px, 3vw, 38px);
  --t-lead:    22px;
  --t-body:    16px;
  --t-small:   14px;

  /* ---- 节奏 ---- */
  --u: 8px;
  --pad: clamp(18px, 4.4vw, 60px);
  --gap: clamp(36px, 6vw, 92px);      /* 段落之间 */
  --band: clamp(60px, 9vw, 132px);    /* 版块之间 */
  --ease: cubic-bezier(.16,1,.3,1);
  --maxw: 1240px;

  /* ---- 档案馆规格 ---- */
  --bgap: 6px;                                   /* 帧与帧的间距 */
  --strip-h: 100svh;                             /* 条带高度 */
  --iw: calc(var(--strip-h) * 16 / 9);           /* 每帧宽度 */
  --speed: 30;                                   /* px / 秒 */
  --shift: calc(22 * (var(--iw) + var(--bgap)));  /* 一轮位移，JS 覆写 */
  --dur: 300s;                                   /* JS 覆写 */
}

@supports (height: 100dvh){
  :root{ --strip-h: 100dvh; }
}

/* ============================================================
   0. RESET
   ============================================================ */

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

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
}

body{
  margin:0;
  font-family:var(--sans);
  font-size:var(--t-body);
  line-height:1.62;
  color:var(--tx);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* 纸：颜色 + 真实宣纸纤维（soft-light 叠合，随页面一起滚动） */
body.page{
  background-color:var(--paper);
  background-image:url("../assets/paper-grain.webp");
  background-size:460px 460px;
  background-blend-mode:soft-light;
}

h1,h2,h3,h4,p,ul,ol,figure,blockquote{ margin:0; }
ul,ol{ padding:0; list-style:none; }
img{ max-width:100%; display:block; }
a{ color:inherit; }

:focus-visible{
  outline:3px solid var(--indigo);
  outline-offset:3px;
}

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

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

/* ============================================================
   1. 通用元件
   ============================================================ */

/* 按钮：直角，单一填色 */
.btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:0 26px;
  font-size:var(--t-body);
  font-weight:500;
  letter-spacing:.01em;
  text-decoration:none;
  border-radius:0;
  transition:background-color .35s var(--ease), color .35s var(--ease),
             transform .35s var(--ease);
}
.btn--fill{ background:var(--indigo); color:var(--paper); }
.btn--fill:hover{ background:var(--indigo-dp); transform:translateY(-2px); }
.btn--fill:active{ transform:translateY(0); }
.btn--ink{ background:var(--ink); color:var(--on-ink); }
.btn--ink:hover{ background:var(--ink-3); transform:translateY(-2px); }
.btn--ghost{
  background:transparent;
  color:var(--tx);
  box-shadow:none;
  border:0;
}
.btn--ghost::after{
  content:"→";
  color:var(--indigo);
  transition:transform .35s var(--ease);
}
.btn--ghost:hover::after{ transform:translateX(4px); }

/* 文字链接：不用下划线，用颜色与位移 */
.tlink{
  color:var(--indigo);
  text-decoration:none;
  transition:color .3s var(--ease);
}
.tlink:hover{ color:var(--seal); }

/* 标签 */
.tag{
  display:inline-block;
  font-size:var(--t-small);
  line-height:1.5;
  color:var(--tx-2);
  background:var(--paper-2);
  padding:3px 10px;
}

/* 段落 */
.p{
  font-size:var(--t-body);
  line-height:1.72;
  color:var(--tx-2);
  max-width:62ch;
}
.p strong{ color:var(--tx); font-weight:600; }

.note{
  font-size:var(--t-small);
  line-height:1.7;
  color:var(--tx-3);
  max-width:60ch;
}

/* ============================================================
   2. 页脚：册子的封底
   ------------------------------------------------------------
   名字回到全宽，下面一行细信息，上沿一条会动的图像边。
   ============================================================ */

.foot{
  position:relative;
  margin-top:var(--band);
  background:var(--ink);
  color:var(--on-ink);
  overflow:hidden;
}
.foot__strip{
  display:flex;
  gap:0;
  height:96px;
  overflow:hidden;
  opacity:.9;
  animation:slide 64s linear infinite;
}
@keyframes slide{
  from{ transform:translateX(0); }
  to  { transform:translateX(-50%); }
}
.foot__strip img{
  height:100%;
  width:240px;
  flex:0 0 auto;
  object-fit:cover;
  filter:brightness(.78) saturate(.95);
}
.foot__inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding:clamp(30px,5vw,58px) var(--pad) clamp(26px,4vw,46px);
}
.foot__name{
  font-size:clamp(34px,7vw,96px);
  font-weight:600;
  line-height:.96;
  letter-spacing:-.03em;
  color:var(--on-ink);
}
.foot__rule{
  margin:22px 0 18px;
  width:64px;
  height:6px;
  background:var(--seal);
}
.foot__cols{
  display:flex;
  flex-wrap:wrap;
  gap:12px clamp(28px,5vw,72px);
  font-size:var(--t-small);
  line-height:1.7;
  color:var(--on-ink-2);
}
.foot__cols a{
  color:var(--on-ink-2);
  text-decoration:none;
  transition:color .3s var(--ease);
}
.foot__cols a:hover{ color:var(--indigo-ink); }
.foot__copy{
  margin-top:20px;
  font-size:var(--t-small);
  color:var(--on-ink-3);
}

/* ============================================================
   3. 首页：一张册页
   ------------------------------------------------------------
   第一屏是刊头 + 三张「活着的」作品卡（Canvas 竖线，见 js/canvas-cards.js），
   第二屏是暗房：22 帧建筑与公共空间效果图横向流动。
   ============================================================ */

body.archive{
  position:relative;
  background:var(--paper);
  color:var(--tx);
}

/* 第一屏：刊头 + 三张卡 */
.pick{
  position:relative;
  background-color:var(--paper);
  background-image:url("../assets/paper-grain.webp");
  background-size:340px 340px;
  background-blend-mode:soft-light;
  padding:calc(58px + 26px) var(--pad) 30px;
}

/* 第二屏：暗房 */
.room{
  position:relative;
  height:100svh;
  overflow:hidden;
  background:var(--ink);
  color:var(--on-ink);
}

/* 贴在暗房墙上的档案标签 */
.room__label{
  position:absolute;
  z-index:2;
  left:var(--pad);
  bottom:clamp(18px,3vw,34px);
  max-width:38ch;
  padding:10px 14px;
  background:var(--ink);
  color:var(--on-ink-2);
  font-size:var(--t-small);
  line-height:1.6;
}

.stage{
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
}

.belt{
  position:absolute;
  top:50%;
  left:0;
  display:flex;
  gap:var(--bgap, 6px);
  height:var(--strip-h);
  transform:translate3d(0,-50%,0);
  will-change:transform;
  animation:drift var(--dur) linear infinite;
}
@keyframes drift{
  from{ transform:translate3d(0,-50%,0); }
  to  { transform:translate3d(calc(-1 * var(--shift)),-50%,0); }
}
.belt.is-paused{ animation-play-state:paused; }

.card{
  position:relative;
  flex:0 0 auto;
  margin:0;
  width:var(--iw);
  height:var(--strip-h);
  background:var(--ink-2);
  overflow:hidden;
  cursor:zoom-in;
  -webkit-tap-highlight-color:transparent;
}
.card img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  user-select:none;
  -webkit-user-drag:none;
  filter:brightness(.82) saturate(.96);
  transition:transform 1.2s var(--ease), filter 1.2s var(--ease);
}
.card:hover img,
.card:focus-visible img{
  transform:scale(1.03);
  filter:brightness(.96) saturate(1);
}
.card:focus-visible{ outline:3px solid var(--indigo-ink); outline-offset:-3px; }

/* 顶栏 */
.abar{
  position:fixed;
  top:0; left:0; right:0;
  z-index:3;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:0 var(--pad);
  background:var(--ink);
}
.wordmark{
  font-size:var(--t-lead);
  font-weight:600;
  letter-spacing:.02em;
  color:var(--on-ink);
  text-decoration:none;
}
.anav{
  display:flex;
  align-items:center;
  gap:clamp(12px,2.2vw,28px);
}
.anav a{
  font-size:var(--t-body);
  color:var(--on-ink-2);
  text-decoration:none;
  padding:4px 0;
  transition:color .3s var(--ease);
}
.anav a:hover{ color:var(--on-ink); }
.anav a[aria-current="page"]{ color:var(--indigo-ink); }
.abar__count{
  font-size:var(--t-small);
  color:var(--on-ink-3);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.abar__count b{ color:var(--on-ink-2); font-weight:500; }

/* 刊头：册页最上面那条题签 */
.pick__head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:clamp(16px,2.4vw,48px);
}
.pick__id{ max-width:min(62ch,100%); }
.pick__side{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
  max-width:min(44ch,100%);
}
.idcard__name{
  font-size:var(--t-display);
  font-weight:600;
  line-height:1;
  letter-spacing:-.02em;
  color:var(--tx);
}
.idcard__role{
  margin-top:10px;
  font-size:var(--t-lead);
  line-height:1.35;
  color:var(--tx);
  font-weight:500;
}
.idcard__note{
  margin-top:14px;
  font-size:var(--t-body);
  line-height:1.7;
  color:var(--tx-2);
  max-width:58ch;
}
.idcard__acts{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 14px;
}
.idcard__facts{
  display:flex;
  flex-wrap:wrap;
  gap:6px 20px;
  font-size:var(--t-small);
  color:var(--tx-2);
}
.idcard__facts li{ position:relative; }
.idcard__facts a{ color:var(--indigo); text-decoration:none; }
.idcard__facts a:hover{ color:var(--seal); }

/* ------------------------------------------------------------
   三张活着的作品卡
   ------------------------------------------------------------ */
.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:clamp(14px,1.8vw,26px);
  margin-top:clamp(18px,2vw,34px);
}
.ccard{
  position:relative;
  aspect-ratio:4/5;
  overflow:hidden;
  background-color:var(--g);
  background-image:var(--img);
  background-size:cover;
  background-position:var(--pos,50%) center;
  color:var(--fg);
  cursor:pointer;
}
.ccard.is-live{ background-image:none; }
.ccard__cv{
  position:absolute;
  inset:0;
  z-index:1;
  display:block;
  width:100%;
  height:100%;
}
.ccard__top{
  position:absolute;
  z-index:2;
  top:0; left:0; right:0;
  display:flex;
  align-items:center;
  gap:10px;
  padding:clamp(14px,1.4vw,20px);
}
.ccard__name{
  font-size:15px;
  font-weight:600;
  letter-spacing:.01em;
  background:var(--g);
  padding:4px 8px;
}
.ccard__bot{
  position:absolute;
  z-index:2;
  left:0; right:0; bottom:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  padding:clamp(16px,1.6vw,24px);
  background:var(--g);
}
/* 卡左上角的小标记：几根竖条，和整站"用竖线画"的语言一致 */
.ccard__mark{
  width:22px;
  height:20px;
  flex:0 0 auto;
  display:flex;
  align-items:flex-end;
  gap:2px;
  background:var(--g);
  padding:3px 4px;
}
.ccard__mark span{
  display:block;
  width:3px;
  height:100%;
  background:currentColor;
}
.ccard__mark span:nth-child(1){ height:58%; }
.ccard__mark span:nth-child(2){ height:100%; width:4px; }
.ccard__mark span:nth-child(3){ height:40%; }
.ccard__mark span:nth-child(4){ height:84%; width:4px; }
.ccard__tag{
  font-size:14px;
  line-height:1.6;
  max-width:30ch;
}
.ccard__go{
  font-size:14px;
  font-weight:600;
  color:inherit;
  text-decoration:none;
  border-bottom:2px solid currentColor;
  padding-bottom:2px;
  transition:opacity .3s var(--ease);
}
.ccard:hover .ccard__go{ opacity:.7; }

@keyframes rise{
  from{ opacity:0; transform:translateY(24px); }
  to  { opacity:1; transform:none; }
}

/* 入场：暗房里先亮起顶栏的字，再浮出身份卡（关掉动效时内容照常显示） */
.wordmark{ animation:rise .5s var(--ease) both .02s; }
.anav a{ animation:rise .5s var(--ease) both .07s; }
.anav a:nth-child(2){ animation-delay:.11s; }
.anav a:nth-child(3){ animation-delay:.15s; }
.anav a:nth-child(4){ animation-delay:.19s; }
.abar__count{ animation:rise .5s var(--ease) both .23s; }
.idcard__name{ animation:rise .6s var(--ease) both .05s; }
.idcard__role{ animation:rise .6s var(--ease) both .13s; }
.idcard__note{ animation:rise .6s var(--ease) both .21s; }
.idcard__acts .btn{ animation:rise .6s var(--ease) both .29s; }
.idcard__acts .btn:nth-child(2){ animation-delay:.35s; }
.idcard__facts li{ animation:rise .6s var(--ease) both .41s; }
.idcard__facts li:nth-child(2){ animation-delay:.46s; }
.idcard__facts li:nth-child(3){ animation-delay:.51s; }
.idcard__facts li:nth-child(4){ animation-delay:.56s; }
.idcard__facts li:nth-child(5){ animation-delay:.61s; }
.idcard__facts li:nth-child(6){ animation-delay:.66s; }
.ccard{ animation:rise .8s var(--ease) both .34s; }
.ccard:nth-child(2){ animation-delay:.46s; }
.ccard:nth-child(3){ animation-delay:.58s; }
.room__label{ animation:rise .7s var(--ease) both .1s; }

/* 灯箱 */
.lightbox{
  position:fixed;
  inset:0;
  z-index:9;
  display:flex;
  flex-direction:column;
  background:rgba(12,10,8,.98);
  opacity:0;
  visibility:hidden;
  transition:opacity .4s var(--ease), visibility .4s;
}
.lightbox.is-open{ opacity:1; visibility:visible; }
.lightbox__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:clamp(14px,3vh,26px) var(--pad) 0;
  flex:0 0 auto;
}
.lightbox__id{
  font-size:var(--t-small);
  letter-spacing:.06em;
  color:var(--on-ink);
  font-variant-numeric:tabular-nums;
}
.lightbox__close{
  width:40px; height:40px;
  display:grid; place-items:center;
  background:var(--ink-2);
  border:0;
  color:var(--on-ink-2);
  font-size:20px; line-height:1;
  cursor:pointer;
  transition:background-color .3s var(--ease), color .3s var(--ease);
}
.lightbox__close:hover{ background:var(--ink-3); color:var(--on-ink); }
.lightbox__stage{
  flex:1 1 auto;
  display:grid;
  place-items:center;
  padding:clamp(10px,2.4vh,28px) clamp(46px,8vw,110px);
  min-height:0;
  position:relative;
}
.lightbox__img{
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  opacity:0;
  transform:scale(.99);
  transition:opacity .4s var(--ease), transform .5s var(--ease);
}
.lightbox__img.is-ready{ opacity:1; transform:scale(1); }
.lightbox__nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px; height:44px;
  display:grid; place-items:center;
  background:var(--ink-2);
  border:0;
  color:var(--on-ink-2);
  font-size:16px;
  cursor:pointer;
  transition:background-color .3s var(--ease), color .3s var(--ease);
}
.lightbox__nav:hover{ background:var(--ink-3); color:var(--on-ink); }
.lightbox__nav--prev{ left:clamp(8px,2.2vw,30px); }
.lightbox__nav--next{ right:clamp(8px,2.2vw,30px); }
.lightbox__foot{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 var(--pad) clamp(14px,3vh,26px);
}
.lightbox__meta{
  font-size:var(--t-small);
  color:var(--on-ink-3);
}

/* ============================================================
   4. 首页响应式
   ============================================================ */

@media (max-width: 820px){
  .abar{ height:54px; }
  .abar__count{ display:none; }
  .pick{ padding:calc(54px + 20px) var(--pad) 26px; }
  .pick__head{ gap:16px; }
  .pick__side{ max-width:100%; }
  .idcard__name{ font-size:clamp(34px,9.6vw,46px); }
  .idcard__role{ font-size:18px; margin-top:8px; }
  .idcard__note{ display:none; }
  .idcard__acts{ margin-top:0; }
  .idcard__facts{ gap:4px 16px; font-size:var(--t-small); }
  .cards{ grid-template-columns:1fr; gap:16px; }
  .ccard{ aspect-ratio:4/3; }
  .room{ height:78svh; }
}

@media (max-width: 480px){
  .anav a{ font-size:var(--t-small); }
  .idcard__acts .btn{ min-height:44px; padding:0 20px; }
}

@media (prefers-reduced-motion: reduce){
  .belt{ animation:none; }
  .card img{ transition:none; }
  .btn{ transition:none; }
  .wordmark,
  .anav a,
  .abar__count,
  .idcard__name,
  .idcard__role,
  .idcard__note,
  .idcard__acts .btn,
  .idcard__facts li,
  .ccard,
  .room__label{ animation:none; }
  .foot__strip{ animation:none; }
}
