/* HRTech — 모션 그래픽 (2026-10-09) · motion.js 와 한 쌍 */

/* ① 전·후 비교 슬라이더 */
.ba-photo-area.mo-cmp-on { display: block; background: #000; }
.mo-cmp { position: relative; --p: 50%; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; overflow: hidden; }
.mo-cmp img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; pointer-events: none; transition: opacity .35s ease; -webkit-user-drag: none; }
.mo-cmp img.fading { opacity: 0; }
.mo-cmp-after { position: relative; }
.mo-cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.mo-cmp .ba-photo-label { position: absolute; top: 10px; left: 10px; z-index: 2; }
.mo-cmp .ba-photo-label.mo-lab-r { left: auto; right: 10px; }
.mo-cmp-line { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; margin-left: -1px; background: #c9a84c; box-shadow: 0 0 10px rgba(201,168,76,.6); z-index: 3; }
.mo-cmp-knob { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 2px solid #c9a84c; background: rgba(8,13,26,.85); color: #dbbe70; display: flex; align-items: center; justify-content: center;
  cursor: ew-resize; padding: 0; box-shadow: 0 2px 12px rgba(0,0,0,.5); }
.mo-cmp-knob:focus-visible { outline: 3px solid #edd898; outline-offset: 2px; }
.mo-cmp-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; pointer-events: none;
  padding: 5px 12px; border-radius: 999px; background: rgba(8,13,26,.75); color: #edd898; font-size: 12px; font-weight: 600; white-space: nowrap;
  transition: opacity .4s ease; }
.mo-cmp.mo-used .mo-cmp-hint { opacity: 0; }

/* ③ 첫 화면 회로선 */
.mo-circuit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.mo-tr-base { fill: none; stroke: rgba(201,168,76,.40); stroke-width: 1.6; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.mo-tr-flow { fill: none; stroke: #f3dc95; stroke-width: 2.6; stroke-linecap: round; opacity: 0;
  stroke-dasharray: 110 calc(var(--len) * 1px); stroke-dashoffset: calc(var(--len) * 1px + 110px); filter: drop-shadow(0 0 6px rgba(237,216,152,.95)); }
.mo-tr-dot { fill: #c9a84c; stroke: rgba(237,216,152,.9); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.mo-circuit.mo-go .mo-tr-base { animation: moDraw 1.8s cubic-bezier(.4,0,.2,1) forwards; animation-delay: calc(var(--i) * .15s); }
.mo-circuit.mo-go .mo-tr-dot { animation: moFadeIn .5s ease forwards, moNode 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .15s + 1.6s), calc(var(--i) * .3s + 2.2s); }
.mo-circuit.mo-go .mo-tr-flow { animation: moFlow var(--dur) linear infinite; animation-delay: calc(var(--i) * .45s + 1.4s); }
.mo-circuit.mo-paused * { animation-play-state: paused !important; }
.mo-circuit.mo-static .mo-tr-base { stroke-dashoffset: 0; }
.mo-circuit.mo-static .mo-tr-dot { opacity: 1; }
@keyframes moDraw { to { stroke-dashoffset: 0; } }
@keyframes moFadeIn { to { opacity: 1; } }
@keyframes moFlow { 0% { stroke-dashoffset: calc(var(--len) * 1px + 110px); opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes moNode { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.8); opacity: .55; } }
/* 첫 화면 배경의 금빛이 천천히 움직임 */
.hero-bg.mo-glow { animation: moGlow 14s ease-in-out infinite alternate; }
@keyframes moGlow { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-4%, 3%) scale(1.08); } 100% { transform: translate(3%, -2%) scale(1.04); } }
@media (max-width: 768px) { .mo-circuit { opacity: .9; } }
.mo-circuit.mo-portrait .mo-tr-base { stroke-width: 1.4; }
.mo-circuit.mo-portrait .mo-tr-flow { stroke-width: 2.2; stroke-dasharray: 60 calc(var(--len) * 1px); }
.mo-circuit.mo-portrait .mo-tr-dot { r: 3.5; }

