/* ============================================================
   xzx-lab.site — 深色画廊
   ============================================================ */

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

:root {
  --bg:        #0A0A0C;
  --bg-elev:   #101014;
  --bg-card:   #15151A;
  --bg-card-h: #1B1B21;
  --line:      rgba(255,255,255,.075);
  --line-2:    rgba(255,255,255,.14);
  --line-3:    rgba(255,255,255,.26);

  --tx:        #F1F0ED;
  --tx-2:      #9C998F;
  --tx-3:      #6B6862;

  --gold:      #C9A66B;
  --gold-soft: rgba(201,166,107,.14);

  --c-app:   #C9A66B;
  --c-image: #8B82E0;
  --c-video: #5DCAA5;
  --c-audio: #F0997B;
  --c-text:  #D8D3C6;

  --serif: Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  --w: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--gold); color: #0A0A0C; }

.wrap { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 28px; }

/* ---------- 导航 ---------- */

.nav {
  position: sticky; top: 0; z-index: 90;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.is-stuck {
  background: rgba(10,10,12,.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 9px; height: 9px; background: var(--gold);
  transform: rotate(45deg); flex: none;
}
.brand-name {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tx); font-weight: 500;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 13.5px; color: var(--tx-2);
  transition: color .2s;
  position: relative;
}
.nav-links a:hover { color: var(--tx); }
.nav-links a.is-active { color: var(--tx); }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--gold);
}
.nav-toggle { display: none; background: none; border: 0; padding: 6px; }
.nav-toggle span {
  display: block; width: 20px; height: 1px; background: var(--tx-2);
  margin: 5px 0; transition: transform .25s, opacity .25s;
}

/* ---------- 通用排版 ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 22px; height: 1px;
  background: var(--gold); vertical-align: middle; margin-right: 10px;
}

h1, h2, h3 { font-weight: 400; margin: 0; }
.serif { font-family: var(--serif); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.35; letter-spacing: .01em;
  margin: 0 0 10px;
}
.section-sub { color: var(--tx-2); font-size: 14.5px; margin: 0; max-width: 46ch; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 36px;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- 首页 hero ---------- */

.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: .5;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.22; letter-spacing: -.01em;
  margin: 0 0 26px; max-width: 17ch;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-lead {
  font-size: 16px; color: var(--tx-2); max-width: 52ch;
  margin: 0 0 44px; line-height: 1.85;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 40px;
  padding-top: 30px; border-top: 1px solid var(--line);
}
.hero-meta div { min-width: 84px; }
.hero-meta dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--tx-3); margin: 0 0 7px;
}
.hero-meta dd {
  margin: 0; font-family: var(--serif); font-size: 22px; color: var(--tx);
}

/* ---------- 主推作品 ---------- */

