/* wf.css — 2026 홍익시디 졸업주간 아카이브 와이어프레임
   색·타이포 체계는 티저 데모(hongiksidi-teaser/prototype/2026)에서 이어받는다:
   지면 #f5f5f3 · 먹 #0d0d0d · 강조색 없음 · 라벨은 SUIT, 글은 Pretendard ·
   네비는 알약(현재 위치 차콜, 나머지 밝은 회색).
   크기 토큰은 데모 아카이브(hongiksidi-2026/src/styles/global.css) 확정값을 쓴다.
   본문·메타 두 단계만. --t-md 이상은 제목 전용. 여백은 4px 격자. */

@font-face {
  font-family: 'Pretendard Variable';
  src: url('fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'SUIT Variable';
  src: url('fonts/SUIT-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* 색 — 티저 체계. 메타는 대비 6.5:1 이상이 되게 먹의 68% */
  --ground: #f5f5f3;
  --ink: #0d0d0d;
  --mute: rgba(13, 13, 13, .68);
  --seam: rgba(13, 13, 13, .15);   /* 헤어라인 */
  --faint: rgba(13, 13, 13, .07);  /* 이미지 자리 면 */
  --nav-on: #33322f;  --nav-on-ink: #c9c8c4;
  --nav-off: #d2d1cd; --nav-off-ink: #3a3936;

  --f-label: 'SUIT Variable', SUIT, 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
  --f-text: 'Pretendard Variable', Pretendard, -apple-system, system-ui, 'Apple SD Gothic Neo', sans-serif;

  /* 타입 스케일 — 데모 확정값 */
  --t-dim: 0.6875rem;                                      /* 11 — 도면 라벨 */
  --t-sm: clamp(0.875rem, 0.83rem + 0.19vw, 0.9375rem);    /* 14 → 15 메타 */
  --t-base: clamp(1rem, 0.94rem + 0.25vw, 1.125rem);       /* 16 → 18 본문 */
  --t-md: 1.1875rem;
  --t-lg: 1.4375rem;
  --t-xl: clamp(1.75rem, 1.1rem + 2.2vw, 2.625rem);
  --t-display: clamp(2.5rem, 1.4rem + 5.5vw, 5.25rem);

  /* 여백 — 4px 격자 */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.25rem; --s6: 1.5rem;
  --s8: 2rem; --s10: 2.5rem; --s12: 3rem; --s16: 4rem; --s20: 5rem; --s24: 6rem;

  --max: 84rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --prose: 34em;
  --measure-list: 58rem;
  --head-h: 3.5rem;                 /* 56 */
  --thumb-ratio: 3 / 2;             /* 대표 이미지 — hongiksidi-2026 THUMB_RATIO */
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0d0d0d;
    --ink: #f2f2f0;
    --mute: rgba(242, 242, 240, .62);
    --seam: rgba(255, 255, 255, .18);
    --faint: rgba(255, 255, 255, .07);
    --nav-on: #e6e5e1;  --nav-on-ink: #1a1a19;
    --nav-off: #2a2a28; --nav-off-ink: #b5b4b0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--t-base);
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--ground);
  word-break: keep-all;
  overflow-wrap: break-word;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--ground); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ── 라벨 어휘 (티저 .t-dim) — 도면 라벨: 작게, 대문자, 자간 넓게 ── */
.lbl {
  font-family: var(--f-label);
  font-weight: 500;
  font-size: var(--t-dim);
  line-height: 1.5;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.num { font-family: var(--f-label); font-variant-numeric: tabular-nums; }

/* ── 메뉴 바 — 위 고정. 왼쪽 전시명, 오른쪽 알약 네비 ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--head-h);
  background: var(--ground);
  border-bottom: 1px solid var(--seam);
}
.site-header .in {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s8);
}
.brand {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: var(--t-base);
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand small {
  font-weight: 400;
  font-size: var(--t-sm);
  letter-spacing: 0;
  color: var(--mute);
  margin-left: var(--s3);
}

/* 알약 네비 — 하나의 알약을 5칸으로 나눈다. 현재 위치만 차콜 */
.menu {
  display: flex;
  background: var(--nav-off);
  border-radius: 999px;
  padding: 3px;
}
.menu a {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;          /* 36 */
  padding: 0 var(--s4);
  border-radius: 999px;
  font-family: var(--f-label);
  font-weight: 700;
  font-size: .8125rem;          /* 13 */
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nav-off-ink);
  white-space: nowrap;
}
.menu a[aria-current="page"] { background: var(--nav-on); color: var(--nav-on-ink); }

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--head-h) + var(--s10)) var(--gutter) var(--s24);
}

