/* ===== 설명하는 움직임 (2026-10-04 형님 「모션그래픽 효과가 들어가면 좋은 곳 … 내용을 바꾸는 게 아니라」 → 「진행해줘」 → 「아주 마음에 들어 나머지도 적용해줘」)
   문구·주소·제목·마크업 구조는 그대로 두고 움직임만 얹는다. 동작 줄이기(prefers-reduced-motion)·효과 줄이기(.motion-paused)에서는 지금 화면 그대로.
   1차(13:57 운영): 질문 펼침 · 견적 금액 · 네이버 네 단계 신호
   2차: 진단 8항목 훑기 · 차례로 넘겨 주기(AI 도식·회사소개 측정) · AI 근거 문서 · 단계 목록 · 페이지 넘김 · 인사이트 목차 · 탭·선택지·신청 버튼
   시간: DESIGN.md 7절(버튼 160–240ms · 카드·메뉴 220–350ms · 장면 650–950ms) 안. 한 번만 돈다(보내는 중 표시만 예외). ===== */

/* 1) 질문 펼침 — 브라우저 기본 펼침 칸(::details-content)의 높이·투명도 전환. 지원하지 않는 브라우저는 지금처럼 바로 열린다. 문의 양식 안 펼침 칸은 뺀다 */
@supports selector(::details-content) and (interpolate-size: allow-keywords) {
  :where(details):not(form details, [data-mx-static]) { interpolate-size: allow-keywords; }
  :where(details):not(form details, [data-mx-static])::details-content {
    display: flow-root;
    block-size: 0;
    opacity: 0;
    overflow: clip;
    overflow-clip-margin: 6px;
    transition: block-size .24s cubic-bezier(.4,0,.2,1), opacity .14s ease, content-visibility .24s allow-discrete;
  }
  :where(details[open]):not(form details, [data-mx-static])::details-content {
    block-size: auto;
    opacity: 1;
    transition: block-size .34s cubic-bezier(.22,1,.36,1), opacity .26s ease .05s, content-visibility .34s allow-discrete;
  }
}

