/* manoa.kr 새 판(v2) — 운영 판 /styles.css 위에 얹는다. 바뀐 것만 여기 둔다.
   움직임 원칙: 라이브러리 0 · transform/opacity 만 움직인다 · html.js 일 때만 숨겨 두고(스크립트가 없으면 다 보인다) · 움직임 끔이면 끝 모습으로 멈춘다. */

/* ⚠ /styles.css 의 body 는 container-type(= 레이아웃 가둠) + overflow-x: hidden 이라 넘침이 창으로 안 올라가고 body 가 스크롤 상자가 된다
   ⇒ 창 scroll 이벤트가 안 오고 scrollTo 가 안 먹는다(잰 값: scrollTo 뒤 scrollY 0). clip 은 스크롤 상자를 안 만든다 */
body { overflow-x: clip; }

/* ── 태블릿 목업 공통. 그림에 베젤·그림자가 들어 있다(940 폭 등 표시 크기 ×2 재출력 · 비율은 1400:1971 그대로, 모서리 투명) ── */
.device { position: relative; aspect-ratio: 1400 / 1971; }
.device > img { display: block; width: 100%; height: auto; }

/* ── ① 히어로 ── */
/* 히어로 「출시 예정」 띠는 운영 판 /styles.css 의 .hero-soon 을 그대로 쓴다(두 판의 히어로가 같은 띠). 사용법 단계 안의 꼬리표는 02 절과 같은 작은 .soon */
.how-soon .soon { margin-left: 0; vertical-align: 0; }
.v2-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; align-items: center; }
.v2-hero .brand-line { grid-column: 1; }
/* 태블릿 높이는 첫 화면 안(머리 76 + 위아래 여유)에 들게 화면 높이를 따른다. 너무 낮은 창에서는 420 에서 멈춘다 */
.v2-hero-art { --dev-h: clamp(420px, calc(100svh - 150px), 660px); grid-row: 1 / span 2; grid-column: 2; margin: 24px 0 0; }
.hero-device { width: calc(var(--dev-h) * 1400 / 1971); max-width: 100%; }
.v2-face-note { margin-top: 6px; color: var(--muted); font-size: 12px; text-align: center; }

