/* BOAS CONSTRUCTION 홈페이지 스타일
   - 글자 크기·여백·격자는 기존 사이트를 화면 크기별로 실측해 같은 값이 나오도록 맞췄다.
   - 768px 미만: 모바일 배치 / 800px 미만: 모바일 헤더(햄버거 메뉴) */
:root {
  --gutter: 4vw;
  --maxw: 1800px;
  --accent: rgb(175, 184, 168);
  --nav: #bfbfbf;
  --u: calc(.012 * min(100vh, 900px));
  --hdr-h: calc(12vw + 79.5px);
}
@media (min-width: 768px) { :root { --u: min(1.2vw, 21.6px); } }
@media (min-width: 800px) { :root { --hdr-h: calc(4vw + 270px); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #000; color: #fff; font-family: Almarai, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html.menu-open, html.lb-open { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: Alice, Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.02em; margin: 2rem 0; }
h1 { font-size: calc(1rem + 3 * var(--u)); line-height: 1.056; }
h2 { font-size: calc(1rem + 1.8 * var(--u)); line-height: 1.1136; }
h3 { font-size: calc(1rem + 1.2 * var(--u)); line-height: 1.1424; }
h4 { font-size: calc(1rem + .6 * var(--u)); line-height: 1.1712; }
p { margin: 1rem 0; }
.t-large { font-size: calc(1rem + .4 * var(--u)); }
.t-small { font-size: calc(1rem - .1 * var(--u)); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: -9999px; top: 12px; z-index: 200; background: #bfbfbf; color: #000; padding: 12px 18px; text-decoration: none; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- 헤더 ---------- */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--hdr-h); background: #000; display: flex; align-items: center; justify-content: space-between; padding: 6vw; }
.hdr-logo { display: block; flex: none; }
.hdr-logo img { height: 77px; width: auto; }
.hdr-nav { display: none; }
.burger { position: relative; width: 47px; height: 37px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; flex: none; }
.burger span { position: absolute; left: 6px; right: 6px; height: 1px; background: currentColor; transition: transform .25s ease, top .25s ease; }
.burger span:first-child { top: 12.5px; }
.burger span:last-child { top: 23.5px; }
.burger[aria-expanded="true"] span { top: 18px; left: 9px; right: 9px; }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 40; background: #000; display: flex; align-items: center; justify-content: center; padding-top: var(--hdr-h); }
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; align-items: center; gap: 6.1vw; }
.menu a { color: #fff; text-decoration: none; font-size: 8.5vw; line-height: 1; }
@media (max-width: 799px) {
  .hdr { transition: height .2s ease, padding .2s ease; }
  .hdr.shrunk { height: calc(8.66vw + 79.5px); padding-top: 4.33vw; padding-bottom: 4.33vw; }
}
@media (min-width: 800px) {
  .hdr { flex-direction: column; justify-content: flex-start; padding: .8vw var(--gutter); }
  .hdr-logo img { height: 243px; }
  .hdr-nav { display: flex; gap: 1.2vw; margin-top: 2.4vw; }
  .hdr-nav a { display: block; color: var(--nav); text-decoration: none; font-size: 16px; line-height: 24px; padding: 1.5px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; }
  .hdr-nav a.on, .hdr-nav a:hover { background-size: 100% 1px; }
  .burger, .menu { display: none !important; }
}

/* ---------- 섹션 ---------- */
.sec { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: var(--minh, 0px); background: var(--bg, #000); }
.sec.va-top { justify-content: flex-start; }
.sec.va-bottom { justify-content: flex-end; }
.sec-in { position: relative; z-index: 1; width: 100%; padding-top: var(--pt, 0px); padding-bottom: var(--pb, 0px); }
#page > :first-child { padding-top: var(--hdr-h); }
.sec-bg { position: absolute; inset: 0; overflow: hidden; }
.sec-bg > img, .sec-bg > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sec-bg .ov { position: absolute; inset: 0; }

/* ---------- 자유 배치 격자 ---------- */
.fe { display: grid; position: relative; --g: calc(6vw - var(--gapx)); --cell: calc((var(--maxw) - var(--gapx) * 7) / 8); grid-template-rows: repeat(var(--rm), minmax(24px, auto)); grid-template-columns: minmax(var(--g), 1fr) repeat(8, minmax(0, var(--cell))) minmax(var(--g), 1fr); row-gap: var(--gapy); column-gap: var(--gapx); overflow-x: clip; }
.blk { grid-area: var(--am); z-index: var(--zm); min-width: 0; position: relative; display: flex; flex-direction: column; justify-content: var(--jm, flex-start); }
@media (min-width: 768px) {
  .fe { --g: calc(var(--gutter) - var(--gapx)); --cell: calc((var(--maxw) - var(--gapx) * 23) / 24); --cw: min(var(--maxw), calc(100vw - var(--gutter) * 2)); grid-template-rows: repeat(var(--rd), minmax(calc(var(--cw) * .0215), auto)); grid-template-columns: minmax(var(--g), 1fr) repeat(24, minmax(0, var(--cell))) minmax(var(--g), 1fr); }
  .blk { grid-area: var(--ad); z-index: var(--zd); justify-content: var(--jd, flex-start); }
}

/* 글 */
.rt { white-space: pre-wrap; overflow-wrap: break-word; }
.rt > :first-child { margin-top: 0; }
.rt > :last-child { margin-bottom: 0; }
.rt a { text-decoration: underline; text-underline-offset: .15em; }

/* 사진 */
.im { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; }
.im-fill img, .im-fit img { position: absolute; inset: 0; width: 100%; height: 100%; }
.im-fill img { object-fit: cover; }
.im-fit img { object-fit: contain; }
.im > a { position: absolute; inset: 0; display: block; }
.fit-m-top img { object-position: 50% 0; }
.fit-m-bottom img { object-position: 50% 100%; }
@media (min-width: 768px) {
  .fit-d-top img { object-position: 50% 0; }
  .fit-d-center img { object-position: 50% 50%; }
  .fit-d-bottom img { object-position: 50% 100%; }
}
.im-shape { container-type: size; display: grid; place-items: center; }
.im-shape .shape { width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); clip-path: circle(50%); overflow: hidden; }
.im-shape img { width: 100%; height: 100%; object-fit: cover; }

/* 구분선 */
.hr hr { border: 0; height: 1px; width: 100%; margin: 8px 0; }

/* SNS 아이콘 */
.soc-list { display: flex; flex-wrap: wrap; justify-content: var(--sj, flex-start); gap: var(--sgap, 12px); }
.soc a { display: block; width: var(--sz, 20px); height: var(--sz, 20px); transition: opacity .2s; }
.soc a:hover { opacity: .7; }
.soc svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* 인스타그램 */
.ig-grid { display: grid; grid-template-columns: repeat(var(--igc, 4), minmax(0, 1fr)); width: var(--igw, 100%); margin: 0 auto; }
@media (max-width: 767px) { .ig-m2 .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ig-i { position: relative; display: block; aspect-ratio: var(--igar, 1); overflow: hidden; margin: calc(var(--igg, 0px) / 2); }
.ig-i img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.ig-i:hover img { opacity: .85; }
.ig-v::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14%; aspect-ratio: 1; background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); transform: translate(-40%, -50%); filter: drop-shadow(0 0 6px rgba(0, 0, 0, .35)); }

/* 지도 */
.map { flex: 1 1 auto; min-height: 240px; }
.map iframe { display: block; width: 100%; height: 100%; min-height: 240px; border: 0; filter: grayscale(1) invert(.92) contrast(.83); }

/* 문의 폼 */
.frm { display: flex; flex-direction: column; gap: 16px; color: var(--accent); font-size: 16px; position: relative; }
.frm fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.frm legend { padding: 0; margin-bottom: 4px; }
.frm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.frm-sub { display: block; font-size: calc(1rem - .1 * var(--u)); }
.frm-f { display: block; }
.frm .req { opacity: .7; font-size: calc(1rem - .1 * var(--u)); margin-left: 4px; }
.frm input[type="text"], .frm input[type="email"], .frm textarea { display: block; width: 100%; margin-top: 6px; height: 36px; padding: 5px 10px; border: 1px solid var(--accent); border-radius: 6.4px; background: transparent; color: inherit; font: inherit; font-size: 16px; }
.frm textarea { height: 100px; min-height: 100px; resize: vertical; }
.frm input:focus, .frm textarea:focus { outline: 1px solid var(--accent); outline-offset: 1px; }
.frm-hp { position: absolute; left: -9999px; opacity: 0; }
.btn { align-self: flex-start; background: #bfbfbf; color: #000; border: 0; border-radius: 0; padding: 16px 20.8px; font: inherit; font-size: 16px; line-height: 1.5; cursor: pointer; transition: opacity .2s; }
.btn:hover { opacity: .8; }
.btn[disabled] { opacity: .5; cursor: default; }
.frm-msg { margin: 0; }
.frm-msg:empty { display: none; }

/* ---------- 갤러리 ---------- */
.sec-gal, .sec-pf { display: block; }
.gal-grid { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); gap: var(--gap, 0px); padding: 0 var(--gap, 0px); }
.gal-grid.gal-inset { padding: var(--gutter); }
.gi { margin: 0; min-width: 0; }
.gi .ph { aspect-ratio: var(--ar, 1.7778); overflow: hidden; }
.gi .ph img { width: 100%; height: 100%; object-fit: cover; }
.gi a { display: block; color: inherit; text-decoration: none; }
.gi a[data-lb] { cursor: zoom-in; }
.gi figcaption { padding: 12px 0 15px; font-size: 16px; line-height: 24px; }
.gal-masonry { columns: var(--cols, 1); column-gap: var(--gap, 0px); padding: 0 var(--gap, 0px); }
.gal-masonry .gi { break-inside: avoid; margin-bottom: var(--gap, 0px); }
.gal-masonry .gi:last-child { margin-bottom: 0; }
.gal-masonry img { width: 100%; height: auto; }

/* 가로로 넘기는 사진 띠 */
.reel { position: relative; height: calc(var(--rvh, 50) * 1vh); overflow: hidden; color: var(--accent); }
.reel-view { position: relative; height: 60%; overflow: hidden; }
.reel-track { position: absolute; inset: 0; }
.reel-i { position: absolute; top: 0; left: 0; height: 100%; margin: 0; will-change: transform; }
.reel-i.anim { transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.reel-i img { width: 100%; height: 100%; object-fit: cover; }
.reel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 8px; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .88); color: #000; cursor: pointer; z-index: 2; }
.reel-btn svg { display: block; width: 100%; height: 100%; }
.reel-prev { left: 15px; }
.reel-next { right: 15px; }
.reel-cap { margin: 25px 0 0; padding: 0 6vw; text-align: center; font-size: 14px; line-height: 1.5; min-height: 21px; }
@media (min-width: 768px) { .reel-view { height: calc(100% - var(--gutter) - 125px); min-height: 120px; } }

/* 프로젝트 목록 */
.pf { display: grid; grid-template-columns: minmax(0, 1fr); padding: 3.3vw 6vw; }
@media (min-width: 768px) { .pf { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3.3vw var(--gutter); } }
.pf-i { display: block; color: inherit; text-decoration: none; min-width: 0; }
.pf .ph { aspect-ratio: 2 / 3; overflow: hidden; }
.pf .ph img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.pf-i:hover img { opacity: .85; }
.pf-t { font-size: calc(1rem + .6 * var(--u)); line-height: 1.2; margin: 1px 0 .5em; }

/* 이전·다음 프로젝트 */
.pag { display: flex; padding: 3vw 6vw; background: #000; color: var(--accent); }
@media (min-width: 768px) { .pag { padding: 3vw var(--gutter); } }
.pag-l { display: flex; align-items: center; max-width: 50%; min-width: 0; color: inherit; text-decoration: none; }
.pag-l > span { min-width: 0; }
.pag-next { margin-left: auto; text-align: right; }
.pag-t { display: block; font-family: Alice, Georgia, serif; font-size: calc(1rem + 1.2 * var(--u)); line-height: 1; letter-spacing: -.02em; overflow-wrap: break-word; }
.pag-ic { flex: none; box-sizing: content-box; width: 18px; height: 32px; stroke-width: 1; }
.pag-prev .pag-ic { padding-right: 25px; }
.pag-next .pag-ic { padding-left: 25px; }
@media (max-width: 767px) { .pag-prev .pag-ic { padding-right: 12px; } .pag-next .pag-ic { padding-left: 12px; } }

/* 옛 편집기 섹션 */
.cl { padding: 0 6vw; }
@media (min-width: 768px) { .cl { padding: 0 var(--gutter); } }
.cl-row { display: flex; flex-wrap: wrap; }
.cl-col { flex: 0 0 100%; min-width: 0; }
@media (min-width: 768px) { .cl-col { flex-basis: calc(var(--span, 12) / 12 * 100%); } }

/* 사진 크게 보기 */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .96); display: flex; align-items: center; justify-content: center; }
.lb[hidden] { display: none; }
.lb img { max-width: 92vw; max-height: 90vh; width: auto; height: auto; object-fit: contain; }
.lb button { position: absolute; width: 56px; height: 56px; padding: 14px; border: 0; background: none; color: #fff; cursor: pointer; opacity: .8; }
.lb button:hover { opacity: 1; }
.lb svg { display: block; width: 100%; height: 100%; }
.lb-x { top: 8px; right: 8px; }
.lb-p { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-n { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-c { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 14px; color: var(--accent); }
