/* =========================================================
   판타스트릭 TGC 팀 포트폴리오 — 사이트 스타일
   근거·결정은 _site/src/디자인방향.md 참고. 토큰을 먼저 고친다.
   ========================================================= */

@font-face {
  font-family: "Pretendard";
  src: url("../fonts/PretendardVariable.woff2") format("woff2-variations"),
       url("../fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MaruBuri";
  src: url("../fonts/MaruBuri-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "MaruBuri";
  src: url("../fonts/MaruBuri-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ---------- 토큰 ---------- */
:root {
  /* 색 — 중립 종이 + 먹. 사이트 틀에는 유채색을 쓰지 않는다 */
  --paper: #F4F2ED;      /* 바탕 */
  --paper-2: #EAE6DE;    /* 빈 사진 자리·보조 면 */
  --paper-3: #E0DBD1;    /* 눌림·구분 면 */
  --ink: #171614;        /* 제목·본문 (바탕 대비 16.2:1) */
  --ink-2: #545049;      /* 보조 글·캡션 (바탕 대비 7.2:1) */
  --ink-3: #7A756C;      /* 장식용 구분 기호 전용 (4.1:1 — 글 본문에 쓰지 않음) */
  --line: #D6D0C5;       /* 머리카락 선 */
  --line-strong: #171614;
  --invert-bg: #171614;  /* 문의 띠 */
  --invert-fg: #F4F2ED;
  --invert-2: #B9B3A8;   /* 어두운 바탕 보조 글 (8.7:1) */
  --accent: #171614;     /* 사례마다 덮어씀 (빌드가 AA 대비로 보정) */
  --accent-ink: #F4F2ED; /* 강조색 위 글자 */

  /* 글꼴 */
  --f-sans: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --f-serif: "MaruBuri", "Pretendard", serif;

  /* 타이포 4단: 제목·숫자 / 소제목 / 본문 / 캡션 */
  --t-display: clamp(40px, 5.4vw, 80px);
  --t-statement: clamp(27px, 3.9vw, 58px);
  --t-number: clamp(40px, 4.2vw, 64px);
  --t-h2: clamp(22px, 1.9vw, 28px);
  --t-h3: 19px;
  --t-lead: clamp(19px, 1.55vw, 23px);
  --t-body: 17px;
  --t-caption: 13.5px;
  --t-label: 12.5px;

  /* 간격 (8 배수) */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px;
  --s6: 64px; --s7: 96px; --s8: 128px; --s9: 176px;

  /* 그리드 */
  --gutter: 24px;
  --margin: clamp(20px, 4vw, 56px);
  --maxw: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.75;
  font-feature-settings: "ss06" 0;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.invert :focus-visible { outline-color: var(--invert-fg); }
strong { font-weight: 650; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 그리드 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.c-all { grid-column: 1 / -1; }
.c-label { grid-column: 1 / span 3; }
.c-main { grid-column: 5 / span 7; }
.c-wide { grid-column: 5 / -1; }
.c-left7 { grid-column: 1 / span 7; }
.c-right4 { grid-column: 9 / span 4; }
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 16px; }
  .c-label, .c-main, .c-wide, .c-left7, .c-right4 { grid-column: 1 / -1; }
}

/* ---------- 머리·꼬리 ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); min-height: 64px; padding-top: 20px; padding-bottom: 18px; }
.wordmark { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; text-decoration: none; }
.wordmark span { font-weight: 400; color: var(--ink-2); margin-left: 6px; }
.site-nav { display: flex; gap: var(--s3); font-size: 14.5px; }
.site-nav a { text-decoration: none; padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
@media (max-width: 560px) { .wordmark span { display: none; } .site-nav { gap: var(--s2); } }

.site-foot { border-top: 1px solid var(--line); padding: var(--s4) 0 var(--s5); font-size: var(--t-caption); color: var(--ink-2); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); }

/* ---------- 공통 조각 ---------- */
.label { font-size: var(--t-label); font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2); line-height: 1.5; }
.label .no { color: var(--accent); font-feature-settings: "tnum"; margin-right: 10px; }
.caption, figcaption { font-size: var(--t-caption); line-height: 1.55; color: var(--ink-2); margin-top: 10px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: var(--t-caption); color: var(--ink-2); }
.tags li::before { content: "#"; opacity: .55; margin-right: 1px; }
.prose p + p { margin-top: 1.1em; }
.prose { max-width: 33em; }
.prose h3 { font-size: var(--t-h3); font-weight: 650; line-height: 1.5; margin: var(--s5) 0 var(--s1); }
.prose h3:first-child { margin-top: 0; }
.prose ul.list { margin: 1em 0; }
.prose ul.list li { position: relative; padding-left: 1.1em; }
.prose ul.list li + li { margin-top: 0.35em; }
.prose ul.list li::before { content: ""; position: absolute; left: 0; top: 0.82em; width: 0.45em; height: 1px; background: var(--ink); }

/* 사진 */
.ph-img { background: var(--paper-2); overflow: hidden; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.ratio-4x5 { aspect-ratio: 4 / 5; }

/* ---------- 빈 자리 (공개 빌드: 품위 있게 비움) ---------- */
.slot { position: relative; background: var(--paper-2); border: 1px solid var(--line); display: flex; align-items: flex-end; }
.slot .slot-note { padding: 14px 16px; font-size: var(--t-caption); color: var(--ink-2); line-height: 1.5; }
.slot-row { min-height: 140px; }
.slot-row ul { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-top: 4px; }
.slot-row li::before { content: "· "; }
.slot .slot-note b { display: block; font-weight: 600; color: var(--ink); letter-spacing: 0.02em; }

/* ---------- 빈 자리 (미리보기: 눈에 띄게) ---------- */
.is-preview .slot { background: repeating-linear-gradient(135deg, #FFF2A8 0 18px, #FFE97A 18px 36px); border: 2px dashed #C2185B; align-items: center; justify-content: center; text-align: center; min-height: 120px; }
.is-preview .slot .slot-note { color: #1a1a1a; font-size: 15px; }
.fill { display: inline-block; background: #C2185B; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; margin-bottom: 6px; border-radius: 2px; }
.fill-box { border: 2px dashed #C2185B; background: #FFF6CC; padding: 16px 18px; color: #1a1a1a; font-size: 15px; line-height: 1.55; }
.fill-box .where { display: block; font-size: 12px; color: #6b5a00; margin-top: 4px; }
.fill-inline { background: #FFE97A; outline: 1px dashed #C2185B; padding: 0 4px; }
.preview-bar { position: sticky; top: 0; z-index: 40; background: #C2185B; color: #fff; font-size: 13.5px; font-weight: 600; }
.preview-bar .wrap { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; min-height: 40px; }
.preview-bar a { color: #fff; }

/* =========================================================
   첫 화면 (index)
   ========================================================= */
.home-hero { padding: var(--s8) 0 var(--s7); }
.home-hero .statement { grid-column: 1 / span 10; font-family: var(--f-serif); font-weight: 600; font-size: var(--t-statement); line-height: 1.28; letter-spacing: -0.025em; text-wrap: balance; }
.home-hero .meta { grid-column: 1 / -1; margin-top: var(--s6); display: grid; grid-template-columns: subgrid; align-items: start; }
.home-hero .meta .who { grid-column: 1 / span 3; }
.home-hero .meta .what { grid-column: 5 / span 8; font-size: var(--t-lead); line-height: 1.6; color: var(--ink); }
.home-hero .meta .what .sep { color: var(--ink-3); margin: 0 0.35em; }
@media (max-width: 900px) {
  .home-hero { padding: var(--s6) 0 var(--s5); }
  .home-hero .statement { grid-column: 1 / -1; }
  .home-hero .meta { display: block; margin-top: var(--s4); }
  .home-hero .meta .what { margin-top: var(--s1); }
}

.sec { padding: var(--s7) 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.sec-head h2 { font-size: var(--t-h2); font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.sec-head .count { font-size: var(--t-caption); color: var(--ink-2); font-feature-settings: "tnum"; }
@media (max-width: 900px) { .sec { padding: var(--s6) 0; } }

/* 대표 작업 */
.feature { display: block; text-decoration: none; }
.feature .ph-img { aspect-ratio: 16 / 8; }
.feature .ph-img img { transition: transform .6s ease; }
.feature:hover .ph-img img { transform: scale(1.012); }
.feature .feature-meta { margin-top: var(--s3); }
.feature .t { grid-column: 1 / span 5; font-family: var(--f-serif); font-weight: 600; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.25; letter-spacing: -0.02em; }
.feature .d { grid-column: 7 / span 4; font-size: 16px; line-height: 1.65; color: var(--ink); }
.feature .y { grid-column: 11 / span 2; text-align: right; font-size: var(--t-caption); color: var(--ink-2); line-height: 1.65; }
.feature:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
@media (max-width: 900px) {
  .feature .ph-img { aspect-ratio: 4 / 3; }
  .feature .t, .feature .d, .feature .y { grid-column: 1 / -1; text-align: left; }
  .feature .d { margin-top: var(--s1); }
  .feature .y { margin-top: var(--s1); }
}

/* 전체 작업 표 (글자 표 + 작은 썸네일) */
.work-table { width: 100%; border-collapse: collapse; margin-top: var(--s6); font-size: 15px; }
.work-table caption { text-align: left; padding-bottom: var(--s2); }
.work-table th { text-align: left; font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; color: var(--ink-2); padding: 0 12px 10px 0; border-bottom: 1px solid var(--ink); }
.work-table td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.5; }
.work-table td.ym { font-feature-settings: "tnum"; color: var(--ink-2); white-space: nowrap; width: 7em; }
.work-table td.name a { font-weight: 600; text-decoration: none; }
.work-table tr:hover td.name a { text-decoration: underline; }
.work-table td.thumb { width: 96px; padding-right: 0; }
.work-table td.thumb span { display: block; width: 96px; aspect-ratio: 3/2; background: var(--paper-2); overflow: hidden; }
.work-table td.thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-table td.muted { color: var(--ink-2); }
@media (max-width: 700px) {
  .work-table thead { display: none; }
  .work-table, .work-table tbody, .work-table tr, .work-table td { display: block; width: auto; }
  .work-table tr { display: grid; grid-template-columns: 1fr 88px; column-gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .work-table td { border: 0; padding: 0; }
  .work-table td.thumb { grid-column: 2; grid-row: 1 / span 4; width: 88px; }
  .work-table td.thumb span { width: 88px; }
  .work-table td.ym { width: auto; font-size: 13px; }
}

/* 서비스 */
.services { grid-column: 5 / -1; counter-reset: svc; }
.services li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) minmax(0, 1.4fr); column-gap: var(--gutter); padding: 22px 0; border-top: 1px solid var(--line); align-items: baseline; }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services .n { font-size: var(--t-caption); color: var(--ink-2); font-feature-settings: "tnum"; }
.services .nm { font-size: 21px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.4; }
.services .ds { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
@media (max-width: 900px) {
  .services { grid-column: 1 / -1; margin-top: var(--s4); }
  .services li { grid-template-columns: 2.4em minmax(0, 1fr); }
  .services .ds { grid-column: 2; margin-top: 4px; }
}

/* 문의 띠 (먹 바탕 — 사이트에서 유일한 어두운 면) */
.invert { background: var(--invert-bg); color: var(--invert-fg); }
.invert .label { color: var(--invert-2); }
.contact { padding: var(--s8) 0 var(--s7); }
.contact h2 { grid-column: 1 / span 9; font-family: var(--f-serif); font-weight: 600; font-size: clamp(28px, 3.2vw, 48px); line-height: 1.3; text-wrap: balance; letter-spacing: -0.025em; }
.contact .lines { grid-column: 1 / -1; margin-top: var(--s6); display: grid; grid-template-columns: subgrid; row-gap: var(--s3); }
.contact .line { grid-column: span 4; border-top: 1px solid #3A3733; padding-top: 14px; }
.contact .line .v { display: block; font-size: clamp(18px, 1.6vw, 24px); font-weight: 500; margin-top: 4px; word-break: break-all; }
.contact .line .v a { text-decoration: none; }
.contact .line .v a:hover { text-decoration: underline; }
.contact .note { grid-column: 1 / span 7; margin-top: var(--s5); color: var(--invert-2); font-size: 15.5px; }
.invert .slot { background: #24221F; border-color: #3A3733; }
.invert .slot .slot-note, .invert .slot .slot-note b { color: var(--invert-2); }
.invert .empty-v { color: var(--invert-2); font-size: 16px; font-weight: 400; }
@media (max-width: 900px) {
  .contact { padding: var(--s6) 0; }
  .contact h2 { grid-column: 1 / -1; }
  .contact .lines { display: block; margin-top: var(--s4); }
  .contact .line { margin-top: var(--s2); }
  .contact .note { grid-column: 1 / -1; }
}

/* =========================================================
   사례 페이지 (work/<코드>/)
   ========================================================= */
.case-top { padding: var(--s6) 0 var(--s5); }
.crumb { font-size: var(--t-caption); color: var(--ink-2); }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.case-title { grid-column: 1 / span 10; margin-top: var(--s5); font-family: var(--f-serif); font-weight: 600; font-size: var(--t-display); line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.case-one { grid-column: 1 / span 7; margin-top: var(--s3); font-size: var(--t-lead); line-height: 1.55; }
.case-kind { grid-column: 9 / span 4; margin-top: var(--s3); align-self: end; text-align: right; }
.case-kind .tags { justify-content: flex-end; }
@media (max-width: 900px) {
  .case-top { padding: var(--s4) 0 var(--s4); }
  .case-title { grid-column: 1 / -1; margin-top: var(--s4); }
  .case-one { grid-column: 1 / -1; }
  .case-kind { grid-column: 1 / -1; text-align: left; margin-top: var(--s2); }
  .case-kind .tags { justify-content: flex-start; }
}

.case-hero .ph-img, .case-hero .slot { aspect-ratio: 16 / 9; }
@media (max-width: 700px) { .case-hero .ph-img, .case-hero .slot { aspect-ratio: 4 / 3; } .case-hero .wrap { padding: 0; } }

/* 리드 + 정보 상자 */
.case-intro { padding: var(--s7) 0 var(--s6); }
.case-lead { grid-column: 1 / span 7; font-size: var(--t-lead); line-height: 1.7; letter-spacing: -0.005em; }
.case-lead p + p { margin-top: 0.9em; }
.facts { grid-column: 9 / span 4; font-size: 14.5px; line-height: 1.55; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); font-size: 13px; padding-top: 1px; }
.facts dd { color: var(--ink); }
@media (max-width: 900px) {
  .case-intro { padding: var(--s5) 0 var(--s4); }
  .case-lead, .facts { grid-column: 1 / -1; }
  .facts { margin-top: var(--s5); }
}

/* 숫자 띠 */
.numbers { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.numbers ul { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.numbers li { padding: var(--s5) var(--s3) var(--s5) 0; }
.numbers li + li { padding-left: var(--s3); border-left: 1px solid var(--line); }
.numbers .v { font-size: var(--t-number); font-weight: 300; line-height: 1; letter-spacing: -0.035em; font-feature-settings: "tnum"; }
.numbers .v small { font-size: 0.42em; font-weight: 450; letter-spacing: 0; margin-left: 0.12em; }
.numbers .k { margin-top: 14px; font-size: 15px; font-weight: 550; line-height: 1.45; }
.numbers .b { margin-top: 4px; font-size: var(--t-caption); color: var(--ink-2); line-height: 1.45; }
.numbers .fill-box { height: 100%; }
@media (max-width: 700px) {
  .numbers ul { grid-template-columns: 1fr 1fr; }
  .numbers li { padding: var(--s4) var(--s2) var(--s4) 0; }
  .numbers li + li { padding-left: 0; border-left: 0; }
  .numbers li:nth-child(even) { padding-left: var(--s2); border-left: 1px solid var(--line); }
  .numbers li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .numbers ul[style*="--n:3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .numbers ul[style*="--n:3"] li { padding: var(--s4) 10px var(--s4) 0; border-top: 0; }
  .numbers ul[style*="--n:3"] li + li { padding-left: 10px; border-left: 1px solid var(--line); }
  .numbers ul[style*="--n:3"] .v { font-size: 36px; }
  .numbers ul[style*="--n:3"] .k { font-size: 13.5px; }
}

/* 본문 장 */
.chapter { padding: var(--s7) 0 0; }
.chapter.scope-sec { padding-bottom: var(--s7); }
.chapter .c-label h2 { font-size: var(--t-h2); font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; margin-top: 6px; }
.chapter .c-label { position: sticky; top: var(--s3); align-self: start; }
.is-preview .chapter .c-label { top: 64px; }
.chapter .flow > * + * { margin-top: var(--s5); }
.chapter .flow > .prose + .prose { margin-top: 1.1em; }
@media (max-width: 900px) {
  .chapter { padding-top: var(--s6); }
  .chapter .c-label { position: static; margin-bottom: var(--s3); }
}

/* 본문 사이 그림: 본문 열을 벗어나 넓게 (같은 구도 반복을 피하려고 번갈아) */
.fig-out { grid-column: 1 / -1; }
.fig-out.alt { grid-column: 3 / -1; }
.fig-row { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.fig-row .ph-img, .fig-row .slot { aspect-ratio: 4 / 3; }
.fig-row.n3 .ph-img, .fig-row.n3 .slot { aspect-ratio: 4 / 5; }
.fig-one .ph-img, .fig-one .slot { aspect-ratio: 3 / 2; }
.fig-one .ph-img.natural { aspect-ratio: auto; }
.fig-one .ph-img.ratio-16x9 { aspect-ratio: 16 / 9; }
.ph-img.portrait img { object-position: 50% 0; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.compare figure { position: relative; }
.compare .ph-img, .compare .slot { aspect-ratio: 4 / 3; }
@media (max-width: 700px) {
  .fig-out.alt { grid-column: 1 / -1; }
  .fig-row { grid-template-columns: 1fr; gap: var(--s2); }
  .fig-row.n3 .ph-img, .fig-row.n3 .slot { aspect-ratio: 4 / 3; }
  .fig-row .ph-img.portrait { aspect-ratio: 4 / 5; }
  .compare { grid-template-columns: 1fr; }
}

/* 인용 */
.pull { padding-top: var(--s2); border-top: 2px solid var(--accent); max-width: 30em; }
.pull p { font-family: var(--f-serif); font-weight: 400; font-size: clamp(21px, 1.8vw, 27px); line-height: 1.6; letter-spacing: -0.015em; }
.pull cite { display: block; margin-top: var(--s2); font-style: normal; font-size: var(--t-caption); color: var(--ink-2); }

/* 맡은 범위 + 크레딧 */
.scope { columns: 2; column-gap: var(--gutter); font-size: 16px; }
.scope li { break-inside: avoid; padding: 10px 0; border-top: 1px solid var(--line); line-height: 1.5; }
@media (max-width: 560px) { .scope { columns: 1; } }
.credit { margin-top: var(--s5); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); font-size: 15px; }
.credit dt { font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; color: var(--ink-2); }
.credit dd { margin-top: 4px; line-height: 1.5; }

/* 다음 사례 */
.next { border-top: 1px solid var(--line); }
.next a { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: var(--s6) 0; text-decoration: none; align-items: center; }
.next .lb { grid-column: 1 / span 3; }
.next .t { grid-column: 4 / span 6; font-family: var(--f-serif); font-weight: 600; font-size: clamp(26px, 2.8vw, 42px); line-height: 1.2; letter-spacing: -0.02em; }
.next .im { grid-column: 10 / span 3; aspect-ratio: 3 / 2; background: var(--paper-2); overflow: hidden; }
.next .im img { width: 100%; height: 100%; object-fit: cover; }
.next a:hover .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
@media (max-width: 900px) {
  .next a { grid-template-columns: 1fr; row-gap: var(--s2); }
  .next .lb, .next .t, .next .im { grid-column: 1; }
}

/* 사례 문의 (짧은 띠) */
.case-cta { padding: var(--s7) 0; }
.case-cta h2 { text-wrap: balance; grid-column: 1 / span 7; font-family: var(--f-serif); font-weight: 600; font-size: clamp(26px, 2.8vw, 40px); line-height: 1.3; letter-spacing: -0.02em; }
.case-cta .lines { grid-column: 9 / span 4; align-self: end; font-size: 16px; line-height: 1.8; }
.case-cta .lines a { text-decoration: none; border-bottom: 1px solid #5a5650; }
.case-cta .lines a:hover { border-bottom-color: var(--invert-fg); }
@media (max-width: 900px) { .case-cta h2, .case-cta .lines { grid-column: 1 / -1; } .case-cta .lines { margin-top: var(--s4); } }

.draft-note { background: var(--ink); color: var(--paper); font-size: 13px; padding: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-head, .preview-bar, .site-foot, .next { display: none; }
  body { background: #fff; }
}

/* =========================================================
   2026-12-01 검수 반영 (H3·H4·H5·M4)
   ========================================================= */
/* 그림 종류 표시 — 3D 화면을 실제 사진으로 오해하지 않게 */
figcaption .kind { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; color: var(--ink); border: 1px solid var(--line); padding: 0 6px; margin-right: 6px; line-height: 1.7; vertical-align: 1px; }
.hero-cap, .img-kind { font-size: var(--t-caption); color: var(--ink-2); margin-top: 10px; }
.temp-tag { position: absolute; left: 12px; top: 12px; font-size: 13px; }
.muted-s { color: var(--ink-2); font-size: 13.5px; }

/* 원본 비율 — 가로로 아주 긴 그림은 자르지 않는다 */
.ph-img.natural, .case-hero .ph-img.natural { aspect-ratio: auto; }
.ph-img.natural img { height: auto; }
.ph-img.wide img { object-fit: contain; }
.fig-one .ph-img.tall { max-width: 440px; }

/* 높이를 맞춘 그림 줄: 그림마다 원본 비율대로 폭을 나눈다 */
.fig-row.just { display: flex; gap: var(--gutter); align-items: flex-start; max-width: calc(var(--sum) * 600px + (var(--n) - 1) * var(--gutter)); }
.fig-row.just > figure { min-width: 0; }
.fig-row.just .ph-img, .fig-row.n3.just .ph-img { aspect-ratio: var(--r); }
@media (max-width: 700px) {
  .fig-row.just { flex-direction: column; max-width: none; gap: var(--s3); }
  .fig-row.just > figure { width: 100%; flex: none !important; }
  .fig-row.just.has-tall { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; }
  .fig-row.just.has-tall > figure { width: 64%; flex: 0 0 64% !important; scroll-snap-align: start; }
  .fig-one .ph-img.tall { max-width: 72%; }
}

/* 첫 화면: 팀명 + 하는 일 + 대표 숫자 (사례 1건일 때도 빈약하지 않게) */
.home-hero .statement.is-name { font-size: var(--t-display); line-height: 1.1; letter-spacing: -0.03em; }
.home-hero .hmeta { grid-column: 1 / -1; margin-top: var(--s6); border-top: 1px solid var(--ink); }
.hrow { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: var(--s4) 0; border-bottom: 1px solid var(--line); align-items: start; }
.hrow > .label { grid-column: 1 / span 3; }
.hrow .src { display: block; font-size: var(--t-caption); color: var(--ink-2); font-weight: 400; letter-spacing: 0; margin-top: 4px; }
.hrow .what { grid-column: 5 / -1; font-size: var(--t-lead); line-height: 1.55; }
.hrow .what .sep { color: var(--ink-3); margin: 0 0.4em; }
.hrow .what .src { margin-top: 8px; }
.hnums { grid-column: 5 / -1; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.hnums li { padding-right: var(--s3); }
.hnums li + li { padding-left: var(--s3); border-left: 1px solid var(--line); }
.hnums .v { font-size: var(--t-number); font-weight: 300; line-height: 1; letter-spacing: -0.035em; font-feature-settings: "tnum"; }
.hnums .v small { font-size: 0.42em; font-weight: 450; letter-spacing: 0; margin-left: 0.12em; }
.hnums .k { margin-top: 12px; font-size: 15px; font-weight: 550; line-height: 1.45; }
@media (max-width: 900px) {
  .hrow { display: block; padding: var(--s3) 0; }
  .hrow .what, .hnums { margin-top: var(--s2); }
  .hnums li { padding-right: 10px; }
  .hnums li + li { padding-left: 10px; }
  .hnums .v { font-size: 34px; }
  .hnums .k { font-size: 13.5px; }
}
.home-hero:has(.hmeta) { padding-bottom: var(--s5); }
.home-hero:has(.hmeta) + .sec { padding-top: var(--s6); }
.scope + .prose, .scope + div { margin-top: var(--s2); font-size: var(--t-caption); color: var(--ink-2); }

/* =========================================================
   2026-12-02 공개 전 검수 반영 (M3·M4·M5·M10·L6)
   ========================================================= */
/* 제목: 한 단어만 다음 줄로 떨어지지 않게 균형 줄바꿈 */
.case-title, .feature .t, .sec-head h2, .chapter h2, .next .t { text-wrap: balance; word-break: keep-all; }
.prose p, .case-lead p, .case-one { text-wrap: pretty; }

/* 숫자: 한 줄 유지, 자릿수가 많으면 칸 폭에 맞춰 글자를 줄인다(--em = 빌드가 잰 글자 폭) */
.numbers li, .hnums li { container-type: inline-size; min-width: 0; }
.numbers .v, .hnums .v { white-space: nowrap; font-size: min(var(--t-number), calc(96cqi / var(--em, 3))); }
@media (max-width: 900px) { .hnums .v { font-size: min(34px, calc(96cqi / var(--em, 3))); } }
@media (max-width: 700px) { .numbers ul[style*="--n:3"] .v { font-size: min(36px, calc(96cqi / var(--em, 3))); } }

/* 대표 이미지: 칸에 맞추면 많이 잘리는 그림(여러 장을 모은 그림 등)은 원본 비율 */
.case-hero .ph-img.natural img, .feature .ph-img.natural img { height: auto; }
.feature .ph-img.natural { aspect-ratio: var(--r); }
@media (max-width: 700px) {
  .case-hero .ph-img.keep-m { aspect-ratio: auto; }
  .case-hero .ph-img.keep-m img { height: auto; }
}
@media (max-width: 900px) {
  .feature .ph-img.keep-m { aspect-ratio: var(--r); }
}

/* 추천 사례 2개 = 나란히 */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s6); align-items: start; }
.features .feature .ph-img { aspect-ratio: 3 / 2; }
.features .feature .ph-img.natural { aspect-ratio: var(--r); }
.features .feature .feature-meta { display: block; }
.features .feature .t { font-size: clamp(22px, 1.9vw, 30px); }
.features .feature .d { margin-top: var(--s1); max-width: 34em; }
.features .feature .y { text-align: left; margin-top: var(--s1); }
.features + .work-table { margin-top: var(--s6); }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .features .feature .ph-img { aspect-ratio: 4 / 3; } }
.hrow > .label a { color: inherit; text-decoration: none; }
.hrow > .label a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

/* 가로로 넘기는 그림 줄: 좁은 화면에서만 넘김 표시 */
.swipe-hint { display: none; }
@media (max-width: 700px) {
  .swipe-hint { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: var(--t-caption); color: var(--ink-2); }
  .swipe-hint span:first-child::after { content: " →"; }
  .swipe-hint .cnt { font-feature-settings: "tnum"; }
  .fig-row.just.has-tall { scrollbar-width: thin; }
  .fig-row.just.has-tall:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
}
.tk { display: inline-block; }
.hrow .what .wi { white-space: nowrap; }
.numbers .v small, .hnums .v small { font-size: max(0.42em, 13px); }
.numbers .k, .hnums .k, .numbers .b { text-wrap: balance; }
/* 모바일: 대표 이미지는 화면 끝까지, 캡션은 본문 여백에 맞춘다 */
@media (max-width: 700px) { .case-hero .caption { padding: 0 var(--margin); } }

/* 본문 장 배치 */
.ch-grid { row-gap: var(--s5); }
.ch-grid > .c-label { grid-row: 1; }
.ch-grid > .b-text { grid-column: 5 / span 7; }
.ch-grid > .b-wide { grid-column: 5 / -1; }
.ch-grid > .b-full { grid-column: 1 / -1; }
@media (max-width: 900px) { .ch-grid > .b-text, .ch-grid > .b-wide, .ch-grid > .b-full { grid-column: 1 / -1; } .ch-grid { row-gap: var(--s4); } }
