/* 눌러 보는 데모 (demo.js) */
.demo { position: relative; container-type: inline-size; }
.demo-frame { background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .07); box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 34px 70px -30px rgba(20, 40, 70, .45); display: flex; flex-direction: column; }
.demo-chrome { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; background: #fbfbfa; border-bottom: 1px solid var(--hair); flex: none; }
.demo-chrome .dots { display: flex; gap: 6px; }
.demo-chrome .dots i { width: 10px; height: 10px; border-radius: 50%; background: #e2e2df; }
.demo-chrome .dots i:first-child { background: #ff6159; } .demo-chrome .dots i:nth-child(2) { background: #ffbd2e; } .demo-chrome .dots i:nth-child(3) { background: #28c941; }
.demo-chrome .title { margin: 0 auto; transform: translateX(-26px); font-size: 12.5px; font-weight: 600; color: var(--grey); }
.demo-app { display: flex; flex: 1; min-height: 0; }
.demo-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.demo-rail { flex: none; width: clamp(120px, 21cqw, 168px); border-right: 1px solid var(--hair); background: #fafaf9; padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.demo-rail .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--ac); color: #fff; display: grid; place-items: center; font: 800 14px var(--font); margin: 0 0 10px 4px; }
.demo-rail nav { display: grid; gap: 2px; }
.demo-rail nav span { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .35s var(--glide), color .35s; }
.demo-rail nav span i { width: 8px; height: 8px; border-radius: 3px; background: currentColor; opacity: .45; flex: none; }
.demo-rail nav span.on { background: var(--ac-soft); color: var(--ac); }
.demo-rail nav span.on i { opacity: 1; }
.demo-rail .sk { margin-top: auto; height: 8px; border-radius: 99px; background: #ecebe8; width: 80%; margin-left: 8px; }
.demo-rail .sk.short { margin-top: 6px; width: 55%; }
.demo-top .here { font-size: 13px; font-weight: 600; color: var(--grey); white-space: nowrap; }
.demo-top .here::before { content: "/"; margin-right: 8px; color: #c9c8c4; }
.demo-top .search { margin-left: auto; width: clamp(60px, 16cqw, 150px); height: 26px; border-radius: 99px; background: var(--panel); }
.demo-top .me { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--ac-soft), var(--ac)); flex: none; }
.demo-top { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--hair); flex: none; }
.demo-top b { font-size: 15px; letter-spacing: -.03em; color: var(--ink); white-space: nowrap; }
.demo-top b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--ac); margin-right: 8px; vertical-align: 1px; }
.demo-top nav { display: flex; gap: 4px; overflow: hidden; margin-left: auto; }
.demo-top nav span { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 5px 10px; border-radius: 99px; white-space: nowrap; transition: background .35s var(--glide), color .35s; }
.demo-top nav span.on { background: var(--ac-soft); color: var(--ac); }
.demo-screen { position: relative; flex: 1; display: grid; place-items: center; padding: 26px 30px; height: clamp(290px, 46cqw, 430px); background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)), var(--tone-bg); overflow: hidden; }
.demo-view { width: min(100%, 580px); font-size: clamp(12.5px, 2.25cqw, 16.5px); }
.demo-view.leave { animation: viewOut .22s var(--glide) forwards; }
@keyframes viewOut { to { opacity: 0; transform: translateY(-10px) scale(.985); filter: blur(2px); } }
.demo-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-top: 1px solid var(--hair); background: #fff; flex: none; }
.demo-note { flex: 1; margin: 0; font-size: 14px; color: var(--grey); line-height: 1.45; }
.demo-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 99px; background: var(--ink); color: #fff; font: 650 15px var(--font); cursor: pointer; white-space: nowrap; transition: transform .35s var(--spring), box-shadow .3s, background .2s; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .55); }
.demo-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--spring); }
.demo-btn:hover { transform: translateY(-1px); }
.demo-btn:hover svg { transform: translateX(3px); }
.demo-btn:active, .demo-btn.pressed { transform: scale(.95); }
.demo-btn.busy span, .demo-btn.busy svg { opacity: .35; }
.demo-btn.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
.demo-btn.again { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.demo-btn.again svg { transform: rotate(180deg); }
.demo-btn .rip { background: rgba(255, 255, 255, .45); }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 0 4px; }
.demo-dots { display: flex; gap: 5px; }
.demo-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(0, 0, 0, .14); transition: width .4s var(--glide), background .3s; }
.demo-dots i.on { background: var(--ac); }
.demo-dots i.on:last-of-type, .demo-dots i.on + i:not(.on) { }
.demo-label { font-size: 12px; color: color-mix(in srgb, var(--ink) 50%, transparent); }
.demo-reset { margin-left: auto; appearance: none; border: 0; background: rgba(255, 255, 255, .75); border-radius: 99px; height: 30px; padding: 0 12px; font: 600 12.5px var(--font); color: var(--ink); cursor: pointer; }
.demo-cursor { position: absolute; left: 0; top: 0; z-index: 6; width: 28px; height: 28px; pointer-events: none; opacity: 0; transition: transform .95s var(--glide), opacity .3s; }
.demo-cursor.show { opacity: 1; }
.demo.is-done .demo-screen { background: linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, .35)), var(--tone-bg); }

