/* 히어로 움직임 (2026-10-13) — 공공모아 화면 구성은 그대로 두고 그림 자리만 움직이게 했다.
 * 114.it.kr(울림) 디자인은 따라 하지 않는다(2026-10-13 사용자 지시) — "머리 그림이 움직인다"는 발상만 참고.
 * ① 머리말 장면: 힉스필드 클레이 장면 루프 영상(.mo-art) + 링이 퍼지는 분야 배지(.mo-badge)
 * ② 화면 곳곳의 작은 움직임: 들어올 때 떠오르기(.mo-rv), 숫자 올라가기, 그림 둥실·반짝임, 타일 눌림.
 * 움직임은 전부 html.mo-on(motion.js 가 붙인다) 아래에서만 돈다 — JS 가 없거나 '동작 줄이기'면 지금 화면 그대로다.
 * 광고 자리(.ad-*, ins 등)에는 아무 움직임도 걸지 않는다(공통 §0-1). */

/* ── ① 머리말 장면 ─────────────────────────────────────────── */
.mo-art { position: relative; display: block; height: var(--mo-h, 169px); aspect-ratio: 16 / 9; flex-shrink: 0; }
.mo-frame { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 14px; background: #eef1f7; }
.mo-frame > img, .mo-frame > video, .mo-frame > .mo-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* 정지 그림은 CSS 배경(2026-10-17) — <img> 면 네이버가 검색결과 썸네일로 뽑아 지도 썸네일을 밀어낸다 */
.mo-frame > .mo-poster { background: center / cover no-repeat; }
.mo-vid { opacity: 0; transition: opacity .6s ease; }
.mo-vid.on { opacity: 1; }

.mo-badge {
  position: absolute; left: -14px; bottom: -12px; width: 30%; aspect-ratio: 1; min-width: 34px; max-width: 64px;
  border-radius: 50%; background: var(--primary-pale); display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(21,32,46,.14); border: 2px solid #fff;
}
.mo-badge img, .mo-badge .bgi { position: relative; width: 72%; height: 72%; z-index: 1; }
.mo-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(47,90,143,.28); opacity: 0; pointer-events: none; }

/* PC 머리말(ph-art-on) — 오른쪽 가운데에 장면을 띄운다. 그림이 120 → 169 로 커져 글 자리를 더 비운다. */
section .page-head-inner.ph-art-on.ph-scene { padding-right: 360px; min-height: 196px; }
.ph-art-on > .mo-art { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); }
@media (max-width: 1024px) {
  section .page-head-inner.ph-art-on.ph-scene { padding-right: 270px; min-height: 160px; }
  .ph-art-on > .mo-art { --mo-h: 124px !important; right: 16px; }
}
@media (max-width: 768px) {
  section .page-head-inner.ph-art-on.ph-scene { padding-right: 150px; min-height: 0; }
  .ph-art-on > .mo-art { --mo-h: 70px !important; right: 14px; }
}

/* 모바일·본문 안 떠 있는 장면(m-art-float) — 제목 오른쪽 */
.mo-art.m-art-float { float: right; margin: 2px 0 10px 14px; }
.mo-art.m-art-float .mo-frame { border-radius: 12px; }
.mo-art.m-art-float .mo-badge { left: -10px; bottom: -8px; border-width: 1.5px; }
.mo-art.m-art-float + h1 { min-height: var(--mo-h, 56px); }

/* 커뮤니티·업체 결과 머리 — 제목 줄 안 작은 장면 */
.mo-art.cm-art { margin: 0 16px 6px 10px; }
.mo-art.cm-art .mo-badge { left: -8px; bottom: -8px; }

/* 목록·지역 머리(ph-grid 오른쪽 칸) — 원 대신 장면 + 분야 배지 */
.ph-grid > .mo-art { margin: 6px 6px 10px 14px; }

/* 모바일(body.is-mobile) — 머리말 맨 위 가로 꽉 찬 배너로 키운다(2026-10-14).
 * 112×63 썸네일(홈은 116 정사각 잘림)로는 작은 움직임이 눈에 안 띄어 "모바일은 안 움직인다"로 보였다. PC 는 그대로. */
.is-mobile .mo-art.m-art-float, .is-mobile .mo-art.m-head-art, .is-mobile .mo-art.cm-art {
  float: none; display: block; order: -1; flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 2 / 1; margin: 0 0 14px;
}
.is-mobile .mo-art.m-art-float + h1 { min-height: 0; }
.is-mobile .mo-art .mo-frame { border-radius: 14px; }
.is-mobile .mo-art .mo-badge { left: 12px; bottom: 12px; width: 50px; min-width: 0; max-width: none; border-width: 2px; }
.is-mobile .m-head-row, .is-mobile .m-hd { flex-wrap: wrap; }
.is-mobile .bz-home-m .m-head-art.mo-hero { order: -1; flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1120 / 627; margin-bottom: 6px; }

/* 상세 머리(2026-10-14) — 옛 분야 원(112) 자리에 공공정보 장면 + 분야 배지. PC 는 제목 왼쪽(로드뷰가 있으면 오른쪽에 그대로),
 * 모바일은 위 모바일 규칙(m-head-art → 가로 배너). 광고 줄은 그대로 — 머리말만 길어진다. */
