/* ==========================================================================
   Prompt Monkeys 후보 2 · 스타일
   --------------------------------------------------------------------------
   1. 디자인 토큰  ← 색·글꼴·크기·움직임은 여기만 바꾸면 전체에 반영됩니다
   2. 기본
   3. 공통 조각 (커서, 라벨, 링크, 버튼)
   4. 헤더 · 메뉴 아이콘
   5. 메뉴 오버레이
   6. 로딩
   7. 쌓기(stack) 공통
   9. 메인 (흘러가는 거대 글자)
   10. 작업 섹션 (가로 · 세로 3편 · 세로 1편)
   11. 마무리 (전체 작업 · 클라이언트 · 문의) · 푸터
   12. 플레이어
   13. About · Contact
   14. 휴대폰 (≤768px)
   15. 움직임 줄이기
   ========================================================================== */

/* 1. 디자인 토큰 ------------------------------------------------------------ */
:root {
  color-scheme: dark;

  /* 색 (후보 1과 같은 값) */
  --ink: #0c0c0c;       /* 배경 */
  --surface: #161615;   /* 영상 로딩 자리 */
  --line: #2a2a28;      /* 구분선 */
  --paper: #f3f3f1;     /* 글자 */
  --mute: #8d8d88;      /* 보조 글자 */
  --soft: #c9c9c5;      /* 본문 보조 */
  --signal: #ff5001;    /* 커서 · 현재 표시에만 */

  /* 메인 거대 글자 두 톤 (배경보다 살짝 밝게, 은은하게) */
  --type-a: #1a1a19;
  --type-b: #232321;
  /* 메인 배경: 검정 가죽 (바탕 + 거대 글자 두 톤 + 페블 질감) */
  --hero-bg: #0e0e0d;
  --hero-type-a: #1e1d1b;
  --hero-type-b: #262523;
  --leather-tile: 480px;      /* 질감 타일 표시 크기 (960px 파일을 480px 로 → 돌기 간격 약 7.5px, 레티나에서도 선명) */
  --leather-strength: 0.62;   /* 질감 진하기 (overlay 불투명도) */
  --leather-sheen: 0.035;     /* 돌기 하이라이트 (screen 불투명도) */

  /* 밝은 메인 (app.js CONFIG.heroTheme = "light" 일 때. "dark" 면 위의 다크 값 그대로) */
  /* 바탕·글자·질감은 jjettas 실측(1280x800 스크린샷, 밝은 쪽 245/242/239 · 어두운 쪽 233/226/221 · 밝기 p5/50/95 216/234/249 · 표준편차 10.3)에 맞춤.
     이전 값: 바탕 linear-gradient(175deg, #f6f3ef, #f0e4d4) · 글자 #e6dccd / #dcd0bf · 질감 pebble-photo-light.webp multiply 0.9 */
  --light-bg: linear-gradient(175deg, #fcfaf7 0%, #faf6f2 100%);
  --light-type-a: #efece8;
  --light-type-b: #e8e4df;
  --light-ink: #0c0c0c;        /* 헤더 · 큰 글자 */
  --light-text: #3a3732;       /* 한 줄 소개 등 본문 */
  --light-text-dim: #4f4a43;   /* 보조 글자 (밝은 바탕·베이지 글자 위 모두 4.5:1 이상) */
  --light-leather: 1;          /* 질감 진하기 (multiply 불투명도). 대비·색은 텍스처 파일(pebble-photo-light-tuned.webp)에 보정해 둠 */
  --light-sheen: 0.1;          /* 돌기 윗면 밝은 테두리 (screen 불투명도) */
  --light-leather-tile: 320px; /* 실사 질감 타일 표시 크기 (작을수록 결이 잘아짐) */

  /* 작은 라벨 (SCROLL 기준: jjettas 실측값) */
  --label-font: "Archivo", "Pretendard Variable", Pretendard, sans-serif;
  --label-size: 0.8rem;       /* 12.8px */
  --label-weight: 500;
  --label-track: 0.42em;
  --label-color: #f6f3ef;
  --label-dim: rgba(246, 243, 239, 0.62);

  /* 메뉴에서 현재 페이지가 아닌 링크 */
  --menu-dim: #3a3a37;
  /* 노이즈 질감 진하기 (0 = 없음) */
  --noise-opacity: 0.07;

  /* 글꼴 */
  --display: "Archivo", "Pretendard Variable", Pretendard, "Helvetica Neue", Arial, sans-serif;
  --body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --narrow: 62%;        /* 압축 대문자 폭 (Archivo wdth 축 62~125) */

  /* 간격·크기 */
  --gutter: clamp(16px, 3vw, 44px);
  --maxw: 1680px;
  --header-h: 72px;

  /* 메인 로고 폭 (로고 타이핑 · 로딩 막대가 같은 크기를 씀) */
  --logo-w: min(46vw, 640px);

  /* 메인 거대 글자: 크기와 흐르는 속도 (속도 단위 px/초, app.js 가 읽음) */
  --type-size: 64svh;
  --type-speed: 36;

  /* 작업 섹션 */
  --panel-gap: 4px;     /* 세로 3편 사이 간격 */
  --slant-ratio: 0.22;  /* 첫 작업 섹션 사선 높이 (화면 높이 대비, app.js 가 읽음) */
  --under-dim: 0.6;     /* 다음 섹션이 덮을 때 아래 섹션이 어두워지는 정도 */

  /* 클라이언트 로고 (홈 아래 마키 · About 그리드) */
  --logo-size: clamp(54px, 5vw, 72px);  /* 로고 크기 기준: 정사각 로고의 높이. 가로로 긴 로고는 면적이 비슷하도록 낮아짐 (app.js --s) */

  /* 움직임 */
  --fast: 0.2s;
  --mid: 0.4s;
  --slow: 0.8s;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);
}

