/* C+ — C 위에 움직임 부품 8개 + 한 화면 단위 배치(대표 11/17)
   부품 이름은 DesignBookmark Motion 갤러리(designbookmark.com/motion)의 이름을 따랐고, 코드는 우리가 새로 짰다(그 사이트 코드 · 자산 복사 없음).
   줄임 모션(html.rm · prefers-reduced-motion)이면 전부 정지 상태. */
:root { --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1); --ease-roll: cubic-bezier(0.2, 0.9, 0.2, 1); }

/* ① Word roll — 자리값마다 0–9 띠가 굴러 올라감 */
.wr { display: inline-flex; vertical-align: top; line-height: 1; height: 1em; overflow: hidden; }
.wr__c { display: inline-block; height: 1em; overflow: hidden; }
.wr__s { display: flex; flex-direction: column; transform: translateY(0); will-change: transform; }
.wr__s > span, .wr__p { display: block; height: 1em; line-height: 1; text-align: center; }
.wr__p { display: inline-block; }
.hm h1 .n76 .wr { height: 0.86em; } .hm h1 .n76 .wr__c { height: 0.86em; } .hm h1 .n76 .wr__s > span { height: 0.86em; line-height: 0.86; }

.nb__i .wr, .nb__i .wr span { font: inherit !important; margin: 0 !important; order: 0 !important; letter-spacing: inherit; }
.nb__i .wr { display: inline-flex !important; } .nb__i .wr__c, .nb__i .wr__p { display: inline-block !important; } .nb__i .wr__s { display: flex !important; } .nb__i .wr__s > span { display: block !important; }
.nb__i .sr { position: absolute !important; }

/* ① Stat card — 숫자 띠를 네 장의 카드로(한 화면) */
@media (min-width: 761px) {
  .is-plus .nb { padding: 72px 0 56px; }
  .is-plus .nb__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 18px; align-items: stretch; }
  .is-plus .nb__i { grid-column: auto !important; margin-top: 0 !important; justify-self: stretch !important; display: flex !important; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 300px; padding: 28px 28px 30px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 6px; background: color-mix(in srgb, currentColor 3%, transparent); transition: transform 400ms var(--ease-out), border-color 400ms; }
  .is-plus .nb__i > span { order: -1 !important; margin: 0 !important; text-align: left !important; font-size: 20px; }
  .is-plus .nb__i { align-items: stretch !important; }
  .is-plus .nb__i b { font-size: 92px !important; text-align: left; }
  .is-plus .nb__i::after { content: ""; display: block; height: 3px; width: 34%; background: var(--coral); border-radius: 2px; transform-origin: left; transform: scaleX(0); transition: transform 900ms var(--ease-out) 300ms; }
  .is-plus .nb__i.is-in::after { transform: scaleX(1); }
  .is-plus .nb__i:hover { transform: translateY(-4px); border-color: var(--coral); }
}

/* ② Roll links — 머리글 메뉴 글자가 위로 굴러 바뀜(글자마다 조금씩 늦게) */
.rl { display: inline-flex; align-items: flex-start; overflow: hidden; height: 1.25em; line-height: 1.25; vertical-align: middle; }
.rl__ch { display: inline-flex; flex-direction: column; flex: 0 0 auto; height: 2.5em; transition: transform 420ms var(--ease-roll); transition-delay: calc(var(--i) * 22ms); white-space: pre; }
.rl__ch > span { display: block; height: 1.25em; }
.rl__ch > span + span { color: var(--coral); }
a:hover > .rl .rl__ch, a:focus-visible > .rl .rl__ch { transform: translateY(-1.25em); }

