/* AL 사이트 공용 - 흰 바탕, 왼쪽 위 세로 메뉴 + 아래 가운데 메뉴 (POTENTIA 식 배치) */
:root {
  --paper: #FFFFFF;
  --ink: #111111;
  --mute: #8A8A86;
  --rule: #E2E2DF;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 2.4vw, 28px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 왼쪽 위 세로 메뉴 · 가운데 위 작은 로고 */
.top {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: calc(env(safe-area-inset-top) + 20px) var(--gutter) 0;
}
.menu {
  display: grid;
  gap: 4px;
  justify-self: start;
  font: 400 11px/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.menu a:hover, .menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
.brand { font: 300 26px/1 var(--sans); letter-spacing: -0.04em; margin-right: -0.04em; }
.extra {
  justify-self: end;
  font: 400 11px/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.extra a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 오른쪽 위 한 · 영 전환 - 지금 언어는 진하게 밑줄, 다른 쪽은 옅게 */
.lang { display: flex; align-items: center; gap: 6px; }
.lang span { color: var(--mute); }
.lang button {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--mute);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* 한국어 - Inter Tight 에 한글이 없어 Noto Sans KR 로 이어 받고, 영문용으로 좁힌 자간을 조금 푼다 */
:lang(ko) { --sans: "Inter Tight", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; word-break: keep-all; }
:lang(ko) .mono { letter-spacing: 0.02em; }

/* 스토브 주소가 아직 없을 때 - 누를 수 없는 옅은 단추 */
.p-cta.wait { border-color: var(--rule); color: var(--mute); }
.p-cta.wait:hover { background: none; color: var(--mute); }
.p-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* 아래 가운데 메뉴 - 지금 화면은 짧은 밑줄 */
.bottom {
  display: flex;
  justify-content: center;
  gap: clamp(32px, 5vw, 64px);
  padding: 18px var(--gutter) calc(env(safe-area-inset-bottom) + 22px);
  font: 400 13px/1 var(--sans);
}
.bottom a { position: relative; padding-bottom: 7px; }
.bottom a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width .25s ease;
}
.bottom a:hover::after, .bottom a[aria-current="page"]::after { width: 100%; }

/* 메인 - 가운데 AL */
.home {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.home main { display: grid; place-items: center; }
.wordmark {
  margin: 0;
  font: 300 clamp(70px, 15vw, 210px)/0.8 var(--sans);
  letter-spacing: -0.05em;
  margin-right: -0.05em;
  user-select: none;
}

/* 안쪽 화면 */
.page { min-height: 100svh; display: grid; grid-template-rows: auto auto 1fr auto; }
.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: clamp(56px, 9vw, 120px) var(--gutter) 20px;
}
.head h1 { margin: 0; font: 300 clamp(40px, 6vw, 84px)/1 var(--sans); letter-spacing: -0.03em; }

.list { padding: 0 var(--gutter) 88px; display: grid; gap: 72px; align-content: start; }
.project { display: grid; gap: 16px; }
.thumb { overflow: hidden; background: #2E3134; }
.thumb img { width: 100%; height: auto; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.thumb:hover img { transform: scale(1.02); }
/* 그림이 아직 없는 프로젝트 - 같은 비율의 회색 판 */
.thumb.blank {
  aspect-ratio: 895 / 292;
  display: grid;
  place-items: center;
  background: #F1F1EF;
  color: #B5B5B1;
  font: 300 clamp(48px, 9vw, 128px)/1 var(--sans);
  letter-spacing: -0.04em;
}
.meta {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}
.meta .no, .meta .info { color: var(--mute); }
.meta h2 { margin: 0; font: 400 clamp(22px, 2.4vw, 30px)/1.15 var(--sans); letter-spacing: -0.01em; }
.meta .info { margin-top: 6px; }
.meta .go { white-space: nowrap; }
.meta .go:hover { text-decoration: underline; text-underline-offset: 4px; }

.about {
  padding: 0 var(--gutter) 88px;
  display: grid;
  gap: 28px;
  align-content: start;
  border-top: 1px solid var(--ink);
  margin: 0 var(--gutter);
  padding-left: 0;
  padding-right: 0;
  padding-top: 28px;
}
.about p {
  margin: 0;
  max-width: 36ch;
  font: 300 clamp(22px, 2.4vw, 34px)/1.32 var(--sans);
  letter-spacing: -0.015em;
}

.contact {
  display: grid;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  max-width: 520px;
}
.contact .mono { color: var(--mute); }
.contact a { font: 300 clamp(20px, 2.2vw, 28px)/1.3 var(--sans); letter-spacing: -0.01em; }
.contact a:hover { text-decoration: underline; text-underline-offset: 5px; }

.foot { border-top: 1px solid var(--rule); }
.foot .copy { display: block; text-align: center; color: var(--mute); padding-bottom: calc(env(safe-area-inset-bottom) + 18px); }

@media (max-width: 560px) {
  .meta { grid-template-columns: 28px 1fr; }
  .meta .go { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .thumb img, .bottom a::after { transition: none; }
}

/* 페이지 이동 - 짧게 사라졌다 살짝 올라오며 나타난다 (지원 안 하는 브라우저는 그냥 넘어감) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .2s ease both; }
::view-transition-new(root) { animation: page-in .36s cubic-bezier(.2,.7,.2,1) both; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
/* 한 파일판에서 화면을 바꿀 때도 같은 느낌 */
.enter { animation: page-in .36s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root), .enter { animation: none; }
}
/* 목록 이름 링크 */
.meta h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.thumb img { cursor: pointer; }
/* 누를 수 없는 썸네일 (만드는 중인 프로젝트) */
.thumb.still img { cursor: default; }
.thumb.still:hover img { transform: none; }

/* ── 프로젝트 상세 팝업 ── */
html.locked { overflow: hidden; }
.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(17, 17, 17, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .22s ease;
}
.sheet.on { opacity: 1; }
/* 팝업 창 - 화면보다 한 뼘 작게, 둥근 모서리 + 그림자 */
.sheet-panel {
  width: min(1120px, 100%);
  height: min(100%, 920px);
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  transform: translateY(18px) scale(.985);
  transition: transform .36s cubic-bezier(.2,.7,.2,1);
}
.sheet.on .sheet-panel { transform: none; }
.sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 3vw, 36px) 14px;
  border-bottom: 1px solid var(--rule);
}
.sheet-bar .mono { color: var(--mute); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.close:hover, .p-back:hover { text-decoration: underline; text-underline-offset: 4px; }
button:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 clamp(18px, 3vw, 36px) 56px;
}
.sheet-body > * { max-width: 1180px; margin-left: auto; margin-right: auto; }

.p-head { display: grid; gap: 18px; padding: clamp(36px, 5vw, 64px) 0 0; }
.p-no { color: var(--mute); }
.p-top { display: flex; align-items: center; gap: 14px; }
/* 지금 상태 - 초록 점이 천천히 깜빡인다 */
.p-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
}
.p-status i { width: 7px; height: 7px; border-radius: 50%; background: #2FA866; animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
.p-head h2 { margin: 0; font: 300 clamp(44px, 7vw, 104px)/0.95 var(--sans); letter-spacing: -0.035em; }
.p-lede { margin: 0; max-width: 46ch; font: 300 clamp(18px, 1.7vw, 22px)/1.45 var(--sans); }
.p-cta {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font: 400 13px/1 var(--sans);
  letter-spacing: 0.02em;
  transition: background-color .2s ease, color .2s ease;
}
.p-cta:hover { background: var(--ink); color: var(--paper); }
.p-cta.big { height: 56px; padding: 0 30px; font-size: 15px; }

.p-trailer { padding-top: 20px; }
.p-trailer .frame { position: relative; display: block; aspect-ratio: 16 / 9; background: #111; overflow: hidden; }
.p-trailer video, .p-trailer iframe, .p-trailer .frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #111; }
.poster-only span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(255,255,255,.92); padding: 12px 18px; border-radius: 999px; color: var(--ink);
  white-space: nowrap;
}

.p-sec { padding-top: clamp(56px, 7vw, 96px); }
.p-label {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--ink);
}
.p-label span { color: var(--mute); }

.p-features { list-style: none; margin: 0; padding: 0; }
.p-features li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.f-no { color: var(--mute); padding-top: 4px; }
.f-text h3 { margin: 0 0 8px; font: 400 clamp(19px, 1.8vw, 24px)/1.2 var(--sans); letter-spacing: -0.01em; }
.f-text p { margin: 0; max-width: 42ch; color: #333; font: 300 15px/1.6 var(--sans); }
.f-media { background: #EEE; aspect-ratio: 16 / 9; overflow: hidden; }
.f-media video, .f-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.p-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 16px; }
.shot { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #EEE; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.shot:hover img { transform: scale(1.03); }

.p-info { margin: 0; }
.p-info div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.p-info dt { color: var(--mute); padding-top: 3px; }
.p-info dd { margin: 0; font: 400 15px/1.5 var(--sans); }

.p-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: clamp(56px, 7vw, 96px); }

/* 스크린샷 크게 보기 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.97);
}
.lightbox img { max-width: calc(100vw - 2 * var(--gutter)); max-height: calc(100svh - 120px); }
.lightbox .box-prev, .lightbox .box-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 18px; padding: 16px; }
.lightbox .box-prev { left: var(--gutter); }
.lightbox .box-next { right: var(--gutter); }
.lightbox .box-count { position: absolute; left: var(--gutter); top: calc(env(safe-area-inset-top) + 18px); color: var(--mute); }
.lightbox .box-close { position: absolute; right: var(--gutter); top: calc(env(safe-area-inset-top) + 16px); }

@media (max-width: 760px) {
  .sheet { padding: 18px 0 0; place-items: end stretch; }
  .sheet-panel { height: 100%; border-radius: 14px 14px 0 0; }
  .p-features li { grid-template-columns: 28px minmax(0, 1fr); }
  .f-media { grid-column: 2; }
  .p-shots { grid-template-columns: 1fr; }
  .p-info div { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-panel { transition: none; }
}