/* 면과선 건축사사무소 — 종이 바탕 + 흑연색 글자, 색은 사진에만. 왼쪽 고정 세로 메뉴, 프로젝트 아카이브 첫 화면 */
:root {
  --paper: #f3f3f0;
  --paper-2: #e9e9e5;
  --graphite: #2a2d31;
  --grey: #85878b;
  --line: #d3d3ce;
  --serif: 'Newsreader', 'Times New Roman', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --side: 264px;
  --gut: clamp(20px, 3vw, 44px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--graphite); font: 400 15.5px/1.75 var(--sans); letter-spacing: -0.005em; word-break: keep-all; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--graphite); outline-offset: 3px; }
::selection { background: var(--graphite); color: var(--paper); }
.it { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 48px; z-index: 100; background: #fff; padding: 8px 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 왼쪽 세로 메뉴 */
.side {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--side); z-index: 30;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 72px 28px 28px; border-right: 1px solid var(--line); background: var(--paper);
}
.studio { text-decoration: none; display: block; }
.studio b { display: block; font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.03em; }
.studio .it { display: block; margin-top: 6px; font-size: 15px; color: var(--grey); }
.side-nav { display: grid; gap: 2px; margin-top: 48px; }
.side-nav a { text-decoration: none; font-size: 15px; padding: 6px 0; color: var(--grey); display: flex; justify-content: space-between; }
.side-nav a:hover, .side-nav a[aria-current="page"] { color: var(--graphite); }
.side-nav a[aria-current="page"]::after { content: ''; width: 24px; height: 1px; background: currentColor; align-self: center; }
.side-foot { font-size: 13px; color: var(--grey); line-height: 1.7; }
.side-foot a { text-decoration: none; color: var(--graphite); }
.menu-btn { display: none; }
.main { margin-left: var(--side); min-height: 100vh; }

/* 첫 화면: 문장 + 아카이브 */
.intro { padding: clamp(64px, 9vw, 140px) var(--gut) 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; }
.intro h1 { margin: 0; font-size: clamp(36px, 4.8vw, 76px); line-height: 1.18; font-weight: 300; letter-spacing: -0.05em; max-width: 14em; }
.intro p { margin: 0; max-width: 20em; font-size: 14.5px; color: var(--grey); }
.bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gut); background: rgba(243,243,240,.94); backdrop-filter: blur(8px); border-block: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.filters button, .views button { font: inherit; font-size: 14.5px; background: none; border: 0; padding: 6px 0; color: var(--grey); cursor: pointer; min-height: 40px; }
.filters button sup { font-size: 10px; margin-left: 2px; }
.filters button[aria-pressed="true"], .views button[aria-pressed="true"] { color: var(--graphite); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.views { display: flex; gap: 14px; }

/* 그리드 보기 */
.archive { padding: 28px var(--gut) clamp(80px, 9vw, 140px); }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 44px 20px; }
.proj { grid-column: span 2; text-decoration: none; display: grid; gap: 12px; align-content: start; }
.proj.w3 { grid-column: span 3; }
.proj.w4 { grid-column: span 4; }
.proj-img { overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 5; }
.proj.w3 .proj-img, .proj.w4 .proj-img { aspect-ratio: 3 / 2; }
.proj-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.02); transition: filter .6s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.proj:hover .proj-img img, .proj:focus-visible .proj-img img { filter: none; transform: scale(1.025); }
.proj-meta { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: baseline; font-size: 14px; }
.proj-meta .no { font-family: var(--serif); font-style: italic; color: var(--grey); }
.proj-meta b { font-weight: 500; }
.proj-meta span:last-child { color: var(--grey); font-size: 13px; }
.proj[hidden] { display: none; }
.grid.is-fading .proj { opacity: 0; transform: translateY(8px); }
.grid .proj { transition: opacity .35s ease, transform .35s ease; }

/* 목록 보기 (대표 효과: 커서 따라오는 사진) */
.list { display: none; border-top: 1px solid var(--graphite); }
.archive.is-list .grid { display: none; }
.archive.is-list .list { display: block; }
.row { display: grid; grid-template-columns: 90px minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) 60px; gap: 16px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .3s ease, color .3s ease; }
.row:hover, .row:focus-visible { padding-left: 14px; }
.list:hover .row:not(:hover) { color: var(--grey); }
.row .no { font-family: var(--serif); font-style: italic; color: var(--grey); }
.row b { font-size: clamp(20px, 2vw, 28px); font-weight: 400; letter-spacing: -0.03em; }
.row b .it { font-size: .8em; color: var(--grey); margin-left: 8px; }
.row span { font-size: 14px; }
.row .yr { text-align: right; font-family: var(--serif); font-style: italic; }
.row .thumb { display: none; }
.row[hidden] { display: none; }
.cursor-img { position: fixed; left: 0; top: 0; z-index: 25; width: 300px; aspect-ratio: 4 / 5; pointer-events: none; overflow: hidden; opacity: 0; transform: translate3d(-999px, -999px, 0); transition: opacity .25s ease; }
.cursor-img.is-on { opacity: 1; }
.cursor-img img { width: 100%; height: 100%; object-fit: cover; }

