/* ==========================================================================
   Gallery pages — shared styles
   ========================================================================== */

/* Hero ----------------------------------------------------------------------*/
.g-hero {
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--ink);
}
.g-hero .hero-logo {
  height: clamp(56px, 7vw, 88px);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
}
.g-hero .hero-logo img {
  max-height: 100%;
  max-width: 320px;
  width: auto;
  object-fit: contain;
}
.g-hero .hero-logo img.wide { max-width: 260px; }

/* Allow .ph to hold a real <img> as the actual asset */
.ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.2,0.7,0.2,1);
}
.ph:has(img) { background-image: none; background-color: var(--ink); }
.ph:has(img)::before { display: none; }
.work:hover .ph img { transform: scale(1.03); }
.g-hero .crumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.g-hero .crumb a:hover { color: var(--ink); }
.g-hero .crumb .sep { opacity: 0.4; }
.g-hero .crumb .cur { color: var(--accent); }

.g-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
@media (max-width: 880px) {
  .g-hero-grid { grid-template-columns: 1fr; gap: 40px; }
}

.g-hero .fair-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.g-hero .fair-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

.g-hero h1 {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(44px, 8vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.g-hero h1 .ital { font-style: italic; }
.g-hero .zh-title {
  font-family: var(--serif-zh);
  font-size: clamp(20px, 2.4vw, 30px);
  color: var(--ink-soft);
  margin-top: 20px;
}
.g-hero .lede {
  font-family: var(--serif-zh);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.g-hero .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.g-hero .stats .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.g-hero .stats .v {
  font-family: var(--serif-en);
  font-size: 20px;
}
.g-hero .stats .v small {
  display: block;
  font-family: var(--serif-zh);
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Sections -----------------------------------------------------------------*/
.g-section {
  padding: clamp(72px, 10vw, 140px) var(--gutter);
}
.g-section.alt { background: var(--bg-soft); }
.g-section.dark { background: var(--ink); color: var(--bg); }
.g-section.dark .text-muted { color: color-mix(in oklch, var(--bg) 60%, transparent); }

.g-sec-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(48px, 7vw, 88px);
  align-items: end;
}
.g-section.dark .g-sec-head { border-bottom-color: var(--bg); }
@media (max-width: 720px) { .g-sec-head { grid-template-columns: 1fr; gap: 16px; } }
.g-sec-head .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 18px;
}
.g-section.dark .g-sec-head .lbl { color: color-mix(in oklch, var(--bg) 55%, transparent); }
.g-sec-head h2 {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.g-sec-head h2 .ital { font-style: italic; }
.g-sec-head h2 .accent { color: var(--accent); }
.g-sec-head .right {
  font-family: var(--serif-zh);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 480px;
  justify-self: end;
}
.g-section.dark .g-sec-head .right { color: color-mix(in oklch, var(--bg) 70%, transparent); }

/* Artist card ---------------------------------------------------------------*/
.artist-list { display: grid; gap: 0; }
.artist-row {
  display: grid;
  grid-template-columns: 56px 1fr 1.5fr;
  gap: clamp(20px, 3vw, 56px);
  padding: clamp(32px, 4vw, 56px) 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.artist-row:last-child { border-bottom: 1px solid var(--rule); }
.artist-row .idx {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  padding-top: 8px;
}
.artist-row .name-block { display: flex; flex-direction: column; gap: 6px; }
.artist-row .name-en {
  font-family: var(--serif-en);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.artist-row .name-en .ital { font-style: italic; }
.artist-row .name-zh {
  font-family: var(--serif-zh);
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--ink);
}
.artist-row .meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 12px;
}
.artist-row .desc {
  font-family: var(--serif-zh);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.artist-row .desc + .desc { margin-top: 12px; }

/* Dark-section variants — artist text needs to flip to light */
.g-section.dark .artist-row { border-top-color: color-mix(in oklch, var(--bg) 18%, transparent); }
.g-section.dark .artist-row:last-child { border-bottom-color: color-mix(in oklch, var(--bg) 18%, transparent); }
.g-section.dark .artist-row .idx { color: color-mix(in oklch, var(--bg) 55%, transparent); }
.g-section.dark .artist-row .name-en { color: var(--bg); }
.g-section.dark .artist-row .name-zh { color: var(--bg); }
.g-section.dark .artist-row .meta { color: color-mix(in oklch, var(--bg) 55%, transparent); }
.g-section.dark .artist-row .desc { color: color-mix(in oklch, var(--bg) 78%, transparent); }

/* Works grid + meta on dark sections */
.g-section.dark .work .meta { color: color-mix(in oklch, var(--bg) 55%, transparent); }
.g-section.dark .work .title { color: var(--bg); }
.g-section.dark .work .title-zh { color: color-mix(in oklch, var(--bg) 70%, transparent); }
.g-section.dark .work .spec { color: color-mix(in oklch, var(--bg) 55%, transparent); }

@media (max-width: 720px) {
  .artist-row { grid-template-columns: 36px 1fr; }
  .artist-row .desc-col { grid-column: 1 / -1; padding-left: 36px; }
}

/* Image grid for artist works ----------------------------------------------*/
.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
@media (max-width: 720px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}
.work {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.work .ph {
  transition: transform 0.5s cubic-bezier(0.2,0.7,0.2,1);
}
.work:hover .ph { transform: scale(1.015); }
.work .meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.work .title {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
}
.work .title-zh {
  font-family: var(--serif-zh);
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: -8px;
}
.work .spec {
  font-family: var(--serif-zh);
  font-size: 13px;
  color: var(--ink-muted);
}

/* Booth info block ---------------------------------------------------------*/
.booth-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 880px) { .booth-info { grid-template-columns: 1fr; gap: 32px; } }
.booth-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.booth-meta .row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.g-section.dark .booth-meta .row { border-bottom-color: color-mix(in oklch, var(--bg) 18%, transparent); }
.booth-meta .row .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.g-section.dark .booth-meta .row .k { color: color-mix(in oklch, var(--bg) 55%, transparent); }
.booth-meta .row .v {
  font-family: var(--serif-en);
  font-size: 17px;
  line-height: 1.5;
}
.booth-meta .row .v small {
  display: block;
  font-family: var(--serif-zh);
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 2px;
}
.g-section.dark .booth-meta .row .v small { color: color-mix(in oklch, var(--bg) 60%, transparent); }

/* Page nav between galleries -----------------------------------------------*/
.next-gallery {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  border-top: 1px solid var(--ink);
}
.next-gallery a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  group: link;
}
.next-gallery .lab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.next-gallery h3 {
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: color 0.25s;
}
.next-gallery h3 .ital { font-style: italic; }
.next-gallery h3 small {
  display: block;
  font-family: var(--serif-zh);
  font-size: 16px;
  color: var(--ink-soft);
  margin-top: 8px;
  letter-spacing: 0;
}
.next-gallery .arrow {
  font-family: var(--serif-en);
  font-size: clamp(40px, 6vw, 80px);
  color: var(--ink-muted);
  transition: transform 0.3s, color 0.3s;
}
.next-gallery a:hover h3 { color: var(--accent); }
.next-gallery a:hover .arrow { transform: translateX(12px); color: var(--accent); }

/* Curatorial statement block -----------------------------------------------*/
.statement {
  max-width: 900px;
}
.statement p {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.45;
  color: var(--ink);
}
.g-section.dark .statement p { color: var(--bg); }
.statement p + p { margin-top: 28px; }
.statement .zh {
  font-family: var(--serif-zh);
  font-style: normal;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-top: 32px;
}
.g-section.dark .statement .zh { color: color-mix(in oklch, var(--bg) 70%, transparent); }
.statement .quote-mark {
  font-family: var(--serif-en);
  font-size: clamp(80px, 12vw, 180px);
  font-style: italic;
  line-height: 0.6;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}

/* Placeholder marker (待畫廊提供補充) */
.placeholder-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px dashed var(--accent);
  background: color-mix(in oklch, var(--accent) 4%, transparent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-style: normal;
}
.placeholder-note::before {
  content: '◇';
  font-family: var(--serif-en);
  font-size: 12px;
}
.g-section.dark .placeholder-note {
  border-color: color-mix(in oklch, var(--bg) 30%, transparent);
  color: color-mix(in oklch, var(--bg) 80%, transparent);
  background: color-mix(in oklch, var(--bg) 6%, transparent);
}
.placeholder-block {
  padding: 24px;
  border: 1px dashed var(--accent);
  background: color-mix(in oklch, var(--accent) 3%, transparent);
  font-family: var(--serif-zh);
  font-size: 14px;
  color: var(--accent);
  line-height: 1.8;
  letter-spacing: 0.04em;
}
.placeholder-block small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0.75;
}
.g-section.dark .placeholder-block {
  border-color: color-mix(in oklch, var(--bg) 30%, transparent);
  background: color-mix(in oklch, var(--bg) 6%, transparent);
  color: color-mix(in oklch, var(--bg) 80%, transparent);
}
