:root {
  --bg: #ffffff;
  --ink: #141210;
  --ink-soft: #5f5a55;
  --ink-faint: #8a847e;
  --line: #e4e1dd;
  --mist: #f3f2f0;
  --clay: #a3311b;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --latin: "Cormorant Garamond", "Noto Serif KR", serif;
  --sans: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; }

/* ── 상단 ───────────────────────── */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px var(--gutter);
}
.mark { font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: .28em; text-decoration: none; }
.top nav { display: flex; gap: clamp(16px, 2.6vw, 36px); font-size: 13px; letter-spacing: .12em; }
.top nav a { text-decoration: none; position: relative; }
.top nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--clay); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.top nav a:hover::after { transform: scaleX(1); }

/* ── 세로 구역 표시 ───────────────── */
.side-label {
  position: fixed; left: calc(var(--gutter) - 4px); top: 50%; z-index: 15;
  margin: 0; transform: translateY(-50%);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; letter-spacing: .3em; color: var(--ink-faint);
  opacity: 0; transition: opacity .5s ease;
}
.side-label.show { opacity: 1; }
.side-label i { width: 1px; height: 36px; background: currentColor; }
.side-label #sideName { color: var(--ink); transition: opacity .3s ease; }

/* ── 첫 화면 ───────────────────── */
.stage {
  position: relative;
  height: 100svh; min-height: 560px;
  overflow: hidden;
  background: var(--bg);
  user-select: none;
  touch-action: pan-y;
}
.hero-name {
  position: absolute; left: 50%; top: 31%; z-index: 0;
  margin: 0; transform: translate(-50%, -50%);
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(110px, 23vw, 380px); line-height: 1;
  letter-spacing: .06em; white-space: nowrap;
  color: var(--ink);
  pointer-events: none;
}
.hero-role {
  position: absolute; left: -.5em; top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: max(13px, .07em); font-weight: 600; letter-spacing: .5em;
  color: var(--ink);
}
.hero-motto {
  position: absolute; right: var(--gutter); top: 12%; z-index: 4; margin: 0;
  font-family: var(--serif); font-weight: 300; font-size: clamp(15px, 1.4vw, 19px);
  letter-spacing: .2em; color: var(--ink);
}
.track { position: absolute; inset: 0; z-index: 2; }

.card {
  --w: min(20vw, 40svh);
  position: absolute; left: 50%; top: 61%;
  width: var(--w); aspect-ratio: 4 / 5;
  margin: 0; padding: 0; border: 0; border-radius: 0;
  overflow: hidden;
  background: var(--mist);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 1.1s var(--ease), opacity .7s ease, filter .8s ease;
  will-change: transform;
}
.card:not(.is-active) { filter: grayscale(.85) contrast(.95); }
.card.is-active.is-open { cursor: zoom-out; }
.card.no-anim { transition: none; }
.card img {
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 1.8s var(--ease);
}
.card:not(.is-active) img { transform: scale(1.08); }
.card:focus-visible { outline: 1px solid var(--clay); outline-offset: 6px; }

.nav-btn {
  position: absolute; top: 61%; z-index: 5;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--ink); background: var(--bg);
  color: var(--ink); font: inherit; font-size: 15px; cursor: pointer;
  transform: translateY(-50%);
  opacity: 0; transition: opacity .3s ease, background .3s ease, color .3s ease;
}
.nav-btn:hover { background: var(--ink); color: var(--bg); }
.stage:hover .nav-btn, .nav-btn:focus-visible { opacity: 1; }
.prev { left: var(--gutter); }
.next { right: var(--gutter); }