/* 휴대폰 */
.demo[data-device="phone"] .demo-frame { width: min(340px, 100%); margin: 0 auto; border-radius: 46px; border: 10px solid #121212; aspect-ratio: 390 / 820; box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 40px 80px -30px rgba(20, 40, 70, .55); }
.demo[data-device="phone"] .demo-chrome { height: 40px; background: #fff; border-bottom: 0; padding: 0 22px; justify-content: space-between; }
.demo[data-device="phone"] .clock { font-size: 13px; font-weight: 700; color: var(--ink); }
.demo[data-device="phone"] .island { width: 86px; height: 24px; border-radius: 99px; background: #121212; }
.demo[data-device="phone"] .sig { display: flex; gap: 2px; align-items: flex-end; height: 11px; }
.demo[data-device="phone"] .sig i { width: 3px; background: var(--ink); border-radius: 1px; }
.demo[data-device="phone"] .sig i:nth-child(1) { height: 5px; } .demo[data-device="phone"] .sig i:nth-child(2) { height: 8px; } .demo[data-device="phone"] .sig i:nth-child(3) { height: 11px; }
.demo[data-device="phone"] .demo-top { padding: 8px 14px 10px; flex-wrap: wrap; gap: 8px; }
.demo[data-device="phone"] .demo-top nav { margin-left: 0; width: 100%; }
.demo[data-device="phone"] .demo-screen { height: auto; padding: 18px 14px; }
.demo[data-device="phone"] .demo-view { font-size: 13.5px; }
.demo[data-device="phone"] .demo-bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding: 12px 14px 18px; }
.demo[data-device="phone"] .demo-note { flex: none; }
.demo[data-device="phone"] .demo-note { font-size: 13px; text-align: center; min-height: 2.9em; }
.demo[data-device="phone"] .demo-btn { justify-content: center; height: 46px; }
.demo[data-device="phone"] .demo-foot { width: min(340px, 100%); margin: 14px auto 0; }
.prod .demo[data-device="phone"] .demo-frame, .prod .demo[data-device="phone"] .demo-foot { width: min(290px, 100%); }
.prod .demo[data-device="phone"] .demo-frame { aspect-ratio: 390 / 760; border-width: 8px; border-radius: 40px; }

@container (max-width: 560px) {
  .demo[data-device="web"] .demo-rail, .demo[data-device="web"] .demo-top .search { display: none; }
  .demo[data-device="web"] .demo-screen { padding: 18px 14px; height: auto; min-height: 300px; }
  .demo[data-device="web"] .demo-view { font-size: 13px; }
  .demo[data-device="web"] .demo-bar { flex-wrap: wrap; }
  .demo[data-device="web"] .demo-note { flex-basis: 100%; }
  .demo[data-device="web"] .demo-btn { flex: 1; justify-content: center; }
  .demo-label { display: none; }
}

/* 사례 페이지 */
.work-hero { padding: 36px 0 0; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--grey); text-decoration: none; padding: 6px 12px 6px 8px; border-radius: 99px; transition: background .2s, color .2s; }
.crumb:hover { background: var(--panel); color: var(--ink); }
.work-hero .chips { margin-top: 26px; }
.work-title { margin-top: 14px; font-size: clamp(42px, 6.4vw, 84px); line-height: 1.06; letter-spacing: -.055em; font-weight: 700; width: fit-content; }
.work-sub { display: block; margin-top: 10px; font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; color: var(--grey); letter-spacing: -.03em; }
.work-one { margin: 18px 0 0; font-size: 20px; line-height: 1.6; color: var(--text); max-width: 760px; }
.save-pill { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding: 10px 16px 10px 12px; border-radius: 99px; background: linear-gradient(120deg, #eaf3fe, #fdf1e7); font-size: 15px; font-weight: 600; color: var(--ink); }
.save-pill b { font-variant-numeric: tabular-nums; }
.save-pill .from { color: var(--grey); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .3); }
.save-pill .to { color: #0f4fae; }
.save-pill small { font-size: 12px; font-weight: 600; color: var(--muted); }
.save-pill i { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.save-pill i svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.stage { position: relative; overflow: hidden; margin-top: 44px; border-radius: 36px; padding: 52px; background: var(--tone-bg); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 44px; align-items: center; }
.stage > *:not(.aurora) { position: relative; z-index: 1; }
.stage > .aurora i:nth-child(1) { background: radial-gradient(circle, #fff, rgba(255, 255, 255, 0) 70%); }
.stage > .aurora i:nth-child(2) { background: radial-gradient(circle, color-mix(in srgb, var(--ac) 35%, #fff), transparent 70%); mix-blend-mode: normal; opacity: .45; }
.stage > .aurora i:nth-child(3) { background: radial-gradient(circle, #ffe3cc, transparent 70%); }
.stage-demo { animation: stageIn 1.1s cubic-bezier(.16,1,.3,1) .1s both; transform-origin: 50% 100%; }
@keyframes stageIn { from { opacity: 0; transform: perspective(1400px) rotateX(18deg) translateY(60px) scale(.94); } }
.guide { animation: guideIn .9s cubic-bezier(.16,1,.3,1) .35s both; }
@keyframes guideIn { from { opacity: 0; transform: translateX(30px); } }
.stage .kd-foot .kd-tag { color: color-mix(in srgb, #111 55%, transparent); }
.stage.phone { grid-template-columns: 1fr 1fr; padding: 60px 60px 52px; }
/* 웹·Mac 데모는 무대를 꽉 채우고, 단계 안내는 아래로 */
.stage:not(.phone) { grid-template-columns: 1fr; gap: 30px; padding: 48px 48px 40px; }
.stage:not(.phone) .guide { display: grid; grid-template-columns: 260px 1fr; gap: 6px 28px; align-items: start; }
.stage:not(.phone) .guide > p { grid-column: 1; }
.stage:not(.phone) .guide ol { grid-column: 2; grid-row: 1 / span 2; margin: 0; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stage:not(.phone) .guide button.on { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .stage-demo, .guide { animation: none; } }
.guide h2 { font-size: 24px; letter-spacing: -.04em; }
.guide > p { margin: 6px 0 0; font-size: 14.5px; color: color-mix(in srgb, var(--ink) 62%, transparent); }
.guide ol { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.guide button { appearance: none; width: 100%; text-align: left; display: grid; grid-template-columns: 28px 1fr; gap: 2px 12px; align-items: start; padding: 12px 14px; border-radius: 16px; border: 1px solid transparent; background: rgba(255, 255, 255, .45); cursor: pointer; transition: background .3s, border-color .3s, transform .35s var(--spring), box-shadow .3s; font: inherit; color: var(--text); }
.guide button:hover { background: rgba(255, 255, 255, .75); }
.guide button > i { grid-row: span 2; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(255, 255, 255, .8); font: 700 12.5px var(--mono); font-style: normal; color: var(--grey); transition: background .3s, color .3s; }
.guide button b { font-size: 15px; color: var(--ink); }
.guide button small { font-size: 13px; color: var(--grey); line-height: 1.45; }
.guide button.on { background: #fff; border-color: rgba(0, 0, 0, .06); box-shadow: 0 14px 30px -18px rgba(20, 40, 70, .4); transform: translateX(4px); }
.guide button.on > i { background: var(--ac); color: #fff; }
.guide button.done > i { background: var(--ac-soft); color: var(--ac); }

/* 손으로 할 때 대 자동화 뒤: kinetics Before / After 끌어서 비교 */
.compare { position: relative; margin-top: 44px; height: max(440px, calc(190px + var(--n, 5) * 52px)); border-radius: 30px; overflow: hidden; user-select: none; touch-action: pan-y; box-shadow: var(--card-shadow); --x: 50%; }
.cmp-layer { position: absolute; inset: 0; display: grid; place-items: center; padding: 40px; }
.cmp-before { background: #f1f0ed; }
.cmp-after { background: linear-gradient(140deg, #dcebfd, #fde9d9); clip-path: inset(0 0 0 var(--x)); }
.cmp-inner { width: min(42%, 440px); }
.cmp-before { justify-items: start; padding-left: 6%; }
.cmp-after { justify-items: end; padding-right: 6%; }
.cmp-inner small { display: block; font-size: 14px; font-weight: 700; color: var(--grey); }
.cmp-after .cmp-inner small { color: #0f4fae; }
.cmp-inner h3 { margin-top: 6px; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.05em; }
.cmp-inner h3 b { font-variant-numeric: tabular-nums; }
.cmp-inner ol { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 7px; counter-reset: c; }
.cmp-inner li { counter-increment: c; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 9px 12px; font-size: 15px; font-weight: 500; color: var(--ink); }
.cmp-inner li::before { content: counter(c); width: 22px; height: 22px; border-radius: 7px; background: var(--panel); display: grid; place-items: center; font: 600 12px var(--mono); color: var(--grey); flex: none; }
.cmp-after .cmp-inner li { font-size: 18px; font-weight: 650; padding: 15px 16px; }
.cmp-after .cmp-inner li::before { background: #0f4fae; color: #fff; }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); pointer-events: none; }
.cmp-handle { position: absolute; top: 50%; left: var(--x); width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); display: grid; place-items: center; pointer-events: none; transition: transform .3s var(--spring); }
.cmp-handle svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.compare:hover .cmp-handle { transform: scale(1.08); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare input:focus-visible ~ .cmp-handle { outline: 3px solid var(--focus); outline-offset: 3px; }
.cmp-tag { position: absolute; top: 18px; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 99px; background: rgba(255, 255, 255, .85); pointer-events: none; }
.cmp-tag.l { left: 18px; } .cmp-tag.r { right: 18px; color: #0f4fae; }
.cmp-hint { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

.feats2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 44px; }
.feats2 div { background: #fff; border: 1px solid var(--hair); border-radius: 22px; padding: 26px 28px; box-shadow: var(--card-shadow); display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.feats2 i { width: 40px; height: 40px; border-radius: 12px; background: var(--ac-soft); color: var(--ac); display: grid; place-items: center; font: 700 14px var(--mono); font-style: normal; }
.feats2 p { margin: 8px 0 0; font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.pts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.pts div { border-radius: 22px; padding: 28px; background: #fff; border: 1px solid var(--hair); box-shadow: var(--card-shadow); }
.pts b { display: block; font-size: clamp(38px, 4.6vw, 56px); font-weight: 700; letter-spacing: -.05em; color: var(--ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.pts span { display: block; margin-top: 10px; color: var(--grey); font-size: 15.5px; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.stack-chips span { font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.real { margin-top: 44px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.real .frame { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--hair); box-shadow: var(--card-shadow); }
.real .frame .bar { display: flex; gap: 6px; align-items: center; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--hair); background: #fbfbfa; font-size: 12px; color: var(--grey); }
.real .frame .bar i { width: 9px; height: 9px; border-radius: 50%; background: #e2e2df; }
.real .frame .bar span { margin-left: 6px; }
.real .shots { display: grid; gap: 16px; }
.real figcaption { margin-top: 8px; font-size: 13.5px; color: var(--grey); }

.next-case { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; border-radius: 30px; overflow: hidden; background: #fff; border: 1px solid var(--hair); box-shadow: var(--card-shadow); text-decoration: none; color: inherit; transition: transform .45s var(--spring), box-shadow .45s var(--glide); }
.next-case:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .28); }
.next-case .txt { padding: 40px; }
.next-case small { font-size: 14px; font-weight: 700; color: var(--blue); }
.next-case b { display: block; margin-top: 6px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.045em; color: var(--ink); line-height: 1.2; }
.next-case p { margin: 8px 0 0; color: var(--grey); }
.next-case .go { display: inline-flex; margin-top: 18px; font-weight: 700; color: var(--ink); gap: 6px; }
.next-case .go::after { content: "→"; transition: transform .3s var(--spring); }
.next-case:hover .go::after { transform: translateX(4px); }
.next-case .cv { border-left: 1px solid var(--hair); }
.cta-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 18px; padding: 30px 36px; border-radius: 30px; background: linear-gradient(120deg, #e7f2fd, #fdeee2); }
.cta-strip b { font-size: 22px; letter-spacing: -.04em; color: var(--ink); }
.cta-strip p { margin: 4px 0 0; color: var(--grey); }
.sec-h { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.045em; margin-top: 112px; }
.sec-h + .lead { margin-top: 10px; font-size: 17px; }

@media (max-width: 960px) {
  .stage, .stage.phone { grid-template-columns: 1fr; padding: 28px 18px; gap: 26px; border-radius: 28px; }
  .guide ol { grid-template-columns: 1fr 1fr; }
  .stage:not(.phone) .guide { grid-template-columns: 1fr; }
  .stage:not(.phone) .guide ol { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .feats2, .pts { grid-template-columns: 1fr; }
  .real { grid-template-columns: 1fr; }
  .next-case { grid-template-columns: 1fr; }
  .next-case .cv { border-left: 0; border-top: 1px solid var(--hair); }
}
@media (max-width: 760px) {
  .work-title { font-size: 44px; }
  .work-one { font-size: 17px; }
  .stage, .stage.phone { margin-left: -12px; margin-right: -12px; padding: 18px 10px 20px; }
  .guide { padding: 0 6px; }
  .guide ol { grid-template-columns: 1fr; }
  .guide button small { display: none; }
  .compare { height: max(480px, calc(170px + var(--n, 5) * 64px)); border-radius: 24px; }
  .cmp-layer { padding: 56px 12px 24px; align-items: start; }
  .cmp-inner { width: 46%; }
  .cmp-inner h3 { font-size: 24px; }
  .cmp-inner li { font-size: 14px; padding: 7px 10px; }
  .cmp-after .cmp-inner li { font-size: 16px; padding: 12px; }
  .next-case .txt { padding: 26px 22px; }
  .cta-strip { padding: 24px 22px; }
  .sec-h { margin-top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo *, .demo *::before, .demo *::after { animation: none !important; transition: none !important; }
  .demo-cursor { display: none; }
}
