/* ---------------------------------------------------------------
   暗色画廊 —— 摄影作品集
   配色接近无彩，仅用低饱和米金作强调，避免抢画面
   --------------------------------------------------------------- */
:root {
  --bg: #0a0a0b;
  --surface: #121214;
  --surface-2: #17171a;
  --line: #26262c;
  --text: #e7e7ea;
  --muted: #82828a;
  --dim: #55555c;
  --accent: #c3ab84;
  --radius: 3px;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

/* ------------------------------- 页头 ------------------------------- */
.site-header {
  padding: 92px 24px 56px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.site-header h1 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: #f2f2f4;
}

.site-header .rule {
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.55;
  margin: 22px auto;
}

.site-header .lede {
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  line-height: 2;
}

/* ------------------------------- 导航 ------------------------------- */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  padding: 0 24px 42px;
  margin-top: -20px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15.5px;
  letter-spacing: 0.14em;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.site-nav a:hover { color: var(--text); }

.site-nav a.active {
  color: var(--accent);
  border-bottom-color: rgba(195, 171, 132, 0.45);
}

/* ------------------------------- 网格 ------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap-grid, 10px);
  padding: 0 10px 80px;
  max-width: 1680px;
  margin: 0 auto;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
  cursor: zoom-in;
  aspect-ratio: var(--ar, 3 / 2);
  border: 1px solid transparent;
  transition: border-color 0.35s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(0, 0, 0, 0.10) 38%,
      transparent 62%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.card img.loaded { opacity: 1; transform: scale(1); }

.card:hover { border-color: rgba(195, 171, 132, 0.28); }
.card:hover img { transform: scale(1.035); }
.card:hover::after { opacity: 1; }

.card .cap {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 2;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #ececef;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card:hover .cap { opacity: 1; transform: translateY(0); }

/* 骨架微光 */
.card.skeleton {
  background: linear-gradient(100deg,
      var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 240% 100%;
  animation: shimmer 1.6s infinite linear;
}

@keyframes shimmer {
  from { background-position: 140% 0; }
  to { background-position: -40% 0; }
}

/* ------------------------------ 灯箱 ------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 6, 7, 0.97);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 76px 120px;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.35s ease;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lb-img.show { opacity: 1; }

.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.25s ease;
  z-index: 4;
}

.lb-close:hover { color: var(--text); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 68px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 30px;
  cursor: pointer;
  transition: color 0.25s ease;
  z-index: 4;
  -webkit-tap-highlight-color: transparent;
}

.lb-nav:hover { color: var(--text); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }

.lb-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  z-index: 5;
}

.lb-meta {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-meta .idx { color: var(--dim); margin-right: 10px; }

.lb-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

.lb-btn:hover { color: var(--text); border-color: #3a3a42; }

.lb-btn.liked {
  color: var(--accent);
  border-color: rgba(195, 171, 132, 0.45);
  background: rgba(195, 171, 132, 0.08);
}

.lb-btn.pop { animation: pop 0.32s ease; }

@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ----------------------------- 评论抽屉 ----------------------------- */
.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100%);
  background: #0e0e10;
  border-left: 1px solid var(--line);
  transform: translateX(101%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 6;
}

.drawer.open { transform: translateX(0); }

.drawer-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head h3 {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.drawer-head button {
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.drawer-head button:hover { color: var(--text); }

.cm-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 22px;
}

.cm-item {
  padding: 15px 0;
  border-bottom: 1px solid rgba(38, 38, 44, 0.6);
}

.cm-item .top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.cm-item .who {
  font-size: 12.5px;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.cm-item .when { font-size: 11.5px; color: var(--dim); }
.cm-item .txt {
  font-size: 13.5px;
  color: #c8c8ce;
  line-height: 1.75;
  word-break: break-word;
  white-space: pre-wrap;
}

.cm-empty {
  padding: 44px 0;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}

.cm-form {
  padding: 14px 22px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.cm-form input,
.cm-form textarea {
  width: 100%;
  background: #15151a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 11px;
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.2s ease;
  resize: none;
}

.cm-form input:focus,
.cm-form textarea:focus { border-color: #3d3d46; }

.cm-form button {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #17130c;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.cm-form button:hover { opacity: 0.86; }
.cm-form button:disabled { opacity: 0.4; cursor: not-allowed; }

.cm-tip {
  font-size: 11.5px;
  color: var(--dim);
  margin-top: 8px;
  text-align: center;
  min-height: 16px;
}

/* ------------------------------ 页脚 ------------------------------ */
.site-footer {
  padding: 44px 24px 60px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-top: 1px solid rgba(38, 38, 44, 0.5);
  max-width: 1680px;
  margin: 0 auto;
}

/* AI 生成内容的页面级说明 */
.footer-note {
  margin-top: 10px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #3a3a40;
}

/* ----------------------------- 响应式 ----------------------------- */
@media (max-width: 720px) {
  .site-header { padding: 62px 22px 38px; }
  .site-nav { gap: 26px; padding-bottom: 30px; margin-top: -10px; }
  .site-nav a { font-size: 14px; }
  .albums { padding: 0 16px 64px; gap: 40px; }
  .album-cover { aspect-ratio: 4 / 3; }
  .album-body { padding-top: 16px; gap: 8px; }
  .album-name { font-size: 19px; }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 0 6px 56px;
  }
  .card { border-radius: 2px; }
  .card .cap { display: none; }
  .lb-stage { padding: 52px 8px 116px; }
  .lb-nav { width: 40px; height: 56px; font-size: 24px; }
  .lb-prev { left: 2px; }
  .lb-next { right: 2px; }
  .lb-bar { gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .lb-meta { font-size: 11.5px; }
  .lb-btn { padding: 7px 12px; font-size: 12px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------------------------- 分类首页 ---------------------------- */
.albums {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 96px;
  display: flex;
  flex-direction: column;
  gap: 62px;
}

.album-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.album-cover {
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
  aspect-ratio: 16 / 9;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transform: scale(1.001);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s ease;
}

.album-card:hover .album-cover img {
  transform: scale(1.045);
  opacity: 1;
}

.album-body {
  padding: 20px 2px 0;
  display: flex;
  align-items: baseline;
  gap: 10px 22px;
  flex-wrap: wrap;
}

.album-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-shrink: 0;
}

.album-name {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #f0f0f3;
  line-height: 1.5;
}

.album-count {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.album-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.9;
  flex: 1 1 300px;
  min-width: 0;
}

.empty-tip {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--dim);
  padding: 80px 0;
  font-size: 14px;
}

/* AI 生成内容标识 */
.ai-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  color: rgba(240, 240, 243, 0.82);
  background: rgba(10, 10, 11, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* ==================================================================
   首页：编辑式长卷排版
   —— 不是「大图堆叠」，而是靠栏宽、字号层级、留白与编号系统
      制造阅读节奏。奇数节图右文左，偶数节相反。
   ================================================================== */

/* ------------------------------ 刊头 ------------------------------ */
.masthead {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 90px;
  text-align: center;
  overflow: hidden;
}

.masthead-inner { position: relative; z-index: 2; }

.masthead-kicker {
  font-size: 9.5px;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
  color: #3d3d44;
  margin-bottom: 42px;
}

.brand {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(32px, 5.6vw, 62px);
  font-weight: 400;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  line-height: 1.25;
  color: #f5f5f7;
}

.brand::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin: 38px auto 0;
  background: var(--accent);
  opacity: 0.5;
}

.tagline {
  margin-top: 30px;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--dim);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-hint span {
  position: absolute;
  top: 0;
  left: -1px;
  width: 3px;
  height: 14px;
  background: var(--accent);
  opacity: 0.85;
  animation: scrollDot 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scrollDot {
  0%   { transform: translateY(0);    opacity: 0; }
  22%  { opacity: 0.9; }
  72%  { opacity: 0.9; }
  100% { transform: translateY(42px); opacity: 0; }
}

/* 首页的导航压在刊头下方 */
.site-nav--top { padding: 0 24px 96px; margin-top: -46px; }

/* --------------------------- 系列列表 --------------------------- */
.series-list {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 34px 140px;
}

.series {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 26px;
  row-gap: 30px;
  align-items: end;
  margin-bottom: 168px;
  text-decoration: none;
  color: inherit;
}

/* 奇数节：编号在左、图居中偏右、文字在右 */
.series .series-index { grid-column: 1 / span 2; }
.series .series-figure { grid-column: 3 / span 7; }
.series .series-text  { grid-column: 11 / span 2; }

/* 偶数节：镜像 —— 图偏左、文字在左边缘、编号在右 */
.series:nth-child(even) .series-index { grid-column: 11 / span 2; text-align: right; }
.series:nth-child(even) .series-figure { grid-column: 4 / span 7; }
.series:nth-child(even) .series-text  { grid-column: 1 / span 3; }

/* --------------------------- 编号系统 --------------------------- */
.series-index {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 6px;
}

.series-index .num {
  font-family: "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--dim);
  transition: color 0.4s ease;
}

.series-index .label {
  font-size: 9px;
  letter-spacing: 0.34em;
  color: #34343a;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  height: 74px;
}

.series:hover .series-index .num { color: var(--accent); }

/* ----------------------------- 图片 ----------------------------- */
.series-figure {
  margin: 0;
  overflow: hidden;
  background: #0d0d0f;
  border-radius: 2px;
}

.series-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 74vh;
  object-fit: contain;          /* 不裁切，尊重构图 */
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.7s ease;
  opacity: 0.94;
}

.series:hover .series-figure img {
  transform: scale(1.018);
  opacity: 1;
}

/* ----------------------------- 文字 ----------------------------- */
.series-text { padding-bottom: 4px; }

.series-text h2 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: #ececef;
  margin-bottom: 16px;
}

.series-text h2::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: rgba(195, 171, 132, 0.5);
  margin-bottom: 15px;
}

.series-text .desc {
  font-size: 12.5px;
  line-height: 2.15;
  letter-spacing: 0.02em;
  color: #7c7c84;
  margin-bottom: 20px;
}

.series-text .count {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: #4a4a51;
}

/* --------------------------- 进入动画 --------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------- 页脚 ----------------------------- */
.footer-mark {
  font-family: Georgia, "Songti SC", serif;
  font-size: 13px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: #34343a;
  margin-bottom: 14px;
}

.empty-tip--series {
  text-align: center;
  color: var(--dim);
  padding: 120px 0;
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* --------------------------- 响应式 --------------------------- */
@media (max-width: 1020px) {
  .series-list { padding: 0 24px 100px; }
  .series { margin-bottom: 110px; column-gap: 18px; }
  .series .series-index { grid-column: 1 / span 3; }
  .series .series-figure { grid-column: 1 / span 12; order: 1; }
  .series .series-text  { grid-column: 1 / span 9; order: 2; }
  .series:nth-child(even) .series-index { grid-column: 1 / span 3; text-align: left; order: 3; }
  .series:nth-child(even) .series-figure { grid-column: 1 / span 12; }
  .series:nth-child(even) .series-text  { grid-column: 1 / span 9; }
  .series-index .label { writing-mode: horizontal-tb; height: auto; }
  .series-index { flex-direction: row; align-items: baseline; gap: 14px; }
}

@media (max-width: 720px) {
  .masthead { min-height: 52vh; padding: 92px 20px 70px; }
  .masthead-kicker { font-size: 8.5px; margin-bottom: 32px; }
  .brand::after { margin-top: 30px; }
  .tagline { margin-top: 24px; font-size: 11px; }
  .scroll-hint { height: 42px; bottom: 24px; }
  .site-nav--top { padding-bottom: 64px; margin-top: -30px; }
  .series { margin-bottom: 78px; row-gap: 20px; }
  .series-text h2 { font-size: 20px; margin-bottom: 12px; }
  .series-text .desc { font-size: 12.5px; line-height: 2; margin-bottom: 14px; }
  .series-figure img { max-height: 62vh; }
}



/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
}
