/* 사람조합 홈페이지 화면 꾸밈과 움직임 (2026-12-02)
   값과 기본 부품은 ds.css에 있다. 이 파일은 화면 구성과 움직임만 담는다. */

/* ---------- 떠 있는 머리 메뉴 ---------- */
.nav { position: fixed; left: 0; right: 0; top: 0; z-index: 40; padding: 18px var(--gutter); display: flex; align-items: center; justify-content: space-between; pointer-events: none; transition: transform .5s var(--ease); }
.nav.hide { transform: translateY(-120%); }
.nav > * { pointer-events: auto; }
.nav .brand { color: var(--ink); transition: color .3s; }
.nav .pills { display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: var(--r-pill); background: rgba(20, 22, 27, .06); backdrop-filter: blur(14px); transition: background .3s; }
.nav .pills a { text-decoration: none; font-size: var(--t-small); font-weight: 600; padding: 11px 20px; border-radius: var(--r-pill); color: var(--ink); transition: background .25s, color .25s; }
.nav .pills a:hover { background: rgba(20, 22, 27, .1); }
.nav .pills a.go { background: var(--accent); color: var(--white); font-weight: 600; }
.nav .pills a.go:hover { background: #a93318; }
.nav.on-ink .brand { color: var(--white); }
.nav.on-ink .pills { background: rgba(255, 255, 255, .12); }
.nav.on-ink .pills a { color: var(--white); }
.nav.on-ink .pills a:hover { background: rgba(255, 255, 255, .16); }
body.draft .nav { top: 32px; }

/* ---------- 첫 화면 ---------- */
.hero { min-height: 100svh; display: grid; align-items: end; padding: 140px 0 clamp(40px, 6vw, 88px); position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero .display { max-width: 11em; }
.hero .under { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 80px); align-items: end; margin-top: clamp(32px, 5vw, 72px); }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* 한 줄씩 올라오는 글자 */
.lines .line { display: block; overflow: hidden; padding-bottom: .08em; }
.lines .line > span { display: block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.lines.on .line > span { transform: none; }
.lines .line:nth-child(2) > span { transition-delay: .09s; }
.lines .line:nth-child(3) > span { transition-delay: .18s; }
.lines .line:nth-child(4) > span { transition-delay: .27s; }

/* 짜맞춤 그림: ㄱ과 ㄴ 두 조각이 스크롤에 따라 맞물린다 */
.joint { position: absolute; right: clamp(-40px, -2vw, 0px); top: 40%; width: min(42vw, 600px); transform: translateY(-50%); z-index: 1; pointer-events: none; --p: 0; }
.joint svg { width: 100%; height: auto; overflow: visible; }
.joint .a { fill: none; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; transform: translate(calc((1 - var(--p)) * 46px), calc((1 - var(--p)) * -46px)) rotate(calc((1 - var(--p)) * 5deg)); transform-origin: 200px 200px; }
.joint .b { fill: var(--accent); transform: translate(calc((1 - var(--p)) * -46px), calc((1 - var(--p)) * 46px)) rotate(calc((1 - var(--p)) * -5deg)); transform-origin: 200px 200px; }
.ink .joint .a { stroke: var(--white); }
.joint.small { position: static; transform: none; width: min(100%, 420px); margin-left: auto; }

.scrollcue { position: absolute; left: 50%; bottom: 22px; width: 1px; height: 56px; background: var(--line); overflow: hidden; z-index: 2; }
.scrollcue::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--ink); animation: cue 2s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }

/* 첫 화면 3D 그림: 떠 있다가 스크롤하면 돌며 커진다 */
.shot { position: absolute; right: clamp(-60px, -3vw, 0px); top: 46%; width: min(52vw, 760px); z-index: 1; pointer-events: none; --p: 0; transform: translateY(calc(-52% + var(--p) * -90px)) rotate(calc(var(--p) * 14deg)) scale(calc(1 + var(--p) * .22)); will-change: transform; }
.shot img { width: 100%; height: auto; mix-blend-mode: multiply; animation: float 7s ease-in-out infinite; -webkit-mask-image: radial-gradient(closest-side, #000 68%, transparent 100%); mask-image: radial-gradient(closest-side, #000 68%, transparent 100%); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-22px) rotate(1.5deg); } }

/* 어두운 구역의 영상 배경 */
.statement .pin { overflow: hidden; }
.bgvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; z-index: 0; transform: scale(calc(1.02 + var(--sp, 0) * .32)) translate3d(calc(var(--sp, 0) * -5%), 0, 0); transform-origin: 78% 50%; will-change: transform; }
.statement .pin .wrap { position: relative; z-index: 2; }
.statement .pin::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 18%, rgba(20,22,27,.55) 55%, rgba(20,22,27,0) 100%); z-index: 1; }

