/* cha hyun seok — photographic studio
   기존 Wix 디자인(흰 바탕, 가운데 정렬, 가는 산세리프 메뉴, 10px 간격 사진 열)을 재현합니다. */

:root {
  --ink: #292929;
  --muted: #a0a09f;
  --foot: #605e5e;
  --bg: #ffffff;
  --gap: 10px;
  --col: 800px;            /* 페이지별로 JS 가 바꿈 (photo 800, video/personal 1000) */
  --font: "Jost", "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; }

/* ───────── header ───────── */
.site-header {
  text-align: center;
  padding: 24px 16px 0;
}
.logo { display: inline-block; }
.logo img { width: 456px; max-width: 100%; height: auto; }
.logo-text { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.logo-name { font-weight: 400; font-size: 58px; letter-spacing: 0.5px; }
.logo-sub { font-size: 16px; margin-top: 4px; margin-right: 4px; }

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}
.site-nav a {
  font-size: 23px;
  line-height: 40px;
  min-width: 137px;
  padding: 0 10px;
  color: var(--ink);
  transition: color .2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--muted); }

/* ───────── page ───────── */
.page {
  flex: 1;
  width: 100%;
  max-width: calc(var(--col) + 32px);
  margin: 0 auto;
  padding: 26px 16px 120px;
}
.page-title {
  margin: 0 0 28px;
  text-align: center;
  font-size: 28px;
  font-weight: 300;
  line-height: 40px;
  color: var(--muted);
}

/* 사진 줄: 같은 줄의 사진은 높이가 같고, 폭 합이 정확히 열 폭과 같아집니다. */
.gallery { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; gap: var(--gap); }
.cell {
  position: relative;
  flex-basis: 0;
  min-width: 0;
  overflow: hidden;
  background: #f3f3f3;
  cursor: zoom-in;
  border: 0; padding: 0; margin: 0;
  display: block; width: 100%;
}
.cell img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform .6s; opacity: 0; }
.cell img.loaded { opacity: 1; }
.cell:hover img { transform: scale(1.01); }
.cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.cell.is-video { cursor: pointer; }
.cell .play {
  position: absolute; inset: 0; margin: auto;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,0,0,.35);
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.cell .play::after {
  content: ""; margin-left: 5px;
  border-style: solid; border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}
.cell:hover .play { background: rgba(0,0,0,.55); transform: scale(1.05); }

/* 마우스를 올리면 설명이 서서히 나타나는 오버레이 (마우스가 있는 기기에서만) */
.cap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px; text-align: center;
  background: rgba(20, 20, 20, .45);
  color: #fff;
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.cap-title { font-size: 19px; font-weight: 400; letter-spacing: .3px; line-height: 1.4; }
.cap-desc { font-size: 14px; line-height: 1.6; opacity: .88; max-width: 34em; white-space: pre-line; }
.cell.is-video .cap { justify-content: flex-end; padding-bottom: 22px; }
@media (hover: hover) and (pointer: fine) {
  .cell:hover .cap, .cell:focus-visible .cap { opacity: 1; }
}

.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }

/* contact */
/* contact: 제목 아래 일정 간격에 붙여 로고·메뉴·제목과 한 흐름으로 읽히게 */
.contact { text-align: center; font-size: 20px; line-height: 1.9; color: var(--ink); letter-spacing: .2px; margin-top: 80px; }
.contact a:hover { color: var(--ink); }

/* ───────── footer (기존처럼 화면 아래 고정, 반투명) ───────── */
.footer-link[href] { color: inherit; transition: color .2s; }
.footer-link[href]:hover { color: var(--ink); }
.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  text-align: center;
  font-size: 14px;
  color: var(--foot);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ───────── lightbox ───────── */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(255,255,255,.98);
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  grid-template-rows: 1fr auto;
  align-items: center;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lb-stage {
  grid-column: 2; grid-row: 1;
  height: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 0 8px;
}
.lb-stage img, .lb-stage video, .lb-stage iframe {
  max-width: 100%; max-height: calc(100vh - 110px);
  object-fit: contain; background: transparent;
}
.lb-stage video { background: #000; }
.lb-stage iframe { width: min(100%, calc((100vh - 110px) * 16 / 9)); aspect-ratio: 16 / 9; border: 0; height: auto; }
.lb-caption {
  grid-column: 1 / -1; grid-row: 2;
  text-align: center; font-size: 15px; color: var(--ink);
  min-height: 46px; padding: 10px 16px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.lb-title { font-size: 16px; color: var(--ink); }
.lb-desc { font-size: 14px; line-height: 1.6; color: var(--foot); max-width: 40em; white-space: pre-line; }
.lb-btn {
  border: 0; background: none; cursor: pointer;
  color: var(--ink); font: 300 48px/1 var(--font);
  padding: 12px; opacity: .55; transition: opacity .2s;
}
.lb-btn:hover { opacity: 1; }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 8px; right: 12px; font-size: 40px; z-index: 2; }
body.lb-open { overflow: hidden; }

/* ───────── tablet ───────── */
@media (max-width: 900px) {
  .site-nav a { min-width: 0; padding: 0 14px; font-size: 20px; }
}

/* ───────── mobile ───────── */
@media (max-width: 640px) {
  :root { --gap: 8px; }
  .site-header { padding-top: 18px; }
  .logo img { width: 260px; }
  .logo-name { font-size: 38px; }
  .logo-sub { font-size: 12px; }
  .site-nav { margin-top: 16px; }
  .site-nav { flex-wrap: nowrap; }
  .site-nav a { font-size: 15.5px; line-height: 34px; padding: 0 7px; }
  .page { padding: 14px 12px 40px; }
  .page-title { font-size: 22px; margin-bottom: 18px; }
  .contact { font-size: 16px; margin-top: 52px; }
  /* 휴대폰에서는 사진을 한 장씩 화면 폭에 맞춰 크게 */
  .row { flex-direction: column; }
  .row .cell { flex: none !important; }
  .footer-link[href] { color: inherit; transition: color .2s; }
.footer-link[href]:hover { color: var(--ink); }
.site-footer { position: static; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .lightbox { grid-template-columns: 0 1fr 0; }
  .lb-prev, .lb-next { display: none; }
  .lb-stage { padding: 52px 8px 4px; }
  .lb-stage img, .lb-stage video { max-height: calc(100vh - 120px); }
}

@media (prefers-reduced-motion: reduce) {
  .cell img { transition: none; }
  .cell:hover img { transform: none; }
}