/* 사무소 소개 */
.sec { padding: clamp(80px, 10vw, 150px) var(--gut); border-top: 1px solid var(--line); }
.label { font-size: 13.5px; color: var(--grey); margin: 0 0 20px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.about-grid h2 { margin: 0; font-size: clamp(28px, 3.2vw, 46px); line-height: 1.35; font-weight: 300; letter-spacing: -0.04em; }
.about-grid p { margin: 0 0 1.2em; color: #4a4d52; font-size: 16px; line-height: 1.95; }
.principles { margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.principles div { border-top: 1px solid var(--graphite); padding-top: 14px; }
.principles dt { font-family: var(--serif); font-style: italic; font-size: 22px; }
.principles dd { margin: 6px 0 0; font-size: 14.5px; color: #4a4d52; }

/* 설계 과정 */
.process { width: 100%; border-collapse: collapse; }
.process th, .process td { text-align: left; padding: 18px 12px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.process thead th { font-weight: 400; font-size: 13px; color: var(--grey); border-bottom: 1px solid var(--graphite); }
.process tbody th { font-weight: 500; font-size: 17px; white-space: nowrap; }
.process tbody th .it { color: var(--grey); margin-right: 14px; font-size: 15px; }
.process td.d { white-space: nowrap; }

/* 수상·출판 */
.press { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.press ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--graphite); }
.press li { display: grid; grid-template-columns: 70px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.press li .it { color: var(--grey); }
.press h3 { margin: 0 0 16px; font-size: 15px; font-weight: 500; }

/* 문의 */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); background: var(--paper-2); }
.contact h2 { margin: 0; font-size: clamp(30px, 3.6vw, 54px); line-height: 1.2; font-weight: 300; letter-spacing: -0.045em; }
.contact dl { margin: 36px 0 0; font-size: 15px; }
.contact dl div { display: grid; grid-template-columns: 80px 1fr; padding: 10px 0; border-top: 1px solid var(--line); }
.contact dt { color: var(--grey); }
.contact dd { margin: 0; }
.form { display: grid; gap: 22px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--grey); }
.form input, .form select, .form textarea { font: inherit; font-size: 17px; color: var(--graphite); border: 0; border-bottom: 1px solid var(--graphite); background: transparent; padding: 8px 0; min-height: 46px; width: 100%; border-radius: 0; }
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-width: 2px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form button { justify-self: start; min-height: 52px; padding: 0 28px; border: 1px solid var(--graphite); background: var(--graphite); color: var(--paper); font: inherit; font-size: 15px; cursor: pointer; border-radius: 999px; }
.form button:hover { background: transparent; color: var(--graphite); }
.form-msg { margin: 0; font-size: 14px; min-height: 1.4em; }
.form-note { margin: 0; font-size: 13px; color: var(--grey); }

.foot { padding: 36px var(--gut); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--grey); }
.foot address { font-style: normal; }

/* 서브 공통 */
.ptop { padding: clamp(64px, 9vw, 140px) var(--gut) clamp(40px, 5vw, 72px); }
.ptop .crumb { font-size: 13.5px; color: var(--grey); margin: 0 0 18px; }
.ptop .crumb a { text-decoration: none; }
.ptop h1 { margin: 0; font-size: clamp(40px, 6vw, 92px); line-height: 1.1; font-weight: 300; letter-spacing: -0.055em; }
.ptop p { margin: 24px 0 0; max-width: 34em; color: #4a4d52; font-size: 16.5px; }
.full { margin: 0; height: clamp(260px, 42vw, 620px); overflow: hidden; }
.full img { width: 100%; height: 100%; object-fit: cover; }
.chron { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--graphite); }
.chron li { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.chron .it { font-size: 20px; }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.person { border-top: 1px solid var(--graphite); padding-top: 14px; display: grid; gap: 4px; }
.person b { font-size: 19px; font-weight: 500; }
.person .it { color: var(--grey); }
.person p { margin: 6px 0 0; font-size: 14.5px; color: #4a4d52; }
.reg { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.reg li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.reg li span { color: var(--grey); }

.svc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--graphite); }
.svc div { padding: 20px 20px 0 0; }
.svc div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.svc h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; }
.svc p { margin: 0; font-size: 14.5px; color: #4a4d52; }
.svc .it { display: block; margin-top: 12px; color: var(--grey); }
.pd { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.pd-figs { display: grid; gap: 16px; }
.pd-figs figure { margin: 0; }
.pd-figs figcaption { margin-top: 8px; font-size: 13px; color: var(--grey); }
.pd-figs .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pd-figs img { width: 100%; object-fit: cover; }
.plan { background: #fff; border: 1px solid var(--line); padding: 20px; }
.plan svg { width: 100%; height: auto; display: block; }
.plan .wall { fill: none; stroke: var(--graphite); stroke-width: 5; }
.plan .thin { fill: none; stroke: var(--graphite); stroke-width: 1.2; }
.plan .court { fill: #e4e7dc; }
.plan text { font: 400 11px var(--sans); fill: var(--graphite); }
.plan .dim { stroke: var(--grey); stroke-width: .8; fill: none; }
.plan .dimt { fill: var(--grey); font-size: 10px; }
.pd h2 { margin: 0 0 6px; font-size: clamp(30px, 3.4vw, 50px); font-weight: 300; letter-spacing: -0.045em; line-height: 1.2; }
.pd h2 + .it { font-size: 20px; color: var(--grey); }
.pd-text p { color: #4a4d52; }
.facts { margin: 28px 0; border-top: 1px solid var(--graphite); }
.facts div { display: grid; grid-template-columns: 96px 1fr; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { color: var(--grey); }
.facts dd { margin: 0; }
.btn { display: inline-flex; align-items: center; min-height: 50px; padding: 0 26px; border: 1px solid var(--graphite); border-radius: 999px; text-decoration: none; font-size: 15px; }
.btn:hover { background: var(--graphite); color: var(--paper); }

/* 반응형 */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .proj, .proj.w3 { grid-column: span 2; }
  .proj.w4 { grid-column: span 4; }
  .proj.w3 .proj-img { aspect-ratio: 4 / 5; }
  .row { grid-template-columns: 70px minmax(0, 2fr) minmax(0, 1fr) 56px; }
  .row .loc { display: none; }
  .svc { grid-template-columns: 1fr 1fr; }
  .svc div:nth-child(3) { padding-left: 0; border-left: 0; }
  .svc div { padding-bottom: 20px; }
}
@media (max-width: 860px) {
  :root { --side: 0px; }
  .side { position: sticky; top: 0; bottom: auto; width: auto; height: 60px; flex-direction: row; align-items: center; padding: 0 var(--gut); border-right: 0; border-bottom: 1px solid var(--line); }
  .studio b { font-size: 17px; display: inline; }
  .studio .it { display: none; }
  .menu-btn { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--graphite); cursor: pointer; padding: 0; }
  .menu-btn::after { content: '메뉴'; }
  .ce-nav-open .menu-btn::after { content: '닫기'; }
  .side-nav { position: fixed; left: 0; right: 0; top: 60px; margin: 0; padding: 12px var(--gut) 28px; background: var(--paper); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .side-nav.is-open { opacity: 1; visibility: visible; }
  .side-nav a { font-size: 22px; padding: 12px 0; color: var(--graphite); border-bottom: 1px solid var(--line); }
  .side-foot { display: none; }
  .bar { top: 60px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .intro { grid-template-columns: 1fr; padding-top: 48px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 32px 14px; }
  .proj, .proj.w3 { grid-column: span 1; }
  .proj.w4 { grid-column: 1 / -1; }
  .proj-meta { grid-template-columns: 1fr; gap: 0; }
  .proj-img img { filter: none; }
  .row { grid-template-columns: 72px 1fr; gap: 4px 14px; align-items: center; }
  .row .no { display: none; }
  .row .thumb { display: block; grid-row: span 2; width: 72px; aspect-ratio: 1; overflow: hidden; }
  .row .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .row b { font-size: 19px; }
  .row .use, .row .yr { grid-column: 2; text-align: left; font-size: 13px; color: var(--grey); }
  .row .yr { display: none; }
  .cursor-img { display: none; }
  .about-grid, .press, .contact, .pd { grid-template-columns: 1fr; }
  .principles, .people { grid-template-columns: 1fr; }
  .process thead { display: none; }
  .process, .process tbody, .process tr, .process th, .process td { display: block; width: 100%; }
  .process tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .process th, .process td { border: 0; padding: 2px 0; }
  .form .two { grid-template-columns: 1fr; }
  .reg { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; }
  .svc div, .svc div + div { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .pd-figs .pair { grid-template-columns: 1fr; }
}
@media (max-width: 860px) { .side { transform: translateZ(0); } }
.r43 { aspect-ratio: 4 / 3; }
.r32, .pd-figs .pair img { aspect-ratio: 3 / 2; }
@media (max-width: 860px) {
  .grid .proj.w4 { grid-column: span 1; }
  .grid .proj.w4 .proj-img { aspect-ratio: 4 / 5; }
  .grid .proj:first-child, .grid .proj:last-child { grid-column: 1 / -1; }
  .grid .proj:first-child .proj-img, .grid .proj:last-child .proj-img { aspect-ratio: 3 / 2; }
}
@media (max-width: 860px) {
  .process td:nth-child(3)::before { content: '받는 것 · '; color: var(--grey); }
  .process td.d::before { content: '기간 · '; color: var(--grey); }
}