/* 화면 가득 커지는 영상 띠 */
.cine { height: 220vh; position: relative; }
.cine .pin { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.cine .frame { --q: 0; position: relative; width: calc(62% + var(--q) * 38%); height: calc(58% + var(--q) * 42%); border-radius: calc((1 - var(--q)) * 28px); overflow: hidden; will-change: width, height; }
.cine video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.18 - var(--q) * .18)); }
.cine .over { position: absolute; inset: 0; display: grid; align-items: end; padding: clamp(24px, 5vw, 72px); background: linear-gradient(0deg, rgba(20,22,27,.62) 0%, rgba(20,22,27,0) 55%); color: var(--white); opacity: calc(var(--q) * 1.6 - .5); }
.cine .over .display { font-size: var(--t-h1); }

/* ---------- 숫자 ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(16px, 2.4vw, 40px); }

/* ---------- 스크롤에 따라 밝아지는 큰 문장 ---------- */
.statement { min-height: 440vh; position: relative; }
.statement .pin { position: sticky; top: 0; min-height: 100svh; display: grid; align-items: center; padding: 120px 0; }
.statement .quote { max-width: 17em; }
.statement .w { opacity: .16; transition: opacity .35s linear; }
.statement .w.lit { opacity: 1; }

/* 네 장면: 스크롤하면 한 문장씩 바뀌고, 강조 낱말에 밑줄이 그어진다 */
.scenes { display: grid; }
.scene { grid-area: 1 / 1; opacity: 0; transform: translateY(56px); filter: blur(10px); transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease); pointer-events: none; }
.scene.on { opacity: 1; transform: none; filter: none; }
.scene.past { opacity: 0; transform: translateY(-56px); filter: blur(10px); }
.say { font-family: var(--serif); font-weight: 800; font-size: clamp(2.25rem, 1rem + 5.4vw, 5.75rem); line-height: 1.2; letter-spacing: -0.05em; margin: 0; }
.say em { font-style: normal; color: #ff8f6b; background: linear-gradient(#ff8f6b, #ff8f6b) left 96% / 0% .09em no-repeat; transition: background-size .9s var(--ease) .45s; padding-bottom: .04em; }
.scene.on .say em { background-size: 100% .09em; }
.scene.final .say { font-size: clamp(2.75rem, 1rem + 7.4vw, 8rem); }
.scene.final .say em { color: var(--white); background-image: linear-gradient(var(--accent), var(--accent)); background-position: left 88%; background-size: 0% .36em; }
.scene.final.on .say em { background-size: 100% .36em; }
.prog { display: flex; align-items: center; gap: 16px; margin-top: clamp(40px, 6vw, 88px); font-size: var(--t-small); font-weight: 600; color: var(--sub-on-ink); font-variant-numeric: tabular-nums; }
.prog #sceneNo { color: var(--white); }
.prog i { position: relative; flex: 0 0 min(40vw, 320px); height: 2px; background: var(--line-on-ink); }
.prog b { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent); transition: width .3s linear; }

/* ---------- 맡는 일: 줄 목록 ---------- */
.svc .row { grid-template-columns: 72px 1fr 1.5fr; transition: padding .5s var(--ease); position: relative; }
.svc .row::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--accent); transition: width .7s var(--ease); }
.svc .row:hover::after { width: 100%; }
.svc .row:hover { padding-left: 16px; }
.svc .row h3 { font-family: var(--serif); font-weight: 700; font-size: var(--t-h2); letter-spacing: -0.03em; line-height: 1.3; margin: 0; }

/* ---------- 누구와 ---------- */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 32px); }
.three > div { border-top: 1px solid var(--line); padding-top: var(--s-3); }
.ink .three > div { border-color: var(--line-on-ink); }
.three p { margin: 12px 0 0; color: var(--sub); font-size: var(--t-lead); line-height: 1.7; }
.ink .three p { color: var(--sub-on-ink); }