/* ③ Swipe deck — 주요 행사 카드가 겹쳐 있다 넘어감(끌기 · 단추 · 화살표 키) */
.is-plus .hp--deck .hp__track { position: relative; display: block; overflow: visible; height: var(--deck-h, 560px); padding: 0; margin: 0 auto; width: min(1180px, calc(100% - 2 * var(--side))); outline-offset: 8px; touch-action: pan-y; }
.is-plus .hp--deck .tl { --h: 250px; position: absolute; left: calc(50% - 190px); top: 0; width: 380px; padding: 22px 22px 20px; background: var(--white, #fff); color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 8px; box-shadow: 0 18px 40px -24px rgb(21 23 26 / .45);
  transform: translateX(calc(var(--k) * 54px)) translateY(calc(var(--k) * 10px)) rotate(calc(var(--k) * 2.6deg)) scale(calc(1 - var(--k) * .045));
  z-index: calc(20 - var(--k)); opacity: var(--o, 1); transition: transform 560ms var(--ease-out), opacity 300ms linear; cursor: grab; user-select: none; }
.is-plus .hp--deck .tl.is-drag { transition: none; cursor: grabbing; }
.is-plus .hp--deck .tl.is-out { transition: transform 420ms var(--ease-out), opacity 420ms linear; opacity: 0; }
.is-plus .hp--deck .tl[aria-hidden="true"] { pointer-events: none; }
.is-plus .hp--deck .tl__rule { display: none; }
.is-plus .hp--deck .tl img { pointer-events: none; -webkit-user-drag: none; }
.is-plus .hp--deck .tl__d b { font-size: 38px; }
.is-plus .hp--deck .tl h3 { font-size: 24px; margin: 14px 0 6px; }
.deck__hint { margin-top: 12px; font-size: 14px; color: #d6d3cd; }
@media (min-width: 761px) {
  .is-plus .hp--deck .hp__track { --deck-h: max(420px, calc(100svh / var(--z, 1) - var(--header-h) - 270px)); }
  .is-plus .hp--deck .tl { --h: max(150px, calc(var(--deck-h) - 250px)); }
  .is-plus .hp { padding-bottom: 40px; }
  .is-plus .hp__head { padding: 40px 0 34px !important; margin-bottom: 40px !important; }
  .is-plus .hp__head h2 { font-size: 72px; }
}
@media (max-width: 760px) {
  .is-plus .hp--deck .hp__track { --deck-h: 520px; width: calc(100% - 40px); }
  .is-plus .hp--deck .tl { left: calc(50% - 41vw); width: 74vw; --h: 210px; transform: translateX(calc(var(--k) * 14px)) translateY(calc(var(--k) * 8px)) rotate(calc(var(--k) * 2deg)) scale(calc(1 - var(--k) * .04)); }
}

/* ④ Expand card — 수행 사례 카드를 누르면 그 자리에서 펼쳐짐 */
.is-plus .cs--x { padding: 64px 0 56px; }
.cs__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.cs__top h2 { font-size: 72px; line-height: 1.1; font-weight: 200; } .cs__top h2 b { font-weight: 900; }
.cs__top p { font-size: 17px; color: var(--muted); padding-bottom: 10px; }
.xc { display: flex; gap: 16px; height: var(--xc-h, 520px); }
@media (min-width: 761px) { .is-plus .xc { --xc-h: max(380px, calc(100svh / var(--z, 1) - var(--header-h) - 320px)); } .is-plus .cs--x .allwork { margin-top: 18px; } .is-plus .cs--x .allwork summary { padding: 14px 0; } }
.xc__card { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: 8px; background: var(--white, #fff); transition: flex-grow 640ms var(--ease-out), box-shadow 300ms; }
.xc__card.is-open { flex-grow: 2.5; box-shadow: 0 24px 50px -30px rgb(21 23 26 / .5); }
.xc__btn { all: unset; box-sizing: border-box; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; cursor: pointer; }
.xc__btn:focus-visible { outline: 2px solid var(--coral); outline-offset: -4px; }
.xc__btn figure { position: relative; flex: 1 1 auto; min-height: 120px; overflow: hidden; margin: 0; transition: flex-basis 640ms var(--ease-out); }
.xc__btn figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.xc__card:hover .xc__btn figure img { transform: scale(1.03); }
.xc__cap { padding: 18px 22px 16px; }
.xc__cap .eb { color: var(--coral-ink, var(--coral)); }
.xc__cap h3 { margin: 6px 0 4px; font: 400 25px/1.28 var(--f-serif); }
.xc__who { font-size: 14px; color: var(--muted); }
.xc__plus { position: absolute; right: 16px; top: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 400 24px/1 var(--f-body); transition: transform 400ms var(--ease-out); }
.xc__card.is-open .xc__plus { transform: rotate(45deg); background: var(--coral); color: var(--ink); }
.xc__body { flex: 0 0 auto; max-height: 0; opacity: 0; overflow: hidden; padding: 0 22px; transition: max-height 640ms var(--ease-out), opacity 300ms linear, padding 640ms var(--ease-out); }
.xc__card.is-open .xc__body { max-height: 420px; opacity: 1; padding: 0 22px 22px; transition-delay: 0ms, 220ms, 0ms; }
.xc__body ol { list-style: none; margin: 4px 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); padding-top: 14px; }
.xc__body li b { display: block; font: 700 14px/1.3 var(--f-body); color: var(--coral-ink, var(--coral)); margin-bottom: 6px; }
.xc__body li p { font-size: 15px; line-height: 1.55; }
.xc__body li strong { display: block; font: 900 34px/1 var(--f-display); margin-bottom: 4px; }
.xc__card:not(.is-open) .xc__cap h3 { font-size: 22px; }
@media (max-width: 760px) {
  .is-plus .cs--x { padding: 48px 0 40px; }
  .cs__top { display: block; } .cs__top h2 { font-size: 44px; }
  .xc { flex-direction: column; height: auto; }
  .xc__card { flex: 0 0 auto; }
  .xc__btn figure { flex: 0 0 auto; aspect-ratio: 16 / 9; }
  .xc__body ol { grid-template-columns: 1fr; }
}

/* 사업 분야 — 한 화면 조각(사진 높이를 화면에 맞춤) */
@media (min-width: 761px) {
  .is-plus .bz { padding: 32px 0 40px; }
  .is-plus .bz__cols { align-items: end; }
  .is-plus .bz__3 { margin-top: 0; }
  .is-plus .bz__c figure { aspect-ratio: auto !important; height: calc((100svh / var(--z, 1) - var(--header-h)) * .52); }
  .is-plus .bz__2 figure { height: calc((100svh / var(--z, 1) - var(--header-h)) * .44); }
  .is-plus .bz__h { height: auto; padding-bottom: 18px; } .is-plus .bz__h h2 { font-size: 72px; }
  .is-plus .bz__c p { margin: 14px 0 8px; font-size: 16px; line-height: 1.6; }
}

/* 가로 넘김(pin) — 현장 기록: 화면은 멈추고 사진 줄만 옆으로 */
html.pin-on .is-plus .pc[data-pin] { height: calc((100svh / var(--z, 1) - var(--header-h)) * 2.6); padding: 0; }
html.pin-on .is-plus .pin__stage { position: sticky; top: var(--header-h); height: calc(100svh / var(--z, 1) - var(--header-h)); overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
html.pin-on .is-plus .pin__stage .pc__head { margin-bottom: 0; }
html.pin-on .is-plus .pin__track { display: flex; gap: 18px; width: max-content; padding: 0 var(--side); transform: translateX(calc(var(--p, 0) * var(--f, 0) * -100%)); will-change: transform; }
html.pin-on .is-plus .pin__track .pc__col { display: contents; }
html.pin-on .is-plus .pin__track figure { height: calc((100svh / var(--z, 1) - var(--header-h)) * .6); width: auto; flex: 0 0 auto; margin: 0; }
html.pin-on .is-plus .pin__track figure img { width: 100%; height: 100%; object-fit: cover; }
.pin__bar { height: 2px; width: min(420px, 40%); margin: 0 var(--side); background: color-mix(in srgb, currentColor 18%, transparent); }
.pin__bar i { display: block; height: 100%; width: 100%; background: var(--coral); transform-origin: left; transform: scaleX(var(--p, 0)); }
html:not(.pin-on) .pin__bar { display: none; }

/* ⑤ Step progress — 사례 상세 수행 과정, 스크롤 따라 선이 채워지고 점이 켜짐 */
.is-plus .proc ol .sp__fill { position: absolute; left: -60px; top: 10px; width: 2px; height: calc((100% - 40px) * var(--sp, 0)); background: var(--coral); z-index: 1; }
.is-plus .proc li::before { z-index: 2; transition: background 300ms, border-color 300ms, transform 300ms var(--ease-out); }
.is-plus .proc li.is-on::before { background: var(--coral); border-color: var(--coral); transform: scale(1.15); }
.is-plus .proc li { opacity: .45; transition: opacity 500ms linear; }
.is-plus .proc li.is-on { opacity: 1; }
@media (max-width: 760px) { .is-plus .proc ol .sp__fill { left: -22px; } }

/* ⑥ Page flip — 결과보고서 단추에 올리면 표지가 넘어가며 첫 장 */
.rp-wrap { position: relative; display: inline-block; }
.rp { position: absolute; left: 50%; bottom: calc(100% + 14px); z-index: 30; width: 200px; height: 260px; margin-left: -100px; perspective: 900px; pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity 220ms linear, transform 320ms var(--ease-out); }
.rp-wrap:hover .rp, .rp-wrap:focus-within .rp { opacity: 1; transform: none; }
.rp__pg, .rp__cv { position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; box-shadow: 0 16px 30px -18px rgb(0 0 0 / .55); }
.rp__pg { background: #fbfaf7; color: #15171A; padding: 22px 18px; font: 500 12px/1.6 var(--f-body); border: 1px solid #ddd8cf; }
.rp__pg b { display: block; font: 800 13px/1.3 var(--f-body); margin-bottom: 10px; }
.rp__pg ol { margin: 0; padding-left: 16px; } .rp__pg li { margin-bottom: 4px; }
.rp__pg i { display: block; height: 6px; margin: 10px 0 0; background: #e6e1d8; border-radius: 3px; } .rp__pg i + i { width: 70%; margin-top: 6px; }
.rp__cv { background: #15171A; color: #fff; padding: 22px 18px; transform-origin: left center; transform: rotateY(0); transition: transform 760ms var(--ease-out) 120ms; backface-visibility: hidden; display: flex; flex-direction: column; justify-content: space-between; border-left: 6px solid var(--coral); }
.rp__cv small { font: 700 11px/1 var(--f-body); letter-spacing: .14em; color: var(--coral); }
.rp__cv b { font: 400 20px/1.3 var(--f-serif); }
.rp__cv span { font: 600 11px/1.4 var(--f-body); color: #c9c5bd; }
.rp-wrap:hover .rp__cv, .rp-wrap:focus-within .rp__cv { transform: rotateY(-158deg); }

/* ⑦ Loading to success — 행사 신청 보내기 → 진행 → 접수번호와 체크 */
.ls { position: relative; min-width: 220px; transition: background 300ms, border-color 300ms, color 300ms; }
.ls__t { display: inline-flex; align-items: center; gap: 10px; }
.ls__sp { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ls-spin 700ms linear infinite; }
@keyframes ls-spin { to { transform: rotate(360deg); } }
.ls__ck { width: 20px; height: 20px; } .ls__ck path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: ls-ck 420ms var(--ease-out) forwards; }
@keyframes ls-ck { to { stroke-dashoffset: 0; } }
.ls.is-ok { background: #1f7a4d !important; border-color: #1f7a4d !important; color: #fff !important; }
.ls__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .5; transform-origin: left; transform: scaleX(0); }
.ls.is-busy .ls__bar { transition: transform 1300ms var(--ease-out); transform: scaleX(1); }

/* ⑧ Magnetic button — 첫 화면 두 단추만 */
.mg { transition: transform 420ms var(--ease-out); will-change: transform; }
.mg > .mg__in { display: inline-flex; align-items: center; gap: inherit; transition: transform 420ms var(--ease-out); }
.mg.is-near { transition: transform 120ms linear; } .mg.is-near > .mg__in { transition: transform 120ms linear; }

/* 폰 첫 화면 — 지도와 76 을 한 화면에 */
@media (max-width: 760px) {
  .is-plus .hm__ink { padding-top: 18px; }
  .is-plus .hm__grid { position: relative; }
  .is-plus .hm__head p:last-child { font-size: 14px; }
  .is-plus .hm h1 { margin-top: 14px; position: relative; z-index: 5; pointer-events: none; }
  .is-plus .hm h1 > span { width: fit-content; pointer-events: auto; }
  .is-plus .hm h1 .t3 b { display: block; }
  .is-plus .hm h1 .t3 { font-size: 28px; }
  .is-plus .hm h1 .t1 { font-size: 30px; }
  .is-plus .hm h1 .n76 { font-size: 34vw; }
  .is-plus .hm h1 .rest { font-size: 32px; }
  .is-plus .hm__sub { font-size: 19px; line-height: 1.45; margin-top: 14px; position: relative; top: auto; left: auto; z-index: 5; }
  .is-plus .hm__cta { margin-top: 16px; position: relative; top: auto; left: auto; z-index: 5; }
  .is-plus .hm .map { position: absolute; right: -6px; top: 104px; width: 42vw; --mw: 42vw; margin: 0; z-index: 1; }
  .is-plus .hm h1 .t2, .is-plus .hm h1 .t3 { text-shadow: 0 0 18px #15171A; }
  .is-plus .hm .map .pin em, .is-plus .hm .map .seoul, .is-plus .hm .map__legend { display: none; }
  .is-plus .hm .map .pin--hot::after, .is-plus .hm .map .pin--hot::before { display: none; }
  .is-plus .hm .map .pin { width: 28px !important; height: 28px !important; }
  .is-plus .hm .map .pin b { font-size: 14px !important; }
  .is-plus .hm .map .pin[data-gu="서해구"] { width: 46px !important; height: 46px !important; } .is-plus .hm .map .pin[data-gu="서해구"] b { font-size: 20px !important; }
  .is-plus .hm .map .pin--hot { width: 42px !important; height: 42px !important; } .is-plus .hm .map .pin--hot b { font-size: 18px !important; }
  .is-plus .hm .map .pin[data-gu="강화군"], .is-plus .hm .map .pin[data-gu="영종구"], .is-plus .hm .map .pin[data-gu="검단구"], .is-plus .hm .map .pin[data-gu="부평구"], .is-plus .hm .map .pin[data-gu="제물포구"] { width: 12px !important; height: 12px !important; min-width: 0 !important; min-height: 0 !important; }
  .is-plus .hm .map .pin[data-gu="강화군"] b, .is-plus .hm .map .pin[data-gu="영종구"] b, .is-plus .hm .map .pin[data-gu="검단구"] b, .is-plus .hm .map .pin[data-gu="부평구"] b, .is-plus .hm .map .pin[data-gu="제물포구"] b { display: none; }
  .is-plus .hm .map svg path { opacity: .7; }
  .is-plus .hm__band { margin-top: 28px; }
}

/* 줄임 모션: 전부 정지 상태 */
html.rm .rl__ch, html.rm .wr__s, html.rm .hp--deck .tl, html.rm .xc__card, html.rm .xc__body, html.rm .rp, html.rm .rp__cv, html.rm .mg, html.rm .mg > .mg__in, html.rm .nb__i, html.rm .nb__i::after, html.rm .proc li, html.rm .proc li::before { transition: none !important; animation: none !important; }
html.rm a:hover > .rl .rl__ch { transform: none; }
html.rm .rp-wrap:hover .rp__cv, html.rm .rp-wrap:focus-within .rp__cv { transform: none; opacity: 0; }
html.rm .ls__sp { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .rl__ch, .wr__s, .hp--deck .tl, .xc__card, .xc__body, .rp, .rp__cv, .mg, .mg > .mg__in, .nb__i, .nb__i::after, .proc li { transition: none !important; animation: none !important; }
  a:hover > .rl .rl__ch { transform: none; }
  .rp-wrap:hover .rp__cv { transform: none; opacity: 0; }
}
