/* 沅書建筑摄影 · 样式
   配色：清水混凝土般的冷灰白底 + 石墨文字 + 一个克制的“沅江青绿”强调色
   字体：只用系统字体，国内访问不依赖外部字体库 */

:root {
  --plaster: #ecedeb;   /* 页面底色 */
  --paper:   #f6f6f4;   /* 浅一级的面 */
  --ink:     #24292b;   /* 正文 */
  --stone:   #5d6569;   /* 次要文字 */
  --seam:    #c5c9c7;   /* 分隔线 */
  --river:   #3f6b61;   /* 强调：焦点、当前项 */
  --dark:    #15191b;   /* 灯箱背景 */

  --sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --head: 68px;
  --measure: 34em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font: 400 16px/1.85 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.skip {
  position: absolute; left: var(--gutter); top: -60px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 50;
}
.skip:focus { top: 8px; }

/* ---------- 顶栏 ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--head); padding: 0 var(--gutter);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 500; letter-spacing: 0.18em; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav a {
  white-space: nowrap;
  font-size: 0.95rem; letter-spacing: 0.14em; padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--seam); }
.nav a[aria-current="page"] { border-bottom-color: var(--river); }

/* ---------- 首页：首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  padding-left: var(--gutter);
  height: calc(100svh - var(--head));
  min-height: 460px;
}
.hero-figure {
  display: grid; grid-template-rows: 1fr auto; min-height: 0; padding-right: var(--gutter);
}
.hero-figure .frame {
  position: relative; min-height: 0; overflow: hidden;
  animation: unveil 1.5s cubic-bezier(0.65, 0, 0.2, 1) both;
}
.hero-figure img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-figure img.is-active { opacity: 1; }
.hero-figure figcaption {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px 0 0; font-size: 0.9rem; color: var(--stone);
}
.hero-dots { display: flex; gap: 4px; }
.hero-dots button { position: relative; width: 36px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.hero-dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--seam); }
.hero-dots button[aria-current="true"]::before { background: var(--river); }
.hero-dots button:hover::before { background: var(--stone); }
.hero-figure figcaption a { border-bottom: 1px solid var(--seam); }
.hero-figure figcaption a:hover { border-bottom-color: var(--river); }
@keyframes unveil {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* ---------- 通用区块 ---------- */
.section { padding: clamp(72px, 11vw, 150px) var(--gutter) 0; }
.section-title {
  font-size: 1rem; font-weight: 500; letter-spacing: 0.2em; margin-bottom: 28px;
}
.statement {
  font-size: clamp(1.45rem, 2.7vw, 2.25rem);
  font-weight: 300; line-height: 1.7; letter-spacing: 0.04em;
  max-width: 26em;
  text-wrap: pretty;
}
/* 首页竖排标题已是品牌名，顶栏不再重复 */
/* 首页：横排标志 + 中英文名称 */
body[data-page="home"] { --head: 112px; }
.home-title { margin: 0; font-weight: inherit; }
.brand-lockup { gap: 18px; letter-spacing: 0; }
.brand-lockup .brand-mark { width: 56px; height: 56px; }
.brand-text { display: grid; gap: 2px; line-height: 1.25; }
.brand-text .cn { font-size: 1.7rem; font-weight: 400; letter-spacing: 0.22em; }
.brand-text .en { font-size: 0.82rem; font-weight: 400; letter-spacing: 0.2em; color: var(--stone); }

/* ---------- 首页：作品索引 ---------- */
.index-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.index { border-top: 1px solid var(--seam); }
.index li { border-bottom: 1px solid var(--seam); }
.index a {
  display: grid; grid-template-columns: 4.5em 1fr auto; gap: 8px 20px; align-items: baseline;
  padding: 22px 0;
}
.index .yr { color: var(--stone); font-variant-numeric: tabular-nums; }
.index .nm { font-size: 1.3rem; font-weight: 400; letter-spacing: 0.06em; }
.index .ct { color: var(--stone); font-size: 0.92rem; }
.index a:hover .nm, .index a:focus-visible .nm { color: var(--river); }
.index .loc {
  grid-column: 2 / 4; color: var(--stone); font-size: 0.9rem; line-height: 1.5;
}
.index.noyear a { grid-template-columns: 1fr auto; }
.index.noyear .loc { grid-column: 1 / 3; }
.preview { position: sticky; top: 24px; }
.preview .frame { aspect-ratio: 4 / 5; overflow: hidden; background: var(--seam); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.more { display: inline-block; margin-top: 28px; border-bottom: 1px solid var(--river); padding-bottom: 2px; }

/* ---------- 联系条 ---------- */
.band {
  display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: baseline; justify-content: space-between;
  padding: 36px 0; border-top: 1px solid var(--seam); border-bottom: 1px solid var(--seam);
}
.band p { font-size: 1.2rem; font-weight: 300; letter-spacing: 0.04em; max-width: 26em; }
.btn {
  display: inline-block; padding: 12px 28px; background: var(--ink); color: var(--paper);
  letter-spacing: 0.14em; border: 0; cursor: pointer;
}
.btn:hover { background: var(--river); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: clamp(72px, 10vw, 140px);
  padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between;
  color: var(--stone); font-size: 0.9rem; border-top: 1px solid var(--seam);
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.site-footer a:hover { color: var(--river); }

/* ---------- 子页面通用 ---------- */
.page-head { padding: clamp(32px, 6vw, 80px) var(--gutter) 0; }
.page-title {
  font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 300; letter-spacing: 0.1em; line-height: 1.3;
}

/* ---------- 作品集 ---------- */
.filters { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 56px; }
.filter-row { display: flex; align-items: baseline; gap: 8px 18px; }
.filter-label { flex: none; font-size: 0.82rem; letter-spacing: 0.14em; color: var(--stone); opacity: 0.8; }
.filter-opts { display: flex; flex-wrap: wrap; gap: 0 26px; }
.filters button {
  background: none; border: 0; border-bottom: 1px solid transparent; padding: 7px 0;
  cursor: pointer; letter-spacing: 0.14em; color: var(--stone); font: inherit; letter-spacing: 0.14em;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--river); }
.filter-count { flex-basis: 100%; margin: 0; margin-top: 4px; font-size: 0.82rem; color: var(--stone); letter-spacing: 0.1em; min-height: 1.4em; }
#grid + .missing { padding: 48px var(--gutter); color: var(--stone); }
#grid + .missing .more { background: none; border: 0; cursor: pointer; margin-left: 16px; font: inherit; }
@media (max-width: 480px) {
  .filters { gap: 4px 0; }
  .filter-row { flex-direction: column; gap: 0; padding: 4px 0; flex-basis: 100%; }
  .filter-opts { gap: 0 20px; }
}
.work-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px) clamp(16px, 2.4vw, 36px);
  padding: 40px var(--gutter) 0;
}
.card { display: block; }
.card[hidden] { display: none; }
.card .frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--seam); }
.card .shot {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.7s ease;
}
.card .shot.is-active { opacity: 1; }
.card-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; }
.card-title { font-size: 1.05rem; letter-spacing: 0.06em; }
.card:hover .card-title { color: var(--river); }
.card-year { color: var(--stone); font-variant-numeric: tabular-nums; }
.card-sub { color: var(--stone); font-size: 0.9rem; line-height: 1.5; }