/* ---------- 일하는 방식: 쌓이는 카드 ---------- */
.stackcards { display: grid; gap: 20px; }
.stackcards .card { position: sticky; top: calc(110px + var(--i) * 18px); min-height: 0; box-shadow: 0 -1px 0 var(--line); }
.stackcards .card .n { font-family: var(--serif); font-size: var(--t-h1); line-height: 1; color: var(--accent); }

/* ---------- 프로젝트: 옆으로 흐르는 구역 ---------- */
.hscroll { position: relative; }
.hscroll .pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hscroll .track { display: flex; gap: 20px; padding: 0 var(--gutter); will-change: transform; }
.hscroll .card { flex: 0 0 min(78vw, 440px); min-height: 400px; }
.hscroll .head { padding: 0 var(--gutter); margin-bottom: clamp(28px, 4vw, 56px); display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.hscroll .bar { margin: clamp(28px, 4vw, 48px) var(--gutter) 0; height: 2px; background: var(--line-on-ink); position: relative; }
.hscroll .bar i { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent); }

/* ---------- 흐르는 글자 띠 ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; white-space: nowrap; }
.marquee .run { display: inline-flex; gap: 56px; animation: run 46s linear infinite; padding-right: 56px; }
.marquee span { font-family: var(--serif); font-size: var(--t-h3); font-weight: 600; color: var(--sub); }
.marquee span::before { content: "·"; margin-right: 56px; color: var(--accent); }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- 하네스 ---------- */
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line-on-ink); }
.four > div { padding: var(--s-4) var(--s-3) var(--s-4) 0; border-right: 1px solid var(--line-on-ink); padding-left: var(--s-3); }
.four > div:first-child { padding-left: 0; }
.four > div:last-child { border-right: 0; }
.four b { font-family: var(--serif); font-size: var(--t-h2); font-weight: 700; display: block; margin-bottom: 12px; }
.four p { margin: 0; color: var(--sub-on-ink); font-size: var(--t-body); }

/* ---------- 회사 ---------- */
.facts { display: grid; grid-template-columns: 140px 1fr; border-top: 1px solid var(--line); }
.facts dt, .facts dd { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; color: var(--sub); padding-top: 22px; }
.cv { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cv li { padding: 16px 0; border-bottom: 1px solid var(--line); }

/* ---------- 문의 ---------- */
.ask { display: grid; gap: 20px; }
.formmsg { display: none; background: var(--white); border-left: 3px solid var(--accent); padding: 16px 18px; border-radius: 0 var(--r-field) var(--r-field) 0; font-size: var(--t-small); }
.formmsg.on { display: block; }
.hint { font-size: var(--t-small); color: var(--sub); margin: 0; }

/* ---------- 큰 글자 바닥 ---------- */
.bottom .lockup { display: flex; align-items: center; gap: 16px; font-family: var(--serif); font-weight: 800; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); line-height: 1; letter-spacing: -0.04em; color: var(--white); margin: 0 0 var(--s-5); }
.bottom .lockup .mark { width: 1.5em; height: 1.5em; }
.bottom .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line-on-ink); padding-top: var(--s-3); }

/* ---------- 안쪽 페이지(프로젝트·처리방침) ---------- */
.pagehead { padding: clamp(150px, 16vw, 240px) 0 clamp(48px, 6vw, 96px); }
.pj dl { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 10px 16px; }
.pj dt { font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; color: var(--sub); padding-top: 4px; }
.pj dd { margin: 0; }
.pj .no { font-family: var(--serif); color: var(--accent); font-size: var(--t-h3); }
.two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.hist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hist li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.hist li i { font-style: normal; font-size: var(--t-small); font-weight: 600; color: var(--sub); }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .hero .under { grid-template-columns: 1fr; }
  .joint { width: 86vw; opacity: .5; right: -22vw; }
  .shot { width: 92vw; right: -30vw; top: 30%; opacity: .9; }
  .cine .frame { width: calc(84% + var(--q) * 16%); height: calc(46% + var(--q) * 54%); }
  .svc .row { grid-template-columns: 44px 1fr; }
  .four { grid-template-columns: repeat(2, 1fr); }
  .four > div:nth-child(2) { border-right: 0; }
  .four > div:nth-child(3) { padding-left: 0; }
  .four > div:nth-child(n+3) { border-top: 1px solid var(--line-on-ink); }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav .pills a:not(.go) { display: none; }
  .nav .pills { background: transparent; padding: 0; backdrop-filter: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .three { grid-template-columns: 1fr; }
  .four { grid-template-columns: 1fr; }
  .four > div { border-right: 0; padding-left: 0; border-top: 1px solid var(--line-on-ink); }
  .four > div:first-child { border-top: 0; }
  .facts { grid-template-columns: 96px 1fr; }
  .hist li { grid-template-columns: 1fr; gap: 2px; }
  .pj dl { grid-template-columns: 1fr; gap: 2px 0; }
  .pj dt { margin-top: 10px; }
  .statement { min-height: 380vh; }
}