.sign-path path { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.sign-card { position: absolute; left: -14%; bottom: 13%; width: 58%; padding: 12px 14px 14px; border-radius: 14px; background: #fff; box-shadow: 0 16px 40px rgba(15, 26, 34, .16); }
.sign-label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.sign-path { display: block; width: 100%; height: auto; margin-top: 4px; }
.sign-path path { stroke: var(--ink); stroke-width: 3; }
.sign-chip { position: absolute; right: 12px; top: -14px; padding: 5px 12px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* 5 초 한 바퀴: 서명 0~26% · 칩 28~34% 에 뜸 · 90% 까지 머문 뒤 함께 사라진다.
   🕐 눈썹 획(0~28%)을 뺐다(사용자 2026-10-10) — 서명이 그 끝(34%)을 기다리지 않고 바로 시작한다. 그리는 길이(1.3 초)·칩 뜨는 길이(0.3 초)는 그대로 */
@keyframes v2-sign { 0% { stroke-dashoffset: 1; opacity: 1; } 26%, 90% { stroke-dashoffset: 0; opacity: 1; } 97%, 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes v2-chip { 0%, 28% { opacity: 0; transform: translateY(6px) scale(.96); } 34%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
.sign-path path { animation: v2-sign 5s ease-in-out infinite; }
.sign-chip { animation: v2-chip 5s ease-out infinite; }

/* ── 들어올 때 살짝 올라오며 나타남(html.js 일 때만 숨긴다) ── */
.js [data-reveal], .js .act-cards[data-stagger] li { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js [data-reveal].is-in, .js .act-cards[data-stagger].is-in li { opacity: 1; transform: none; }
.js .act-cards[data-stagger] li:nth-child(2) { transition-delay: .12s; }
.js .act-cards[data-stagger] li:nth-child(3) { transition-delay: .24s; }
.js .act-cards[data-stagger] li:nth-child(4) { transition-delay: .36s; }

/* ── ② 고민 ── */
.v2-problem .sec-copy { padding-top: 27px; }
.bubbles { display: grid; justify-items: start; gap: 12px; margin-top: 28px; }
.bubble { position: relative; padding: 12px 18px; border-radius: 18px 18px 18px 4px; background: #fff; box-shadow: 0 8px 24px rgba(15, 26, 34, .07); color: var(--ink); font-size: clamp(17px, 1.37931vw, 20px); font-weight: 600; }
.bubble-b { margin-left: 36px; border-radius: 18px 18px 4px 18px; background: var(--mint); }
.v2-problem .body { margin-top: 28px; }
.converge { position: relative; padding-top: 25px; }
.scatter { --gap: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); text-align: center; }
.scatter li { display: flex; flex-direction: column; align-items: center; }
.scatter img { width: min(112px, 100%); height: 130px; object-fit: contain; }
.scatter strong { margin-top: 16px; font-size: 18px; font-weight: 700; }
/* 모인 자리 = 상담 기록 목업 한 장이 주인공. 칸 폭을 다 쓰고(최대 600 — 1450 에서 목업 글자 ≈ 10~11 px) 위쪽(오늘의 상담 카드)만 보이게 자른다 */
.gathered { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 40px; padding: 30px 28px 0; border-radius: 22px; background: var(--mint-soft); overflow: hidden; text-align: center; }
.gathered p { font-size: clamp(20px, 1.65517vw, 24px); line-height: 1.5; font-weight: 700; }
.record-crop { width: min(600px, 100%); aspect-ratio: 1400 / 1180; overflow: hidden; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.record-crop img { display: block; width: 100%; height: auto; }
/* 차례: 말 하나(0) → 말 둘(.6s) → 네 장이 가운데로 모여 사라짐(1.5s) → 모인 칸이 올라옴(2.2s) */
.js .bubble { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .5s ease, transform .5s ease; }
.js .bubble-b { transition-delay: .6s; }
.js .scatter li { transition: transform .8s cubic-bezier(.5, 0, .2, 1) 1.5s, opacity .6s ease 1.7s; }
.js .gathered { opacity: 0; transform: translateY(18px); transition: opacity .6s ease 2.2s, transform .6s ease 2.2s; }
.js .v2-problem.is-in .bubble { opacity: 1; transform: none; }
.js .v2-problem.is-in .scatter li { opacity: 0; transform: translateX(calc((1.5 - var(--i)) * (100% + var(--gap)))) scale(.55); }
/* 움직일 때만 네 장과 모인 칸을 한 자리에 겹친다 — 모인 칸이 네 장이 사라진 그 자리에서 올라온다 */
@media (prefers-reduced-motion: no-preference) {
  .js .converge { display: grid; align-items: center; }
  .js .converge > * { grid-area: 1 / 1; }
  .js .gathered { margin-top: 0; }
}
.js .v2-problem.is-in .gathered { opacity: 1; transform: none; }
.scatter li:nth-child(1) { --i: 0; } .scatter li:nth-child(2) { --i: 1; } .scatter li:nth-child(3) { --i: 2; } .scatter li:nth-child(4) { --i: 3; }

/* ── ③ 사용법 ── */
.v2-how { --stage-top: 76px; }
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 56px; align-items: center; }
.how-steps { display: grid; gap: 14px; margin-top: 36px; }
.how-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; padding: 16px 18px; border-radius: 16px; transition: background .3s, opacity .3s; }
.how-steps .how-no { margin-top: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mint); color: var(--teal); font-size: 18px; font-weight: 800; }
.how-steps strong { display: block; font-size: clamp(20px, 1.65517vw, 24px); font-weight: 700; }
.how-steps span { display: block; margin-top: 6px; color: var(--body); font-size: clamp(16px, 1.24138vw, 18px); line-height: 1.55; }
.how-steps .how-soon { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: var(--teal); font-size: 14px; font-weight: 700; }
.js .how-inline { display: none; }
.how-screens .device { width: calc(clamp(380px, calc(100svh - 180px), 640px) * 1400 / 1971); }
.how-screens .device > img { position: absolute; inset: 0; transition: opacity .45s ease; }
.how-screens { display: none; }
.how-screens [data-i] { opacity: 0; }
.v2-how[data-step="0"] .how-screens [data-i="0"], .v2-how[data-step="1"] .how-screens [data-i="1"], .v2-how[data-step="2"] .how-screens [data-i="2"] { opacity: 1; }
/* AI 얼굴 캡션(COO ㊿-65 ①): 붙는 무대에서는 얼굴이 나오는 2 단계 화면일 때만 보인다 */
.how-screens .v2-face-note { opacity: 0; transition: opacity .45s ease; }
.v2-how[data-step="1"] .how-screens .v2-face-note { opacity: 1; }
/* 붙는 무대는 넓은 화면 + 스크립트 + 움직임 켬일 때만. 세 단계 = 화면 높이 셋 */
@media (min-width: 768px) {
  .js .how-screens { display: block; }
  .js .v2-how { height: 300svh; padding-top: 0; margin-top: var(--sec-gap); }
  .js .how-stage { position: sticky; top: var(--stage-top); display: flex; align-items: center; height: calc(100svh - var(--stage-top)); }
  .js .how-stage > .wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); }
  .js .how-steps li { opacity: .45; }
  .js .v2-how[data-step="0"] li[data-i="0"], .js .v2-how[data-step="1"] li[data-i="1"], .js .v2-how[data-step="2"] li[data-i="2"] { opacity: 1; background: #fff; box-shadow: 0 10px 30px rgba(15, 26, 34, .06); }
}

/* ── ④ 기록 흐름 ── */
.v2-manage .sec-copy { padding-top: 40px; }
.manage-art { display: flex; justify-content: center; }
.device-md { width: min(360px, 100%); }
/* 차오르는 선: 첫 아이콘 가운데 → 끝 아이콘 가운데. 칸이 1fr 일곱이라 양끝은 칸 반(100%/14) 들어간다 */
.fill-row { position: relative; --fill: 0; }
.fill-row li::after { display: none; }
.fill-row::before, .fill-row::after { content: ''; position: absolute; top: calc(var(--ic) / 2 - 1.5px); left: calc(100% / 14); right: calc(100% / 14); height: 3px; border-radius: 3px; }
.fill-row::before { background: var(--line); }
.fill-row::after { background: var(--teal); transform-origin: left center; transform: scaleX(var(--fill)); }
.fill-row li { z-index: 1; }
.fill-row .ic { border-radius: 50%; background: var(--bg); transition: filter .3s, transform .3s; }
.js .fill-row li:not(.on) .ic { filter: grayscale(1) opacity(.55); }
.js .fill-row li.on .ic { transform: scale(1.04); }
@container flow (max-width: 671px) {
  .fill-row::before, .fill-row::after { top: calc(var(--ic) / 2); bottom: calc(var(--ic) / 2); left: calc(var(--ic) / 2 - 1.5px); right: auto; width: 3px; height: auto; }
  .fill-row::after { transform-origin: center top; transform: scaleY(var(--fill)); }
}

/* ── ⑥ 아래 띠 ── */
.v2-bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: rgba(252, 249, 245, .96); backdrop-filter: blur(10px); box-shadow: 0 -8px 24px rgba(15, 26, 34, .08); transform: translateY(calc(100% + 32px)); transition: transform .35s ease; }  /* +32: 숨었을 때 위로 퍼지는 그림자(24)까지 내린다 */
.v2-bar.show { transform: none; }
.v2-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15px; font-weight: 600; color: #3a4148; }

/* ── 태블릿 ── */
@media (max-width: 1180px) {
  .v2-hero-grid { column-gap: 32px; }
  .v2-hero-art { --dev-h: clamp(400px, calc(100svh - 140px), 600px); }
  /* 태블릿 폭은 화면의 46% 에서 멈춘다 — 768×1024 에서 높이로만 정하면 426 이 되어 글 칸이 230 으로 좁아지고 키운 혜택(18 px, 2026-10-10)이 두 줄로 꺾였다. 1180 에서는 426 그대로 */
  .hero-device { width: min(calc(var(--dev-h) * 1400 / 1971), 46vw); }
  .how-grid { column-gap: 32px; }
  .v2-manage .sec-copy { padding-top: 0; }
  .device-md { width: min(320px, 100%); }
}

/* ── 쌓임(767 아래): 그림이 글 아래로. 사용법은 단계마다 화면을 쌓는다 ── */
@media (max-width: 767px) {
  .v2-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .v2-hero-art { grid-row: auto; grid-column: 1; margin-top: 32px; }
  .hero-device { width: min(300px, 74%); margin-inline: auto; }
  .v2-hero .brand-line { margin-top: 20px; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .js .how-screens { display: none; }
  .how-steps li { grid-template-columns: 36px minmax(0, 1fr); padding: 0; }
  .how-steps .how-no { width: 36px; height: 36px; font-size: 16px; }
  .js .how-inline { display: block; grid-column: 1 / -1; width: min(280px, 80%); margin: 20px auto 12px; }
  .how-steps { gap: 28px; }
}

@media (max-width: 640px) {
  .scatter { --gap: 12px; }
  .scatter img { height: 84px; }
  .scatter strong { font-size: 14px; margin-top: 8px; }
  .gathered { gap: 16px; padding: 22px 0 0; }
  .gathered p { font-size: 17px; }
  /* 폰: 폭이 모자라 베젤 양옆을 잘라 1.28 배로 당긴다(목업 글자 ≈ 7→9 px). 아바타·오른쪽 단추는 안 잘린다 */
  .record-crop { width: 100%; aspect-ratio: 1400 / 1300; }
  .record-crop img { width: 128%; max-width: none; margin-left: -14%; }
  .sign-card { left: -8%; padding: 8px 10px 10px; }
  .sign-chip { font-size: 12px; padding: 4px 10px; top: -12px; }
  .v2-bar-row > span { display: none; }  /* > : 단추 안 화살(span)까지 지우지 않게 */
  .v2-bar .btn { width: 100%; }
}

/* ── 움직임 끔: 끝 모습으로 멈추고, 붙는 무대 없이 단계를 쌓는다 ── */
@media (prefers-reduced-motion: reduce) {
  .sign-path path, .sign-chip { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
  .js [data-reveal], .js .act-cards[data-stagger] li, .js .bubble, .js .gathered { opacity: 1; transform: none; transition: none; }
  .js .scatter li { transition: none; }
  .js .v2-problem.is-in .scatter li { opacity: 1; transform: none; }
  .js .v2-how { height: auto; padding-top: var(--sec-gap); margin-top: 0; }
  .js .how-stage { position: static; height: auto; display: block; }
  .js .how-screens { display: none; }
  .js .how-inline { display: block; grid-column: 1 / -1; width: min(300px, 80%); margin: 20px auto 0; }
  html.js .v2-how[data-step] .how-steps li[data-i] { opacity: 1; background: none; box-shadow: none; transition: none; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .fill-row { --fill: 1 !important; }
  .js .fill-row li .ic { filter: none; transform: none; transition: none; }
  .v2-bar { transition: none; }
}

/* ── 스크립트 없음: 단계를 쌓고 선은 다 찬 꼴(움직임 끔과 같은 끝 모습) ── */
html:not(.js) .how-grid { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .how-inline { display: block; grid-column: 1 / -1; width: min(300px, 80%); margin: 20px auto 0; }
html:not(.js) .fill-row { --fill: 1; }
/* 쌓인 단계의 캡션은 .how-inline 의 보이기·폭을 따르고 위 여백만 화면에 붙인다(세 꼴: 좁은 화면 · 움직임 끔 · 스크립트 없음) */
html .how-steps li p.v2-face-note.how-inline { margin-top: 6px; }