/* ---------- 项目详情 ---------- */
.back { font-size: 0.92rem; color: var(--stone); }
.back a { border-bottom: 1px solid var(--seam); }
.back a:hover { border-bottom-color: var(--river); }
.project-head { padding: clamp(28px, 5vw, 64px) var(--gutter) 0; }
.project-head .page-title { margin-top: 24px; }
.project-en { color: var(--stone); letter-spacing: 0.1em; margin-top: 6px; }
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 32px;
  margin: 36px 0 0; padding: 22px 0; border-top: 1px solid var(--seam); border-bottom: 1px solid var(--seam);
  max-width: 920px;
}
.article-link { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.article-title {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  font-size: 0.86rem; color: var(--stone); letter-spacing: 0.06em; line-height: 1.7;
}
.facts dt { font-size: 0.85rem; color: var(--stone); letter-spacing: 0.1em; }
.facts dd { margin-top: 2px; }
.lede { margin-top: 36px; max-width: var(--measure); line-height: 2; }
.plates {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 28px);
  padding: clamp(40px, 6vw, 80px) var(--gutter) 0;
}
.plate { margin: 0; grid-column: span 2; }
.plate.half { grid-column: span 1; }
.plate button {
  display: block; width: 100%; padding: 0; border: 0; background: var(--seam); cursor: zoom-in;
}
.plate img { width: 100%; height: auto; }
.plate figcaption { font-size: 0.88rem; color: var(--stone); padding-top: 8px; line-height: 1.6; }
.pager {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin: clamp(56px, 8vw, 110px) var(--gutter) 0; padding-top: 24px; border-top: 1px solid var(--seam);
}
.pager small { display: block; color: var(--stone); font-size: 0.85rem; letter-spacing: 0.1em; }
.pager a:hover span { color: var(--river); }
.pager .next { text-align: right; margin-left: auto; }
.pager span { font-size: 1.15rem; letter-spacing: 0.06em; }
.missing { padding: 80px var(--gutter); }

