/* Gallery Daham */
:root {
  --ink: #141414;
  --ink-2: #555;
  --ink-3: #8a8a8a;
  --line: #e4e4e4;
  --bg: #fff;
  --bg-2: #f6f5f3;
  --accent: #8b2471; /* 다함 직인 색 */
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 76px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.7; letter-spacing: -0.01em;
  word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3 { font-weight: 500; margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid transparent; transition: background .3s, border-color .3s;
}
/* blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block for the fixed mobile menu and clip it to 60px */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none; }
.site-header.over-hero:not(.scrolled)::before { backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 26px; width: auto; transition: filter .3s; }
.nav { display: flex; gap: clamp(20px, 3vw, 44px); align-items: center; font-size: 14px; letter-spacing: .04em; }
.nav a { position: relative; padding: 4px 0; text-transform: uppercase; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .25s; }
.nav a:hover::after, .nav a[aria-current]::after { right: 0; }
.nav .lang { color: var(--ink-3); padding-left: clamp(8px, 1.5vw, 20px); border-left: 1px solid var(--line); }
.menu-btn { display: none; width: 32px; height: 32px; position: relative; }
.menu-btn span:not(.sr) { position: absolute; left: 5px; right: 5px; height: 1.5px; background: currentColor; transition: transform .25s, top .25s; }
.menu-btn span:nth-child(1) { top: 12px; }
.menu-btn span:nth-child(2) { top: 19px; }
.menu-open .menu-btn span:nth-child(1) { top: 15.5px; transform: rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { top: 15.5px; transform: rotate(-45deg); }

/* header over the hero image (home) */
.site-header.over-hero { position: fixed; left: 0; right: 0; background: transparent; color: #fff; }
.site-header.over-hero .logo img { filter: invert(1); }
.site-header.over-hero .nav .lang { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.35); }
.site-header.over-hero.scrolled { background: rgba(255,255,255,.96); color: var(--ink); }
.site-header.over-hero.scrolled .logo img { filter: none; }
.site-header.over-hero.scrolled .nav .lang { color: var(--ink-3); border-color: var(--line); }

@media (max-width: 820px) {
  :root { --header-h: 60px; }
  .logo img { height: 22px; }
  .menu-btn { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; background: #fff; color: var(--ink);
    flex-direction: column; justify-content: center; gap: 28px; font-size: 22px;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .nav .lang { border: 0; padding: 0; font-size: 16px; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .site-header.over-hero { color: var(--ink); }
  .menu-open .site-header.over-hero .logo img { filter: none; }
  .menu-open .site-header.over-hero .nav .lang { color: var(--ink-3); }
  .logo { position: relative; z-index: 2; }
  .menu-open { overflow: hidden; }
}

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; background: #111; overflow: hidden; color: #fff; }
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; transform: scale(1.04); }
.hero-slide.on { opacity: 1; transform: scale(1); transition: opacity 1.6s ease, transform 7s ease-out; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.hero-caption {
  position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(40px, 8vh, 88px);
  display: flex; flex-direction: column; gap: 4px; max-width: min(720px, calc(100% - 2 * var(--gutter)));
}
@media (min-width: 1416px) { .hero-caption { left: calc((100vw - var(--wrap)) / 2 + var(--gutter)); } }
.hero-caption .tag { color: rgba(255,255,255,.8); }
.hero-title { font-size: clamp(28px, 4.4vw, 56px); font-weight: 400; line-height: 1.2; letter-spacing: -0.03em; }
.hero-artists { font-size: clamp(16px, 1.6vw, 20px); }
.hero-dates { font-size: 14px; color: rgba(255,255,255,.8); letter-spacing: .02em; }
.hero-caption:hover .hero-title { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.hero-dots { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(44px, 8vh, 92px); display: flex; gap: 10px; }
.hero-dots button { width: 28px; height: 2px; background: rgba(255,255,255,.4); }
.hero-dots button[aria-selected="true"] { background: #fff; }
@media (max-width: 820px) { .hero-dots { display: none; } }

/* ---------- common ---------- */
.tag { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.section { padding-top: clamp(56px, 8vw, 104px); }
.section:last-child { padding-bottom: clamp(72px, 10vw, 128px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 32px; border-top: 1px solid var(--ink); padding-top: 18px; }
.section-head h2, h2.year { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
h2.year { border-top: 1px solid var(--ink); padding-top: 18px; margin-bottom: 32px; }
.more { font-size: 14px; color: var(--ink-2); border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.more:hover { color: var(--ink); border-color: currentColor; }
.page-head { padding-top: clamp(48px, 7vw, 96px); }
.page-head h1 { font-size: clamp(34px, 5vw, 60px); font-weight: 400; letter-spacing: -0.035em; }
.empty { min-height: 40vh; color: var(--ink-2); }
.empty p + p { margin-top: 16px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(16px, 2.4vw, 32px); }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; }
.card-img { aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-text { padding-top: 16px; }
.card h3 { font-size: 19px; font-weight: 500; }
.card .artists { color: var(--ink); margin-top: 2px; }
.card .dates { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.card .tag { color: var(--accent); margin-bottom: 4px; }
.card-lg h3 { font-size: 24px; }

/* ---------- home intro band ---------- */
.intro-band { margin-top: clamp(72px, 10vw, 128px); background: var(--bg-2); padding: clamp(56px, 8vw, 104px) 0; }
.intro-inner { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.intro-lead { font-size: clamp(19px, 2.1vw, 26px); line-height: 1.6; font-weight: 300; letter-spacing: -0.02em; }
.intro-inner .more { justify-self: end; }
@media (max-width: 720px) { .intro-inner { grid-template-columns: 1fr; } .intro-inner .more { justify-self: start; } }

/* ---------- exhibitions list ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font-size: 14px; }
.filters button { color: var(--ink-3); padding: 2px 0; border-bottom: 1px solid transparent; }
.filters button:hover { color: var(--ink); }
.filters button.on { color: var(--ink); border-color: var(--ink); }

/* ---------- exhibition detail ---------- */
.ex-head { padding-top: clamp(48px, 7vw, 96px); max-width: var(--wrap); }
.ex-head h1 { font-size: clamp(32px, 5vw, 64px); font-weight: 400; letter-spacing: -0.035em; margin-top: 12px; max-width: 18em; }
.ex-artists { font-size: clamp(18px, 2vw, 22px); margin-top: 10px; }
.ex-dates { color: var(--ink-3); margin-top: 6px; letter-spacing: .02em; }
.ex-cover { margin-top: clamp(32px, 5vw, 56px); margin-bottom: 0; }
.ex-cover img { width: 100%; max-height: 82vh; object-fit: cover; background: var(--bg-2); margin: 0 auto; }
.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--line); margin-top: clamp(40px, 6vw, 72px); }
.tabs button { padding: 14px 0; margin-bottom: -1px; border-bottom: 1px solid transparent; font-size: 15px; color: var(--ink-3); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.tabs .count { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.tab-panel { padding-top: clamp(32px, 5vw, 56px); }
.overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.overview:not(:has(.ex-poster)) { grid-template-columns: minmax(0, 760px); }
.ex-text p { margin-bottom: 1.2em; max-width: 40em; }
.ex-text .note { color: var(--ink-3); }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; }
.meta dt { color: var(--ink-3); }
.meta dd { margin: 0; }
.ex-poster { display: grid; gap: 16px; }
.ex-poster img { width: 100%; box-shadow: 0 1px 0 var(--line), 0 12px 32px rgba(0,0,0,.08); }
@media (max-width: 820px) { .overview { grid-template-columns: 1fr; } .ex-poster { max-width: 360px; } }
.masonry { columns: 3 300px; column-gap: clamp(12px, 2vw, 24px); }
.masonry figure { break-inside: avoid; margin: 0 0 clamp(12px, 2vw, 24px); }
.masonry img { width: 100%; background: var(--bg-2); transition: opacity .2s; }
.masonry a:hover img { opacity: .88; }
.masonry figcaption { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.ex-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: clamp(72px, 10vw, 128px); padding-top: 24px; padding-bottom: clamp(72px, 10vw, 128px); }
.ex-nav a { display: flex; flex-direction: column; gap: 4px; max-width: 45%; font-size: 17px; }
.ex-nav a span { font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }
.ex-nav .newer { text-align: right; margin-left: auto; }
.ex-nav a:hover { color: var(--accent); }
.exhibition .ex-nav { border-top: 1px solid var(--line); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(255,255,255,.98); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; object-fit: contain; }
.lightbox figcaption { font-size: 13px; color: var(--ink-2); margin-top: 12px; text-align: center; }
.lightbox button { position: absolute; font-size: 40px; font-weight: 200; line-height: 1; width: 64px; height: 64px; color: var(--ink); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--ink-3); }
@media (max-width: 720px) {
  .lightbox figure { max-width: 100vw; }
  .lb-prev, .lb-next { top: auto; bottom: 4px; transform: none; }
}

/* ---------- about ---------- */
.about-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-top: clamp(40px, 6vw, 72px); align-items: start; }
.about-text p { margin-bottom: 1.2em; color: var(--ink-2); }
.about-text .lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.6; color: var(--ink); font-weight: 300; }
@media (max-width: 820px) { .about-intro { grid-template-columns: 1fr; } }
.space-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(12px, 2vw, 24px); }
.space-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px clamp(24px, 4vw, 56px); }
.history h3 { font-size: 28px; font-weight: 300; margin-bottom: 12px; }
.history ul { list-style: none; margin: 0; padding: 0; }
.history li { border-top: 1px solid var(--line); }
.history li a { display: block; padding: 9px 0; font-size: 15px; }
.history li a:hover { color: var(--accent); }
.h-date { color: var(--ink-3); font-variant-numeric: tabular-nums; margin-right: 8px; }
.h-artist { color: var(--ink-3); }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(72px, 10vw, 128px); }
.service { border-top: 1px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.service-num { font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.service h2 { font-size: 26px; font-weight: 400; }
.service h2 .en { display: block; font-size: 13px; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; font-weight: 500; }
.service p { color: var(--ink-2); flex: 1; }
.service .more { align-self: flex-start; }
@media (max-width: 820px) { .services { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(72px, 10vw, 128px); }
.contact h2 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; border-top: 1px solid var(--ink); padding-top: 18px; margin-bottom: 24px; }
.contact dl { display: grid; grid-template-columns: 110px 1fr; gap: 12px 16px; margin: 0; }
.contact dt { color: var(--ink-3); font-size: 14px; padding-top: 2px; }
.contact dd { margin: 0; }
.contact dd a:hover { color: var(--accent); }
.map { margin-top: 32px; aspect-ratio: 4 / 3; background: var(--bg-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink-2); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 0; border-bottom: 1px solid #c9c9c9; border-radius: 0; padding: 8px 0; outline: none; transition: border-color .2s;
}
.contact-form textarea { border: 1px solid #c9c9c9; padding: 10px 12px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--ink); }
.contact-form .invalid { border-color: #c0392b; }
.contact-form button[type="submit"] { align-self: flex-start; margin-top: 8px; background: var(--ink); color: #fff; padding: 12px 36px; font-size: 15px; letter-spacing: .04em; transition: background .2s; }
.contact-form button[type="submit"]:hover { background: var(--accent); }
.form-status { font-size: 14px; color: var(--accent); min-height: 1.5em; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } .contact dl { grid-template-columns: 90px 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 28px; font-size: 13px; color: var(--ink-2); line-height: 1.8; }
.page-home .site-footer { border-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: 24px; }
.footer-name { color: var(--ink); font-weight: 600; }
.footer-links { display: flex; gap: 20px; justify-content: flex-end; }
.footer-links a:hover, .site-footer a:hover { color: var(--ink); }
.copyright { margin-top: 28px; color: var(--ink-3); font-size: 12px; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } .footer-links { justify-content: flex-start; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
