/* Zheng Zhang — ceramic sculpture
   Minimalist, quiet gallery design. System fonts only. */

:root {
  --bg: #fafafa;
  --ink: #1b1b1a;
  --ink-soft: #55554f;
  --hairline: #e4e4de;
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}

a:hover {
  border-bottom-color: var(--ink);
}

/* ---------- header ---------- */

.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 20px;
  display: flex;
  align-items: baseline;
  gap: 32px;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: none;
  margin-right: auto;
}

.site-nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

.site-nav a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: none;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  padding: 10px 12px;
  background: var(--bg, #fff);
  min-width: 150px;
  z-index: 50;
}

.dropdown-menu a {
  display: block;
  padding: 6px 0;
  white-space: nowrap;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

.lang-toggle {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.lang-toggle button {
  background: none;
  border: none;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0 2px;
}

.lang-toggle button.active {
  color: var(--ink);
  font-weight: 600;
}

.lang-toggle .sep {
  opacity: 0.4;
}

/* ---------- layout ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0 8px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 44px;
}

.sub-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 40px 0 14px;
}

.body-text {
  max-width: 640px;
  color: #2c2c2a;
  margin-bottom: 18px;
}

/* ---------- hero ---------- */

.hero {
  padding: 56px 0 8px;
  text-align: center;
}

.hero-figure picture {
  display: block;
}

.hero-figure img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.hero-name {
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-top: 44px;
}

.hero-line {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* 方案 A（2026-10-15 用户已选）：桌面端 hero 容器定死 1.41:1（与横版图 1179×836 同比），
   图 object-fit: cover 铺满整列，1920 宽屏两侧不再留白。手机端（≤700px）仍用竖版图 + contain，不动。 */
@media (min-width: 701px) {
  .hero-figure {
    aspect-ratio: 1179 / 836;
  }

  .hero-figure picture {
    height: 100%;
  }

  .hero-figure img {
    height: 100%;
    max-height: none;
    object-fit: cover;
  }
}

/* ---------- series & works ---------- */

.series {
  margin-bottom: 64px;
}

.series-title {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.series-text {
  color: #2c2c2a;
  padding: 28px 0;
  text-align: justify;
}

.series-text + .series-text {
  padding-top: 0;
}

.featured {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  align-items: start;
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
}

.featured:first-of-type {
  border-top: none;
  padding-top: 8px;
}

.featured figcaption {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.work-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-meta {
  font-size: 13px;
  color: var(--ink-soft);
}

.work-desc {
  color: #2c2c2a;
  padding-top: 4px;
}

/* ---------- grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
}

.grid-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* portrait works: show the whole piece instead of cropping */
.grid-item img.show-full {
  object-fit: contain;
}

.grid-item figcaption {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- magnifier lens (grid thumbnails) ---------- */

.lens {
  position: fixed;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
  background: var(--bg);
  pointer-events: none;
  z-index: 80;
  display: none;
}

.lens img {
  object-fit: cover;
  max-width: none;
}

.grid-item .ph {
  cursor: zoom-in;
}

.grid-item:hover img {
  transform: none; /* the lens replaces the gentle hover zoom */
}

.grid-item figcaption {
  cursor: pointer;
}

.grid-item figcaption:hover {
  color: var(--ink);
}

/* ---------- maple lineage: six small thumbnails in one row ---------- */

.grid.maple-thumbs {
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  padding-top: 32px;
}

.grid.maple-thumbs .grid-item figcaption {
  font-size: 10px;
  margin-top: 8px;
}

@media (max-width: 700px) {
  .grid.maple-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(94, 86, 83, 0.9); /* 半透明：背后隐约可见页面，强化浮空图层感 */
}

.lightbox.open {
  display: block;
}

.lightbox-stage {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(90vw, 1100px);
  height: 78vh;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background: transparent; /* 与半透明浮层融为一体，照片直接浮在上面 */
}

.lightbox-stage.dragging {
  cursor: grabbing;
}

.lightbox-content {
  position: absolute;
  left: 50%;
  top: 50%;
  will-change: transform;
}

.lightbox-content img {
  display: block;
  max-width: none;
  transform: translate(-50%, -50%);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4vh;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #dedcd8;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 28px;
  background: none;
  border: none;
  font-size: 36px;
  line-height: 1;
  color: #cfcdc9;
  cursor: pointer;
  padding: 4px 8px;
}

.lightbox-close:hover {
  color: #fff;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  color: #cfcdc9;
  padding: 10px;
  user-select: none;
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 44px;
  height: 44px;
  display: block;
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
}

/* ---------- footer ---------- */

.site-footer {
  max-width: var(--max);
  margin: 72px auto 0;
  padding: 22px 24px 40px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .featured {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-name {
    font-size: 26px;
  }
}

@media (max-width: 560px) {
  .site-header {
    flex-wrap: wrap;
    gap: 10px 20px;
  }

  .brand {
    margin-right: auto;
    white-space: nowrap;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 8px 18px;
    order: 3;
    width: 100%;
  }

  /* FR words are longer — tighten only the French nav so CONTACT stays on one line */
  html[lang="fr"] .site-nav {
    gap: 8px 12px;
  }

  html[lang="fr"] .site-nav a {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 48px;
  }
}

/* ---------- subtle motion (JS-enhanced; off for reduced motion) ---------- */

.ph {
  display: block;
  overflow: hidden;
}

.featured figure img,
.grid-item img {
  transition: transform 1.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.featured figure:hover img,
.grid-item:hover img {
  transform: scale(1.025);
}

.hero-figure {
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-figure img {
    animation: heroDrift 26s ease-in-out infinite alternate;
  }

  html.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.9s ease, transform 0.9s ease;
  }

  html.js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroDrift {
  from { transform: scale(1); }
  to { transform: scale(1.045) translateY(-6px); }
}