/* 2. 기본 ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  word-break: keep-all;
  overflow-wrap: break-word;
}
html.is-locked, html.is-locked body { overflow: hidden; }
html.is-loading, html.is-loading body { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
::selection { background: var(--paper); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* 노이즈 질감 (메인·마무리·About·Contact 배경) */
.grain::before,
.hero::before,
.outro::before,
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/noise.png") repeat;
  background-size: 160px 160px;
  opacity: var(--noise-opacity);
  pointer-events: none;
  z-index: 0;
}

/* 3. 공통 조각 ------------------------------------------------------------- */
.cursor {
  display: inline-block;
  width: 0.42em;
  height: 1em;
  margin-left: 0.12em;
  background: var(--signal);
  vertical-align: -0.12em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.label {
  font-family: var(--label-font);
  font-stretch: 100%;
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: 1.55;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--label-dim);
}
.text-link {
  display: inline-block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.text-link:hover { border-color: var(--paper); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.pill { gap: 0; }
.pill .cursor { width: 0; height: 14px; margin: 0; vertical-align: 0; opacity: 0; animation: none; transition: opacity var(--fast), width var(--fast), margin var(--fast); }
.pill:hover { border-color: var(--paper); }
.pill:hover .cursor, .pill[data-done] .cursor { width: 7px; margin-right: 10px; opacity: 1; animation: blink 1.05s steps(1) infinite; }
.pill--solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.pill--solid:hover { background: transparent; color: var(--paper); }

/* 압축 굵은 대문자 */
.giant,
.cta-link,
.menu-link,
.contact-email,
.sec-title,
.cap-title h2 {
  font-family: var(--display);
  font-stretch: var(--narrow);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

/* 4. 헤더 ----------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--header-h);
  pointer-events: none;
  transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -24px 0;
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.55), rgba(12, 12, 12, 0));
  opacity: var(--header-shade, 1);
  pointer-events: none;
}
.site-header[data-solid]::before {
  inset: 0;
  background: rgba(12, 12, 12, 0.88);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.header-inner {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.header-inner > * { pointer-events: auto; }
.logo { justify-self: start; display: block; position: relative; }
.logo img { width: clamp(76px, 7vw, 100px); height: auto; transition: opacity 0.3s var(--ease); }
.logo .logo-dark { position: absolute; left: 0; top: 0; opacity: 0; }
.brand {
  justify-self: center;
  font-family: var(--display);
  font-stretch: var(--narrow);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand .cursor { width: 6px; height: 13px; margin-left: 4px; vertical-align: -1px; }

/* 두 줄 사선 메뉴 아이콘 → 열리면 X */
.menu-btn {
  justify-self: end;
  position: relative;
  width: 48px;
  height: 48px;
  margin-right: -10px;
}
.menu-btn i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 24px;
  margin: -12px 0 0 -1px;
  background: var(--paper);
  border-radius: 1px;
  transition: transform 0.5s var(--ease-io), background-color 0.3s var(--ease);
}
.menu-btn i:nth-child(1) { transform: translateX(-5px) rotate(28deg); }
.menu-btn i:nth-child(2) { transform: translateX(5px) rotate(28deg); }
.menu-btn:hover i:nth-child(1) { transform: translateX(-6px) rotate(34deg); }
.menu-btn:hover i:nth-child(2) { transform: translateX(6px) rotate(22deg); }
.menu-open .menu-btn i:nth-child(1) { transform: translateX(0) rotate(45deg); }
.menu-open .menu-btn i:nth-child(2) { transform: translateX(0) rotate(-45deg); }
.menu-open .site-header::before { opacity: 0; }

/* 밝은 메인 위에서는 헤더를 어둡게 (app.js 가 html.header-dark). 메뉴가 열리면 다시 흰색 */
.site-header::before { transition: opacity 0.3s var(--ease); }
.brand { transition: color 0.3s var(--ease); }
html.header-dark:not(.menu-open) .site-header::before { opacity: 0; }
html.header-dark:not(.menu-open) .logo .logo-light { opacity: 0; }
html.header-dark:not(.menu-open) .logo .logo-dark { opacity: 1; }
html.header-dark:not(.menu-open) .brand { color: var(--light-ink); }
html.header-dark:not(.menu-open) .menu-btn i { background: var(--light-ink); }

html.header-init .site-header::before,
html.header-init .site-header .logo img,
html.header-init .site-header .brand,
html.header-init .site-header .menu-btn i { transition: none !important; }

/* 플레이어가 열려 있으면 헤더 숨김 */
.player-open .site-header { opacity: 0; pointer-events: none; }
.player-open .site-header * { pointer-events: none; }

/* 5. 메뉴 오버레이 ---------------------------------------------------------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #0a0a0a;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--mid) var(--ease), visibility 0s linear var(--mid);
}
.menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/noise.png") repeat;
  background-size: 160px 160px;
  opacity: var(--noise-opacity);
  pointer-events: none;
}
.menu-open .menu {
  visibility: visible;
  opacity: 1;
  transition: opacity var(--mid) var(--ease), visibility 0s;
}
.menu-main {
  position: relative;
  align-self: center;
  display: grid;
  justify-items: center;
  gap: clamp(28px, 5vh, 56px);
  padding: calc(var(--header-h) + 8px) var(--gutter) 0;
}
.menu-links {
  display: flex;
  flex-direction: column;   /* 세 줄: WORK / ABOUT / CONTACT */
  align-items: center;
  font-size: min(15vw, 18svh, 232px);  /* 화면 높이 800px 에서 세 줄이 넘치지 않게 높이에도 맞춤 */
  line-height: 0.86;
}
.menu-link {
  position: relative;
  display: inline-block;
  color: var(--menu-dim);
  transition: color var(--fast) var(--ease);
}
.menu-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-top: 0.04em; }
.menu-mask > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.7s var(--ease);
}
.menu-open .menu-mask > span { transform: none; }
.menu-open .menu-link:nth-child(2) .menu-mask > span { transition-delay: 0.06s; }
.menu-open .menu-link:nth-child(3) .menu-mask > span { transition-delay: 0.12s; }
/* 호버 커서: 글자 오른쪽에 겹쳐 나타나 줄 배치가 흔들리지 않게 */
.menu-link .cursor {
  position: absolute;
  left: 100%;
  top: 50%;
  width: 0.16em;
  height: 0.6em;
  margin: -0.3em 0 0 0.05em;
  visibility: hidden;
}
.menu-link[aria-current="page"] { color: var(--paper); }
.menu-link:hover,
.menu-link:focus-visible { color: var(--paper); }
.menu-link:hover .cursor,
.menu-link:focus-visible .cursor { visibility: visible; }

