/* ============================================================================
   unichest.co.kr — 유니체스트 한국어 사이트
   레이아웃 수치는 전부 원본 www.unichest.com 실측값(Playwright, 1920/1600/1440/
   1280/1024/768/375 7개 폭)에서 온 것이다. 근거: docs/qa/measurements.md.
   원본 브레이크포인트(실측 확인): 데스크탑 ≥1440 · 태블릿 810–1439 · 폰 ≤809.
   원본 unichest.com은 절대 수정하지 않음(읽기 전용).
   ========================================================================== */

:root {
  color-scheme: light;
  --ground: #ffffff;
  --ground-about: rgb(235, 235, 235); /* 원본 /about 배경 */
  --ink: #121212;                     /* rgb(18,18,18) 헤드라인·내비 */
  --body: #1f1f1f;                    /* rgb(31,31,31) 본문 */
  --meta: #484848;                    /* rgb(72,72,72) 카드 메타 */
  --muted: #b3b3b3;
  --nav-hover: rgba(196, 196, 196, 1);
  --hairline: #e6e6e6;
  --stage: #000000;                   /* 히어로 슬라이드 바탕 */
  --footer-bg: #1c1c1c;               /* rgb(28,28,28) */
  --footer-ink: #ffffff;
  --logo-filter: none;

  /* 한국어는 Pretendard 우선, 라틴 전용 UI(내비·라벨 등)만 Karla 우선.
     둘 다 상대편 폰트를 폴백에 포함해 한 글자도 시스템 폰트로 새지 않게 한다. */
  --font-ko: 'Pretendard Variable', Pretendard, 'Noto Sans KR', -apple-system, 'Malgun Gothic', sans-serif;
  --font-latin: Karla, 'Pretendard Variable', Pretendard, sans-serif;

  --header-h: 80px;
  --fade: 0.8s;          /* 히어로 크로스페이드 (원본 transitionDuration) */
}

* { box-sizing: border-box; }
/* html/body 어느 쪽에도 overflow-x 를 걸지 않는다.
   hidden 은 body 를 스크롤 컨테이너로 만들고 clip 은 뷰포트 스크롤 자체를 막아서
   둘 다 페이지 스크롤과 스크롤 리빌을 깨뜨린다. */
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--font-ko);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  /* 한국어는 단어(어절) 중간에서 끊지 않는다 — "것/을" 처럼 낱말이 쪼개지는 것을 막는다 */
  word-break: keep-all;
  overflow-wrap: normal;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid currentColor; outline-offset: 3px;
}
p, figure { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ground); color: var(--ink); padding: 10px 16px;
}
.skip:focus { left: 12px; top: 12px; }

/* 화면에서만 감추고 스크린리더·검색엔진에는 남긴다 */
.vh {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* 콘텐츠 폭 — 원본 실측: 홈·프로젝트는 뷰포트의 90%(상한 없음),
   어바웃은 75%(상한 1200px), work 상세는 70%. */
.wide   { width: 90%; margin: 0 auto; }
.narrow { width: 75%; max-width: 1200px; margin: 0 auto; }

/* ── 폰트 스택 예외 : 디자인상 항상 영문인 UI 요소만 Karla 우선으로 ─────
   그 외 전부(스테이트먼트 h1, 카드 메타·타이틀, work 본문/제목, 어바웃·컨택 카피,
   폼 라벨, 404 등)는 body 기본값(--font-ko)을 그대로 물려받는다.
   카드 타이틀(h3)은 원본 예시(FLEX G 등)와 달리 실제로는 86개 중 48개가
   "스마트 휠체어"처럼 한글이라 --font-ko 유지 — Karla로 두면 그 한글이 다시
   시스템 폰트로 샌다(오늘 고치는 것과 같은 버그). */
.nav a,
.mark,
.slabel,
.aboutlink,
.ftr .lab,
.ftr .copy,
.ftr .global,
.form h2,
.form .socials a,
.form label,
.form button[type=submit],
.lists h2,
.svc-head {
  font-family: var(--font-latin);
}

/* ── 헤더 : fixed, 흰색, 80px (원본과 동일 · 스크롤해도 변하지 않음) ───── */
.hdr {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h);
  background: var(--ground); z-index: 20;
}
.hdr .wide { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.mark img { width: 130px; height: auto; filter: var(--logo-filter); }
/* 내비 라벨은 원본 그대로 영문 대문자 — PROJECTS / ABOUT / CONTACT */
.nav { display: flex; align-items: center; gap: 56px; }
.nav a { font-size: 16px; line-height: 19.2px; font-weight: 600; color: var(--ink); transition: color .2s; }
.nav a:hover { color: var(--nav-hover); }
.nav a.on { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.nav .msocial { display: none; } /* 데스크탑에서는 숨김 — 모바일 오버레이에서만 보인다 */
.burger {
  display: none; width: 34px; height: 34px; border: 0; background: none;
  padding: 0; cursor: pointer; align-items: center; justify-content: center;
}
.burger span { display: block; width: 20px; height: 1px; background: var(--ink); position: relative; }
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 1px; background: var(--ink);
  transition: transform .25s ease, top .25s ease;
}
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.burger[aria-expanded='true'] span { background: transparent; }
.burger[aria-expanded='true'] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded='true'] span::after  { top: 0; transform: rotate(-45deg); }