.caption {
  position: absolute; inset: auto 0 0 0; z-index: 5;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px;
  padding: 0 var(--gutter) 30px;
  font-size: 12px; letter-spacing: .04em; color: var(--ink-soft);
}
.cap-count { display: flex; align-items: center; gap: 12px; font-family: var(--latin); font-size: 15px; color: var(--ink); font-variant-numeric: lining-nums; }
.cap-count i { width: 40px; height: 1px; background: var(--ink); }
.cap-info { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.cap-info b { font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: .12em; color: var(--ink); }
.cap-info > * { transition: opacity .35s ease; }
.caption.swap .cap-info > * { opacity: 0; }
.cap-hint { justify-self: end; font-family: var(--latin); font-style: italic; font-size: 15px; letter-spacing: .04em; }

/* ── 공통 ───────────────────────── */
main { position: relative; }
.sec-title {
  margin: 0 0 56px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5.4vw, 72px); line-height: 1.2; letter-spacing: .02em;
}
.sec-title em, .col-big em, .dropcap-text em, .contact-line em { font-weight: 900; }
.cta {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 36px;
  font-family: var(--serif); font-size: 14px; letter-spacing: .14em;
  text-decoration: none;
}
.cta i { width: 26px; height: 12px; background: var(--clay); transform-origin: left; transition: transform .4s var(--ease); }
.cta:hover i { transform: scaleX(1.7); }
.cta.center { display: flex; justify-content: center; }

/* ── 소개 (큰 첫 글자) ───────────── */
.intro { padding: clamp(120px, 16vw, 220px) var(--gutter) clamp(80px, 10vw, 140px); }
.dropcap-text {
  position: relative;
  max-width: 760px; margin: 0 auto;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(21px, 2.4vw, 32px); line-height: 1.75;
}
.dropcap {
  position: absolute; z-index: -1;
  left: -.75em; top: -.9em;
  font-weight: 900; font-size: 5.2em; line-height: 1;
  color: var(--mist);
}

/* ── 콜라주 ───────────────────────── */
.collage-wrap { padding: 0 var(--gutter) clamp(100px, 12vw, 180px) calc(var(--gutter) + 56px); }
.collage { position: relative; max-width: 1180px; height: clamp(380px, 52vw, 680px); margin: 0 auto; }
.collage figure { position: absolute; margin: 0; overflow: hidden; }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage .c1 { left: 0; top: 18%; width: 42%; aspect-ratio: 1; filter: grayscale(1); }
.collage .c2 { left: 30%; top: 0; width: 30%; aspect-ratio: 4 / 5; z-index: 2; }
.collage .c3 { right: 0; top: 8%; width: 40%; aspect-ratio: 4 / 3; filter: grayscale(1); }
.c-line { position: absolute; left: 4%; bottom: 6%; width: 92%; height: 70%; z-index: 3; overflow: visible; pointer-events: none; }
.c-line line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }

.two-col {
  max-width: 1180px; margin: clamp(48px, 6vw, 80px) auto 0;
  display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 96px); align-items: start;
}
.col-small { text-align: right; justify-self: end; max-width: 330px; }
.col-small p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--ink-soft); }
.col-big { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.55; color: var(--ink); }

/* ── 작품 목록 (큰 제목을 지그재그로) ──── */
.works { padding: clamp(80px, 10vw, 140px) var(--gutter) clamp(100px, 12vw, 160px); border-top: 1px solid var(--line); }
.work-index { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.work-index li { display: flex; }
.work-index li:nth-child(6n+1) { justify-content: flex-start; padding-left: 8%; }
.work-index li:nth-child(6n+2) { justify-content: center; }
.work-index li:nth-child(6n+3) { justify-content: flex-end; padding-right: 4%; }
.work-index li:nth-child(6n+4) { justify-content: flex-start; padding-left: 18%; }
.work-index li:nth-child(6n+5) { justify-content: flex-end; padding-right: 14%; }
.work-index li:nth-child(6n+6) { justify-content: center; }
.work-index button {
  display: inline-flex; align-items: baseline; gap: 16px;
  padding: 6px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--serif); font-weight: 400; color: var(--ink);
  font-size: clamp(30px, 5.2vw, 70px); line-height: 1.3; letter-spacing: .02em;
  transition: color .3s ease;
}
.work-index button sup { font-family: var(--latin); font-size: 15px; color: var(--ink-faint); letter-spacing: .04em; }
.work-index:hover button { color: #cfcac5; }
.work-index button:hover, .work-index button:focus-visible { color: var(--clay); outline: none; }
.work-index button small { align-self: center; font-family: var(--sans); font-size: 12px; letter-spacing: .08em; color: var(--ink-faint); opacity: 0; transition: opacity .3s ease; }
.work-index button:hover small, .work-index button:focus-visible small { opacity: 1; }

.hover-peek {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: 240px; aspect-ratio: 4 / 5;
  background: var(--mist) center / cover no-repeat;
  pointer-events: none;
  opacity: 0; transform: translate(-50%, -50%) scale(.9);
  transition: opacity .3s ease, transform .5s var(--ease);
}
.hover-peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ── 작업 ───────────────────────── */
.process { max-width: 1180px; margin: 0 auto; padding: clamp(100px, 12vw, 160px) var(--gutter); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); }
.steps li { border-top: 1px solid var(--ink); padding-top: 22px; }
.steps .num { display: block; margin-bottom: 40px; font-family: var(--latin); font-style: italic; font-size: 28px; color: var(--clay); }
.steps h3 { margin: 0 0 14px; font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: .06em; }
.steps p { margin: 0; color: var(--ink-soft); line-height: 1.9; font-size: 15px; }
.note { margin: 64px 0 0; max-width: 60ch; color: var(--ink-soft); line-height: 1.9; font-size: 15px; }