.menu-sub {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mute);
}
.lang button {
  padding: 8px 6px;
  color: var(--mute);
  transition: color var(--fast);
}
.lang button[aria-pressed="true"] { color: var(--paper); }
.lang button[aria-pressed="true"]::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 11px;
  margin-left: 4px;
  background: var(--signal);
  vertical-align: -1px;
}
.lang button:hover { color: var(--paper); }
.social { display: flex; gap: 6px; }
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--soft);
  transition: color var(--fast), border-color var(--fast);
}
.social a:hover { color: var(--paper); border-color: var(--paper); }
.social svg { width: 18px; height: 18px; }
.menu-foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter) max(20px, env(safe-area-inset-bottom, 0px));
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

/* 6. 로딩 -----------------------------------------------------------------
   처음 0.4초는 어두운 화면만(.loader-bg). 그 뒤에도 준비 중이면 data-show 로 막대를 보여 준다 (숫자 없음).
   막대 = 메인 로고의 오렌지 막대와 같은 크기 (로고 폭 × 34/772, 높이 × 136/772). 빈 부분은 옅은 오렌지 */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: opacity 0.3s var(--ease);
  animation: loaderSafety 0s linear 8s forwards; /* 스크립트가 실패해도 화면이 막히지 않게 */
}
@keyframes loaderSafety { to { opacity: 0; visibility: hidden; } }
.loader-bg {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transition: opacity 0.5s var(--ease);
}
.loader-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/noise.png") repeat;
  background-size: 160px 160px;
  opacity: var(--noise-opacity);
}
.loader-bar {
  position: relative;
  width: calc(var(--logo-w) * 34 / 772);
  height: calc(var(--logo-w) * 136 / 772);
  background: rgba(255, 80, 1, 0.15);
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.5s cubic-bezier(0.65, 0, 0.25, 1);
}
.loader-fill {
  position: absolute;
  inset: 0;
  background: var(--signal);
  transform: scaleY(var(--p, 0));
  transform-origin: 50% 100%;
}
.loader-bar[data-off] .loader-fill { opacity: 0; }
.loader[data-show] .loader-bar { opacity: 1; }
.loader[data-fade] .loader-bg { opacity: 0; }   /* 메인으로 이어질 때: 바탕만 걷히고 막대는 커서 자리로 */
.loader[data-hide] { opacity: 0; }
@media (max-width: 768px) { :root { --logo-w: 72vw; } }

/* 7. 쌓기 공통 -------------------------------------------------------------
   .stack 안의 섹션은 모두 화면 맨 위에 붙는다(sticky).
   아래 섹션이 올라오면 위 섹션을 덮고, 덮이는 섹션은 --under(0~1) 만큼 어두워진다 */
.stack { position: relative; }
.stack > section {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
.stack > section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #000;
  opacity: calc(var(--under, 0) * var(--under-dim));
  pointer-events: none;
}

/* 14-1. 터치 모드 (홈, 휴대폰 폭 또는 pointer: coarse — app.js 가 html.touch-mode)
   문서는 고정하고 .scroller(화면 고정 높이) 안에서만 스크롤 → iOS 주소창이 접히거나 펴지지 않아 높이가 고정된다.
   sticky 쌓기·덮임 어둡게·사선 변화는 끄고, 섹션 = 컨테이너 높이(--snap-h, app.js 가 px 로)의 일반 블록 + 기본 scroll-snap */