main { padding-top: var(--header-h); }

/* ── 홈 : 히어로 슬라이드쇼 (데스크탑 20장 × 2초, 모바일 8장 × 4초) ──── */
/* 원본 실측 비율 1.92 (1728×900 / 1296×675 / 921.6×480 — 모든 폭에서 일정) */
.stage {
  margin-top: 40px; position: relative; background: var(--stage);
  aspect-ratio: 1.92; overflow: hidden;
}
.stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity var(--fade) ease-in-out;
}
.stage img.live { opacity: 1; }
.stage .mobile-only { display: none; }

/* ── 홈 : 스테이트먼트 ──────────────────────────────────────────────── */
/* 원본: 히어로 아래 124px, 본문 40px/56px, 오른쪽에 ABOUT US 링크(20px/24px).
   한국어는 같은 px에서 더 크게 읽히므로 33px(원본의 82.5%)로 낮췄었으나, 대표 지시(2026-09-08)로
   25px(75%)·세미볼드 600·행간 1.55(고정 56px 대신 상대값)로 재조정한다.
   min-height 는 그대로 224px 유지 — 아래 Our Service 라벨·그리드·푸터 좌표가 원본과 일치하게 한다
   (원본 영문은 1440·1600 에서 4줄, 1852px 이상에서 3줄). */
.statement {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 48px; padding: 124px 0 0;
}
.statement h1 {
  font-size: 25px; line-height: 1.55; font-weight: 600; color: var(--ink);
  width: 57%; max-width: 57%; min-height: 224px; letter-spacing: -.015em;
}
.statement h1 .ln { display: block; }
.aboutlink {
  font-size: 20px; line-height: 24px; font-weight: 600; color: var(--ink);
  white-space: nowrap; padding-top: 20px; margin-right: -35px;
}
.aboutlink:hover { opacity: .55; }
@media (min-width: 1852px) { .statement h1 { min-height: 168px; } }

/* ── 섹션 라벨 + 프로젝트 그리드 (홈: 3열 매스너리) ───────────────── */
/* 원본: 스테이트먼트 아래 123.3px, 라벨 17px/20.4px, 그 아래 38.7px 에서 그리드 시작 */
.slabel { margin: 114px 0 39px; font-size: 17px; line-height: 20.4px; color: var(--ink); font-weight: 400; }
.grid-home {
  display: grid; grid-template-columns: 343fr 578fr 343fr;
  column-gap: 10px; row-gap: 40px; align-items: start;
}
.grid-list {
  display: grid; grid-template-columns: repeat(4, 1fr);
  column-gap: 28px; row-gap: 30px; align-items: start;
}
.card figure { overflow: hidden; background: var(--hairline); }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card .r43 { aspect-ratio: 4 / 3; }
.card .r45 { aspect-ratio: 343 / 433; }
.card .r08 { aspect-ratio: 0.808; }      /* /projects 카드 실측 비율 */
.card h3 { margin-top: 16px; font-size: 14px; line-height: 16.8px; font-weight: 700; color: var(--meta); }
.card dl { margin: 8px 0 0; font-size: 13px; line-height: 15.6px; color: var(--meta); }
.card dl div { display: flex; gap: 4px; }
.card dt, .card dd { margin: 0; font-weight: 400; }
/* 원본 카드의 메타값은 전부 대문자로 찍힌다(CLIENT : SAMSUNG DISPLAY).
   데이터에는 상세 페이지와 똑같은 표기(Gosung eng)를 넣고, 카드에서만 대문자로 렌더한다. */