/* ── 전시 (연회색 + 큰 흐린 글자) ───── */
.exhibition { position: relative; overflow: hidden; background: var(--mist); padding: clamp(100px, 12vw, 170px) var(--gutter); }
.watermark {
  position: absolute; left: 50%; top: 2%; transform: translateX(-50%);
  font-family: var(--serif); font-weight: 900; font-size: clamp(200px, 34vw, 560px); line-height: 1;
  color: #e8e6e3; white-space: nowrap; pointer-events: none;
}
.ex-inner { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 80px 1fr; gap: 24px; }
.v-date { margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); justify-self: center; font-family: var(--latin); font-size: 15px; letter-spacing: .14em; color: var(--ink-soft); }
.ex-meta { margin: -28px 0 48px; font-size: 15px; line-height: 1.8; color: var(--ink-soft); }
.ex-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(16px, 2vw, 28px); align-items: end; }
.ex-grid figure { margin: 0; overflow: hidden; }
.ex-grid img { width: 100%; height: 100%; object-fit: cover; }
.ex-grid figure:last-child { aspect-ratio: 1; }

/* ── 기록 ───────────────────────── */
.press { max-width: 1180px; margin: 0 auto; padding: clamp(100px, 12vw, 160px) var(--gutter) 0; }
.press-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.press-list a {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.p-date { font-family: var(--latin); font-size: 17px; color: var(--ink-faint); }
.p-title { font-family: var(--serif); font-size: clamp(18px, 2vw, 26px); transition: color .3s ease; }
.p-src { font-size: 12px; letter-spacing: .12em; color: var(--ink-soft); }
.press-list a:hover .p-title { color: var(--clay); }

/* ── 문의 ───────────────────────── */
.contact { padding: clamp(120px, 14vw, 200px) var(--gutter); text-align: center; }
.contact-line { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 3.6vw, 46px); line-height: 1.6; }

.site-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--gutter); border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-faint);
}

/* ── 스크롤 등장 ───────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1.2s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── 좁은 화면 ───────────────────── */
@media (max-width: 860px) {
  .side-label { display: none; }
  .top nav a:nth-child(n+3) { display: none; }
  .card { --w: min(46vw, 40svh); }
  .hero-role { display: none; }
  .hero-motto { left: var(--gutter); right: auto; top: 86px; bottom: auto; font-size: 13px; }
  .caption { grid-template-columns: auto 1fr; }
  .cap-info { align-items: flex-end; text-align: right; }
  .cap-hint { display: none; }
  .nav-btn { display: none; }
  .dropcap { left: -.2em; }
  .collage { height: 120vw; }
  .collage .c1 { top: 34%; width: 62%; }
  .collage .c2 { left: auto; right: 0; width: 52%; }
  .collage .c3 { left: 0; right: auto; top: 0; width: 44%; }
  .two-col, .steps { grid-template-columns: 1fr; }
  .col-small { text-align: left; justify-self: start; order: 2; }
  .work-index li { justify-content: flex-start !important; padding: 0 !important; }
  .work-index button small { display: none; }
  .ex-inner { grid-template-columns: 1fr; }
  .v-date { writing-mode: horizontal-tb; transform: none; justify-self: start; }
  .ex-grid { grid-template-columns: 1fr; }
  .press-list a { grid-template-columns: 64px 1fr; }
  .p-src { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card img, .reveal { transition: none; }
  .reveal { opacity: 1; transform: none; }
}