html.touch-mode,
html.touch-mode body { height: 100%; overflow: hidden; }
html.touch-mode .scroller {
  position: fixed;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  container-type: size;   /* 섹션 높이를 이 틀의 실제 높이(cqh)에 묶음 — 카카오톡 인앱처럼 뜬 뒤 높이가 바뀌어도 자동으로 맞춰짐 */
}
html.touch-mode.is-locked .scroller { overflow: hidden; }   /* 메뉴·플레이어가 열리면 멈춤 (위치는 유지) */
html.touch-mode .stack > section {
  position: relative;
  height: var(--snap-h, 100svh);   /* cqh 미지원 브라우저용 */
  height: 100cqh;                  /* 스크롤 틀 높이 그대로 (JS 측정 타이밍과 무관) */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
html.touch-mode .stack > section::after { display: none; }  /* 덮임 어둡게 끔 */
html.touch-mode .work--first { clip-path: none; }           /* 사선 변화 끔 */
html.touch-mode .outro { scroll-snap-align: start; }        /* 마무리: 시작점만 스냅, 안은 자유 스크롤 */
html.touch-mode .site-footer { scroll-snap-align: end; }    /* 맨 끝(푸터)까지 닿을 수 있게 */

/* 영상 공통: 포스터가 먼저 자리를 잡고, 재생되면 영상이 그 위로 나타난다 (흔들림 0) */
.media-fill,
.media-fill img,
.media-fill video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.media-fill { overflow: hidden; background: var(--surface); }
.media-fill img,
.media-fill video { object-fit: cover; }
.media-fill video { opacity: 0; transition: opacity 0.5s var(--ease); }
[data-playing] > .media-fill video,
.media-fill[data-playing] video { opacity: 1; }

/* 9. 메인 ----------------------------------------------------------------- */
.hero, .stack > .hero { isolation: isolate; background: var(--hero-bg); }
/* 노이즈 그레인: 질감 위에 overlay */
.hero::before { z-index: 1; mix-blend-mode: overlay; opacity: 0.35; }
/* 페블 가죽: 바탕과 흐르는 글자 모두를 같은 결로 덮는 고정 레이어 */
.leather {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.leather--tex,
.leather--sheen {
  background: url("assets/pebble.webp") repeat;
  background-size: var(--leather-tile) var(--leather-tile);
}
.leather--tex { mix-blend-mode: overlay; opacity: var(--leather-strength); }
.leather--sheen { mix-blend-mode: screen; opacity: var(--leather-sheen); }
/* 빛: 위쪽 가운데가 살짝 밝고 가장자리는 어둡게 */
.leather--light {
  background:
    radial-gradient(90% 70% at 50% -8%, rgba(255, 244, 226, 0.11), rgba(255, 244, 226, 0) 70%),
    radial-gradient(140% 120% at 50% 40%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}
.type {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.type-row {
  position: absolute;
  left: 0;
  white-space: nowrap;
  font-family: "Archivo", sans-serif;
  font-stretch: var(--narrow);
  font-weight: 900;
  font-size: var(--type-size);
  line-height: 0.74;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  user-select: none;
}
.type-row--a { top: -0.07em; color: var(--type-a); }
.type-row--b { bottom: -0.1em; color: var(--type-b); }
.hero .type-row--a { color: var(--hero-type-a); }
.hero .type-row--b { color: var(--hero-type-b); }
.type-track {
  display: flex;
  width: max-content;
  animation: marquee var(--dur, 60s) linear infinite;
  will-change: transform;
}
.type-row[data-reverse] .type-track { animation-direction: reverse; }
.hero[data-off] .type-track { animation-play-state: paused; }
.type-track span { padding-right: 0.14em; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

.hero-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4svh, 40px);
  padding: 0 var(--gutter);
  text-align: center;
}
/* 로고 타이핑 (assets/logo-type.png = 원본 로고의 검정 글자만, 3배 해상도. 오렌지 막대는 .lt-cursor)
   좌표는 app.js LOGO_TYPE 가 원본 로고 픽셀 기준으로 계산해 % 로 넣는다 */
.logo-type { width: var(--logo-w); }
.lt-box {
  position: relative;
  width: 100%;
  aspect-ratio: 772 / 312;
  transition: transform 0.12s ease-out;  /* 글자가 늘 때마다 덩어리가 가운데를 유지하며 왼쪽으로 밀림 */
}
.lt-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  clip-path: inset(var(--t, 0) var(--r, 100%) var(--b, 0) 0);
  user-select: none;
  -webkit-user-drag: none;
}
.lt-cursor { position: absolute; background: var(--signal); }
.lt-cursor[data-off] { opacity: 0; }
html[data-hero-theme="dark"] .lt-line { filter: invert(1); }  /* 다크 메인이면 흰 글자 */
.hero-intro { opacity: 0; transition: opacity 0.9s var(--ease); }
.hero[data-typed] .hero-intro { opacity: 1; }
.hero-intro {
  max-width: 40em;
  white-space: pre-line;   /* data.js site.intro 의 \n = 줄바꿈 */
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 500;
  line-height: 1.6;
  color: var(--soft);
  text-wrap: balance;
}
.hero-intro .gt { font-family: var(--mono); color: var(--mute); }
.hero-next {
  position: absolute;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  bottom: max(26px, env(safe-area-inset-bottom, 0px));
  z-index: 2;
  font-family: var(--label-font);
  font-stretch: 100%;
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: 19.84px;
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--label-dim);
  transition: color var(--fast);
}
.hero-next:hover { color: var(--label-color); }

/* 9-1. 밝은 메인 · About/Contact 첫 화면 (html:not([data-hero-theme="dark"])) ----------
   jjettas 식: 따뜻한 오프화이트 바탕 + 살짝 진한 베이지 글자 + 가죽 질감(multiply) + 위쪽 빛 + 종이 그레인 */
html:not([data-hero-theme="dark"]) .hero,
html:not([data-hero-theme="dark"]) .page-hero { background: var(--light-bg); color: var(--light-ink); }
html:not([data-hero-theme="dark"]) .hero .type-row--a,
html:not([data-hero-theme="dark"]) .page-hero .type-row--a { color: var(--light-type-a); }
html:not([data-hero-theme="dark"]) .hero .type-row--b,
html:not([data-hero-theme="dark"]) .page-hero .type-row--b { color: var(--light-type-b); }
html:not([data-hero-theme="dark"]) .leather--tex {
  /* 실사 가죽(AI 생성 원본 → 이음매 없는 타일). 이전 계산형: assets/pebble-light.webp */
  background-image: url("assets/pebble-photo-light-tuned.webp"); /* 원본 pebble-photo-light.webp 를 밝은 평균·은은한 결·따뜻한 그림자로 재보정 */
  background-size: var(--light-leather-tile) var(--light-leather-tile);
  mix-blend-mode: multiply;
  opacity: var(--light-leather);
}
html:not([data-hero-theme="dark"]) .leather--sheen { display: none; } /* 실사 질감에 하이라이트가 이미 있음 */
html:not([data-hero-theme="dark"]) .leather--light {
  background:
    radial-gradient(100% 70% at 50% -12%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%),
    radial-gradient(150% 120% at 50% 40%, rgba(60, 50, 40, 0) 55%, rgba(60, 50, 40, 0.06) 100%);
}
html:not([data-hero-theme="dark"]) .page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: url("assets/noise.png") repeat;
  background-size: 160px 160px;
  mix-blend-mode: overlay;
  opacity: 0.35;
  pointer-events: none;
}
html:not([data-hero-theme="dark"]) .page-hero-inner { z-index: 2; }
html:not([data-hero-theme="dark"]) .hero-intro { color: var(--light-text); }
html:not([data-hero-theme="dark"]) .hero-intro .gt { color: var(--light-text-dim); }
html:not([data-hero-theme="dark"]) .hero-next { color: rgba(12, 12, 12, 0.72); }
html:not([data-hero-theme="dark"]) .hero-next:hover { color: var(--light-ink); }
html:not([data-hero-theme="dark"]) .page-kicker { color: var(--light-text-dim); }
html:not([data-hero-theme="dark"]) .page-lead { color: var(--light-text); }
html:not([data-hero-theme="dark"]) .contact-email:hover { color: var(--light-text-dim); }
html:not([data-hero-theme="dark"]) .page-hero .pill { border-color: rgba(12, 12, 12, 0.28); color: var(--light-ink); }
html:not([data-hero-theme="dark"]) .page-hero .pill:hover { border-color: var(--light-ink); }
html:not([data-hero-theme="dark"]) .page-hero ::selection { background: var(--light-ink); color: #f6f3ef; }

/* 10. 작업 섹션 ------------------------------------------------------------ */
.work { background: var(--ink); }
.work a { display: block; }
.work-link:focus-visible, .panel:focus-visible { outline-offset: -4px; }
.work-link { position: absolute; inset: 0; }

/* 첫 작업 섹션: 왼쪽 낮고 오른쪽 높은 사선 윗변으로 메인을 덮는다 (--slant 는 app.js 가 스크롤에 맞춰 줄임) */
.work--first { clip-path: polygon(0 var(--slant, 0px), 100% 0, 100% 100%, 0 100%); }

/* 영상 위 글자 (preymaker 배치): 세로 가운데, 가로는 화면 가운데에서 시작, 태그는 오른쪽 끝 */
.work-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.38) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18));
  pointer-events: none;
}
.work-cap {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 3;
  display: grid;
  grid-template-columns: 50% minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 32px;
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  transform: translateY(calc(-50% + 14px));
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}
/* 섹션이 자리 잡으면 제목이 살짝 올라오며 나타남 (app.js 가 data-in) */
.work[data-in] .work-cap { opacity: 1; transform: translateY(-50%); }
.cap-title { grid-column: 2; min-width: 0; }
.cap-title h2 {
  font-size: clamp(40px, 5.6vw, 104px);
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
}
.cap-title h2.is-long { font-size: clamp(32px, 4.2vw, 80px); }
.cap-title h2:lang(ko) { font-weight: 700; letter-spacing: -0.02em; word-spacing: 0.12em; line-height: 1.02; }
.cap-title h2 .cursor {
  width: 0.24em;
  height: 0.7em;
  vertical-align: 0;
  opacity: 0;
  animation: none;
}
.work-link:hover .cap-title h2 .cursor,
.work-link:focus-visible .cap-title h2 .cursor { opacity: 1; animation: blink 1.05s steps(1) infinite; }
.cap-client {
  margin-top: 14px;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 500;
  color: var(--soft);
}
.cap-no { display: block; margin-bottom: 14px; color: var(--label-color); }
.cap-tags {
  grid-column: 3;
  display: flex;
  gap: 8px;
  padding-top: 6px;
}
.cap-tags li {
  padding: 6px 10px;
  border: 1px solid rgba(243, 243, 241, 0.4);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.work-media { z-index: 0; }
.work-link:hover .work-media video,
.work-link:hover .work-media img { transform: scale(1.015); }
.work-media img,
.work-media video { transition: opacity 0.5s var(--ease), transform 1.2s var(--ease); }

/* 세로 3편 묶음: 9:16 × 3 ≈ 16:9. 높이·폭 중 작은 쪽에 맞춰 잘리지 않게 (남는 곳은 여백) */
.work--trio {
  container-type: size;
  display: grid;
  place-items: center;
}
.trio {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--panel-gap);
}
.panel {
  position: relative;
  flex: none;
  height: min(100cqh, (100cqw - 2 * var(--panel-gap)) / var(--sum));
  aspect-ratio: var(--a);
  overflow: hidden;
  background: var(--surface);
  transition: opacity var(--mid) var(--ease);
}
.panel .media-fill { background: var(--surface); }
.trio:hover .panel:not(:hover) { opacity: 0.5; }
/* 패널 제목: 항상 보임. 아래쪽 어두운 스크림 위에 번호 · 제목 · 클라이언트 */
.panel-no { font-size: 11px; color: var(--label-color); opacity: 0.8; margin-bottom: 6px; }
.panel-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 6px;
  padding: 120px 20px 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0) 100%);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