/* ── 쪽 머리 — 라벨 + 수치. 아래 머리선 1px ── */
.kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--ink);
  margin-bottom: var(--s6);
}
.kicker .cnt {
  font-family: var(--f-label);
  font-weight: 300;
  font-size: var(--t-lg);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.kicker .cnt small { font-size: var(--t-sm); font-weight: 400; color: var(--mute); margin-left: var(--s1); letter-spacing: 0; }

/* ── 이미지 자리: 옅은 면 + 대각선 1개 ── */
.ph { position: relative; overflow: hidden; background: var(--faint); }
.ph::after {
  content: "";
  position: absolute; inset: 0;
  /* 대각선은 크기와 무관하게 1px — % 만 쓰면 큰 상자에서 굵어진다 */
  background: linear-gradient(to top right,
    transparent calc(50% - .5px), var(--seam) calc(50% - .5px),
    var(--seam) calc(50% + .5px), transparent calc(50% + .5px));
}
.ph.thumb { aspect-ratio: var(--thumb-ratio); }
.ph.wide { aspect-ratio: 16 / 9; }

/* ── INDEX — 검색 + 표. 한 줄 = 작품 하나. 순서는 열 때마다 무작위 ── */
.find {
  max-width: var(--measure-list);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: var(--s2) var(--s4);
  margin-bottom: var(--s6);
}
.find input {
  min-width: 0; width: 100%;
  font: inherit; font-size: var(--t-base); color: inherit;
  padding: var(--s2) 0;
  border: 0; border-bottom: 1px solid var(--ink);
  border-radius: 0; background: none; -webkit-appearance: none;
}
.find input::placeholder { color: var(--mute); }
.find input:focus-visible { outline: none; border-bottom-width: 2px; }
.find .cnt {
  white-space: nowrap;
  font-family: var(--f-label); font-weight: 300; font-size: var(--t-lg); line-height: 1;
  letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
}
.find .cnt small { font-size: var(--t-sm); font-weight: 400; color: var(--mute); margin-left: var(--s1); letter-spacing: 0; }

table.idx {
  width: 100%;
  max-width: var(--measure-list);
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--t-base);
}
table.idx th, table.idx td {
  text-align: left;
  vertical-align: baseline;
  padding: var(--s2) var(--s3) var(--s2) 0;
  border-bottom: 1px solid var(--seam);
}
table.idx th:last-child, table.idx td:last-child { padding-right: 0; text-align: right; }
table.idx col.c-ban { width: 4rem; }
table.idx thead th {
  position: sticky; top: var(--head-h); z-index: 1;
  background: var(--ground);
  border-bottom-color: var(--ink);
  padding-top: var(--s1); padding-bottom: var(--s1);
}
table.idx td.ban { font-family: var(--f-label); font-variant-numeric: tabular-nums; color: var(--mute); font-size: var(--t-sm); }
table.idx .en { display: inline; margin-left: .5em; color: var(--mute); font-size: var(--t-sm); font-family: var(--f-label); }
table.idx tbody a { font-weight: 500; }
table.idx tbody tr:hover a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
p.empty { color: var(--mute); padding: var(--s8) 0; }

/* ── PROJECT — 반 블록 (루트) ── */
.bans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s10) var(--s5);
}
.bans a { display: block; }
.bans .ph { margin-bottom: var(--s3); }
.bans .c {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--f-label); font-weight: 600; font-size: var(--t-md); letter-spacing: -0.02em;
}
.bans .c .num { font-weight: 300; color: var(--mute); font-size: var(--t-sm); }

/* ── PROJECT — 반 한 개: 파빌리온 머리 + 작품 블록 ── */
.pavilion { margin: var(--s6) 0 var(--s12); }
.pavilion h1 {
  font-family: var(--f-label);
  font-weight: 600;
  font-size: var(--t-display);
  line-height: 1;
  letter-spacing: -0.04em;
}
.pavilion h1 small { font-size: .3em; font-weight: 400; letter-spacing: 0; color: var(--mute); margin-left: .4em; }
.pavilion p { margin-top: var(--s4); max-width: var(--prose); color: var(--mute); }

.works {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* 데스크톱 2단 — 3:2 실측 결정 (2026-07-31) */
  gap: var(--s12) var(--s8);
}
.works a { display: block; }
.works .ph { margin-bottom: var(--s3); }
.works .t { display: block; font-weight: 500; line-height: 1.45; }
.works .p { display: block; color: var(--mute); font-size: var(--t-sm); margin-top: var(--s1); }