.feature { padding: 24px 0 84px; }
.feature-card {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: 0; border: 1px solid var(--line);
  background: var(--bg-card);
  overflow: hidden;
}
.feature-figure { position: relative; overflow: hidden; background: #0D0D10; }
.feature-figure img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
  aspect-ratio: 3/2;
}
.feature-card:hover .feature-figure img { transform: scale(1.025); }
.feature-body { padding: 44px 40px; display: flex; flex-direction: column; }
.feature-body h3 {
  font-family: var(--serif); font-size: 30px; margin: 0 0 12px;
}
.feature-body .sub { color: var(--tx-2); font-size: 14px; margin: 0 0 22px; line-height: 1.75; }
.feature-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px;
  background: var(--line); margin: 0 0 30px;
  border: 1px solid var(--line);
}
.feature-facts div { background: var(--bg-card); padding: 14px 16px; }
.feature-facts dt {
  font-size: 10.5px; letter-spacing: .12em; color: var(--tx-3);
  text-transform: uppercase; margin-bottom: 5px; font-family: var(--mono);
}
.feature-facts dd { margin: 0; font-size: 15px; color: var(--tx); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 26px; border-radius: 2px;
  font-size: 13.5px; letter-spacing: .02em;
  border: 1px solid transparent;
  transition: background .22s, color .22s, border-color .22s;
}
.btn-solid { background: var(--gold); color: #14120E; }
.btn-solid:hover { background: #DDB97D; }
.btn-ghost { border-color: var(--line-2); color: var(--tx); }
.btn-ghost:hover { border-color: var(--line-3); background: rgba(255,255,255,.03); }
.btn-arrow { transition: transform .22s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.feature-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }

/* ---------- 类型徽章 ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 2px;
  border: 1px solid var(--line-2); color: var(--tx-2);
  font-family: var(--mono);
}
.badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.badge-app   { color: var(--c-app);   border-color: rgba(201,166,107,.3); }
.badge-image { color: var(--c-image); border-color: rgba(139,130,224,.3); }
.badge-video { color: var(--c-video); border-color: rgba(93,202,165,.3); }
.badge-audio { color: var(--c-audio); border-color: rgba(240,153,123,.3); }
.badge-text  { color: var(--c-text);  border-color: var(--line-2); }

/* ---------- 图集横滑 ---------- */

.strip-section { padding: 0 0 88px; }
.strip {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 4px 28px 20px; margin: 0 -28px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.strip::-webkit-scrollbar { height: 3px; }
.strip::-webkit-scrollbar-thumb { background: var(--line-2); }
.strip::-webkit-scrollbar-track { background: transparent; }

.strip-item {
  flex: 0 0 auto; width: 348px; scroll-snap-align: start;
  cursor: zoom-in; border: 1px solid var(--line);
  background: var(--bg-card); overflow: hidden;
  transition: border-color .25s;
}
.strip-item:hover { border-color: var(--line-3); }
.strip-item img {
  width: 100%; height: 232px; object-fit: cover; object-position: top center;
  transition: transform .7s var(--ease);
}
.strip-item:hover img { transform: scale(1.04); }
.strip-cap {
  padding: 11px 14px; font-size: 12px; color: var(--tx-3);
  border-top: 1px solid var(--line);
}

/* ---------- 作品网格 ---------- */

.grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 20px;
}
.card {
  border: 1px solid var(--line); background: var(--bg-card);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .25s, background .25s, transform .35s var(--ease);
}
.card:hover { border-color: var(--line-3); background: var(--bg-card-h); transform: translateY(-2px); }
.card-figure { position: relative; overflow: hidden; background: #0D0D10; }
.card-figure img {
  width: 100%; aspect-ratio: 3/2; object-fit: cover;
  transition: transform .7s var(--ease);
}
.card:hover .card-figure img { transform: scale(1.045); }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 16px; margin: 0 0 7px; font-weight: 400; }
.card-desc { font-size: 13px; color: var(--tx-2); margin: 0 0 16px; line-height: 1.65; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; color: var(--tx-3); background: rgba(255,255,255,.045);
  padding: 2px 7px; border-radius: 2px;
}
.tag-link { cursor: pointer; transition: color .2s, background .2s; }
.tag-link:hover { color: var(--gold); background: var(--gold-soft); }
.card-year { font-family: var(--mono); font-size: 11px; color: var(--tx-3); }

.card-empty {
  border: 1px dashed var(--line-2); background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center; min-height: 280px;
}
.card-empty p { color: var(--tx-3); font-size: 13px; margin: 0; max-width: 24ch; line-height: 1.7; }
.card-empty .dot {
  width: 26px; height: 26px; border: 1px solid var(--line-2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-3); margin-bottom: 14px; font-size: 15px;
}

/* ---------- 筛选栏 ---------- */

.filters {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: none; border: 1px solid var(--line-2); color: var(--tx-2);
  font-size: 12.5px; padding: 6px 15px; border-radius: 2px;
  transition: color .2s, border-color .2s, background .2s;
}
.chip:hover { color: var(--tx); border-color: var(--line-3); }
.chip.is-on { background: var(--tx); border-color: var(--tx); color: #0A0A0C; }
.chip .n { opacity: .5; margin-left: 5px; font-family: var(--mono); font-size: 11px; }

.search {
  display: flex; align-items: center; gap: 9px;
  border-bottom: 1px solid var(--line-2); padding: 6px 2px;
  transition: border-color .25s;
}
.search:focus-within { border-color: var(--gold); }
.search svg { flex: none; opacity: .5; }
.search input {
  background: none; border: 0; outline: 0; color: var(--tx);
  font-size: 13.5px; width: 170px; font-family: var(--sans);
}
.search input::placeholder { color: var(--tx-3); }

.result-note { font-size: 12.5px; color: var(--tx-3); margin: 0 0 24px; font-family: var(--mono); }

/* ---------- 页头 ---------- */

.page-head { padding: 72px 0 40px; }
.page-head h1 {
  font-family: var(--serif); font-size: clamp(30px, 4.4vw, 46px);
  margin: 0 0 16px; letter-spacing: -.005em;
}
.page-head p { color: var(--tx-2); font-size: 15px; max-width: 54ch; margin: 0; }

/* ---------- 详情页 ---------- */

.detail { padding: 56px 0 96px; }
.back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--tx-3); margin-bottom: 34px;
  transition: color .2s;
}
.back:hover { color: var(--gold); }
.detail-head { max-width: 760px; margin-bottom: 40px; }
.detail-head h1 {
  font-family: var(--serif); font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.25; margin: 14px 0 18px;
}
.detail-head .lead { font-size: 16px; color: var(--tx-2); margin: 0; line-height: 1.85; }
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 24px 52px; margin: 30px 0 0;
  padding: 20px 0 0; border-top: 1px solid var(--line);
}
.detail-meta div { min-width: 70px; }
.detail-meta dt {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--tx-3); margin: 0 0 5px;
}
.detail-meta dd { margin: 0; font-size: 13.5px; color: var(--tx); }