.panel-title {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: clamp(22px, 1.8vw, 26px);
  line-height: 1.15;
  text-transform: uppercase;
}
.panel-title:lang(ko) { font-family: var(--body); font-weight: 700; letter-spacing: -0.015em; }
.panel-title .cursor { width: 0.36em; height: 0.82em; vertical-align: -0.06em; opacity: 0; animation: none; }
.panel:hover .panel-title .cursor,
.panel:focus-visible .panel-title .cursor { opacity: 1; animation: blink 1.05s steps(1) infinite; }
.panel-client {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
}

/* 세로 1편 (묶음에서 남은 작업): 같은 영상을 크게 흐리게 깔고, 선명한 영상을 가운데 */
.blur-bg {
  position: absolute;
  inset: -6%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.blur-bg img,
.blur-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(36px) brightness(0.5) saturate(1.15);
}
.blur-bg canvas { opacity: 0; transition: opacity 0.6s var(--ease); }
.blur-bg[data-live] canvas { opacity: 1; }
.work--solo { container-type: size; }
.solo-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  height: min(100cqh - 2 * var(--header-h), 100cqw * 0.9 / var(--a));
  aspect-ratio: var(--a);
  transform: translate(-50%, -50%);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.work--solo .work-cap { grid-template-columns: 50% minmax(0, 1fr) auto; }
