/* 바바방 화려한 효과 (2026-11-12) — assets/js/fx.js 와 짝. 사장님 "홈페이지 너무 밋밋해서 좀 화려한 효과 많이 줘도 될듯"
   + 고급 분양 사이트(소요한남 by 파르나스 · 루카831 · 에테르노 압구정)에서 본 효과를 노랑·검정 바바방 톤으로 옮김.
   움직임은 transform 대신 translate/scale/rotate 속성을 써서, 이미 있는 카드 기울기(common.js)·버튼 들림과 겹치지 않게 했다. */

/* 1 스크롤 진행 막대 */
.fx-progress { position: fixed; left: 0; top: 0; z-index: 9998; width: 100%; height: 4px; background: linear-gradient(90deg, var(--ink) 0 30%, var(--y) 30% 70%, var(--ink) 70%); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* 2 스크롤하면 아래에서 올라오며 나타나기 (처음 화면 밖에 있던 것만) */
.fx-wait { opacity: 0; translate: 0 38px; scale: .97; }
.fx-wait.fx-in { opacity: 1; translate: none; scale: none; transition: opacity .7s ease var(--fx-d, 0s), translate .9s cubic-bezier(.2, .8, .2, 1.15) var(--fx-d, 0s), scale .9s cubic-bezier(.2, .8, .2, 1) var(--fx-d, 0s); }

/* 3 형광펜 긋기: .hl 노란 밑줄이 왼쪽에서 오른쪽으로 그어진다 */
html.fx:not(.fx-still) .hl { background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 1.1s cubic-bezier(.65, 0, .25, 1) .15s; }
html.fx:not(.fx-still) .hl.fx-in { background-size: 100% 100%; }

/* 4 제목 글자가 하나씩 튀어 오르기 */
.fx-split .fx-w { white-space: nowrap; }
.fx-split .fx-ch { display: inline-block; opacity: 0; translate: 0 .55em; rotate: 10deg; transition: opacity .45s ease calc(min(var(--i), 34) * 32ms), translate .7s cubic-bezier(.2, .9, .25, 1.35) calc(min(var(--i), 34) * 32ms), rotate .7s cubic-bezier(.2, .9, .25, 1.2) calc(min(var(--i), 34) * 32ms); }
.fx-split.fx-go .fx-ch { opacity: 1; translate: none; rotate: none; }
.hero h1 mark { transition: scale .5s cubic-bezier(.3, 1.6, .5, 1) .9s; }
html.fx:not(.fx-still) .hero h1:not(.fx-go) mark { scale: .6; }

/* 5 첫 화면 집 그림이 선으로 그려지기 */
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
@keyframes fx-float { 0%, 100% { translate: 0 var(--fx-py, 0); } 50% { translate: 0 calc(var(--fx-py, 0px) - 12px); } }

/* 10 겹쳐 움직이기(패럴랙스): fx.js 가 --fx-py 를 바꾼다 */
.fx-par { translate: 0 var(--fx-py, 0); will-change: translate; }
.hook-photos.fx-par { scale: 1.08; }  /* 배경 사진이 움직여도 가장자리 빈틈이 안 보이게 */

/* 11 지금 보는 메뉴 표시 (루카831) */
.nav a.fx-current { background: var(--ink) !important; color: var(--y) !important; }

/* 카드 사진 살짝 다가오기 */
html.fx:not(.fx-still) .card .card-photo img { transition: scale .7s cubic-bezier(.2, .8, .2, 1); }
html.fx:not(.fx-still) .card:hover .card-photo img { scale: 1.07; }

/* 12 사진 크게 보기 (에테르노 PhotoSwipe 같은 것, 매물 페이지) */
.detail .gallery-track img { cursor: zoom-in; }
.fx-zoom-hint { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(18, 18, 18, .78); color: #fff; font: 700 13px var(--f-b); pointer-events: none; backdrop-filter: blur(6px); }
.fx-zoom-hint svg { width: 15px; height: 15px; }
.fx-lb { position: fixed; inset: 0; z-index: 10000; background: rgba(10, 10, 9, .96); display: grid; grid-template-rows: auto 1fr auto; color: #fff; opacity: 0; transition: opacity .25s ease; touch-action: none; }
.fx-lb.on { opacity: 1; }
.fx-lb-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font: 700 15px var(--f-b); }
.fx-lb-x { border: 0; background: var(--y); color: var(--ink); width: 44px; height: 44px; border-radius: 50%; font-size: 22px; font-weight: 800; cursor: pointer; }
.fx-lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; }
.fx-lb-stage img { max-width: 94vw; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: transform .25s ease, opacity .2s; cursor: zoom-in; }
.fx-lb-stage img.zoomed { cursor: grab; }
.fx-lb-nav { position: absolute; top: 50%; translate: 0 -50%; border: 0; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; cursor: pointer; }
.fx-lb-nav:hover { background: var(--y); color: var(--ink); }
.fx-lb-prev { left: 16px; } .fx-lb-next { right: 16px; }
.fx-lb-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px)); justify-content: safe center; }
.fx-lb-thumbs button { flex: none; width: 64px; height: 48px; border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; background: #222; opacity: .55; cursor: pointer; }
.fx-lb-thumbs button.on { border-color: var(--y); opacity: 1; }
.fx-lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
html.fx-lock, html.fx-lock body { overflow: hidden; }
@media (max-width: 600px) { .fx-lb-nav { display: none; } .fx-lb-thumbs button { width: 52px; height: 40px; } }

/* 13 처음 들어올 때 바바방 인트로 (한 번 열면 그 창에서는 다시 안 나옴) */
.fx-intro { position: fixed; inset: 0; z-index: 10001; background: var(--y); display: grid; place-items: center; clip-path: inset(0 0 0 0); animation: fx-intro-out .7s cubic-bezier(.75, 0, .2, 1) 1.25s forwards; cursor: pointer; }
.fx-intro-logo { display: flex; align-items: flex-end; gap: .02em; font: 900 clamp(64px, 12vw, 150px)/1 var(--f-d); color: var(--ink); letter-spacing: -.04em; }
.fx-intro-logo i { font-style: normal; display: inline-block; opacity: 0; translate: 0 40%; animation: fx-intro-pop .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.fx-intro-logo i:nth-child(1) { font-size: .66em; animation-delay: .08s; }
.fx-intro-logo i:nth-child(2) { font-size: .82em; animation-delay: .2s; }
.fx-intro-logo i:nth-child(3) { animation-delay: .32s; }
.fx-intro-sub { position: absolute; bottom: 18%; left: 0; right: 0; text-align: center; font: 800 clamp(16px, 2vw, 22px) var(--f-b); color: var(--ink); opacity: 0; animation: fx-intro-fade .5s ease .6s forwards; }
@keyframes fx-intro-pop { to { opacity: 1; translate: none; } }
@keyframes fx-intro-fade { to { opacity: 1; } }
@keyframes fx-intro-out { to { clip-path: inset(0 0 100% 0); } }