/* 형제 반 이동 — 블록 뒤 */
.siblings {
  display: flex; flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  margin-top: var(--s20);
  padding-top: var(--s5);
  border-top: 1px solid var(--seam);
}
.siblings a {
  font-family: var(--f-label); font-weight: 500; font-size: var(--t-sm);
  letter-spacing: .04em; color: var(--mute);
  min-height: 2.75rem; display: inline-flex; align-items: center;   /* 터치 44px */
}
.siblings a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ── 작품 상세 ── */
.work-head { max-width: 48rem; }
.work-head h1 { font-size: var(--t-xl); font-weight: 600; }
.work-head .en { font-family: var(--f-label); color: var(--mute); font-size: var(--t-md); margin-top: var(--s2); letter-spacing: -0.01em; }
.work-head .meta { margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: var(--t-sm); }
.work-head .meta .ban { font-family: var(--f-label); color: var(--mute); }
.work-head .desc { margin-top: var(--s6); max-width: var(--prose); }

.plates { display: flex; flex-direction: column; gap: var(--s4); margin-top: var(--s10); }
.plates .ph { width: 100%; }
.plates .ph:nth-child(odd)  { aspect-ratio: 3 / 2; }
.plates .ph:nth-child(even) { aspect-ratio: 4 / 5; }

.video { margin-top: var(--s10); }

/* 외부링크 — 티저 .btn 어휘. 라벨은 도메인별로 빌드에서 정한다 (FACTS 2026-08-12) */
.ext { margin-top: var(--s10); }
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 2.75rem; padding: 0 var(--s5);
  border: 1px solid var(--ink); border-radius: 999px;
  font-family: var(--f-label); font-weight: 500; font-size: var(--t-dim);
  letter-spacing: .16em; text-transform: uppercase;
}
.btn:hover { background: var(--ink); color: var(--ground); }

.prevnext {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4);
  margin-top: var(--s16); padding-top: var(--s5);
  border-top: 1px solid var(--ink);
}
.prevnext > div:last-child { text-align: right; }
.prevnext a { display: block; font-weight: 500; }
.prevnext .lbl { display: block; margin-bottom: var(--s1); }

/* ── 정적 지면 (ABOUT · PROGRAM · ARCHIVE) ── */
.static > * { max-width: var(--measure-list); }   /* 왼쪽 기준선은 머리와 같다 — 가운데로 띄우지 않는다 */
.static h2 { font-size: var(--t-md); font-weight: 600; margin: var(--s12) 0 var(--s3); }
.static .kicker + h2, .static h2:first-child { margin-top: 0; }
.static p { max-width: var(--prose); }
.static p + p { margin-top: var(--s4); }
.static .hint { color: var(--mute); font-size: var(--t-sm); }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td {
  text-align: left; vertical-align: top;
  padding: var(--s3) var(--s6) var(--s3) 0;
  border-bottom: 1px solid var(--seam);
}
table.tbl thead th { border-bottom-color: var(--ink); padding-top: 0; padding-bottom: var(--s1); }
table.tbl td.d { font-family: var(--f-label); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl td.m { color: var(--mute); font-size: var(--t-sm); }
table.tbl a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

dl.credits { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s8); margin: 0; }
dl.credits dt { color: var(--mute); font-size: var(--t-sm); padding-top: .15em; }
dl.credits dd { margin: 0; }

/* ── 좁은 화면 — 메뉴는 아래 고정 알약, 제목만 위에 ── */
@media (max-width: 40rem) {
  .site-header .in { justify-content: flex-start; }
  .brand small { display: none; }
  .menu {
    position: fixed;
    left: var(--s3); right: var(--s3);
    bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px));
    z-index: 100;
  }
  .menu a { flex: 1 1 0; min-height: 2.75rem; padding: 0; font-size: .75rem; letter-spacing: .02em; }  /* 터치 44px */
  main { padding-bottom: calc(var(--s16) + 2.75rem + env(safe-area-inset-bottom, 0px)); }

  table.idx .en { display: none; }        /* 영문 제목만 접는다 — 작가 열은 남긴다 */
  table.idx th, table.idx td { padding-right: var(--s2); }

  .bans { grid-template-columns: repeat(2, 1fr); gap: var(--s8) var(--s4); }
  .works { grid-template-columns: 1fr; gap: var(--s10); }
  .prevnext { grid-template-columns: 1fr; }
  .prevnext > div:last-child { text-align: left; }
}
@media (min-width: 40rem) and (max-width: 60rem) {
  .bans { grid-template-columns: repeat(3, 1fr); }
}