.card dd { text-transform: uppercase; }

/* ── 프로젝트 목록 ─────────────────────────────────────────────────── */
/* 원본에는 H1·리드문이 없고 검색창 하나뿐이다(헤더 아래 70px). SEO 용 H1은 DOM에 남기되
   화면에서는 감춰 원본과 세로 좌표를 맞춘다. */
.page-head {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.search { margin: 70px 0 8px; display: flex; align-items: center; gap: 10px; }
.search input {
  flex: 1; font-family: inherit; font-size: 20px; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid var(--meta);
  padding: 8px 0; outline: none;
}
.search input::placeholder { color: var(--muted); }
.noresult { padding: 40px 0 120px; color: var(--meta); font-size: 15px; }

/* ── 어바웃 ─────────────────────────────────────────────────────────── */
/* 원본 실측: 본문 컬럼 75%(상한 1200px), 히어로 비율 1.6272, 헤더 아래 120px */
body.p-about { background: var(--ground-about); }
.a-hero { margin-top: 120px; aspect-ratio: 1.6272; background: var(--hairline); overflow: hidden; }
.a-hero img { width: 100%; height: 100%; object-fit: cover; }
/* 인트로 2단 — 원본은 "왼쪽=인트로 / 오른쪽=프로세스" 두 칼럼이고, 각 칼럼 안에서
   언어 블록이 위아래로 쌓인다(원본은 영문이 위·한글이 아래, 우리는 한국어 사이트라 반대).
   칼럼 폭은 %가 아니라 520px 고정이고 남는 공간이 통째로 칼럼 사이 간격이 된다
   (원본 실측: 1920/컬럼1200 → 간격 160 · 1440/컬럼1080 → 간격 40).
   블록 사이 여백(18/20/40/10/20)도 원본 실측값을 그대로 옮긴 것. */
.duo { display: grid; grid-template-columns: 520px 520px; justify-content: space-between; padding-top: 70px; }
.duo h1, .duo h2 { font-size: 36px; line-height: 43.2px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.duo .kr { margin-top: 18px; font-size: 15px; line-height: 1.8; color: var(--body); }
.duo .kr + .kr { margin-top: 20px; }
.duo .sub { margin-top: 80px; font-size: 20px; line-height: 26px; font-weight: 600; color: var(--ink); }
.duo .en { margin-top: 10px; font-size: 14px; line-height: 22px; color: var(--muted); }
.duo .en + .en { margin-top: 20px; }
/* .figwide 는 about 페이지에서만 쓰이고, 그 안의 프로세스 다이어그램/로고 이미지는
   대부분 투명(PNG alpha)이라 컨테이너 배경이 그대로 비쳐 보인다.
   --hairline(#e6e6e6)을 쓰면 about 페이지 배경(--ground-about, rgb(235,235,235))과
   톤이 미세하게 달라 이미지가 별도 칸처럼 보이므로, 반드시 페이지 배경과 동일하게 맞춘다. */
.figwide { margin-top: 160px; overflow: hidden; background: var(--ground-about); }
.figwide img { width: 100%; height: auto; }
/* 프로세스 다이어그램(.figwide.inset)은 원본에서 %가 아니라 브레이크포인트별 고정 폭
   (실측: ≥1440px 1002px · 810~1439.98px 612px · ≤809.98px 315px)이라, 뷰포트가 넓어질수록
   원본은 더 커지지 않는데 %기반이던 우리 쪽만 계속 커져 오버사이즈로 보였다(2026-09-08 수정).
   margin-top도 같은 이유로 이 클래스에서만 덮어써 옆의 로고 이미지(.figwide, inset 아님)에는
   영향을 주지 않는다. */
.figwide.inset { width: 1002px; max-width: 100%; margin-left: auto; margin-right: auto; margin-top: 119px; }

.svc-head { margin-top: 119px; font-size: 36px; line-height: 43.2px; font-weight: 800; color: var(--ink); }
/* Service 4단 — 칼럼도 225px 고정 + space-between (원본 실측: 1920 간격 100 · 1440 간격 60) */
.svc { display: grid; grid-template-columns: repeat(4, 225px); justify-content: space-between; row-gap: 56px; margin-top: 40px; }
.svc h3 { font-size: 14px; line-height: 16.8px; font-weight: 700; color: var(--body); }
.svc .kr { font-size: 14px; line-height: 18.2px; color: var(--body); margin-top: 10px; }
.svc .en { font-size: 14px; line-height: 16.8px; color: var(--muted); margin-top: 10px; }

/* Awards / Activity — 원본은 1024px 까지 2단을 유지한다(폰에서만 1단). */
.lists { display: grid; grid-template-columns: 520px 520px; justify-content: space-between; margin-top: 130px; }
.lists h2 { font-size: 36px; line-height: 43.2px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-bottom: 14px; }
/* 행간 32px 은 대표 지시(원본 26px 보다 여유 있게) — 일부러 원본과 다르게 둔다. */
.lists li { font-size: 16px; line-height: 32px; font-weight: 500; color: var(--ink); }

.clients-head { margin-top: 130px; font-size: 36px; line-height: 43.2px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
/* 로고 그리드 — 원본은 항상 7열이고 로고 폭이 컨테이너에 따라 늘어난다(고정 px 아님).
   실측: 그리드 폭 = 컬럼의 94%(데스크탑) / 90%(태블릿), 칼럼 간격 40px / 20px. */
.logos { display: grid; grid-template-columns: repeat(7, 1fr); column-gap: 40px; row-gap: 50px; width: 94%; margin: 70px auto 0; padding: 0; }
.logos img { width: 100%; height: auto; object-fit: contain; filter: var(--logo-filter); opacity: .9; }

/* ── 프로젝트 상세(work) ───────────────────────────────────────────── */
/* 원본 실측: 첫 이미지 y=150(헤더 80 + 70), 본문 컬럼 뷰포트의 70%, 이미지 4:3 */
.work { padding-top: 150px; }
.work .narrow { width: 70%; max-width: none; }
.work figure { margin-bottom: 20px; background: var(--hairline); overflow: hidden; }
.work figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.work h1 { margin-top: 44px; font-size: 28px; line-height: 36px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.work .summary { margin-top: 20px; font-size: 15px; line-height: 1.8; color: var(--body); max-width: 720px; }
.work .wmeta { display: flex; gap: 60px; margin: 40px 0 120px; flex-wrap: wrap; }
.work .wmeta dt { font-size: 13px; line-height: 15.6px; color: var(--muted); }
.work .wmeta dd { margin: 6px 0 0; font-size: 14px; line-height: 16.8px; color: var(--ink); font-weight: 600; }
.work .figs { padding-bottom: 40px; }
.work .backlink { display: inline-block; padding: 40px 0 120px; font-size: 14px; font-weight: 600; color: var(--ink); }
.work .backlink:hover { opacity: .55; }

/* ── 컨택 ───────────────────────────────────────────────────────────── */
/* 원본 실측: 헤더 아래 200px 에서 h1, 좌 528 / 우 665 고정, 전체 폭 min(90%, 1512px) 중앙 */
.contact {
  display: grid; grid-template-columns: 528px 665px; justify-content: space-between;
  max-width: 1512px; margin: 0 auto; padding: 200px 0 408px;
}
.contact h1 { font-size: 36px; line-height: 43.2px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.contact .lead { margin-top: 18px; font-size: 16px; line-height: 26px; color: var(--body); }
.contact .sub { margin-top: 6px; font-size: 15px; line-height: 24px; color: var(--meta); }
.contact hr { border: 0; border-top: 1px solid var(--hairline); margin: 40px 0 28px; }
.contact .lines p { font-size: 15px; line-height: 26px; color: var(--ink); }
.contact .lines b { font-weight: 700; }
.contact .map { margin-top: 36px; aspect-ratio: 528 / 325; background: var(--hairline); }   /* 원본 실측 528×325 */
.contact .map iframe { width: 100%; height: 100%; border: 0; display: block; }
.form h2 { font-size: 15px; font-weight: 700; letter-spacing: .12em; color: var(--ink); padding-bottom: 12px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: center; }
.form .socials { display: flex; gap: 12px; }
.form .socials a { font-size: 12px; font-weight: 500; color: var(--meta); letter-spacing: 0; }
.form .socials a:hover { color: var(--ink); }
.form label { display: block; margin-top: 26px; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--meta); }
.form input, .form textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: none; border: 0; border-bottom: 1px solid #858585;
  padding: 10px 0; outline: none; transition: border-color .3s ease;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--ink); }
.form .note { margin-top: 10px; font-size: 12px; line-height: 18px; color: var(--muted); }
.form button {
  margin-top: 36px; font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: .1em;
  color: var(--ground); background: var(--ink); border: 0; border-radius: 0;
  padding: 15px 42px; cursor: pointer; transition: opacity .2s;
}
.form button:hover { opacity: .78; }
.form button:disabled { cursor: progress; opacity: .55; }

/* ── 문의 폼 첨부 (원본 "참고자료 첨부 / Select Files" 재현) ─────────── */
.form .attach { margin-top: 30px; font-size: 13px; font-weight: 600; color: var(--ink); }
.form .pick { margin-top: 12px; }
/* 진짜 input 은 화면에서 숨기고 label 을 버튼처럼 쓴다 (키보드로도 열린다) */
.form .pick input[type=file] {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.form .pickbtn {
  display: inline-block; margin: 0; font-family: var(--font-latin);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--ink);
  border: 1px solid var(--ink); padding: 9px 20px; cursor: pointer; transition: background .2s, color .2s;
}
.form .pickbtn:hover { background: var(--ink); color: var(--ground); }
.form .pick input[type=file]:focus-visible + .pickbtn { outline: 2px solid var(--ink); outline-offset: 2px; }

.form .filelist { list-style: none; margin: 14px 0 0; padding: 0; }
.form .filelist li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--hairline);
  font-size: 13px; line-height: 20px; color: var(--body);
}
.form .filelist .fn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form .filelist .fs { flex: none; font-size: 12px; color: var(--meta); }
.form .filelist .fx {
  flex: none; margin: 0; padding: 2px 8px; font-size: 11px; font-weight: 500; letter-spacing: 0;
  color: var(--meta); background: none; border: 1px solid var(--hairline); cursor: pointer;
}
.form .filelist .fx:hover { color: var(--ink); border-color: var(--ink); opacity: 1; }

