/* 첫 화면 테스트 — 공통 */
.hx { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; }
.hx-copy { position: absolute; z-index: 6; left: var(--pad); bottom: calc(var(--cbar-h) + clamp(30px, 6vh, 64px)); max-width: 820px; }
.hx-title { font-size: clamp(30px, 3.4vw, 56px); font-weight: 700; line-height: 1.3; letter-spacing: -.035em; }
.hx-title .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hx-title .ln > span { display: inline-block; }
.hx-title .br { font-weight: 300; opacity: .65; }
.hx-title .slot { position: relative; display: inline-block; vertical-align: bottom; height: 1.3em; overflow: hidden; }
.hx-title .slot .w { position: absolute; left: 0; top: 0; white-space: nowrap; }
.hx-title .slot .measure { visibility: hidden; position: absolute; left: -9999px; }
.hx-sub { margin-top: 16px; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.7; opacity: .75; }
.testbar { position: fixed; z-index: 95; left: 50%; bottom: calc(var(--cbar-h) + 12px); transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; background: rgba(0, 0, 0, .7); border-radius: 4px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.testbar a, .testbar button { height: 32px; padding: 0 12px; display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; color: #fff; border-radius: 2px; opacity: .7; white-space: nowrap; }
.testbar a.on { background: #fff; color: #111; opacity: 1; }
.testbar a:hover, .testbar button:hover { opacity: 1; }
.testbar .sep { width: 1px; background: rgba(255, 255, 255, .25); margin: 4px 4px; }
.is-shot .testbar, .in-frame .testbar { display: none; }

/* ---------- A. 정밀 스캔: 실제 수술 영상 + 조준선 ---------- */
.hx-a { background: #050806; color: #fff; }
.a-media { position: absolute; inset: 0; filter: saturate(.86); }
.a-media video, .a-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.a-media video { opacity: 0; }
.a-dim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(5, 8, 6, .86) 0%, rgba(5, 8, 6, .34) 40%, rgba(5, 8, 6, .2) 62%, rgba(5, 8, 6, .55) 100%), linear-gradient(90deg, rgba(5, 8, 6, .5) 0%, rgba(5, 8, 6, 0) 58%); }
.a-hud { position: absolute; z-index: 2; left: 0; top: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; overflow: visible; }
.a-hud .ln-w { fill: none; stroke: rgba(255, 255, 255, .88); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.a-hud .ln-f { fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 1; vector-effect: non-scaling-stroke; }
.a-hud .ln-g { fill: none; stroke: #9fe0c6; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.a-hud .dotc { fill: #fff; }
.a-hud .t { fill: #fff; font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.a-hud .t-s { fill: rgba(255, 255, 255, .72); font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .03em; }
.a-read { position: absolute; z-index: 6; right: calc(var(--pad) + 76px); top: calc(var(--gnb-h) + 24px); text-align: right; font-size: 12.5px; letter-spacing: .03em; line-height: 1.9; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.a-read b { color: #fff; font-weight: 600; }

/* ---------- B. SINCE 2005: 2005 → 20년 (흰 바탕) ---------- */
.hx-b { background: #fff; color: var(--ink); }
.b-big { position: absolute; z-index: 3; left: 0; top: 0; width: 0; height: 0; }
.b-big svg { display: block; width: 100%; height: 100%; overflow: visible; }
.b-big text { font-family: var(--sans); font-weight: 700; fill: var(--green); fill-opacity: 0; stroke: var(--green); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.b-since { position: absolute; z-index: 3; left: var(--pad); top: calc(var(--gnb-h) + clamp(34px, 7vh, 80px)); font-size: clamp(18px, 1.6vw, 26px); font-weight: 600; letter-spacing: .14em; color: var(--ink); }
.b-desc { position: absolute; z-index: 3; left: var(--pad); max-width: 34em; }
.b-desc b { display: block; color: var(--ink); font-size: clamp(20px, 1.8vw, 28px); font-weight: 700; letter-spacing: -.02em; line-height: 1.45; }
.b-desc span { display: block; margin-top: 10px; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.6; color: #6b7570; }
.hx-b .hx-copy { left: auto; right: calc(var(--pad) + 64px); text-align: right; color: var(--green); }
.hx-b .hx-title { font-size: clamp(32px, 3.6vw, 58px); font-weight: 600; }
.b-chips { position: absolute; z-index: 3; right: calc(var(--pad) + 64px); top: calc(50% - 56px); display: flex; gap: 8px; list-style: none; }
.b-chips li { height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border: 1px solid rgba(31, 87, 68, .28); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--green); }
.b-line { position: absolute; z-index: 1; left: var(--pad); right: var(--pad); top: 50%; height: 1px; background: rgba(31, 87, 68, .12); }

/* ---------- C. 헤어라인 디자인: 얼굴 3등분 설계도 ---------- */
.hx-c { background: var(--green); color: #fff; }
.c-art { position: absolute; z-index: 2; right: max(var(--pad), 3vw); top: var(--gnb-h); bottom: 0; width: min(52vw, 900px); }
.c-art svg { width: 100%; height: 100%; overflow: visible; }
.c-art .region { fill: none; stroke: none; }
.c-art .lf { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 1.3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.c-art .eye2, .c-art .mouth { stroke: rgba(255, 255, 255, .45); }
.c-art .lg { fill: none; stroke: rgba(255, 255, 255, .24); stroke-width: 1; stroke-dasharray: 3 6; vector-effect: non-scaling-stroke; }
.c-art .hl { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.c-art .mk { fill: var(--green); stroke: var(--gold); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.c-art .dim { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1; vector-effect: non-scaling-stroke; }
.c-art .dot { fill: rgba(255, 255, 255, .8); }
.c-art .t { fill: #fff; font-family: var(--sans); font-size: 15px; font-weight: 600; }
.c-art .t-s { fill: rgba(255, 255, 255, .62); font-family: var(--sans); font-size: 12.5px; font-weight: 500; }
.c-art .n { fill: rgba(255, 255, 255, .72); font-family: var(--sans); font-size: 14px; font-weight: 600; text-anchor: middle; }
.c-tag { position: absolute; z-index: 6; left: var(--pad); top: calc(var(--gnb-h) + clamp(28px, 6vh, 64px)); font-size: 14px; font-weight: 600; opacity: .7; }

/* ---------- D. 밀도 스캔: 흰 바탕 점 매트릭스 ---------- */
.hx-d { background: #fff; color: var(--ink); }
.d-art { position: absolute; z-index: 2; right: max(var(--pad), 5vw); top: calc(var(--gnb-h) + 8px); bottom: calc(var(--cbar-h) + 8px); width: min(48vw, 720px); }
.d-art svg { width: 100%; height: 100%; overflow: visible; }
.d-art .ol { fill: none; stroke: rgba(17, 21, 19, .55); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.d-art .br { fill: none; stroke: var(--green); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.d-art .scan { fill: url(#dScan); }
.d-art .lead { fill: none; stroke: rgba(17, 21, 19, .45); stroke-width: 1; vector-effect: non-scaling-stroke; }
.d-art .t { fill: var(--ink); font-family: var(--sans); font-size: 15px; font-weight: 700; }
.d-art .t-s { fill: #6b7570; font-family: var(--sans); font-size: 12.5px; font-weight: 500; }
.d-art .kdot { fill: #b98a2e; } .d-art .kdot2 { fill: #1f5744; }
.d-head { position: absolute; z-index: 6; left: var(--pad); top: calc(var(--gnb-h) + clamp(28px, 6vh, 64px)); font-size: 14px; font-weight: 600; color: var(--green); }

/* ---------- E. 실사 슬라이드 + 괄호 카피 (삼성드림 구조) ---------- */
.hx-e { background: #050806; color: #fff; }
.e-slides figure { position: absolute; inset: 0; opacity: 0; }
.e-slides figure.on { opacity: 1; }
.e-slides img { width: 100%; height: 100%; object-fit: cover; }
.e-dim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(5, 8, 6, .8) 0%, rgba(5, 8, 6, .12) 50%, rgba(5, 8, 6, .35) 100%); }
.e-frame { position: absolute; z-index: 2; inset: calc(var(--gnb-h) + 14px) clamp(16px, 2vw, 32px) calc(var(--cbar-h) + 14px); pointer-events: none; }
.e-frame i { position: absolute; width: 26px; height: 26px; border: 0 solid rgba(255, 255, 255, .7); }
.e-frame i:nth-child(1) { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.e-frame i:nth-child(2) { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.e-frame i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.e-frame i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
.e-pager { margin-top: 26px; display: flex; align-items: center; gap: 10px; }
.e-pager button.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: width .4s, background .4s; }
.e-pager button.dot.on { width: 28px; border-radius: 4px; background: #fff; }
.e-pager .pp { margin-left: 8px; width: 28px; height: 28px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; font-size: 10px; display: grid; place-items: center; }
.e-cap { position: absolute; z-index: 6; right: calc(var(--pad) + 76px); bottom: calc(var(--cbar-h) + clamp(30px, 6vh, 64px)); font-size: 13px; color: rgba(255, 255, 255, .75); }

/* ---------- A+. 정밀 스캔 발전형: 장면 전환 ---------- */
.hx-a2 .a-media video { opacity: 1; }
.hx-a2 .a-stills { position: absolute; inset: 0; }
.hx-a2 .a-stills img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; opacity: 0; }
.hx-a2 .a-stills img:first-child { opacity: 1; }
.a-hud .bg { fill: rgba(5, 8, 6, .42); }
.hx-a2 .a-dim { background: radial-gradient(ellipse 52% 46% at 16% 84%, rgba(5, 8, 6, .62), rgba(5, 8, 6, 0) 72%), linear-gradient(0deg, rgba(5, 8, 6, .86) 0%, rgba(5, 8, 6, .34) 40%, rgba(5, 8, 6, .2) 62%, rgba(5, 8, 6, .55) 100%), linear-gradient(90deg, rgba(5, 8, 6, .5) 0%, rgba(5, 8, 6, 0) 58%); }
.a-scene { position: absolute; z-index: 6; right: calc(var(--pad) + 76px); top: calc(var(--gnb-h) + 112px); display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.a-scene .no b { color: #fff; font-weight: 700; }
.a-scene .bar { width: 64px; height: 1px; background: rgba(255, 255, 255, .3); }
.a-scene .bar i { display: block; height: 100%; background: #fff; transform-origin: left center; transform: scaleX(0); }
.a-scene .nm { min-width: 4em; font-weight: 600; color: #fff; }
@media (max-width: 980px) { .a-scene { display: none; } }
.pre .a-scene { visibility: hidden; }

@media (max-width: 980px) {
  .a-media { inset: 0 0 auto 0; height: 76%; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
  .a-media video, .a-media img { object-position: 74% 50%; }
  .a-read { right: var(--pad); top: calc(var(--gnb-h) + 14px); font-size: 11.5px; }
  .a-hud .t { font-size: 17px; } .a-hud .t-s { font-size: 13.5px; }
  .hx-b .hx-copy { right: var(--pad); }
  .b-line, .b-chips { display: none; }
  .b-desc { right: var(--pad); }
  .c-art { left: 0; right: 0; width: auto; top: calc(var(--gnb-h) + 40px); bottom: 40%; }
  .c-art .t { font-size: 23px; } .c-art .n { font-size: 22px; }
  .c-art .lab .t-s { display: none; } .c-art .thirds .t-s { font-size: 19px; }
  .c-tag { top: calc(var(--gnb-h) + 12px); }
  .d-art { left: 4vw; right: 4vw; width: auto; top: calc(var(--gnb-h) + 36px); bottom: 40%; }
  .d-art .t { font-size: 24px; } .d-art .t-s, .d-art .lk { display: none; }
  .d-head { top: calc(var(--gnb-h) + 12px); }
  .hx-title { font-size: clamp(24px, 6.9vw, 34px); letter-spacing: -.04em; }
  .hx-b .hx-title { font-size: clamp(24px, 6.6vw, 34px); }
  .e-cap { display: none; }
  .testbar { bottom: calc(var(--cbar-h) + 8px); max-width: 96vw; overflow-x: auto; }
  html:not(.is-shot):not(.in-frame) .hx-copy { bottom: calc(var(--cbar-h) + 64px); }
}
.pre .hx-copy, .pre .gnb, .pre .a-read, .pre .b-desc, .pre .b-chips, .pre .b-since, .pre .c-tag, .pre .d-head, .pre .e-cap { visibility: hidden; }