.work--solo[data-orient="portrait"] .work-cap { grid-template-columns: calc(50% + min(100cqh - 2 * var(--header-h), 90cqw / var(--a)) * var(--a) / 2) minmax(0, 1fr) auto; }

/* 11. 마무리 · 푸터 --------------------------------------------------------- */
.outro {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background: var(--ink);
  padding-top: clamp(96px, 14vw, 200px);
  border-top: 1px solid var(--line);
}
.outro > * { position: relative; z-index: 1; }
.outro-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.giant {
  font-size: clamp(64px, 12vw, 200px);
  line-height: 0.82;
}
.index { counter-reset: none; }
.index li { border-bottom: 1px solid var(--line); }
.index a {
  display: grid;
  grid-template-columns: 48px 44px minmax(0, 1.6fr) minmax(0, 1fr) 120px 64px;
  align-items: center;
  column-gap: clamp(12px, 2vw, 28px);
  min-height: 84px;
  padding: 10px 0;
  color: var(--soft);
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.index a:hover,
.index a:focus-visible { color: var(--paper); }
.idx-thumb {
  position: relative;
  width: 44px;
  height: 64px;
  overflow: hidden;
  background: var(--surface);
}
.idx-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.8); transition: filter var(--mid) var(--ease); }
.index a:hover .idx-thumb img { filter: none; }
.idx-title {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 750;
  font-size: clamp(18px, 1.9vw, 30px);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--paper);
}
.idx-title .cursor { width: 0.34em; height: 0.8em; vertical-align: -0.04em; opacity: 0; animation: none; }
.index a:hover .idx-title .cursor,
.index a:focus-visible .idx-title .cursor { opacity: 1; animation: blink 1.05s steps(1) infinite; }
.idx-client { font-size: 14px; }
.idx-cat, .idx-time, .idx-no { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.idx-time { text-align: right; font-variant-numeric: tabular-nums; }

.clients-band {
  margin-top: clamp(96px, 12vw, 180px);
  display: grid;
  gap: 28px;
}
.logo-marquee {
  position: relative;
  overflow: hidden;
  /* 양 끝: 로고가 어두운 배경 속으로 서서히 나타나고 사라짐 (배경 질감은 그대로 보이도록 마스크) */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-track {
  display: flex;
  width: max-content;
  animation: marquee var(--dur, 50s) linear infinite;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-track li {
  display: grid;
  place-items: center;
  height: clamp(96px, 9vw, 132px);
  padding: 0 clamp(28px, 3.4vw, 56px);
}
.logo-track img {
  width: auto;
  height: calc(var(--logo-size) * var(--s, 0.5));
  max-width: calc(var(--logo-size) * 2.6);
  object-fit: contain;
}
.logo-track .logo-text { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--mute); }

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding-top: clamp(96px, 14vw, 200px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.cta-link {
  font-size: clamp(64px, 15vw, 260px);
  line-height: 0.8;
  transition: color var(--fast);
}
.cta-link .cursor { width: 0.22em; height: 0.66em; vertical-align: 0; margin-left: 0.06em; }
.cta-link:hover { color: var(--soft); }
.cta-side { display: grid; gap: 10px; justify-items: end; text-align: right; color: var(--soft); padding-bottom: 0.6em; }

.site-footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
}
.footer-inner img { width: 84px; height: auto; opacity: 0.9; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--soft); }
.footer-links a:hover { color: var(--paper); }
.footer-meta { display: flex; gap: 20px; }

/* 12. 플레이어 ------------------------------------------------------------- */
.player {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  color: var(--paper);
  opacity: 0;
  transition: opacity var(--mid) var(--ease);
  user-select: none;
  -webkit-user-select: none;
}
.player.is-open { opacity: 1; }
.player:focus { outline: none; }
.player[data-idle] { cursor: none; }
.pl-bg {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  max-width: none;
  filter: blur(40px) brightness(0.45) saturate(1.2);
  opacity: 0;
  transition: opacity var(--slow) var(--ease);
}
.player[data-stage="play"] .pl-bg { opacity: 1; }
.pl-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.player[data-stage="play"] .pl-video { opacity: 1; }
.pl-intro {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.pl-intro img { width: clamp(120px, 12vw, 176px); height: auto; opacity: 0; }
.player[data-stage="intro"] .pl-intro img { animation: plIntro 0.55s var(--ease) both; }
@keyframes plIntro {
  0% { opacity: 0; transform: scale(0.96); }
  35% { opacity: 1; transform: none; }
  72% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.02); }
}
.pl-wait {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 22px;
  margin: -11px 0 0 -5px;
  display: none;
}
.player[data-stage="play"]:not([data-playing]):not([data-paused]) .pl-wait { display: block; }