/* ④ 공정 흐름 순서대로 불 켜기 */
.process-flow.mo-seq .process-arrow { opacity: .2; transition: opacity .4s ease; transition-delay: calc(var(--i) * .16s); }
.process-flow.mo-seq.mo-on .process-arrow { opacity: 1; }
.process-flow.mo-seq.mo-on .process-num { animation: moLight 1s ease both; animation-delay: calc(var(--i) * .16s); }
.process-flow.mo-seq .process-label { transition: color .4s ease; transition-delay: calc(var(--i) * .16s); }
.process-flow.mo-seq.mo-on .process-label { color: var(--text-primary, #f1f5f9); }
@keyframes moLight {
  0%   { background: rgba(201,168,76,.06); color: var(--gold-400, #dbbe70); box-shadow: 0 0 0 0 rgba(201,168,76,0); transform: scale(.9); }
  45%  { background: #c9a84c; color: #080d1a; box-shadow: 0 0 0 8px rgba(201,168,76,.22); transform: scale(1.12); }
  100% { background: rgba(201,168,76,.18); color: var(--gold-300, #edd898); box-shadow: 0 0 0 0 rgba(201,168,76,0); transform: scale(1); }
}

.process-flow.mo-each .process-arrow, .process-flow.mo-each .process-label { transition-delay: 0s; }
.process-flow.mo-each .mo-lit.process-arrow { opacity: 1; }
.process-flow.mo-each .mo-lit .process-num { animation: moLight 1s ease both; }
.process-flow.mo-each .mo-lit .process-label { color: var(--text-primary, #f1f5f9); }

/* ⑤ 정련 흐름 */
.mo-refine-bar { position: relative; height: 3px; border-radius: 3px; background: rgba(201,168,76,.15); margin: 0 0 var(--space-4, 16px); overflow: hidden; }
.mo-refine-bar::after { content: ''; position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #a8872d, #edd898); transition: width calc(var(--n) * .45s) cubic-bezier(.4,0,.2,1); }
.mo-refine-bar.mo-on::after { width: 100%; }
.mo-refine .refine-gallery-item { opacity: .25; transform: translateY(12px); filter: grayscale(.8);
  transition: opacity .6s ease, transform .6s ease, filter .6s ease; transition-delay: calc(var(--i) * .45s); }
.mo-refine.mo-on .refine-gallery-item { opacity: 1; transform: none; filter: none; }
.mo-refine.mo-on .refine-gallery-num { animation: moPop .6s ease both; animation-delay: calc(var(--i) * .45s + .2s); }
@keyframes moPop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); box-shadow: 0 0 0 6px rgba(201,168,76,.3); } 100% { transform: scale(1); } }

/* ⑥ 현장 둘러보기 */
.mo-tour { position: relative; aspect-ratio: 16/7; border-radius: var(--radius-lg, 14px); overflow: hidden; background: #080d1a;
  border: 1px solid var(--border-gold, rgba(201,168,76,.3)); margin-bottom: var(--space-6, 24px); }
.mo-tour-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.mo-tour-slide.mo-act { opacity: 1; }
.mo-tour-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1); }
.mo-tour-slide.mo-act img { animation: moKen 6s ease-out both; }
.mo-tour.mo-paused .mo-tour-slide img, .mo-tour.mo-static .mo-tour-slide img { animation: none; }
@keyframes moKen { from { transform: scale(1); } to { transform: scale(1.08); } }
.mo-tour::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,13,26,0) 55%, rgba(8,13,26,.85) 100%); pointer-events: none; }
.mo-tour-tag { position: absolute; top: 14px; left: 16px; z-index: 2; padding: 4px 10px; border-radius: 4px; background: rgba(201,168,76,.92); color: #080d1a;
  font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.mo-tour-cap { position: absolute; left: 20px; bottom: 18px; z-index: 2; color: #fff; font-weight: 700; font-size: var(--text-xl, 1.25rem); text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.mo-tour-dots { position: absolute; right: 18px; bottom: 22px; z-index: 2; display: flex; gap: 6px; }
.mo-tour-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.4); cursor: pointer; }
.mo-tour-dot.mo-act { background: #c9a84c; width: 22px; border-radius: 4px; transition: width .3s ease; }
@media (max-width: 768px) {
  .mo-tour { aspect-ratio: 4/3; }
  .mo-tour-cap { font-size: 1rem; left: 14px; bottom: 40px; }
  .mo-tour-dots { left: 14px; right: auto; bottom: 16px; }
  .mo-tour-dot { width: 10px; height: 10px; }
}

/* 「동작 줄이기」 설정 */
@media (prefers-reduced-motion: reduce) {
  .mo-circuit *, .hero-bg, .mo-tour-slide img, .process-flow .process-num, .mo-refine .refine-gallery-item { animation: none !important; transition: none !important; }
}