/* 2) 견적 계산 — 고른 표시(주황 알약)는 칸 뒤에서 미끄러진다. 칸 바탕은 투명(바탕 #FCFAF7 이라 흰색과 거의 같다) */
.mxe-est .est-chips { position: relative; isolation: isolate; }
.mxe-est .est-chips button { background: transparent; transition: color .2s ease, border-color .2s ease; }
.mxe-est .est-chips button[aria-pressed="true"] { background: transparent; border-color: transparent; color: var(--gray-900, #1C1815); }
.mxe-est-pill {
  position: absolute; left: 0; top: 0; z-index: -1;
  border-radius: 999px; background: var(--orange-500, #FC8300);
  box-shadow: 0 6px 14px -8px #fc8300;
  pointer-events: none;
  transition: transform .34s cubic-bezier(.22,1,.36,1), width .34s cubic-bezier(.22,1,.36,1), height .34s cubic-bezier(.22,1,.36,1), opacity .2s ease;
}
/* 금액 창: 위로 빠지는 옛 금액이 위의 작은 설명(예상 월 운영비)과 겹치지 않게 창 밖은 2px 까지만 그린다(시안 1차 6px 에서 겹침 확인) */
.mxe-roll { position: relative; overflow: hidden; overflow: clip; overflow-clip-margin: 2px; }
.mxe-roll-ghost { position: absolute; left: 0; top: 0; width: 100%; margin: 0; pointer-events: none; }

/* 3) 단계 신호(네이버 광고 네 단계) */
.mxe-flow { position: relative; }
.mxe-flow-lines { position: absolute; left: 0; top: 0; z-index: 1; overflow: visible; pointer-events: none; }
.mxe-flow-lines .mxe-flow-packet { filter: drop-shadow(0 0 5px rgba(252,131,0,.75)); }
.mxe-flow .icon-dot { position: relative; z-index: 2; transition: background-color .32s ease, color .32s ease; }
.mxe-flow .icon-dot.mxe-lit { background: var(--mxe-bg); color: var(--mxe-fg); }

/* 4) 차례로 넘겨 주기 — 도식 사이 화살표(::after)가 넘겨 줄 때 한 번 튄다(AI 운영 설계). 화살표가 없는 판(회사소개 측정)은 칸만 켜진다 */
.mxe-relay > .mxe-hand::after { animation: mxe-hand .5s cubic-bezier(.22,1,.36,1); }
@keyframes mxe-hand { 45% { transform: scale(1.3); background-color: #fff1e5; } }

/* 5) AI 근거 문서 — 화면에 들어오기 직전에 검색 결과·답을 비워 두고, 질문이 다 쳐진 뒤 차례로 보인다 */
.mxe-rag-pre .lab-rag-hit, .mxe-rag-pre .lab-rag-answer { opacity: 0; }
.mxe-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: currentColor; animation: mxe-caret .9s steps(1) infinite; }
@keyframes mxe-caret { 50% { opacity: 0; } }
@media print { .mxe-rag-pre .lab-rag-hit, .mxe-rag-pre .lab-rag-answer { opacity: 1 !important; } }

/* 6) 단계 목록 — 세로·가로 번호 목록(ol.steps)은 번호를 잇는 선, 2×2 목록(ol.sd-steps)·문의 칸(ol.cv-delivery)은 칸 위 줄을 따라 빛이 지나간다, 단계 표는 줄이 차례로 짚어진다 */
.mxe-rail-host { position: relative; }
.mxe-rail { position: absolute; z-index: 1; background: #FFCF94; border-radius: 2px; pointer-events: none; }
.mxe-rail-host > li.mxe-num::before { animation: mxe-num .44s var(--mxe-d, 0ms) cubic-bezier(.22,1,.36,1) both; }
@keyframes mxe-num { 40% { transform: scale(1.28); color: var(--orange-500, #FC8300); } }
.mxe-sweep > li { position: relative; }
.mxe-sweep > li::after {
  content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 2px;
  background: var(--mxe-sweep, #FC8300); transform-origin: left center; opacity: 0; pointer-events: none;
  animation: mxe-sweep .95s var(--mxe-d, 0ms) cubic-bezier(.22,1,.36,1) both;
}
@keyframes mxe-sweep { 0% { transform: scaleX(0); opacity: 1; } 55% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.mxe-sweep > li::before { transform-origin: left center; animation: mxe-num-flash .95s var(--mxe-d, 0ms) cubic-bezier(.22,1,.36,1) both; }
@keyframes mxe-num-flash { 30% { transform: scale(1.22); color: var(--mxe-sweep, #FC8300); } }
.mxe-rows tbody > tr > td { animation: mxe-row .8s var(--mxe-d, 0ms) ease both; }
@keyframes mxe-row { 40% { background-color: #FFF4E6; } }

/* 7) 페이지 넘김 — 머리 메뉴는 그대로 두고 본문만 살짝 겹쳐 바뀐다(DESIGN.md 「경계에서 250–400ms 약한 페이드·위치 이동」). 지원하지 않는 브라우저는 지금처럼 넘어간다 */
@view-transition { navigation: auto; }
.site-header { view-transition-name: rk-header; }
::view-transition-old(root) { animation: mxe-vt-out .18s ease both; }
::view-transition-new(root) { animation: mxe-vt-in .34s cubic-bezier(.22,1,.36,1) both; }
@keyframes mxe-vt-out { to { opacity: 0; } }
@keyframes mxe-vt-in { from { opacity: 0; transform: translateY(10px); } }
/* 휴대폰에서도 켠다 — 10-04 운영 파일 그대로 휴대폰 화면 흉내로 여섯 번 넘겨 여섯 번 모두 정상(경고 0).
   점검 중 보인 「Transition was aborted」 경고는 작업 파일을 끼우려고 요청을 가로챈 시험 방식에서만 났다(PC 도 같이 났다) */

/* 8) 인사이트 글 목차 — 읽고 있는 장에 주황 막대가 따라간다(목차가 따라 내려오는 넓은 화면에서만) */
.mxe-toc-bar { position: absolute; left: -14px; top: 0; width: 2px; height: 0; border-radius: 2px; background: var(--orange-500, #FC8300); opacity: 0; pointer-events: none; transition: transform .32s cubic-bezier(.22,1,.36,1), height .32s cubic-bezier(.22,1,.36,1), opacity .2s ease; }
.mxe-toc a { transition: color .2s ease; }
.mxe-toc a.mxe-toc-on { color: var(--ab-ink, #1C1815); }

/* 9) 탭 — 고른 칸 바탕(원래 모양을 그대로 옮긴 판)이 옆 칸으로 미끄러진다 */
.mxe-seg { position: relative; isolation: isolate; }
.mxe-seg [role="tab"] { transition: color .2s ease; }
.mxe-seg [role="tab"][aria-selected="true"] { background: transparent !important; box-shadow: none !important; }
.mxe-seg-ind { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; transition: transform .32s cubic-bezier(.22,1,.36,1), width .32s cubic-bezier(.22,1,.36,1), height .32s cubic-bezier(.22,1,.36,1); }

/* 10) 문의 칸 선택지 — 고르면 칸이 왼쪽부터 채워진다(채움 색은 원래 고른 색을 읽어 쓴다) · 보내는 동안 신청 버튼에 빛이 지나간다 */
.mxe-chips span { position: relative; isolation: isolate; overflow: hidden; transition: color .2s ease, border-color .2s ease; }
.mxe-chips span::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--mxe-chip-on); transform: scaleX(0); transform-origin: left center; transition: transform .28s cubic-bezier(.22,1,.36,1); }
.mxe-chips input:checked + span { background: var(--mxe-chip-off) !important; }
.mxe-chips input:checked + span::before { transform: scaleX(1); }
form[data-intake-form][data-sending="true"] [type="submit"] { position: relative; overflow: hidden; cursor: progress; }
form[data-intake-form][data-sending="true"] [type="submit"]::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); animation: mxe-sending 1.1s ease-in-out infinite; }
@keyframes mxe-sending { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  details::details-content, .mxe-est-pill, .mxe-est .est-chips button, .mxe-flow .icon-dot, .mxe-seg-ind, .mxe-seg [role="tab"], .mxe-toc-bar, .mxe-chips span, .mxe-chips span::before { transition: none !important; }
  .mxe-relay > .mxe-hand::after, .mxe-rail-host > li.mxe-num::before, .mxe-sweep > li::after, .mxe-sweep > li::before, .mxe-rows tbody > tr > td, .mxe-caret { animation: none !important; }
  form[data-intake-form][data-sending="true"] [type="submit"]::after { animation: none; background: rgba(255,255,255,.18); }
}
.motion-paused details::details-content, .motion-paused .mxe-est-pill, .motion-paused .mxe-est .est-chips button, .motion-paused .mxe-flow .icon-dot, .motion-paused .mxe-seg-ind, .motion-paused .mxe-toc-bar, .motion-paused .mxe-chips span::before { transition: none !important; }

/* 11) 「효과 줄이기」 버튼이 푸터 맨 아래 줄에 들어갔을 때(휴대폰 하위 페이지·메인 전 폭 — 옮기는 것은 motion-explain.js 0번)
   테두리만 있는 알약, 보이는 높이 32px·누르는 범위 44px, 색은 푸터 글자색을 따라간다. 휴대폰 하위 페이지는 mobile-fit.css 1번에 같은 값이 있다.
   메인은 hero-rolling.css 가 버튼을 숨겨 두었는데(body.helmet-home … display:none!important), 푸터 줄 안에서는 보이게 한다 */
html body .site-footer .cv-footer-bottom .rk-motion-toggle {
  position: relative; inset: auto; display: inline-flex; align-items: center; align-self: center;
  margin: 0; max-width: none; min-height: 32px; padding: 0 12px; transform: none;
  border: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 38%, transparent); border-radius: 999px;
  background: transparent; box-shadow: none; color: inherit; font-size: 11px; line-height: 1; white-space: nowrap;
}
html body .site-footer .cv-footer-bottom .rk-motion-toggle[aria-pressed="true"] { background: color-mix(in srgb, currentColor 14%, transparent); }
html body .site-footer .cv-footer-bottom .rk-motion-toggle::after { content: ""; position: absolute; inset: -6px -4px; }
html body.helmet-home .site-footer .cv-footer-bottom .rk-motion-toggle { display: inline-flex !important; }
