/* ==========================================================================
   05 사진 (miracle/photography.php · assets/js/sx/photography.js) — "렌즈 · 조리개 · 초점"
   ========================================================================== */
.sub--photography { --accent: var(--y); --mono: "SFMono-Regular", Consolas, monospace; }

/* ---------- Hero: 조리개가 열리며 초점 ---------- */
.ph-hero { position: relative; height: 100vh; height: 100svh; min-height: 660px; overflow: hidden; background: var(--k); color: var(--on-dark); isolation: isolate; }
.ph-hero__img { position: absolute; inset: 0; z-index: -1; }
.ph-hero__img img { width: 100%; height: 100%; object-fit: cover; filter: blur(var(--blur, 18px)) brightness(.7); transform: scale(var(--zoom, 1.12)); }
.ph-hero::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(transparent 55%, var(--b-4)); }
.ph-iris { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.ph-iris__plate { fill: #0a0a09; }
.ph-iris__edges line { stroke: var(--w-line); stroke-width: .35; }
.ph-af { position: absolute; left: 0; top: 0; z-index: 2; width: 120px; height: 84px; margin: -42px 0 0 -60px; pointer-events: none; transition: opacity .4s; opacity: 0; }
.ph-hero.is-in .ph-af { opacity: 1; }
.ph-af i { position: absolute; inset: 0; border: 1px solid var(--w-strong); transition: border-color .2s, inset .3s var(--ease);
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 22px 22px no-repeat, linear-gradient(#000 0 0) 100% 0 / 22px 22px no-repeat, linear-gradient(#000 0 0) 0 100% / 22px 22px no-repeat, linear-gradient(#000 0 0) 100% 100% / 22px 22px no-repeat;
  mask: linear-gradient(#000 0 0) 0 0 / 22px 22px no-repeat, linear-gradient(#000 0 0) 100% 0 / 22px 22px no-repeat, linear-gradient(#000 0 0) 0 100% / 22px 22px no-repeat, linear-gradient(#000 0 0) 100% 100% / 22px 22px no-repeat; }
.ph-af b { position: absolute; left: 0; top: -20px; font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 500; color: var(--w-strong); }
.ph-af.is-lock i { border-color: var(--y); inset: 8px 12px; }
.ph-af.is-lock b { color: var(--y); }
.ph-hero__top { position: absolute; left: 0; right: 0; top: calc(var(--hd-h) + 24px); z-index: 3; }
.ph-hero__foot { position: absolute; left: 0; right: 0; bottom: clamp(32px, 6vh, 64px); z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.ph-hero__word { margin-bottom: 20px; font-family: var(--f-display); font-size: var(--t-mega); font-weight: 800; line-height: .8; letter-spacing: -.06em; }
.ph-exif { display: flex; align-items: center; gap: 20px; padding: 12px 18px; border: 1px solid var(--w-line); background: var(--b-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-family: var(--mono); font-size: var(--fs-xs); color: var(--on-dark-2); }
.ph-exif b { color: var(--on-dark); font-weight: 600; font-variant-numeric: tabular-nums; }
.ph-exif__meter { position: relative; width: 90px; height: 10px; background: repeating-linear-gradient(90deg, var(--w-mid) 0 1px, transparent 1px 15px); }
.ph-exif__meter i { position: absolute; top: -3px; bottom: -3px; left: var(--m, 0%); width: 2px; background: var(--y); }

.ph-hero { cursor: crosshair; }
.ph-flash { position: absolute; inset: 0; z-index: 4; background: var(--white); opacity: 0; pointer-events: none; }
.ph-flash.is-on { animation: ph-flash .5s ease-out; }
@keyframes ph-flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.ph-roll { position: absolute; right: calc(var(--gutter) + 80px); bottom: calc(clamp(32px, 6vh, 64px) + 70px); z-index: 3; width: 200px; height: 150px; pointer-events: none; }
.ph-roll__count { position: absolute; right: 0; bottom: -28px; font-family: var(--mono); font-size: var(--fs-2xs); color: var(--on-dark-3); }
.ph-roll__count b { color: var(--y); font-weight: 500; }
.ph-prints { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.ph-print { position: absolute; left: 0; top: 0; width: 200px; padding: 6px 6px 20px; background: var(--paper); box-shadow: var(--sh-lg); will-change: transform; }
.ph-print i { display: block; width: 188px; height: 125px; background-repeat: no-repeat; background-color: var(--k2); }
.ph-print b { position: absolute; left: 8px; bottom: 4px; font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--ink2); }
.ph-exif__hint { padding-right: 16px; border-right: 1px solid var(--w-line); color: var(--y); }

/* ---------- 소개: 과다 노출 → 적정 노출 ---------- */
.ph-intro { padding: round(clamp(120px, 14vw, 220px), 4px) 0; }
.ph-intro .eyebrow { margin-bottom: 40px; }
.ph-intro__text { max-width: 1200px; font-family: var(--f-display); font-size: max(var(--fs-xl), min(var(--fs-2xl), (100vw - 640px) * 999), min(var(--fs-4xl), (100vw - 960px) * 999), min(var(--fs-5xl), (100vw - 1280px) * 999)); font-weight: 600; line-height: 1.42; letter-spacing: -.04em; }
.sx-motion .ph-intro__text .w { display: inline-block; opacity: 1; color: var(--ink); transition: color 1.1s var(--ease), filter 1.1s var(--ease), text-shadow 1.1s; }
.sx-motion .ph-intro__text .w:not(.is-on) { color: var(--white); filter: blur(4px); text-shadow: 0 0 24px var(--white); }

/* ---------- 분야: 라이트박스 + 그리스 펜슬 ---------- */
.ph-table { --mx: 50%; --my: 50%; position: relative; padding: round(clamp(40px, 5vw, 80px), 4px); background: radial-gradient(circle 520px at var(--mx) var(--my), #fff, #f6f4ee 60%), #f6f4ee; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), inset 0 0 80px rgba(255, 248, 204, .7), var(--sh-paper); }
.ph-table::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .035) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px) 0 0 / 40px 40px; }
.ph-neg__sheet { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: round(clamp(24px, 3vw, 56px), 4px); }
.ph-neg__item { display: grid; align-content: start; gap: 6px; }
.ph-slide { position: relative; display: block; margin-bottom: 22px; outline: none; transform: rotate(var(--r)); transition: transform .6s var(--ease); }
.ph-slide__mount { display: block; padding: 16px 16px 30px; background: #e9e7e1; border-radius: 4px; box-shadow: 0 2px 4px rgba(0, 0, 0, .12); transition: box-shadow .6s var(--ease); }
.ph-slide__mount small { display: block; margin-top: 10px; font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: .1em; color: var(--ink2); }
.ph-slide__img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--k); }
.ph-slide__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.ph-lock { position: absolute; inset: 16px 16px 30px; pointer-events: none; }
.ph-lock i { position: absolute; width: 22px; height: 22px; border: 0 solid var(--y); opacity: 0; transition: transform .55s var(--ease), opacity .3s; }
.ph-lock i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; transform: translate(-18px, -18px); }
.ph-lock i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; transform: translate(18px, -18px); }
.ph-lock i:nth-child(3) { right: 0; bottom: 0; border-width: 0 2px 2px 0; transform: translate(18px, 18px); }
.ph-lock i:nth-child(4) { left: 0; bottom: 0; border-width: 0 0 2px 2px; transform: translate(-18px, 18px); }
.ph-lock b { position: absolute; left: 12px; top: 12px; padding: 3px 7px; background: var(--y); color: var(--k); font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .08em; opacity: 0; transform: translateY(4px); transition: opacity .3s .3s, transform .4s var(--ease) .3s; }
.ph-slide:is(:hover, :focus-visible) .ph-lock i { opacity: 1; transform: translate(10px, 10px) scale(1); }
.ph-slide:is(:hover, :focus-visible) .ph-lock i:nth-child(2) { transform: translate(-10px, 10px); }
.ph-slide:is(:hover, :focus-visible) .ph-lock i:nth-child(3) { transform: translate(-10px, -10px); }
.ph-slide:is(:hover, :focus-visible) .ph-lock i:nth-child(4) { transform: translate(10px, -10px); }
.ph-slide:is(:hover, :focus-visible) .ph-lock b { opacity: 1; transform: none; }
.ph-slide:is(:hover, :focus-visible) { transform: rotate(0) translateY(-10px); }
.ph-slide:is(:hover, :focus-visible) .ph-slide__mount { box-shadow: 0 30px 50px rgba(0, 0, 0, .18); }
.ph-slide:is(:hover, :focus-visible) .ph-slide__img img { transform: scale(1.05); }
@media (hover: hover) { .ph-neg__sheet:hover .ph-neg__item:not(:hover) .ph-slide__img img { filter: brightness(.75) saturate(.6); } }
.ph-neg__item > small { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--ink2); }
.ph-neg__item strong { font-size: var(--fs-xl); letter-spacing: -.03em; }
.ph-neg__item > span:last-child { font-size: var(--fs-sm); color: var(--ink2); }

/* ---------- 스튜디오: 랙 포커스 ---------- */
.ph-rack { position: relative; background: var(--k); color: var(--on-dark); }
.ph-rack__sticky { position: relative; height: 100vh; min-height: 640px; overflow: hidden; }
.ph-rack__stage { position: absolute; inset: 0; }
.ph-rack__layer { position: absolute; will-change: filter, transform; }
.ph-rack__layer.is-back { left: 0; right: 0; top: 50%; margin: 0; transform: translateY(-50%); text-align: center; font-family: var(--f-display); font-size: 22vw; font-weight: 800; line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--w-mid); }
.ph-rack__layer.is-mid { right: 8%; top: 16%; width: min(46vw, 640px); aspect-ratio: 4 / 3; overflow: hidden; box-shadow: var(--sh-xl); }
.ph-rack__layer.is-mid img { width: 100%; height: 100%; object-fit: cover; }
.ph-rack__layer.is-front { inset: 0; pointer-events: none; }
.ph-rack__layer.is-front i { position: absolute; border-radius: 50%; background: radial-gradient(circle, var(--y-a2), transparent 70%); }
.ph-rack__layer.is-front i:nth-child(1) { left: -6%; top: 54%; width: 34vw; height: 34vw; }
.ph-rack__layer.is-front i:nth-child(2) { left: 28%; bottom: -16%; width: 22vw; height: 22vw; background: radial-gradient(circle, rgba(244, 242, 236, .18), transparent 70%); }
.ph-rack__layer.is-front i:nth-child(3) { right: -4%; top: -8%; width: 26vw; height: 26vw; }
.ph-rack__layer.is-front i:nth-child(4) { right: 30%; top: 6%; width: 10vw; height: 10vw; background: radial-gradient(circle, rgba(244, 242, 236, .22), transparent 70%); }
.ph-rack__text { position: absolute; left: 0; right: 0; top: 50%; z-index: 2; transform: translateY(-50%); will-change: opacity; }   /* 투명도만 바뀜 → 합성만 */
.ph-rack__text > * { max-width: 460px; }
.ph-rack__text .lead { margin-top: 24px; }
.ph-rack__ring { position: absolute; left: 0; right: 0; bottom: calc(clamp(24px, 5vh, 48px) + var(--dock-space, 0px)); z-index: 2; display: flex; align-items: center; gap: 24px; }
.ph-ring { position: relative; width: min(460px, 60vw); height: 44px; overflow: hidden; border-block: 1px solid var(--w-line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); }
.ph-ring__scale { will-change: transform; position: absolute; left: 50%; top: 0; bottom: 0; display: flex; align-items: center; font-family: var(--mono); font-size: var(--fs-xs); color: var(--on-dark-2); }
.ph-ring__scale i { width: 80px; font-style: normal; text-align: center; background: repeating-linear-gradient(90deg, var(--w-mid) 0 1px, transparent 1px 16px) 0 0 / 100% 6px no-repeat; padding-top: 10px; }
.ph-ring > b { position: absolute; left: 50%; top: 0; width: 2px; height: 12px; margin-left: -1px; background: var(--y); }
.ph-rack__label { font-family: var(--mono); font-size: var(--fs-xs); color: var(--on-dark-3); }
.ph-rack__label b { color: var(--y); font-weight: 500; }
.sx-motion .ph-rack { height: 280vh; }
.sx-motion .ph-rack__sticky { position: sticky; top: 0; }

/* ---------- 촬영 종류: 폴라로이드 현상 ---------- */
.ph-pola__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: round(clamp(20px, 3vw, 48px), 4px); }
.ph-pola__item { display: grid; align-content: start; gap: 6px; }
.ph-pola__card { display: block; padding: 12px 12px 18px; margin-bottom: 18px; background: var(--on-dark); color: var(--k); box-shadow: var(--sh-lg); transform: rotate(var(--rot)); transition: transform .6s var(--ease); }
.ph-pola__item:hover .ph-pola__card { transform: rotate(0) translateY(-8px) scale(1.03); }
.ph-pola__img { display: block; aspect-ratio: 1; overflow: hidden; background: #2a2a28; }
.ph-pola__img img { width: 100%; height: 100%; object-fit: cover; }
.sx-motion .ph-pola__img img { filter: brightness(.08) sepia(1) contrast(.5) blur(2px); transition: filter 4s cubic-bezier(.3, 0, .2, 1) calc(var(--i) * .35s); }
.sx-motion .ph-pola__item.is-dev .ph-pola__img img { filter: none; }
.ph-pola__card b { display: block; margin-top: 14px; font-size: var(--fs-md); letter-spacing: -.02em; }
.ph-pola__item small { font-family: var(--mono); font-size: var(--fs-2xs); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.ph-pola__item > span { font-size: var(--fs-sm); color: var(--fg-2); }

/* ---------- 장비: 카메라 가방 ---------- */
.ph-gear__in { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.ph-gear__tabs { display: grid; gap: 4px; position: sticky; top: calc(var(--hd-h) + 32px); }
.ph-gear__tabs button { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); font-size: var(--fs-md); font-weight: 700; color: var(--fg-2); text-align: left; transition: color .3s, border-color .3s, background .3s; }
.ph-gear__tabs button b { font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 500; }
.ph-gear__tabs button small { margin-left: auto; font-size: var(--fs-xs); opacity: .6; }
.ph-gear__tabs button:hover { color: var(--fg); border-color: var(--w-mid); }
.ph-gear__tabs button.is-on { color: var(--k); background: var(--y); border-color: var(--y); }
.ph-gear__bag { position: relative; padding: 16px; background: #141413; border: 1px solid var(--line); box-shadow: inset 0 0 0 6px var(--k); overflow: hidden; }
.ph-gear__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ph-gear__grid li { display: grid; gap: 4px; padding: 14px 14px 18px; background: var(--k3); border-radius: 6px; box-shadow: inset 0 2px 8px var(--b-3); }
.ph-gear__grid li > span { display: block; aspect-ratio: 4 / 3; margin-bottom: 10px; background: var(--white); border-radius: 3px; overflow: hidden; }
.ph-gear__grid img { width: 100%; height: 100%; object-fit: contain; padding: 10%; transition: transform .6s var(--ease); }
.ph-gear__grid li:hover img { transform: scale(1.08) rotate(-3deg); }
.ph-gear__grid b { font-size: var(--fs-sm); }
.ph-gear__grid small { font-size: var(--fs-xs); line-height: 1.6; color: var(--fg-2); }
.sx-motion .ph-gear__grid.is-in li { animation: ph-pop .6s var(--ease) calc(var(--j) * .05s) both; }
@keyframes ph-pop { from { opacity: 0; transform: translateY(16px); } }
.ph-gear__shutter { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: var(--k); clip-path: inset(50% 0 50% 0); }
.ph-gear__bag.is-snap .ph-gear__shutter { animation: ph-snap .32s ease-in-out; }
@keyframes ph-snap { 0%, 100% { clip-path: inset(50% 0 50% 0); } 45%, 55% { clip-path: inset(0 0 0 0); } }

/* ---------- 작업: 셔터 ---------- */
.ph-works__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: round(clamp(48px, 6vw, 88px), 4px); }
.ph-works__top .sx-head { margin-bottom: 0; }
.ph-works__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: round(clamp(12px, 1.6vw, 24px), 4px); }
.ph-shot { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--k2); }
.ph-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ph-shot i { position: absolute; left: 0; right: 0; height: 50%; background: var(--k); transform: scaleY(0); pointer-events: none; }
.ph-shot i:first-of-type { top: 0; transform-origin: 50% 0; } .ph-shot i:last-of-type { bottom: 0; transform-origin: 50% 100%; }
.ph-shot:hover i { animation: ph-blink .36s ease-in-out; }
.ph-shot:hover img { transform: scale(1.06); }
@keyframes ph-blink { 50% { transform: scaleY(1); } }
.ph-shot::after { content: ""; position: absolute; inset: 0; background: var(--white); opacity: 0; pointer-events: none; }
.ph-shot:hover::after { animation: vd-flash .5s ease-out .18s; }
@keyframes vd-flash { 0% { opacity: .5; } 100% { opacity: 0; } }

@media (max-width: 1180px) {
  .ph-pola__grid { grid-template-columns: repeat(2, 1fr); }
  .ph-gear__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .ph-hero__foot { flex-direction: column; align-items: flex-start; }
  .ph-exif { flex-wrap: wrap; }
  .ph-neg__sheet, .ph-works__grid { grid-template-columns: 1fr; }
  .ph-gear__in { grid-template-columns: 1fr; }
  .ph-gear__tabs { position: static; grid-auto-flow: column; overflow-x: auto; }
  .ph-gear__tabs button { white-space: nowrap; }
  .ph-rack__layer.is-mid { left: var(--gutter); right: var(--gutter); top: 14%; width: auto; }
  .ph-rack__text { top: auto; bottom: 120px; transform: none; }
  .ph-rack__text .lead { display: none; }
}
@media (max-width: 640px) {
  .ph-pola__grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .ph-gear__grid { grid-template-columns: 1fr 1fr; }
}
