/* ---------- 레거시(지난 외주 프로젝트) 페이지 ---------- */
.legacy-page { --text: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }

.legacy-page { --tl: #d9dbe2; }  /* 연혁 선 = 아이콘 테두리 색 */



.lg-wrap { width: min(1080px, calc(100% - 48px)); margin: 0 auto; padding: 112px 0 160px; }
.lg-title { margin: 0 0 56px; text-align: center; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

/* ---------- 연혁: 선 하나 + 선 위의 작은 아이콘 + 이름 (PC 좌우 교차) ---------- */
.tl { --icon-col: 120px; position: relative; list-style: none; margin: 0; padding: 0; }
/* 선은 첫 이미지 테두리에서 시작해 마지막 이미지 테두리에서 끝난다 (위치는 site.js 가 잼) */
.tl::before { content: ""; position: absolute; top: var(--tl-top, 0); bottom: var(--tl-bottom, 0); left: 50%; width: 1px; margin-left: -.5px; background: var(--tl); }
.tl-item + .tl-item { margin-top: 96px; }
.tl-item a { display: grid; grid-template-columns: 1fr var(--icon-col) 1fr; align-items: center; }

/* 아이콘: 선과 같은 테두리, 안쪽 여백은 배경색 → 선이 테두리로 이어져 좌우로 갈라졌다 다시 만난다 */
.tl-frame {
  grid-column: 2; grid-row: 1; justify-self: center; position: relative; z-index: 1; display: block;
  padding: 6px; background: var(--bg); border: 1px solid var(--tl); border-radius: 10px;
  transition: border-color .2s;
}
.tl-frame img { display: block; width: 80px; height: auto; border-radius: 5px; }

.tl-name { grid-row: 1; font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--ink-2); transition: color .2s; }
.tl-item.l .tl-name { grid-column: 1; text-align: right; }
.tl-item.r .tl-name { grid-column: 3; }

.tl-item a:hover .tl-frame { border-color: #a9adb8; }
.tl-item a:hover .tl-name { color: var(--ink); }
.tl-item a:focus-visible { outline: none; }
.tl-item a:focus-visible .tl-frame { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- 모바일: 선과 아이콘은 왼쪽, 이름은 오른쪽 ---------- */
@media (max-width: 860px) {
  .lg-wrap { width: calc(100% - 32px); padding-top: 96px; }
  .lg-title { text-align: left; margin: 0 0 40px 4px; }
  .tl { --icon-col: 96px; }
  .tl::before { left: calc(var(--icon-col) / 2); }
  .tl-item + .tl-item { margin-top: 64px; }
  .tl-item a { grid-template-columns: var(--icon-col) 1fr; column-gap: 6px; }
  .tl-frame { grid-column: 1; }
  .tl-item.l .tl-name, .tl-item.r .tl-name { grid-column: 2; text-align: left; }
  .tl-frame img { width: 64px; }
  .tl-frame { padding: 5px; border-radius: 9px; }
}


/* ---------- 프로젝트 상세: 목록 위에 뜨는 카드. 안쪽 스크롤 없이 페이지 스크롤로 읽는다 ---------- */
.case-view { position: absolute; top: 0; left: 0; right: 0; min-height: 100vh; z-index: 5; visibility: hidden; pointer-events: none; transition: visibility 0s linear .3s; }
.case-view.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.case-dim {
  position: fixed; inset: 0; background-color: rgba(6,7,10,0);
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  transition: background-color .45s ease, -webkit-backdrop-filter .45s ease, backdrop-filter .45s ease;
}
.case-view.is-open .case-dim { background-color: rgba(15,17,21,.38); -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); }
.case-card {
  position: relative; width: min(960px, calc(100% - 48px)); margin: 92px auto 120px;
  background: #fff; color: var(--ink); border-radius: 26px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(24px) scale(.97);
  transition: opacity .35s ease, transform .5s var(--ease);
}
.case-card:focus { outline: none; }
.case-card.is-in { opacity: 1; transform: none; }
.case-view.is-leaving .case-card { opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .26s ease, transform .26s ease; }
.case-card .modal-close { background: rgba(255,255,255,.9); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
/* 상세를 보는 동안 목록은 보던 위치 그대로 화면에 고정되어 블러 뒤에 보인다 (페이지 길이 = 상세 길이) */
#page.case-open .lg-wrap { position: fixed; left: 0; right: 0; }

.case-hero {
  margin: 0; padding: 56px 40px; display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 40%, #fff 0, rgba(255,255,255,0) 100%), linear-gradient(160deg, #eceef4, #e3e5ed);
}
.case-hero img { width: auto; max-width: 100%; max-height: 400px; border-radius: 14px; box-shadow: 0 24px 60px rgba(15,17,21,.18), 0 4px 12px rgba(15,17,21,.08); }

.case { padding: 44px 64px 72px; font-family: var(--text); }
.case-head { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.case-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.case-tags li { padding: 5px 11px; border-radius: 999px; background: #f2f3f6; font-size: 12px; color: var(--ink-2); }
.case-head h2 { margin: 0; font-family: var(--font); font-size: 30px; font-weight: 700; line-height: 1.3; }
.case-sub { margin: 10px 0 0; font-size: 16px; color: var(--ink-2); }
.case-meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

.case-body { font-size: 15px; line-height: 1.85; color: #3b3f4a; }
.case-body h3 { margin: 48px 0 14px; font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.case-body h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.case-body p { margin: 0 0 14px; }
.case-body ul { margin: 0 0 14px; padding-left: 18px; }
.case-body li { margin: 6px 0; }
.case-body strong { color: var(--ink); }
.case-body figure { margin: 0; }
.case-body img, .case-body video { display: block; width: 100%; height: auto; border-radius: 12px; background: #f2f3f6; }
.case-body figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); text-align: center; }

.case-body .feature { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; margin: 28px 0; }
.case-body .ftext { margin: 18px 0; }
.case-body .feature .ftext { margin: 0; }
.case-body .gallery { display: grid; gap: 14px; margin: 20px 0 8px; }
.case-body .gallery.g2 { grid-template-columns: repeat(2, 1fr); }
.case-body .gallery.g3 { grid-template-columns: repeat(3, 1fr); }
.case-body .logos { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 6px; }
.case-body .logos img { width: auto; height: 40px; max-width: 160px; object-fit: contain; border-radius: 0; background: none; filter: grayscale(1); opacity: .65; }

@media (max-width: 760px) {
  .case-card { width: 100%; margin: 76px 0 0; border-radius: 22px 22px 0 0; }
  .case { padding: 28px 22px 56px; }
  .case-hero { padding: 64px 22px 32px; }
  .case-hero img { max-height: 300px; }
  .case-head h2 { font-size: 24px; }
  .case-body .feature { grid-template-columns: 1fr; gap: 16px; }
  .case-body .feature > figure:first-child { order: 2; }
  .case-body .gallery.g3 { grid-template-columns: 1fr 1fr; }
}