/* 움직임을 줄이도록 설정한 기기: 모든 움직임을 끄고 내용은 다 보이게 한다 */
@media (prefers-reduced-motion: reduce) {
  .lines .line > span { transform: none; transition: none; }
  .statement { min-height: 0; }
  .scenes { gap: var(--s-5); }
  .scene { grid-area: auto; opacity: 1; transform: none; filter: none; transition: none; }
  .say em { background-size: 100% .09em; transition: none; }
  .prog { display: none; }
  .bgvid { transform: none; }
  .statement .pin { position: static; min-height: 0; }
  .statement .w { opacity: 1; transition: none; }
  .marquee .run { animation: none; }
  .scrollcue::after { animation: none; }
  .stackcards .card { position: static; }
  .hscroll .pin { position: static; height: auto; padding: var(--section) 0; }
  .hscroll .track { flex-wrap: wrap; transform: none !important; }
  .joint { --p: 1 !important; }
  .shot { transform: translateY(-52%); }
  .shot img { animation: none; }
  .cine { height: auto; }
  .cine .pin { position: static; height: auto; padding: var(--section) var(--gutter); }
  .cine .frame { width: 100%; height: 60vh; border-radius: 28px; }
  .cine .over { opacity: 1; }
  .nav { transition: none; }
}

/* ---------- 첫 화면: 하는 일 네 가지를 바로 보인다 ---------- */
.hero .display { max-width: 12em; }
.does { list-style: none; margin: clamp(24px, 3vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 1040px; }
.does a { display: grid; gap: 4px; text-decoration: none; background: var(--white); border-radius: 16px; padding: 18px 20px; height: 100%; border: 1.5px solid transparent; transition: transform var(--dur) var(--ease), border-color .25s; }
.does a:hover { transform: translateY(-4px); border-color: var(--accent); }
.does b { font-size: var(--t-lead); letter-spacing: -0.03em; line-height: 1.35; }
.does span { font-size: var(--t-small); color: var(--sub); }

/* ---------- 어느 화면에서나 바로 의뢰하기 ---------- */
.quick { position: fixed; right: 20px; bottom: 20px; z-index: 45; display: flex; gap: 8px; }
.quick a { display: none; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px; border-radius: var(--r-pill); font-weight: 700; font-size: var(--t-body); text-decoration: none; box-shadow: 0 10px 30px rgba(20, 22, 27, .22); }
.quick .q-main { display: inline-flex; background: var(--accent); color: var(--white); }
.quick .q-main:hover { background: #a93318; }
@media (max-width: 640px) {
  .quick { left: 0; right: 0; bottom: 0; gap: 0; background: var(--ink); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .quick a { display: inline-flex; flex: 1; min-height: 52px; padding: 0; border-radius: 12px; box-shadow: none; color: var(--white); background: transparent; }
  .quick .q-main { flex: 1.5; background: var(--accent); }
  body { padding-bottom: 72px; }
  .does { grid-template-columns: repeat(2, 1fr); }
  .hero { align-items: start; padding-top: 110px; }
  .shot { top: auto; bottom: -6%; width: 78vw; right: -26vw; opacity: .5; transform: none; }
}
@media (max-width: 960px) and (min-width: 641px) { .does { grid-template-columns: repeat(2, 1fr); } }
@media print { .quick { display: none; } }
@media (min-width: 641px) { .quick { transition: opacity .3s, transform .3s; } .quick.early { opacity: 0; pointer-events: none; transform: translateY(12px); } }
.bottom .lockup .en { font-style: normal; font-size: .42em; font-weight: 600; letter-spacing: .02em; color: var(--sub-on-ink); align-self: flex-end; padding-bottom: .25em; }

/* 문의 양식: 자동 등록 막는 숨은 칸, 접수 완료 표시 */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formmsg.ok { border-left-color: #2f7d4f; }
