/* ───────────────────────────────────────────────
   포트폴리오 사이트 — 참고: blackdogfilms.com
   고급스러움은 '덜어낸 것'에서 나온다:
   · 구호·큰 제목·굵은 글자를 쓰지 않는다. 글자는 전부 보통 굵기(400), 작게, 가운데.
   · 첫 화면은 큰 로고 하나와 작품뿐이다.
   · 영문은 Jost, 한글은 Pretendard. 색은 검정·흰색·회색. 초록은 로고 심볼에만.
   · 갤러리는 블랙독과 같은 짜임: 화면을 같은 폭의 칸으로 나눠(1680px 미만 3칸, 이상 4칸) 세로 작품 1칸 · 가로 작품 2칸.
     블랙독 실측(.outer_image) — 1440 화면: 435×494 · 900×494, 사이 30px(가로·세로 같음) / 1920 화면: 439×432 · 908×432 / 2560: 599×598.
     → 3칸일 때 높이 = 칸 폭 × 494/435, 4칸일 때 = 칸 폭과 같게. 좌우 여백 30px. 폭을 멈추지 않는다. 모서리 0.
   · 첫 화면 맨 위는 RSA 식 큰 화면(대표작 한 편이 가득) — 그 아래가 블랙독 식 갤러리.
   ─────────────────────────────────────────────── */