.detail-cover {
  border: 1px solid var(--line); overflow: hidden; margin-bottom: 56px;
  background: var(--bg-card); cursor: zoom-in;
}
.detail-cover img { width: 100%; }

.prose { max-width: 700px; }
.prose h2 {
  font-family: var(--serif); font-size: 22px; margin: 42px 0 14px;
  padding-top: 6px; color: var(--tx);
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 18px; color: #C4C1B9; font-size: 15px; line-height: 1.9; }
.prose ul { margin: 0 0 20px; padding-left: 20px; color: #C4C1B9; }
.prose li { margin-bottom: 9px; line-height: 1.85; }
.prose strong { color: var(--tx); font-weight: 500; }
.prose code {
  font-family: var(--mono); font-size: .88em; background: rgba(255,255,255,.06);
  padding: 2px 6px; border-radius: 2px; color: var(--gold);
}

.gallery-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px; margin: 18px 0 8px;
}
.gallery-grid figure { margin: 0; border: 1px solid var(--line); overflow: hidden; cursor: zoom-in; background: var(--bg-card); }
.gallery-grid img { width: 100%; aspect-ratio: 3/2; object-fit: cover; object-position: top center; transition: transform .6s var(--ease); }
.gallery-grid figure:hover img { transform: scale(1.035); }
.gallery-grid figcaption { padding: 10px 13px; font-size: 12px; color: var(--tx-3); border-top: 1px solid var(--line); }

.cta-panel {
  margin: 56px 0 0; padding: 40px; border: 1px solid var(--line);
  background: var(--bg-elev); display: flex; align-items: center;
  justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.cta-panel h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 8px; }
.cta-panel p { margin: 0; color: var(--tx-2); font-size: 13.5px; }

/* ---------- 笔记 ---------- */

.note-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.note-row {
  background: var(--bg); padding: 30px 32px;
  display: grid; grid-template-columns: 1fr auto; gap: 32px;
  align-items: center; transition: background .25s;
}
.note-row:hover { background: var(--bg-card); }
.note-row h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 9px; }
.note-row p { margin: 0; color: var(--tx-2); font-size: 13.5px; line-height: 1.75; max-width: 62ch; }
.note-row-side { text-align: right; white-space: nowrap; }
.note-date { font-family: var(--mono); font-size: 11.5px; color: var(--tx-3); display: block; margin-bottom: 6px; }
.note-read { font-size: 11.5px; color: var(--tx-3); }