/* ---------- 灯箱 ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: var(--dark); color: #e7e9e8;
}
.lightbox::backdrop { background: var(--dark); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 24px 24px 8px; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-bar {
  display: flex; gap: 12px 28px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px var(--gutter) 20px; font-size: 0.92rem;
}
.lb-bar p { color: #aab0ae; }
.lb-bar div { display: flex; gap: 24px; }
.lb-bar button {
  background: none; border: 0; padding: 6px 0; cursor: pointer; letter-spacing: 0.12em;
  border-bottom: 1px solid transparent; color: #e7e9e8;
}
.lb-bar button:hover { border-bottom-color: #7fa79d; }
.lightbox :focus-visible { outline-color: #9bc5ba; }

/* ---------- 关于 ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 110px); padding: clamp(40px, 6vw, 80px) var(--gutter) 0; align-items: start;
}
.about-photo { position: sticky; top: 24px; display: grid; gap: clamp(12px, 1.6vw, 20px); }
.about-photo img { width: 100%; height: auto; background: var(--seam); }
.about-body > * + * { margin-top: 1.1em; }
.about-body p { max-width: var(--measure); line-height: 2; }
.about-body h2 {
  font-size: 1rem; font-weight: 500; letter-spacing: 0.2em;
  margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--seam);
}
.field-list { display: flex; flex-wrap: wrap; gap: 8px 26px; max-width: var(--measure); }
.field-list li {
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  font-size: 0.9rem; letter-spacing: 0.1em; line-height: 1.8; color: var(--stone);
}
.about-lead { font-size: clamp(1.3rem, 2.2vw, 1.8rem); font-weight: 300; line-height: 1.8; letter-spacing: 0.04em; }
.plain-list li { padding: 6px 0; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.2em 1fr; padding: 8px 0; max-width: var(--measure); }
.steps li::before { content: counter(step); color: var(--river); font-variant-numeric: tabular-nums; }

/* ---------- 联系 ---------- */
.contact {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 110px); padding: clamp(40px, 6vw, 80px) var(--gutter) 0; align-items: start;
}
.contact-list { display: grid; gap: 22px; }
.contact-list dt { font-size: 0.85rem; color: var(--stone); letter-spacing: 0.1em; }
.contact-list dd { margin-top: 2px; }
.contact-list a { border-bottom: 1px solid var(--seam); }
.contact-list a:hover { border-bottom-color: var(--river); }
.qr { display: block; width: 160px; margin-top: 10px; background: var(--paper); }
.qr-note { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--stone); }
.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; color: var(--stone); letter-spacing: 0.08em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0; background: transparent; border: 0; border-bottom: 1px solid var(--stone);
  border-radius: 0; line-height: 1.6;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--river); box-shadow: 0 1px 0 var(--river); }