.det-wrap .det-hero > .mo-art.det-mo { order: -1; }
.det-wrap .det-hero > .mo-art.det-mo .mo-badge { left: 10px; bottom: 10px; }

/* 홈 히어로 — 마을 그림 위에 같은 장면의 루프 영상 */
.mo-hero { position: relative; overflow: hidden; aspect-ratio: 1120 / 627; }
.mo-hero > img, .mo-hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.mo-hero > .mo-vid { border-radius: inherit; }

/* ── ② 곳곳의 작은 움직임 — html.mo-on 아래에서만 ─────────────────── */
@keyframes mo-ring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes mo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes mo-bob-s { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-3deg); } }
@keyframes mo-pop { 0% { transform: scale(1); } 35% { transform: scale(1.14) rotate(-4deg); } 65% { transform: scale(.96) rotate(2deg); } 100% { transform: scale(1); } }
@keyframes mo-shine { 0% { transform: translateX(-120%) skewX(-18deg); } 60%, 100% { transform: translateX(260%) skewX(-18deg); } }
@keyframes mo-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes mo-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,90,143,.0); } 50% { box-shadow: 0 0 0 6px rgba(47,90,143,.10); } }

.mo-on .mo-ring { animation: mo-ring 2.8s cubic-bezier(.2,.6,.3,1) infinite; }
.mo-on .mo-ring--2 { animation-delay: 1.4s; }
.mo-on .mo-badge { animation: mo-bob 4.2s ease-in-out infinite; }

/* 들어올 때 떠오르기 — motion.js 가 .mo-rv 를 붙이고, 화면에 들어오면 .mo-in */
.mo-on .mo-rv { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.3,1); }
.mo-on .mo-rv.mo-in { opacity: 1; transform: none; }

/* 홈 히어로 글 — 차례로 올라온다 */
.mo-on .bz-home-d .hero-tx > *, .mo-on .bz-home-m .m-head-tx > * { animation: mo-up .7s cubic-bezier(.2,.7,.3,1) both; }
.mo-on .bz-home-d .hero-tx > :nth-child(2), .mo-on .bz-home-m .m-head-tx > :nth-child(2) { animation-delay: .08s; }
.mo-on .bz-home-d .hero-tx > :nth-child(3), .mo-on .bz-home-m .m-head-tx > :nth-child(3) { animation-delay: .16s; }
.mo-on .bz-home-d .hero-tx > :nth-child(4) { animation-delay: .24s; }
.mo-on .bz-home-d .hero-link, .mo-on .bz-home-m .m-life-chip { transition: transform .18s ease, box-shadow .18s ease, border-color .13s, color .13s, background .13s; }
.mo-on .bz-home-d .hero-link:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(21,32,46,.08); }
.mo-on .bz-home-d .hero-link:hover img, .mo-on .bz-home-m .m-life-chip:active img { animation: mo-pop .5s ease; }

/* 머리말 글 — 목록·생활 화면도 살짝 올라온다 */
.mo-on .page-head h1, .mo-on .page-head h1 + p { animation: mo-up .6s cubic-bezier(.2,.7,.3,1) both; }
.mo-on .page-head h1 + p { animation-delay: .07s; }

/* 분야 타일 — 올리면 그림이 통 튀고, 원이 숨을 쉰다 */
.mo-on .svc-tile:hover .svc-ic img, .mo-on .m-tile:active .m-tile-ic img { animation: mo-pop .55s ease; }
.mo-on .svc-tile:hover .svc-ic { animation: mo-pulse 1.4s ease-in-out infinite; }
.mo-on .m-tile:active { transform: scale(.96); transition: transform .1s; }

/* 섹션 제목 앞 그림 — 천천히 둥실 */
.mo-on .sec-ic, .mo-on .h-ic, .mo-on .m-sec-hd h2 img, .mo-on .m-sec-hd h2 .bgi { animation: mo-bob-s 5s ease-in-out infinite; }

/* 안내 배너 그림 둥실 + 배너에 빛 한 줄 */
.mo-on .cta-art, .mo-on .cta-w-art, .mo-on .m-cta-art { animation: mo-bob 4.6s ease-in-out infinite; }
.mo-on .cta-banner, .mo-on .m-cta { position: relative; overflow: hidden; }
.mo-on .cta-banner::after, .mo-on .m-cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 34%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: mo-shine 5.5s ease-in-out infinite;
}

/* 목록 썸네일 — 줄에 올리면 분야 그림이 통 */
.mo-on .list-item:hover .li-thumb img, .mo-on .feed-item:hover .feed-thumb img { animation: mo-pop .5s ease; }

/* 빈 결과 그림 둥실 */
.mo-on img[src$="/illust/empty.webp"] { animation: mo-bob 4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .mo-on *, .mo-on *::before, .mo-on *::after { animation: none !important; transition: none !important; }
  .mo-on .mo-rv { opacity: 1; transform: none; }
  .mo-vid { display: none; }
}