/* ---------- 关于 ---------- */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 20px 0 96px; }
.about-block h2 {
  font-family: var(--serif); font-size: 20px; margin: 0 0 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.about-block p { color: #B8B5AD; font-size: 14.5px; line-height: 1.9; margin: 0 0 16px; }
.about-list { list-style: none; padding: 0; margin: 0; }
.about-list li {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.about-list li span:first-child { color: var(--tx-3); }
.about-list li span:last-child { color: var(--tx); }

/* ---------- 字段说明块 ---------- */

.callout {
  border-left: 1px solid var(--gold); padding: 4px 0 4px 20px;
  color: var(--tx-2); font-size: 13.5px; line-height: 1.8; margin: 26px 0;
}

/* ---------- 页脚 ---------- */

.footer {
  border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 20px;
}
.footer-top {
  display: flex; justify-content: space-between; gap: 40px;
  flex-wrap: wrap; margin-bottom: 44px;
}
.footer-brand .brand-name { margin-bottom: 14px; display: block; }
.footer-brand p { color: var(--tx-3); font-size: 13px; margin: 0; max-width: 32ch; line-height: 1.75; }
.footer-mail {
  display: inline-block; margin-top: 12px;
  font-size: 13px; color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: border-color .22s;
}
.footer-mail:hover { border-bottom-color: var(--gold); }
.footer-cols { display: flex; gap: 72px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--tx-3); margin: 0 0 14px; font-weight: 400; font-family: var(--mono);
}
.footer-col a, .footer-col span {
  display: block; font-size: 13px; color: var(--tx-2);
  margin-bottom: 9px; transition: color .2s;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--tx-3);
}
.footer-bottom a { color: var(--tx-3); transition: color .2s; }
.footer-bottom a:hover { color: var(--tx-2); }

/* ---------- 灯箱 ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,6,8,.97);
  display: none; align-items: center; justify-content: center;
  padding: 64px 76px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border: 1px solid var(--line);
}
.lb-btn {
  position: absolute; background: none; border: 1px solid var(--line-2);
  color: var(--tx-2); width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s, border-color .2s;
}
.lb-btn:hover { color: var(--tx); border-color: var(--line-3); }
.lb-prev { left: 20px; top: 50%; margin-top: -21px; }
.lb-next { right: 20px; top: 50%; margin-top: -21px; }
.lb-close { right: 20px; top: 20px; }
.lb-cap {
  position: absolute; bottom: 22px; left: 0; right: 0; text-align: center;
  font-size: 12.5px; color: var(--tx-2); pointer-events: none;
}
.lb-count { color: var(--tx-3); margin-left: 8px; font-family: var(--mono); font-size: 11px; }

/* ---------- 入场动画 ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); }
  .reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity .7s var(--ease), transform .7s var(--ease);
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
  .feature-card { grid-template-columns: 1fr; }
  .feature-figure img { aspect-ratio: 16/10; }
  .feature-facts { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .nav-links { gap: 22px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 52px; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 40px); }
  .hero-meta { gap: 26px; }
  .hero-meta dd { font-size: 18px; }
  .feature { padding: 12px 0 60px; }
  .feature-body { padding: 30px 24px; }
  .feature-body h3 { font-size: 24px; }
  .grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 26px; }
  .strip-item { width: 268px; }
  .strip-item img { height: 180px; }
  .strip { margin: 0 -20px; padding: 4px 20px 20px; }
  .filters { flex-direction: column; align-items: stretch; }
  .search input { width: 100%; }
  .search { flex: 1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 1fr; gap: 14px; padding: 24px 20px; }
  .note-row-side { text-align: left; }
  .cta-panel { padding: 28px 22px; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    background: rgba(10,10,12,.98); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px 20px 18px; display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 11px 0; font-size: 15px; width: 100%; }
  .nav-links a.is-active::after { display: none; }
  .nav-toggle { display: block; }
  .lightbox { padding: 56px 14px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .footer-cols { gap: 44px; }
}