.form-note { font-size: 0.9rem; color: var(--stone); max-width: var(--measure); }
.form .btn { justify-self: start; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index-wrap { grid-template-columns: 1fr; }
  .preview { display: none; }
}
@media (max-width: 760px) {
  :root { --head: 60px; }
  .brand { letter-spacing: 0.1em; }
  .brand-lockup { letter-spacing: 0; gap: 12px; }
  .brand-lockup .brand-mark { width: 44px; height: 44px; }
  .brand-text .cn { font-size: 1.3rem; letter-spacing: 0.16em; }
  .brand-text .en { font-size: 0.7rem; letter-spacing: 0.12em; }
  .nav { gap: 14px; }
  .nav a { letter-spacing: 0.08em; }
  .honor-year { grid-template-columns: 1fr; }
  .hero { height: 78svh; min-height: 420px; }
  .hero { padding-left: 0; }
  .hero-figure { padding-right: 0; }
  .hero-figure figcaption { padding-left: var(--gutter); padding-right: var(--gutter); }
  .work-grid { grid-template-columns: 1fr; }
  .plates { grid-template-columns: 1fr; }
  .plate.half { grid-column: span 1; }
  .about, .contact { grid-template-columns: 1fr; }
  .about-photo { position: static; }
  .index a { grid-template-columns: 3.6em 1fr; }
  .index .ct { grid-column: 2; }
  .index .loc { grid-column: 2; }
  .index.noyear a { grid-template-columns: 1fr auto; }
  .index.noyear .ct { grid-column: auto; }
  .index.noyear .loc { grid-column: 1 / 3; }
}
@media (max-width: 760px) and (min-width: 480px) {
  .plates { grid-template-columns: 1fr 1fr; }
  .plate { grid-column: span 2; }
  .plate.half { grid-column: span 1; }
}
@media (max-width: 480px) {
  .brand:not(.brand-lockup) > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (max-width: 480px) {
  /* 首页：名称较长，导航移到名称下一行 */
  body[data-page="home"] .site-header { flex-wrap: wrap; height: auto; padding-top: 16px; padding-bottom: 10px; gap: 10px 0; }
  body[data-page="home"] .nav { width: 100%; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-figure .frame { animation: none; }
  .hero-figure img, .card .shot { transition: none; }
}

/* ---------- 中英文切换 ---------- */
.lang-switch {
  font: inherit; font-size: 0.82rem; letter-spacing: 0.1em; color: var(--stone);
  background: none; border: 0; border-bottom: 1px solid transparent; padding: 4px 0; cursor: pointer; white-space: nowrap;
}
.lang-switch:hover { color: var(--ink); border-bottom-color: var(--seam); }
html[lang="en"] .nav a, html[lang="en"] .filters button, html[lang="en"] .filter-label { letter-spacing: 0.04em; }
html[lang="en"] .brand-text .cn { font-size: 1.35rem; letter-spacing: 0.08em; }
html[lang="en"] .brand-text .en { letter-spacing: 0.1em; }
html[lang="en"] .page-title, html[lang="en"] .section-title { letter-spacing: 0.02em; }
html[lang="en"] .statement, html[lang="en"] .about-lead { letter-spacing: 0; }
@media (max-width: 480px) {
  html[lang="en"] .brand-text .cn { font-size: 1.1rem; }
  html[lang="en"] .nav { gap: 12px; }
}

/* ---------- 在路上 / 短片 ---------- */
.road-intro { margin-top: 20px; max-width: 40em; color: var(--stone); line-height: 1.9; }
.road-grid { padding: 0 var(--gutter) 80px; columns: 3 280px; column-gap: 24px; }
.road-item { display: block; margin-bottom: 24px; break-inside: avoid; }
.road-item img { width: 100%; height: auto; display: block; }
.film-list { list-style: none; padding: 0; margin: 24px 0 80px; display: grid; gap: 18px; }
.film-list span { display: block; color: var(--stone); font-size: 0.9rem; margin-top: 4px; }
#films-list, #road-grid:empty { padding-left: var(--gutter); padding-right: var(--gutter); }
@media (max-width: 760px) { .nav { gap: 12px; } .nav a { letter-spacing: 0.04em; font-size: 0.88rem; } .road-grid { padding: 0 20px 60px; } #films-list { padding: 0 20px; } }

.film-list { display: grid; gap: 56px; margin: 32px 0 80px; padding: 0 var(--gutter); max-width: 1200px; }
.film-list h2 { font-size: 1.1rem; font-weight: 400; margin-top: 14px; letter-spacing: 0.08em; }
.film-list p { color: var(--stone); font-size: 0.9rem; margin-top: 6px; }
.film-frame { aspect-ratio: 16 / 9; background: #000; }
.film-frame iframe, .film-frame video { width: 100%; height: 100%; border: 0; display: block; }