.pl-close {
  position: absolute;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  top: max(22px, env(safe-area-inset-top, 0px));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  font-family: var(--display);
  font-stretch: var(--narrow);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pl-close::after {
  content: "";
  width: 7px;
  height: 14px;
  background: var(--signal);
  opacity: 0;
  transition: opacity var(--fast);
}
.pl-close:hover::after,
.pl-close:focus-visible::after { opacity: 1; }
/* 작품 정보: CLOSE 와 같은 줄 가운데, 라벨 스타일. 컨트롤과 함께 나타나고 숨는다 */
.pl-meta {
  position: absolute;
  left: 50%;
  top: max(22px, env(safe-area-inset-top, 0px));
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 44px;
  align-content: center;
  width: max-content;
  max-width: min(56vw, 720px);
  transform: translateX(-50%);
  text-align: center;
  font-family: var(--label-font);
  font-stretch: 100%;
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: 1.5;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}
.pl-title { color: var(--label-color); }
.pl-client { color: var(--label-dim); font-size: 11px; }
.pl-close, .pl-meta, .pl-bar, .pl-hint { transition: opacity var(--mid) var(--ease), transform var(--mid) var(--ease); }
.player[data-idle] .pl-close,
.player[data-idle] .pl-meta { opacity: 0; }

.pl-hint {
  position: absolute;
  left: 50%;
  bottom: 96px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(243, 243, 241, 0.4);
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateX(-50%);
}
.pl-hint .cursor { width: 7px; height: 14px; margin: 0; vertical-align: 0; }
.pl-hint:hover { border-color: var(--paper); }

.pl-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  padding: 40px max(var(--gutter), env(safe-area-inset-right, 0px)) max(22px, env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}
.player[data-ui] .pl-bar { opacity: 1; transform: none; pointer-events: auto; }
.pl-btn {
  flex: none;
  min-width: 64px;
  height: 36px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
}
.pl-btn[data-pl="mute"] { text-align: right; min-width: 88px; }
.pl-btn:hover { color: var(--soft); }
.pl-track {
  position: relative;
  flex: 1;
  height: 28px;
  cursor: pointer;
  touch-action: none;
}
.pl-track::before,
.pl-buf,
.pl-fill {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 1px;
}
.pl-track::before { right: 0; background: rgba(243, 243, 241, 0.2); }
.pl-buf { width: calc(var(--b, 0) * 100%); background: rgba(243, 243, 241, 0.32); }
.pl-fill { width: calc(var(--p, 0) * 100%); background: var(--paper); }
.pl-knob {
  position: absolute;
  top: 50%;
  left: calc(var(--p, 0) * 100%);
  width: 6px;
  height: 14px;
  margin: -7px 0 0 -3px;
  background: var(--signal);
  opacity: 0;
  transition: opacity var(--fast);
}
.pl-track:hover .pl-knob,
.pl-track:focus-visible .pl-knob,
.pl-track[data-drag] .pl-knob { opacity: 1; }
.pl-time {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--soft);
}

/* 13. About · Contact ------------------------------------------------------ */
.page { position: relative; isolation: isolate; }
.page > * { position: relative; z-index: 1; }
.page-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 clamp(56px, 8vw, 112px);
}
.type--page .type-row--a { top: auto; bottom: 0.14em; color: var(--type-a); }
.type--page { z-index: 0; }
.page-hero-inner { position: relative; z-index: 1; }
.page-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(24px, 3vw, 40px); color: var(--soft); }
.page-kicker .cursor { width: 7px; height: 13px; margin: 0; vertical-align: 0; }
.manifesto {
  max-width: 22em;
  font-size: clamp(26px, 3.6vw, 60px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-wrap: pretty;
  white-space: pre-line;
}
.manifesto .cursor { width: 0.36em; height: 0.86em; vertical-align: -0.08em; }
.page-sec { padding-top: clamp(80px, 10vw, 160px); }
.sec-title {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(40px, 6vw, 96px);
  line-height: 0.9;
}
.sec-title .label { transform: translateY(-0.6em); }
.process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.process li {
  padding: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 36px) clamp(36px, 4vw, 56px) 0;
  display: grid;
  align-content: start;
  gap: 14px;
}
.process li + li { border-left: 1px solid var(--line); padding-left: clamp(20px, 2.4vw, 36px); }
.step-no {
  font-family: var(--display);
  font-stretch: var(--narrow);
  font-weight: 800;
  font-size: clamp(56px, 7vw, 112px);
  line-height: 0.8;
  color: var(--type-b);
  -webkit-text-stroke: 1px var(--line);
  transition: color var(--fast), -webkit-text-stroke-color var(--fast);
}
.process li:hover .step-no { color: var(--signal); -webkit-text-stroke-color: var(--signal); }
.process h3 { font-size: clamp(20px, 1.8vw, 26px); font-weight: 700; }
.process p { color: var(--soft); max-width: 36ch; }
.client-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}
.client-grid li {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 18%;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--mute);
}
/* 컬러 로고(어두운 배경용). 크기는 면적 기준(--s, app.js clientItem). 평소엔 살짝 흐리고 올리면 선명 */
.client-grid li { padding: 12%; }
.client-grid img {
  width: auto;
  height: calc(var(--logo-size) * var(--s, 0.5));
  max-width: 100%;
  object-fit: contain;
  opacity: 0.78;
  transition: opacity var(--fast);
}
.client-grid li:hover img { opacity: 1; }
.cta--page { padding-top: clamp(96px, 14vw, 200px); }

