/* 새결시스템즈 첫 화면 — 디지털 트윈 스캔(운영모아 11/28 대표 지시)
   스크롤하면 ① 현장 사진 → ② 설계도로 훑어 읽기·측정점 → ③ 모터로 다가가 진동 감지 → ④ 담당자 알림 */
.twin { position: relative; height: 340vh; background: #0b1712; color: #eef3ea; }
.twin-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.twin-media { position: absolute; inset: 0 0 0 22%; transform-origin: var(--ox, 60%) var(--oy, 65%); transform: scale(var(--zs, 1)); will-change: transform; }
.twin-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.tw-photo { filter: saturate(1.04) contrast(1.04) brightness(1.06); }
.tw-line { clip-path: inset(0 calc(100% - var(--sx, 0%)) 0 0); opacity: var(--lo, 1); }
.tw-scan { position: absolute; top: 0; bottom: 0; left: var(--sx, 0%); width: 2px; margin-left: -1px; background: #9ff0ff; box-shadow: 0 0 18px 4px #5fd8ff99, 0 0 60px 14px #5fd8ff33; opacity: var(--so, 0); }
.tw-scan::after { content: ""; position: absolute; inset: 0 -120px 0 auto; width: 120px; background: linear-gradient(90deg, #7fe2ff33, transparent); }
.tw-nodes { position: absolute; inset: 0; }
.tw-node { position: absolute; left: 0; top: 0; transform: translate(var(--x), var(--y)); opacity: 0; transition: opacity .45s ease; }
.tw-node.on { opacity: 1; }
.tw-node .dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: #c9f46a; box-shadow: 0 0 0 3px #0b1712aa; }
.tw-node .dot::before, .tw-node .dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid #c9f46a; animation: twPulse 2.2s ease-out infinite; }
.tw-node .dot::after { animation-delay: 1.1s; }
.tw-node .chip { position: absolute; left: 14px; top: -34px; white-space: nowrap; padding: .38rem .6rem; border-radius: .3rem; background: #0c1a14e6; border: 1px solid #c9f46a66; font-size: .78rem; line-height: 1.25; letter-spacing: -.01em; backdrop-filter: blur(6px); }
.tw-node .chip small { display: block; color: #a9bfb2; font-size: .68rem; }
.tw-node .chip b { font-variant-numeric: tabular-nums; color: #e9ffc0; font-weight: 700; }
.tw-node.left .chip { left: auto; right: 14px; }
.tw-node.hot .dot { background: #ffb02e; }
.tw-node.hot .dot::before, .tw-node.hot .dot::after { border-color: #ffb02e; animation-duration: 1s; }
.tw-node.hot .chip { border-color: #ffb02ecc; }
.tw-node.hot .chip b { color: #ffd37a; }
.tw-node.dim { opacity: .18; }
@keyframes twPulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }

.twin-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #0b1712 0%, #0b1712 22%, #0b1712d9 33%, #0b171233 52%, transparent 66%), linear-gradient(0deg, #0b1712aa, transparent 30%); }
.twin-copy { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-bottom: 4rem; opacity: var(--co, 1); transform: translateY(var(--cy, 0)); }
.twin-eyebrow { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem; color: #c9f46a; font-weight: 700; font-size: .9rem; letter-spacing: .02em; }
.twin-eyebrow span { width: 9px; height: 9px; border-radius: 50%; background: #c9f46a; box-shadow: 0 0 0 4px #c9f46a33; animation: twBlink 1.6s ease-in-out infinite; }
@keyframes twBlink { 50% { box-shadow: 0 0 0 8px #c9f46a10; } }
.twin h1 { margin: 0; font-size: clamp(2.9rem, 5.4vw, 5.6rem); line-height: 1.08; letter-spacing: -.055em; font-weight: 800; max-width: 9.5em; }
.twin h1 span { display: block; overflow: hidden; }
.twin h1 span i { display: inline-block; font-style: normal; transform: translateY(105%); animation: twRise .8s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--j) * 35ms + .15s); }
.twin h1 span + span { color: #c9f46a; }
@keyframes twRise { to { transform: none; } }
.twin-lead { max-width: 32ch; margin: 1.4rem 0 2rem; color: #cfdbd2; font-size: 1.08rem; line-height: 1.7; }
.twin-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.twin-actions .button { min-height: 3.1rem; padding-inline: 1.25rem; gap: .9rem; font-weight: 700; }
.twin-actions .lime { background: #c9f46a; color: #11200f; }
.twin-actions .outline { border-color: #9fb3a6; color: #eef3ea; }
.twin-actions .outline:hover { background: #ffffff14; }

.twin-steps { position: absolute; z-index: 3; left: 50%; bottom: 1.5rem; transform: translateX(-50%); display: flex; gap: .35rem; margin: 0; padding: .35rem; list-style: none; border-radius: 999px; background: #0c1a14cc; border: 1px solid #ffffff1f; backdrop-filter: blur(8px); }
.twin-steps li { display: flex; align-items: center; gap: .4rem; padding: .42rem .85rem; border-radius: 999px; font-size: .82rem; color: #9fb3a6; transition: background .3s, color .3s; white-space: nowrap; }
.twin-steps li b { font-size: .7rem; color: inherit; opacity: .7; }
.twin-steps li.on { background: #c9f46a; color: #11200f; font-weight: 700; }

.tw-wave { position: absolute; z-index: 3; right: 4vw; top: 16vh; width: min(380px, 40vw); padding: 1rem 1.1rem .9rem; border-radius: .6rem; background: #0c1a14e8; border: 1px solid #ffffff24; box-shadow: 0 20px 60px #0008; opacity: var(--wo, 0); transform: translateY(calc((1 - var(--wo, 0)) * 20px)); pointer-events: none; backdrop-filter: blur(8px); }
.tw-wave header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .84rem; color: #b8c9be; }
.tw-wave header strong { color: #eef3ea; font-weight: 700; }
.tw-val { font-variant-numeric: tabular-nums; font-size: 1.35rem; font-weight: 800; color: #e9ffc0; letter-spacing: -.02em; }
.tw-wave canvas { display: block; width: 100%; height: 92px; margin: .55rem 0 .4rem; color: #c9f46a; }
.tw-state { margin: 0; font-size: .82rem; color: #b8c9be; }
.tw-state b { color: #e9ffc0; }
.tw-wave.hot { border-color: #ffb02e99; }
.tw-wave.hot .tw-val, .tw-wave.hot .tw-state b { color: #ffcf6e; }
.tw-wave.hot canvas { color: #ffb02e; }

.tw-phone { position: absolute; z-index: 4; right: 6vw; bottom: 12vh; width: min(320px, 78vw); border-radius: 1.1rem; padding: 1rem 1.05rem; background: #f8f9f4; color: #151e17; box-shadow: 0 30px 80px #000a, 0 0 0 6px #ffffff14; opacity: var(--po, 0); transform: translateY(calc((1 - var(--po, 0)) * 60px)) rotate(calc((1 - var(--po, 0)) * 4deg)); pointer-events: none; }
.tw-phone .app { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: #5b6a5f; }
.tw-phone .app i { width: 1.25rem; height: 1.25rem; border-radius: .3rem; background: #14241c; display: grid; place-items: center; }
.tw-phone .app i::before { content: ""; width: .55rem; height: .55rem; border-inline: .16rem solid #c9f46a; transform: skewX(-12deg); }
.tw-phone .app time { margin-left: auto; }
.tw-phone h3 { margin: .55rem 0 .25rem; font-size: 1rem; letter-spacing: -.02em; }
.tw-phone p { margin: 0; font-size: .84rem; line-height: 1.55; color: #3d4a40; }
.tw-phone .who { display: flex; gap: .5rem; margin-top: .7rem; }
.tw-phone .who span { flex: 1; text-align: center; padding: .5rem 0; border-radius: .45rem; font-size: .8rem; font-weight: 700; background: #ecefe5; }
.tw-phone .who span.go { background: #14241c; color: #c9f46a; }
.tw-phone .done { display: flex; align-items: center; gap: .45rem; margin-top: .65rem; padding-top: .6rem; border-top: 1px solid #d9ded2; font-size: .8rem; color: #2f6a3a; font-weight: 700; opacity: var(--do, 0); }
.tw-phone .done::before { content: "✓"; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #2f6a3a; color: white; font-size: .7rem; }

.twin-hint { position: absolute; z-index: 3; left: 50%; bottom: 5.2rem; transform: translateX(-50%); margin: 0; font-size: .8rem; color: #cfdbd2; opacity: var(--ho, 1); animation: twBob 2s ease-in-out infinite; }
@keyframes twBob { 50% { translate: 0 5px; } }
.twin-cap { position: absolute; z-index: 3; left: 50%; top: 1.4rem; transform: translateX(-50%); margin: 0; padding: .4rem .9rem; border-radius: 999px; background: #0c1a14b3; font-size: .8rem; color: #cfdbd2; opacity: var(--capo, 0); white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 움직임 줄이기: 고정 없이 한 화면, 측정점만 보임 */
.twin.still { height: auto; }
.twin.still .twin-stage { position: relative; height: min(100svh, 52rem); }
.twin.still .twin-steps, .twin.still .twin-hint, .twin.still .tw-scan { display: none; }

@media (max-width: 860px) {
  .twin { height: 300vh; }
  .twin-media { inset: 0; }
  .twin-media img { object-position: 46% 50%; }
  .twin-shade { background: linear-gradient(0deg, #0b1712 0%, #0b1712f2 30%, #0b171299 48%, #0b171222 70%, #0b171266 100%); opacity: calc(.15 + .85 * var(--co, 1)); }
  .twin-copy { justify-content: flex-end; padding-bottom: 6.2rem; }
  .twin h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .twin-lead { font-size: .98rem; margin: 1rem 0 1.3rem; }
  .twin-steps { bottom: 1rem; }
  .twin-steps li { padding: .38rem .6rem; font-size: .76rem; }
  .twin-steps li b { display: none; }
  .twin-hint { display: none; }
  .tw-wave { left: 1rem; right: 1rem; width: auto; top: 4.2rem; }
  .tw-phone { left: 50%; right: auto; bottom: 5rem; margin-left: calc(min(320px, 78vw) / -2); }
  .tw-node .chip { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  .twin h1 span i { animation: none; transform: none; }
  .tw-node .dot::before, .tw-node .dot::after, .twin-hint, .twin-eyebrow span { animation: none; }
}
.twin.auto .twin-hint { display: none; }
