:root {
  --bg: #f4f4f1;
  --ink: #121212;
  --sub: #66665f;
  --line: rgba(18, 18, 18, 0.12);
  --wrap: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: Pretendard, system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.6;
  letter-spacing: -0.015em; word-break: keep-all; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* 등장 효과 (JS 있을 때만) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* 상단 */
.top { position: fixed; inset: 0 0 auto; z-index: 50; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.top .wrap { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.top.solid { background: rgba(244, 244, 241, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.top.on-dark { background: rgba(14, 14, 16, 0.8); color: #f3f3f0; border-color: rgba(255, 255, 255, 0.08); }
.brand { font-weight: 800; font-size: 14px; letter-spacing: 0.12em; }
.top nav { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.top nav a { opacity: 0.7; transition: opacity 0.2s; }
.top nav a:hover { opacity: 1; }

/* 목업 */
.frame { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.06); }
.frame .bar { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #ebebe7; }
.frame .bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfcfca; }
.frame .bar span { flex: 1; max-width: 340px; margin: 0 auto; transform: translateX(-21px); height: 17px; border-radius: 9px; background: #fff;
  font-size: 11px; color: #8b8b86; display: flex; align-items: center; justify-content: center; }
.frame img { width: 100%; }
.phone { background: #111; border-radius: 30px; padding: 7px; box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.4); }
.phone img { border-radius: 23px; width: 100%; }
.dark .phone { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 30px 60px -18px rgba(0, 0, 0, 0.6); }

/* 소개 */
.hero { padding: 150px 0 110px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; color: var(--sub); }
.hero h1 { font-size: clamp(40px, 5.4vw, 72px); line-height: 1.12; letter-spacing: -0.045em; font-weight: 800; margin: 22px 0 22px; }
.lead { font-size: 18px; color: var(--sub); }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; max-width: 460px; }
.skills li { border: 1px solid rgba(18, 18, 18, 0.22); border-radius: 999px; padding: 7px 15px; font-size: 14px; font-weight: 500; }
.hero-art { position: relative; aspect-ratio: 1 / 0.86; }
.hero-art .frame, .hero-art .phone { position: absolute; }
.hero-art .f1 { width: 78%; right: 0; top: 0; }
.hero-art .f2 { width: 64%; left: 0; top: 34%; }
.hero-art .f3 { width: 58%; right: 6%; top: 56%; }
.hero-art .f4 { width: 21%; right: -2%; top: 19%; }

/* 작업 목록 */
.index { padding: 0 0 40px; }
.idx { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.idx a { display: grid; gap: 2px; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); transition: padding 0.3s var(--ease); }
.idx a:hover { padding-left: 8px; }
.idx span { font-size: 13px; color: var(--sub); font-weight: 600; }
.idx b { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.idx em { font-style: normal; font-size: 14px; color: var(--sub); }

/* 작업 */
.work { padding: 130px 0 120px; }
.work.dark { background: #0e0e10; color: #f3f3f0; --sub: #9b9b95; --line: rgba(255, 255, 255, 0.12); }
.work.light { background: #ffffff; }
.work.cool { background: #edf1f7; }
.work.warm { background: #f4f0e9; --sub: #776e63; }
.w-head { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: end; }
.w-no { font-size: clamp(56px, 7vw, 96px); font-weight: 200; line-height: 0.82; letter-spacing: -0.05em; color: var(--acc); }
.w-cat { font-size: 14px; font-weight: 600; color: var(--acc); letter-spacing: 0.02em; }
.w-title h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.1; font-weight: 800; letter-spacing: -0.045em; margin: 6px 0 8px; }
.w-title h2 small { font-size: 0.5em; font-weight: 500; color: var(--sub); letter-spacing: -0.02em; margin-left: 4px; }
.w-one { font-size: 18px; color: var(--sub); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 600; white-space: nowrap; transition: transform 0.2s var(--ease), background 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn span { font-size: 17px; }
.dark .btn { background: var(--acc); color: #0e0e10; }
.btn.ghost { background: transparent; color: var(--sub); border: 1px solid var(--line); font-weight: 500; cursor: default; }
.btn.ghost:hover { transform: none; }

.w-stage { position: relative; margin: 64px 0 0; padding-right: 13%; }
.w-stage .phone { position: absolute; right: 0; bottom: -40px; width: 20%; }

.w-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; margin-top: 92px; align-items: start; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.feats li { padding-top: 16px; border-top: 2px solid var(--acc); font-size: 15px; color: var(--sub); line-height: 1.5; }
.feats b { display: block; font-size: 18px; color: inherit; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.dark .feats b, .feats b { color: var(--ink); }
.dark .feats b { color: #f3f3f0; }
.meta div { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.meta div:first-child { border-top: 1px solid var(--line); }
.meta dt { color: var(--sub); }

.gallery { display: flex; gap: 14px; margin-top: 54px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery button { flex: 0 0 auto; width: min-content; text-align: left; scroll-snap-align: start; }
.gallery img { height: 190px; width: auto; max-width: none; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 8px;
  background: rgba(127, 127, 127, 0.15); box-shadow: 0 0 0 1px var(--line); transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.gallery button[data-phone] img { aspect-ratio: 390 / 844; border-radius: 10px; }
.gallery button:hover img { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--acc); }
.gallery span { display: block; font-size: 13px; color: var(--sub); margin-top: 9px; line-height: 1.4; }

/* 진행 과정 */
.process { padding: 130px 0; }
.process h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 44px; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.steps li { border-top: 2px solid var(--ink); padding-top: 16px; font-size: 14px; color: var(--sub); line-height: 1.5; }
.steps span { display: block; font-size: 30px; font-weight: 200; color: var(--ink); letter-spacing: -0.03em; line-height: 1; }
.steps b { display: block; color: var(--ink); font-size: 17px; font-weight: 700; margin: 12px 0 4px; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--sub); }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 크게 보기 */
.lb { position: fixed; inset: 0; z-index: 100; background: #0c0c0c; display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-top { height: 56px; flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 22px; color: #eee; font-size: 14px; }
.lb-title { font-weight: 600; }
.lb-count { color: #888; }
.lb-x { margin-left: auto; width: 44px; height: 44px; font-size: 20px; color: #eee; }
.lb-scroll { flex: 1; overflow: auto; padding: 8px 20px 40px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lb-scroll img { margin: 0 auto; width: 100%; max-width: 1200px; border-radius: 6px; }
.lb.phone .lb-scroll img { max-width: 400px; border-radius: 18px; }
.lb.fit .lb-scroll { display: flex; align-items: center; }
.lb.fit .lb-scroll img { max-height: calc(100vh - 110px); width: auto; max-width: min(100%, 1400px); }
.lb-nav { position: fixed; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 30px; line-height: 1; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-nav:hover { background: rgba(255, 255, 255, 0.2); }

/* 태블릿 */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero { padding-top: 120px; }
  .idx { grid-template-columns: 1fr 1fr; }
  .w-body { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
}

/* 휴대폰 */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { padding: 0 20px; }
  .top .wrap { height: 56px; }
  .top nav { gap: 18px; font-size: 13.5px; }
  .hero { padding: 104px 0 64px; }
  .hero h1 { font-size: 38px; margin: 16px 0 14px; }
  .lead { font-size: 15.5px; }
  .skills { margin-top: 24px; gap: 6px; }
  .skills li { font-size: 13px; padding: 6px 12px; }
  .hero-art { aspect-ratio: 1 / 0.92; }
  .idx { grid-template-columns: 1fr 1fr; }
  .idx b { font-size: 17px; }
  .idx em { font-size: 12.5px; }
  .work { padding: 80px 0 72px; }
  .w-head { grid-template-columns: 1fr; gap: 10px; }
  .w-no { font-size: 52px; }
  .w-one { font-size: 15.5px; }
  .w-head .btn { justify-self: start; margin-top: 10px; height: 46px; padding: 0 20px; font-size: 14.5px; }
  .w-stage { margin-top: 38px; padding-right: 16%; }
  .w-stage .phone { width: 27%; bottom: -26px; border-radius: 18px; padding: 4px; }
  .w-stage .phone img { border-radius: 14px; }
  .frame { border-radius: 7px; }
  .frame .bar { height: 18px; padding: 0 8px; gap: 4px; }
  .frame .bar i { width: 6px; height: 6px; }
  .frame .bar span { display: none; }
  .w-body { margin-top: 56px; }
  .feats { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
  .feats li { font-size: 13.5px; padding-top: 12px; }
  .feats b { font-size: 15.5px; }
  .meta div { grid-template-columns: 40px 1fr; font-size: 13.5px; }
  .gallery { margin: 40px -20px 0; padding: 0 20px 8px; gap: 10px; scroll-padding: 20px; }
  .gallery img { height: 150px; }
  .process { padding: 80px 0; }
  .steps { grid-template-columns: 1fr 1fr; gap: 26px 16px; }
  .lb-nav { display: none; }
  .lb-scroll { padding: 4px 10px 30px; }
}