.page-lead { font-size: clamp(17px, 1.5vw, 22px); color: var(--soft); margin-bottom: clamp(20px, 3vw, 36px); }
.contact-email {
  display: inline-block;
  font-size: clamp(24px, 7.6vw, 150px);
  line-height: 0.95;
  text-transform: none;
  overflow-wrap: anywhere;
  transition: color var(--fast);
}
.contact-email:hover { color: var(--soft); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(24px, 3vw, 40px); }

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 48px);
  padding-top: 12px;
  padding-bottom: clamp(80px, 10vw, 160px);
}
.field { display: grid; gap: 6px; padding: 22px 0 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 17px;
  transition: border-color var(--fast);
}
.field select { appearance: none; -webkit-appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238d8d88' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; }
.field select option { background: var(--ink); }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--paper); }
.field input::placeholder,
.field textarea::placeholder { color: #55554f; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 36px; }
.form-status { grid-column: 1 / -1; min-height: 1.7em; padding-top: 12px; color: var(--soft); }

/* 14. 휴대폰 (≤768px) ------------------------------------------------------ */
@media (max-width: 1024px) {
  .index a { grid-template-columns: 36px 40px minmax(0, 1.4fr) minmax(0, 1fr) 64px; }
  .idx-cat { display: none; }
  .client-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
    --type-size: 46svh;
    --type-speed: 26;
    --slant-ratio: 0.12;
  }
  .brand { font-size: 13px; }
  .logo img { width: 72px; }

  .type-row--a { top: 4svh; }
  .type-row--b { bottom: 4svh; }
  .hero-intro { font-size: 15px; max-width: none; }

  /* 작업 섹션: 글자는 아래쪽에 */
  .work-cap {
    top: auto;
    bottom: max(28px, env(safe-area-inset-bottom, 0px));
    transform: translateY(14px);
    grid-template-columns: minmax(0, 1fr);
    row-gap: 14px;
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  }
  .work[data-in] .work-cap { transform: none; }
  .work--solo[data-orient] .work-cap { grid-template-columns: minmax(0, 1fr); }
  .cap-title { grid-column: 1; }
  .cap-title h2 { font-size: clamp(34px, 10.5vw, 56px); }
  .cap-title h2.is-long { font-size: clamp(26px, 7.4vw, 44px); }
  .cap-no { margin-bottom: 10px; }
  .cap-client { margin-top: 10px; }
  .cap-tags { grid-column: 1; grid-row: 2; padding-top: 0; flex-wrap: wrap; }
  .work-shade { background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 55%); }
  /* 휴대폰 세로 작업: 화면 폭에 맞춰 영상 전체가 보이게 (위아래 빈 곳은 흐린 배경) */
  .work--solo[data-orient="portrait"] .solo-frame {
    height: min(100cqh, 100cqw / var(--a));
    box-shadow: none;
  }
  /* 휴대폰 가로 작업: 화면 폭에 맞춤 (위쪽에 배치, 글자는 아래) */
  .work--solo[data-orient="landscape"] .solo-frame {
    top: 40%;
    height: auto;
    width: 100cqw;
    box-shadow: none;
  }

  .outro-head { align-items: flex-end; }
  .index a { grid-template-columns: 40px minmax(0, 1fr) 48px; grid-template-rows: auto auto; row-gap: 2px; min-height: 76px; }
  .idx-no { display: none; }
  .idx-thumb { grid-row: 1 / 3; width: 40px; height: 58px; }
  .idx-title { grid-column: 2; font-size: 18px; }
  .idx-client { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--mute); }
  .idx-time { grid-column: 3; grid-row: 1 / 3; }

  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta-side { justify-items: start; text-align: left; padding-bottom: 0; }

  .menu-links { font-size: min(22vw, 12svh, 120px); }
  .menu-foot { flex-direction: column; gap: 4px; align-items: center; text-align: center; }

  .pl-meta { top: max(70px, env(safe-area-inset-top, 0px)); max-width: calc(100vw - 2 * var(--gutter)); letter-spacing: 0.14em; }
  .pl-bar { gap: 12px; }
  .pl-btn { min-width: 0; }
  .pl-btn[data-pl="mute"] { min-width: 0; }
  .pl-time { font-size: 10px; }
  .pl-hint { bottom: 88px; white-space: nowrap; }

  .page-hero { min-height: 78svh; }
  .process { grid-template-columns: minmax(0, 1fr); }
  .process li { padding-right: 0; }
  .process li + li { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* 15. 움직임 줄이기 -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .type-track,
  .logo-track { animation: none; }
  .logo-track { flex-wrap: wrap; justify-content: center; width: auto; }
  .cursor,
  .lt-box { transition: none; }
  .menu-mask > span { transition: none; }
  .work-cap, .work[data-in] .work-cap { opacity: 1; transition: none; }
}