/* 허니팟 — 사람 눈에도 스크린리더에도 걸리지 않게 완전히 빼 둔다 */
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form .fstate { margin-top: 16px; font-size: 13px; line-height: 21px; }
.form .fstate.is-ok  { color: var(--ink); font-weight: 600; }
.form .fstate.is-err { color: #c0392b; }
.form .fstate.is-busy { color: var(--meta); }

/* ── 404 ────────────────────────────────────────────────────────────── */
.nf { padding: 160px 0 200px; text-align: center; }
.nf h1 { font-size: 36px; line-height: 43.2px; font-weight: 800; color: var(--ink); }
.nf p { margin-top: 18px; font-size: 16px; color: var(--body); }
.nf a { display: inline-block; margin-top: 34px; font-size: 14px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 3px; }

/* ── 푸터 ───────────────────────────────────────────────────────────── */
/* 원본 실측(1920/1440/1024): 안쪽 컨테이너 왼쪽 = 25%vw − 172px, 폭 = 50%vw + 328px,
   3열(저작권 / Address / Contact), 상단 여백 55px, 높이 320px(태블릿 280 · 폰 198). */
.ftr { background: var(--footer-bg); color: var(--footer-ink); padding: 55px 0 0; min-height: 320px; }
.ftr .narrow {
  width: calc(50% + 328px); max-width: none;
  margin-left: calc(25% - 172px); margin-right: 0;
  display: grid; grid-template-columns: 1fr 277px 140px;
  font-size: 13px; line-height: 15.6px;
}
.ftr p { color: var(--footer-ink); }
.ftr .lab { margin-bottom: 12px; }
.ftr .addr { line-height: 15.6px; }
.ftr .phones { margin-top: 81px; }
.ftr a:hover { opacity: .6; }
.ftr .global { display: inline-block; margin-top: 18px; color: #8c8c8c; }
.social { display: flex; gap: 10px; margin-top: 109px; margin-left: 28px; }
.social a { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.social svg { width: 18px; height: 18px; fill: var(--footer-ink); }

/* 페이지별 마지막 블록 → 푸터 사이 간격 (원본 실측) */
body.p-home .ftr      { margin-top: 80px; }
body.p-projects .ftr  { margin-top: 160px; }
body.p-about .ftr     { margin-top: 170px; }
body.p-contact .ftr   { margin-top: 0; }
body.p-work .ftr      { margin-top: 0; min-height: 450px; }

/* ── 스크롤 리빌 (원본: opacity 0 → 1, translateY(150px) → 0) ───────── */
.js .rv { opacity: 0; transform: translateY(150px); transition: opacity .9s ease-out, transform .9s cubic-bezier(.22,.61,.36,1); }
.js .rv.in { opacity: 1; transform: none; }

/* ── 커스텀 커서 (원본 규칙 그대로) ────────────────────────────────── */
#custom-cursor {
  position: fixed; top: 0; left: 0; width: 20px; height: 20px;
  background-color: rgba(226, 255, 82, .2);
  border: 1.5px solid rgb(156, 177, 50);
  border-radius: 50%; pointer-events: none; z-index: 2147483647;
  backdrop-filter: blur(3px); opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .15s, width .3s cubic-bezier(.23,1,.32,1), height .3s cubic-bezier(.23,1,.32,1);
  display: none;
}
#custom-cursor.active { width: 100px; height: 100px; }

/* ══ 태블릿 : 810 – 1439px ═════════════════════════════════════════════
   원본은 이 구간에서 헤더 높이는 80px 그대로지만 타이포·여백이 한 단계 줄고
   /projects 그리드는 좌우 40px 고정 여백 + 열 간격 10px 로 바뀐다. */
@media (max-width: 1439.98px) {
  .nav { display: none; }
  .burger { display: flex; }
  .nav.open {
    display: flex; position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--ground); flex-direction: column; align-items: flex-end;
    justify-content: flex-start; gap: 26px; padding: 60px 40px 40px; overflow-y: auto;
  }
  .nav.open a { font-size: 44px; line-height: 52.8px; font-weight: 500; color: var(--ink); }
  .nav.open .msocial { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-top: 26px; }
  .nav.open .msocial a { font-size: 18px; line-height: 21.6px; font-weight: 400; }
}

@media (min-width: 810px) and (max-width: 1439.98px) {
  /* 홈 : 히어로 아래 70px, 스테이트먼트 35px/42px 를 한국어 29px 로, 링크는 아래로 */
  .statement { flex-direction: column; align-items: stretch; gap: 0; padding-top: 70px; }
  .statement h1 { font-size: 22px; line-height: 42px; width: 100%; max-width: none; min-height: 84px; }
  .aboutlink { padding-top: 64px; align-self: flex-start; margin-left: 50%; margin-right: 0; }
  .slabel { margin: 88px 0 39px; }
  /* /projects : 그리드만 좌우 40px 고정 여백으로 빠져나온다 */
  .search { margin: 40px 0 0; }
  .grid-list { margin-inline: calc(40px - 5vw); column-gap: 10px; }
  /* 어바웃·work 컬럼 폭 (원본 실측: 어바웃 680px 고정 · work 80%) */
  .narrow { width: 680px; max-width: 100%; }
  .work .narrow { width: 80%; }
  .a-hero { margin-top: 40px; }
  /* 인트로는 1단으로 접히지만(원본과 동일) 본문 글줄 폭은 원본처럼 520px 로 잡는다.
     Awards/Activity 는 원본이 1024px 까지 2단을 유지하므로 여기서 접지 않는다. */
  .duo, .contact { grid-template-columns: 1fr; row-gap: 56px; }
  .duo { padding-top: 60px; row-gap: 80px; }
  .duo > div > p { max-width: 520px; }
  .duo .sub { margin-top: 40px; }
  .contact { max-width: 665px; padding: 120px 0 372px; }
  .contact .map { aspect-ratio: 656 / 404; }
  .svc { grid-template-columns: repeat(2, 275px); column-gap: 90px; justify-content: start; row-gap: 56px; }
  /* 다이어그램 실측(원본 810~1439.98px): 폭 612px · 위 간격 79px · Service 헤딩 24px/28.8px, 위 간격 79px */
  .figwide.inset { width: 612px; margin-top: 79px; }
  .figwide { margin-top: 166px; }
  .svc-head { margin-top: 79px; font-size: 24px; line-height: 28.8px; }
  .lists { grid-template-columns: 1fr 1fr; column-gap: 54px; margin-top: 80px; }
  .lists h2 { font-size: 24px; line-height: 28.8px; }
  /* 글자/행간 비율은 대표가 정한 2.0(16/32) 그대로 두고, 글자 크기만 원본처럼 줄인다.
     16px 그대로 두면 313px 칼럼에서 한 줄짜리 항목이 두 줄로 접혀 목록이 두 배로 길어진다. */
  .lists li { font-size: 12px; line-height: 24px; }
  .clients-head { margin-top: 80px; }
  .logos { width: 90%; column-gap: 20px; row-gap: 30px; }
  body.p-about .ftr { margin-top: 90px; }
  .ftr { min-height: 280px; }
  body.p-work .ftr { min-height: 450px; }
  .ftr .narrow { grid-template-columns: 1fr 256px 140px; }
  body.p-home .ftr { margin-top: 40px; }
  body.p-projects .ftr { margin-top: 100px; }
}

/* ══ 폰 : ≤ 809px ═══════════════════════════════════════════════════════
   원본 실측 확인: 809px 에서 헤더 48px·1열로 바뀐다(810px 은 아직 태블릿).
   거터는 홈·프로젝트만 좌우 20px 고정이고, 어바웃 350px·work/컨택/푸터는 90% 다. */
@media (max-width: 809.98px) {
  :root { --header-h: 48px; }
  body.p-home main .wide, body.p-projects main .wide { width: calc(100% - 40px); }
  .narrow { width: 350px; max-width: calc(100% - 25px); }
  .mark img { width: 100px; }
  /* 원본 홈은 히어로가 y=0 에서 시작하고 흰 헤더가 그 위를 덮는다. 높이는 580px 고정. */
  body.p-home main { padding-top: 0; }
  .stage { margin-top: 0; margin-left: -20px; margin-right: -20px; aspect-ratio: auto; height: 580px; }
  .stage .desktop-only { display: none; }
  .stage .mobile-only { display: block; }
  .statement { flex-direction: column; align-items: stretch; gap: 0; padding-top: 41px; }
  .statement h1 { font-size: 15px; line-height: 26px; font-weight: 600; width: 100%; max-width: none; min-height: 0; }
  .aboutlink { font-size: 12px; line-height: 14.4px; padding-top: 55px; align-self: flex-start; margin-left: 50%; margin-right: 0; }
  .slabel { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .grid-home { grid-template-columns: 1fr; row-gap: 70px; margin-top: 74px; }
  .grid-list { grid-template-columns: 1fr; row-gap: 48px; margin-inline: 0; column-gap: 0; }
  .card h3 { margin-top: 14px; }
  .search { margin: 32px 0 0; margin-inline: calc(5vw - 20px); }
  .search input { font-size: 16px; }
  .a-hero { margin-top: 32px; }
  .duo { grid-template-columns: 1fr; padding-top: 40px; row-gap: 80px; }
  .duo h1, .duo h2 { font-size: 26px; line-height: 32px; }
  .duo .sub { margin-top: 40px; font-size: 19px; line-height: 24px; }
  /* 원본은 폰에서도 본문 글줄 상자를 520px 로 고정해 두어 375px 화면에서는 글이 화면 밖으로
     넘친다(원본 버그). 폭은 원본과 맞추되 화면을 넘지 않는 선에서 자른다. */
  .duo > div > p { max-width: none; width: min(520px, calc(100vw - 40px)); }
  /* 원본 폰/좁은 화면에서는 히어로·인트로·다이어그램만 350px 컬럼 안에 있고
     아래쪽 블록(플로우 이미지·Awards/Activity·Clients)은 좌우 20px 만 남기고
     화면 전체로 펼쳐진다. .bleed 가 .narrow 밖으로 빠져나오게 하는 장치. */
  .bleed { width: calc(100vw - 40px); margin-left: calc(50% - 50vw + 20px); margin-right: 0; }
  .figwide { margin-top: 46px; }
  /* 다이어그램 실측(원본 ≤809.98px): 폭 315px · 위 간격 50px · Service 헤딩 16px/19.2px, 위 간격 90px */
  .figwide.inset { width: 315px; max-width: 100%; margin-top: 50px; }
  .svc-head { margin-top: 90px; font-size: 16px; line-height: 19.2px; }
  .clients-head { margin-top: 80px; font-size: 16px; line-height: 19.2px; }
  .svc { grid-template-columns: repeat(2, 150px); column-gap: 35px; justify-content: start; row-gap: 30px; margin-top: 30px; }
  .svc h3 { font-size: 12px; line-height: 14.4px; }
  .svc .kr { font-size: 11px; line-height: 14.3px; }
  .svc .en { font-size: 11px; line-height: 13.2px; }
  .lists { grid-template-columns: 1fr; margin-top: 80px; row-gap: 40px; }
  .lists h2 { font-size: 16px; line-height: 19.2px; }
  .lists li { font-size: 11px; line-height: 22px; }
  .logos { grid-template-columns: repeat(7, 1fr); column-gap: 6px; row-gap: calc(17.7px + (100vw - 375px) / 38.5); width: 100%; margin: 20px 0 0; padding: 0; }
  /* work : 원본은 첫 이미지 y=80(헤더 48 + 32), 컬럼 90% */
  .work { padding-top: 80px; }
  .work .narrow { width: 90%; }
  .work h1 { margin-top: 32px; font-size: 22px; line-height: 30px; }
  .work .wmeta { gap: 32px; margin: 28px 0 100px; }
  .contact { grid-template-columns: 1fr; row-gap: 56px; padding: 128px 0 148px; max-width: none; }
  .contact h1 { font-size: 26px; line-height: 32px; }
  .contact .map { aspect-ratio: 337 / 208; }
  /* 푸터 : 원본 폰 실측 — 90% 폭, 2열(저작권은 전체 폭), 11px/13.2px, 높이 198px */
  .ftr { margin-top: 0; padding: 20px 0 0; min-height: 198px; }
  .ftr .narrow {
    width: 90%; margin: 0 auto;
    grid-template-columns: 1fr 119px; column-gap: 0; row-gap: 20px;
    font-size: 11px; line-height: 13.2px;
  }
  .ftr .narrow > div:first-child { grid-column: 1 / -1; }
  .ftr .lab { margin-bottom: 13px; }
  .ftr .phones { margin-top: 27px; }
  .social { margin-top: 54px; margin-left: 21px; }
  .social a { width: 22px; height: 22px; }
  .social svg { width: 16px; height: 16px; }
  body.p-work .ftr { min-height: 198px; }
  body.p-work .ftr .narrow { width: calc(100% - 75px); }
  body.p-home .ftr { margin-top: 95px; }
  body.p-projects .ftr { margin-top: 40px; }
  body.p-about .ftr { margin-top: calc(92px + (100vw - 375px) / 6.47); }
  #custom-cursor { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .stage img { transition: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  #custom-cursor { display: none !important; }
}