.pf {
  --bg: #161616; --bar: #202021; --ink: #FFFFFF; --sub: #C2C2C2; --mute: #9A9A9A; --line: #343434; --tilebg: #242424;   /* 2026-11-19: 새까만 바탕(#000)이 너무 어둡다는 지적 → 짙은 먹색으로 */
  --side: 30px; --gap: 30px; --n: 3; --tall: 1.1356; --top: 48px; --logo-filter: none; --logo-op: .78;
  --type: 'Jost', 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg); color: var(--ink); font-family: var(--type); font-weight: 400; font-size: 16px; line-height: 1.6; color-scheme: dark;
}
/* 밝은 화면: 종이색 바탕. 작품 위 글자는 어느 화면에서나 흰색이다. */
[data-theme="light"] .pf {
  --bg: #F1F0EC; --bar: #E6E5E0; --ink: #0A0A0A; --sub: #474743; --mute: #5C5C57; --line: #D4D3CC; --tilebg: #D9D8D2;
  --logo-filter: brightness(0); --logo-op: .7; color-scheme: light;
}
[data-theme="light"] .ph { background: rgba(230, 229, 224, .8); }
.pf .wrap { max-width: none; padding-left: var(--side); padding-right: var(--side); }
.pf h1, .pf h2, .pf h3 { font-weight: 400; letter-spacing: 0; }
.cap { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* 맨 위 얇은 띠: 작은 회색 메뉴 */
.ph { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--top); background: rgba(26, 26, 27, .72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.ph__in { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 var(--side); gap: 16px; }
.ph__nav { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--mute); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ph__nav::-webkit-scrollbar { display: none; }
.ph__nav a { display: inline-flex; align-items: center; height: var(--top); white-space: nowrap; transition: color .2s var(--ease); }
.ph__nav a:hover, .ph__nav a[aria-current] { color: var(--ink); }
/* 밝게/어둡게 스위치의 모양은 shared/base.css 의 .tsw (여기서는 조금 작게) */
.ph .tsw { transform: scale(.86); transform-origin: right center; }

/* 이름(레이블): 이 사이트에서 가장 큰 글자. 넓은 자간의 대문자 — 작품 속 고객사 이름(보통 자간, 대소문자 섞임)과 모양부터 다르게 */
.mark { display: inline-block; }
.mark__name { display: block; font-family: 'Jost', sans-serif; font-weight: 500; font-size: 52px; line-height: 1; letter-spacing: .3em; margin-right: -.3em; white-space: nowrap; }
.mast { display: flex; justify-content: center; padding: calc(var(--top) + 56px) var(--side) 52px; animation: mastFade 1.4s var(--ease) both; }
.mast a { display: block; color: var(--ink); }
.mast--sm { padding-bottom: 40px; }
/* 맨 위 로고 띠(블랙독처럼): 검은 여백 한가운데 심볼 + 이름. 그 아래로 대표 필름이 이어진다 */
.mast--top { padding: calc(var(--top) + 28px) var(--side) 28px; background: var(--bg); }
.mark--lock { display: block; }
.scr { display: block; width: auto; height: 196px; }
.scr--l { display: none; }
[data-theme="light"] .scr--d { display: none; }
[data-theme="light"] .scr--l { display: block; }
.mast--sm .mark__name { font-size: 36px; }


/* 작품 격자(블랙독 식): 같은 폭의 칸 N개. 세로 작품 1칸, 가로 작품 2칸. 사이는 가로·세로 모두 30px */
/* 2026-11-24 회의: 썸네일 사이(갭) 0 — 전시장처럼 그림이 맞닿는다. 칸 폭 계산은 그대로(--gap 만 0) */
.pgrid { --gap: 0px; --u: calc((100vw - var(--side) * 2 - var(--gap) * (var(--n) - 1)) / var(--n)); padding: 0 var(--side) 120px; }
.prow { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); column-gap: var(--gap); height: calc(var(--u) * var(--tall)); }
.prow + .prow { margin-top: var(--gap); }
.tile.sp2 { grid-column: span 2; }
@media (min-width: 1680px) { .pf { --n: 4; --tall: 1; } }
.tile { position: relative; display: block; overflow: hidden; background: var(--tilebg); color: #fff; min-width: 0; opacity: 0; transform: translateY(12px); }
.tile.is-on-screen { opacity: 1; transform: none; transition: opacity .9s var(--ease) var(--tile-delay, 0s), transform .9s var(--ease) var(--tile-delay, 0s); }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform 1.6s var(--ease), filter 1.2s var(--ease); }   /* center 25%: 위쪽 중심 — 아래쪽 자막·텍스트 크롭 */
.tile.is-busy img { object-position: center 15%; }   /* 글자 많은 썸네일은 더 위로 */
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); filter: brightness(1.07); }
/* 이름은 왼쪽 아래에. 글자 뒤는 아래에서 위로 옅어지는 그늘 한 겹(예전의 가운데 검은 타원은 없앴다) */
/* 그림 위 그늘·캡션은 없앴다(2026-11-24 회의) — 이름·종류·연도는 작품 화면에서 */
.tile__clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s var(--ease); pointer-events: none; }
.tile__clip.is-on { opacity: 1; }
.tile__mid { position: absolute; left: 20px; right: 20px; bottom: 18px; text-align: left; transition: opacity .4s var(--ease); z-index: 2; }
/* 캡션 뒤에 어둡게 번지는 판: 대표 이미지 속 글자 위에서도 캡션이 읽히게 */
/* 대표 이미지에 글자(특히 한글)가 박힌 작품: 가만히 있을 때는 흐리고 어둡게 눌러 둔다. 마우스를 올리면 또렷해지고 영상이 돈다 */
.tile__brand { display: block; font-size: 18px; line-height: 1.3; }
.tile__title { display: block; margin-top: 2px; font-size: 14px; line-height: 1.5; color: #F2F2F2; }
.tile__meta { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #D6D6D6; }
.tile:focus-visible { outline: 2px solid #fff; outline-offset: -2px; z-index: 3; }
.pnone { padding: 80px var(--side) 160px; text-align: center; color: var(--sub); }

/* 작품 한 편 */
.film { padding: 0 var(--side); }
.film__player { position: relative; display: block; width: min(100%, calc((100vh - 120px) * var(--ar))); aspect-ratio: var(--ar); margin: 0 auto; overflow: hidden; background: var(--tilebg); }
.film__player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.8); }
.film__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film__play { position: absolute; inset: 0; width: 100%; display: grid; place-items: center; color: #fff; }
.film__play span { width: 88px; height: 88px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .9); display: grid; place-items: center; transition: background-color .25s var(--ease), color .25s var(--ease); }
.film__play span svg { width: 26px; height: 26px; margin-left: 3px; }
.film__play:hover span { background: #fff; color: #000; }
.film__play em { position: absolute; left: 0; right: 0; top: calc(50% + 52px); text-align: center; font-style: normal; font-size: 13px; }
.film__info { max-width: 720px; margin: 0 auto; padding: 56px 0 96px; text-align: center; }
.film__brand { font-size: 28px; line-height: 1.3; }
.film__title { margin-top: 6px; font-size: 16px; color: var(--sub); }
.film__desc { margin-top: 32px; font-size: 15px; line-height: 1.9; color: var(--sub); }
.credits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 40px; margin-top: 40px; }
.credits div { text-align: center; }
.credits dt { color: var(--mute); }
.credits dd { margin-top: 4px; font-size: 14px; }
.more-head { text-align: center; color: var(--mute); padding: 0 0 24px; }

/* Info */
.info { max-width: 880px; margin: 0 auto; padding: 0 var(--side) 120px; text-align: center; }
.info__say { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.5; }
.info__ko { margin-top: 16px; font-size: 15px; color: var(--sub); }
.info__name { margin-top: 28px; font-size: 14px; line-height: 1.8; color: var(--mute); }
.info__sec { margin-top: 96px; }
.info__sec > .cap { display: block; color: var(--mute); margin-bottom: 28px; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); text-align: center; }
.how video { width: 100%; aspect-ratio: 800 / 538; object-fit: cover; background: var(--tilebg); }
.how h3 { margin-top: 16px; font-size: 18px; }
.how p { margin-top: 6px; font-size: 14px; line-height: 1.7; color: var(--sub); }
.wide { max-width: none; padding: 0 var(--side); }
.clients { padding: 8px 0; }
.clients .logos img { height: 30px; margin-right: 72px; filter: var(--logo-filter); opacity: var(--logo-op); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.cols h3 { font-size: 22px; }
.cols p { margin-top: 12px; font-size: 15px; line-height: 1.9; }
.cols p span { color: var(--mute); }
.cols a { border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.cols a:hover { border-color: currentColor; }
.info__mail { display: inline-block; font-size: clamp(22px, 3vw, 40px); border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* 바닥 */
.pft { padding: 40px var(--side) 48px; text-align: center; font-size: 12px; line-height: 1.9; color: var(--mute); border-top: 1px solid var(--line); }
.pft nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; margin-bottom: 16px; font-size: 13px; color: var(--sub); }
.pft a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .pf { --side: 12px; --gap: 8px; }
  .mark__name { font-size: 26px; letter-spacing: .24em; margin-right: -.24em; }
  .mast--sm .mark__name { font-size: 22px; }
  .mast--top { padding: calc(var(--top) + 20px) var(--side) 20px; }
  .scr { height: 148px; }
  .ph__nav { gap: 18px; font-size: 13px; }
  .mast { padding: calc(var(--top) + 36px) var(--side) 32px; }
  .pgrid { padding-bottom: 72px; }
  /* 좁은 화면: 가로 작품은 한 줄에 하나, 세로 작품은 둘씩 */
  /* 좁은 화면: 줄 묶음을 풀고 2칸으로 다시 흐르게 한다. 가로 작품은 한 줄, 세로 작품은 둘씩 */
  .pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); grid-auto-flow: dense; }
  .prow { display: contents; }
  .prow + .prow { margin-top: 0; }
  .tile.sp2 { grid-column: auto; }
  .prow { display: contents; }
  .pgrid .tile { aspect-ratio: 4 / 5; }
  .pgrid .tile.is-land { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .pgrid .tile.is-solo { grid-column: 1 / -1; aspect-ratio: 1 / 1; }
  .tile__mid { left: 12px; right: 12px; bottom: 12px; }
  .tile__brand { font-size: 16px; }
  .tile__title { font-size: 12px; }
  .tile__meta { margin-top: 6px; font-size: 11px; }
  .film__player { width: min(100%, calc((100svh - 200px) * var(--ar))); }
  .film__info { padding: 36px 0 64px; }
  .film__brand { font-size: 22px; }
  .info__sec { margin-top: 64px; }
  .how, .cols { grid-template-columns: 1fr; gap: 32px; }
  .clients .logos img { height: 22px; margin-right: 44px; }
}

/* 미리보기(재생기를 못 끼우는 곳)에서는 그림이 천천히 커진다 */
.tile.hv--still img { transition: transform 5s ease-out; }
.tile.hv--still:hover img { transform: scale(1.08); }

/* 로고 등장 */
@keyframes mastFade { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 움직임 줄이기: 타일은 처음부터 보이게, 로고 등장 없앰 */
@media (prefers-reduced-motion: reduce) {
  .tile { opacity: 1 !important; transform: none !important; }
  .mast { animation: none !important; }
}
