/* 첫 화면 v3 (2026-10-13) — 가운데 정렬 + 분석 화면 모션. 홈(index.html)에서만 불러온다.
   장면: 국토(Blue Marble) → 서울(Sentinel-2 원해상도) → 벡터 지도(OSM 건물·도로)로 연속 확대 → 경계·면적 → 노후도·용도지역 → 용적률·판정.
   JS 가 .stage 에 on1~on5 를 누적으로 붙인다(단계 n 이면 on1..onN). 색·치수는 brand.css 토큰, 어두운 지도 위만 밝은 파랑 계열. */
.hero2{ padding:48px 0 64px; background:linear-gradient(var(--upp-canvas) 0%, var(--upp-canvas) 50%, var(--upp-cloud) 50%); }
.h2c{ text-align:center; max-width:820px; margin:0 auto; }
.hero2 h1{ font-size:clamp(34px,4.6vw,54px); line-height:1.18; letter-spacing:-.025em; margin:0 0 var(--s-md); }
.hero2 h1 .hl{ color:var(--upp-primary); }
.hero2 .lede{ max-width:640px; margin:0 auto; }
.hero2 .cta{ margin-top:28px; display:flex; justify-content:center; }
.btn.xl{ font-size:18px; padding:16px 48px; letter-spacing:.02em; }
.credit{ text-align:center; font-size:12px; color:var(--upp-graphite); margin:var(--s-md) 0 0; }

/* ── 무대(앱 창) ── */
.stage{ --ease:cubic-bezier(.65,0,.35,1); --out:cubic-bezier(.2,.8,.2,1);
  margin:36px auto 0; max-width:1120px; background:var(--upp-canvas); border:1px solid var(--upp-hairline-card);
  border-radius:var(--r-xl); box-shadow:0 30px 80px rgba(9,39,64,.22), var(--lift); overflow:hidden; text-align:left; }
.st-bar{ display:flex; align-items:center; gap:var(--s-sm); padding:10px 14px; border-bottom:1px solid var(--upp-hairline); }
.st-search{ flex:1 1 auto; max-width:400px; height:34px; display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--upp-steel);
  border-radius:var(--r-ctl); font-size:13px; color:var(--upp-ink); white-space:nowrap; overflow:hidden; }
.st-search .mag{ width:15px; height:15px; flex:0 0 auto; fill:none; stroke:var(--upp-graphite); stroke-width:1.6; stroke-linecap:round; }
.st-search .caret{ width:1px; height:15px; background:var(--upp-ink); margin-left:1px; animation:st-blink 1s steps(1) infinite; }
@keyframes st-blink{ 50%{ opacity:0; } }
.st-tabs{ list-style:none; margin:0 0 0 auto; padding:0; display:flex; gap:4px; }
.st-tabs li{ margin:0; font-size:12px; padding:5px 11px; border-radius:var(--r-pill); color:var(--upp-graphite); transition:background .4s, color .4s; }
.st-tabs li.on{ background:var(--upp-navy); color:var(--upp-on-ink); }

/* 지도는 16:9 고정 — 카드는 지도 위에 띄운다(카드 높이가 지도를 세로로 늘리던 문제, 2026-10-13) */
.st-body{ position:relative; }
.st-map{ position:relative; overflow:hidden; background:#061d31; aspect-ratio:16 / 9; }
.st-map > img, .st-map > svg{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.st-map img.sat{ object-fit:cover; }
.st-map .seoul{ object-position:44% 60%; transform-origin:44% 60%; }   /* 확대는 hero.js 카메라가 맡는다 */
.st-map .vec, .st-map .pinlayer{ overflow:visible; }   /* 축소된 동안에도 틀 밖까지 그려 사각형 판이 보이지 않게 */
.st-map .vec{ opacity:0; transform-origin:44% 60%; }

/* 벡터 지도 — UPP 도면 스타일(2026-10-13). 흰 블록 위 회색 도로면, 가는 필지선, 외곽선 없는 건물:
   건물 #E4E4E4 · 필지선 #7A828C · 구역계 #E2231A · 노후도 주제도(ageClasses)는 건물에 칠한다.
   구역계·필지는 도로 중심선을 반폭만큼 띄운 선으로 계산했다 — 골목 반폭 2.4m·간선 6.5m 가 아래 도로 굵기(4.8·13)와 같아야 경계가 도로 가장자리에 붙는다.
   도면 색은 디자인 시스템 적용 대상이 아니다(관례·판독성 우선, ci/BRAND.md). */
.vec .vbg{ fill:#FFFFFF; }
.vec .grid{ display:none; }
/* 성능: 도로 1천여 개를 하나씩 그리는 효과는 확대와 겹쳐 버벅였다 — 도로는 처음부터 그려 둔다 */
.vec .rd-case path, .vec .rd-fill path{ fill:none; stroke-linecap:round; stroke-linejoin:round; }
.vec .rd-case path.mi{ stroke:#A9AEB5; stroke-width:5.2; }
.vec .rd-fill path.mi{ stroke:#D8DBDF; stroke-width:4.8; }
.vec .rd-case path.ma{ stroke:#A9AEB5; stroke-width:13.4; }
.vec .rd-fill path.ma{ stroke:#D8DBDF; stroke-width:13; }
.vec .b-out path, .vec .b-in path{ fill:#E4E4E4; stroke:#C8CACD; stroke-width:.3; stroke-linejoin:miter; }
.vec .b-in path{ transition:fill .5s ease var(--d,0s), stroke .5s ease var(--d,0s); }
/* 건축물 노후도 주제도 — 앱처럼 건물에 칠한다(ageClasses 색). 굵은 테두리는 작은 배율에서 모서리가 뭉개져 가는 선으로 */
.stage.on4 .vec .b-in path{ stroke:rgba(0,0,0,.45); stroke-width:.35; }
.stage.on4 .vec .b-in path.a0{ fill:#91cf60; }
.stage.on4 .vec .b-in path.a1{ fill:#fee08b; }
.stage.on4 .vec .b-in path.a2{ fill:#fc8d59; }
.stage.on4 .vec .b-in path.a3{ fill:#d73027; }
.vec .site-fill{ fill:#E2231A; fill-opacity:0; transition:fill-opacity .8s ease 1s; }
.stage.on3 .vec .site-fill{ fill-opacity:.07; }
.vec .parcels path{ fill:transparent; stroke:#7A828C; stroke-width:.45; stroke-linejoin:miter; stroke-opacity:0; transition:stroke-opacity .6s ease calc(1.2s + var(--d,0s)), fill .6s ease calc(.2s + var(--d,0s)); }
.stage.on3 .vec .parcels path{ stroke-opacity:.9; }

.vec .site-line{ fill:none; stroke:#E2231A; stroke-width:1.3; stroke-linejoin:miter; stroke-dasharray:1; stroke-dashoffset:1; transition:stroke-dashoffset 1.4s var(--ease); }
.stage.on3 .vec .site-line{ stroke-dashoffset:0; }
.vec .site-line{ opacity:0; } .stage.on3 .vec .site-line{ opacity:1; }   /* 그려지기 전 시작점의 점 숨김 */
.vec .brk{ fill:none; stroke:#1A1A1A; stroke-width:1.2; opacity:0; transition:opacity .4s ease 1.2s; }
.stage.on3 .vec .brk{ opacity:1; animation:st-brk 2.4s ease-in-out 1.2s 2; }
@keyframes st-brk{ 50%{ opacity:.3; } }
.vec .dim path{ fill:none; stroke:#333; stroke-width:.7; stroke-dasharray:2 2; }
.vec .dim text, .vec .r-lbl{ fill:#1A1A1A; font:600 7.5px var(--upp-font); paint-order:stroke; stroke:#fff; stroke-width:2px; stroke-linejoin:round; }
.vec .dim{ opacity:0; transition:opacity .6s ease 1.5s; }
.stage.on3 .vec .dim{ opacity:1; }
.vec .r250{ fill:none; stroke:#333; stroke-opacity:.45; stroke-width:.8; stroke-dasharray:3.5 4.5; opacity:0; transform-box:fill-box; transform-origin:center; transform:scale(.5); transition:opacity .8s, transform 1.6s var(--out); }
.vec .r-lbl{ opacity:0; transition:opacity .6s ease .9s; }
.stage.on4 .vec .r250{ opacity:1; transform:scale(1); }
.stage.on4 .vec .r-lbl{ opacity:1; }
.vec .scanbar{ opacity:0; }
.vec .scanbar{ display:none; }
@keyframes st-scan{ 0%{ opacity:1; transform:translateX(0); } 90%{ opacity:1; } 100%{ opacity:0; transform:translateX(640px); } }

/* 핀·말풍선 */
.pinlayer .pin{ opacity:0; transition:opacity .3s ease .2s; }
.pinlayer .drop{ transform:translateY(-46px); transition:transform .7s cubic-bezier(.3,1.7,.5,1) .2s; }
.pinlayer .drop path{ fill:var(--upp-primary); stroke:#fff; stroke-width:2.2; }
.pinlayer .drop circle{ fill:#fff; }
.pinlayer .shadow{ fill:rgba(0,0,0,.35); }
.pinlayer .rip{ fill:none; stroke:#fff; stroke-width:2; opacity:0; transform-box:fill-box; transform-origin:center; }
.stage.on1 .pinlayer .pin{ opacity:1; }
.stage.on1 .pinlayer .drop{ transform:none; }
.stage.on1 .pinlayer .rip{ animation:st-rip 2s ease-out .9s infinite; }
.stage.on1 .pinlayer .rip.r2{ animation-delay:1.9s; }
@keyframes st-rip{ 0%{ opacity:.95; transform:scale(1); } 100%{ opacity:0; transform:scale(6); } }
.stage.on2 .pinlayer .rip{ stroke:var(--upp-primary); }
.stage.on3 .pinlayer .pin{ opacity:0; transition-delay:1.2s; }
.stage.on3 
.st-hud{ position:absolute; left:12px; bottom:12px; display:flex; gap:6px; font-size:12px; color:var(--upp-ink); font-variant-numeric:tabular-nums; }
.st-hud span{ background:rgba(255,255,255,.92); padding:4px 9px; border-radius:var(--r-lg); box-shadow:0 1px 4px rgba(0,0,0,.18); }
.st-hud .lv{ color:var(--upp-primary); font-weight:600; }

/* ── 오른쪽 분석 패널 ── */
.st-side{ position:absolute; top:14px; right:14px; width:272px; display:flex; flex-direction:column; gap:9px; pointer-events:none; }
.sc{ background:rgba(255,255,255,.94); border:1px solid rgba(255,255,255,.7); border-radius:var(--r-card); padding:11px 13px 12px;
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); box-shadow:0 8px 24px rgba(0,0,0,.25);
  opacity:0; transform:translateX(16px); transition:opacity .55s ease, transform .55s var(--out); }
.sc-h{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:4px; }
.sc .k{ font-size:12px; color:var(--upp-graphite); }
.sc .st{ font-size:11px; color:var(--upp-graphite); background:var(--upp-cloud); padding:1px 7px; border-radius:var(--r-pill); }
.sc .big{ font-size:12px; font-weight:600; color:var(--upp-navy); }
.sc b{ font-size:24px; font-weight:600; font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
.stage.on3 .c1, .stage.on4 .c2, .stage.on4 .c3, .stage.on5 .c4{ opacity:1; transform:none; }
.stage.on4 .c3{ transition-delay:.35s; }
.kv2{ display:grid; grid-template-columns:auto 1fr auto 1fr; gap:2px 8px; margin-top:6px; font-size:12px; color:var(--upp-graphite); }
.kv2 em{ font-style:normal; color:var(--upp-ink); font-weight:600; }

.donut-row{ display:flex; align-items:center; gap:12px; }
.donut{ width:64px; height:64px; flex:0 0 auto; transform:rotate(-90deg); }
.donut circle{ fill:none; stroke-width:9; }
.donut .trk{ stroke:var(--upp-fog); }
.donut .s1{ stroke:var(--upp-primary-mid); stroke-dasharray:0 100; transition:stroke-dasharray 1.2s var(--out) .3s; }
.donut .s2{ stroke:var(--upp-primary-bright); stroke-dasharray:0 100; stroke-dashoffset:-78; transition:stroke-dasharray .8s var(--out) 1.3s; }
.donut text{ transform:rotate(90deg); transform-origin:32px 32px; font:600 12px var(--upp-font); fill:var(--upp-ink); text-anchor:middle; }
.stage.on4 .donut .s1{ stroke-dasharray:78 22; }
.stage.on4 .donut .s2{ stroke-dasharray:22 78; }
.lg{ list-style:none; margin:0; padding:0; font-size:12px; color:var(--upp-charcoal); flex:1; }
.lg li{ margin:3px 0; display:flex; align-items:center; gap:6px; }
.lg i{ width:9px; height:9px; border-radius:2px; flex:0 0 auto; }
.lg i.z3{ background:var(--upp-primary-mid); }
.lg i.zj{ background:var(--upp-primary-bright); }
.lg em{ margin-left:auto; font-style:normal; font-weight:600; color:var(--upp-ink); font-variant-numeric:tabular-nums; }

.hbars{ display:flex; flex-direction:column; gap:5px; margin-top:6px; }
.hb{ display:grid; grid-template-columns:62px 1fr 18px; align-items:center; gap:8px; font-size:11.5px; color:var(--upp-charcoal); }
.hb i{ display:block; height:9px; width:0; border-radius:var(--r-pill); transition:width 1s var(--out); }
.hb em{ font-style:normal; text-align:right; font-weight:600; color:var(--upp-ink); font-variant-numeric:tabular-nums; }
.hb i.a0{ background:#91cf60; }
.hb i.a1{ background:#fee08b; }
.hb i.a2{ background:#fc8d59; }
.hb i.a3{ background:#d73027; }   /* 앱 노후도 주제도와 같은 색(ageClasses) */
.stage.on4 .hb i{ width:var(--w); }
.stage.on4 .hb:nth-child(2) i{ transition-delay:.12s; }
.stage.on4 .hb:nth-child(3) i{ transition-delay:.24s; }
.stage.on4 .hb:nth-child(4) i{ transition-delay:.36s; }

.far{ width:100%; height:auto; display:block; margin-top:4px; overflow:visible; }
.far .axis{ stroke:var(--upp-hairline); stroke-width:1; }
.far .area{ fill:var(--upp-primary-soft); opacity:0; transition:opacity .8s ease .9s; }
.far .line{ fill:none; stroke:var(--upp-navy); stroke-width:2.5; stroke-linejoin:round; stroke-dasharray:1; stroke-dashoffset:1; transition:stroke-dashoffset 1.3s var(--ease) .2s; }
.far .pts circle{ fill:var(--upp-canvas); stroke:var(--upp-navy); stroke-width:2; transform-box:fill-box; transform-origin:center; transform:scale(0); transition:transform .4s cubic-bezier(.3,1.7,.5,1); }
.far .pts circle:nth-child(1){ transition-delay:.5s; }
.far .pts circle:nth-child(2){ transition-delay:.9s; }
.far .pts circle:nth-child(3){ transition-delay:1.3s; }
.far .lbl text{ font:600 12px var(--upp-font); fill:var(--upp-ink); text-anchor:middle; opacity:0; transition:opacity .5s ease 1.4s; }
.far .lbl text.sub{ font-weight:400; font-size:11px; fill:var(--upp-graphite); }
.stage.on5 .far .area{ opacity:.9; }
.stage.on5 .far .line{ stroke-dashoffset:0; }
.stage.on5 .far .pts circle{ transform:scale(1); }
.stage.on5 .far .lbl text{ opacity:1; }
.chips{ display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.chips em{ display:inline-flex; align-items:center; gap:4px; font-style:normal; font-size:11.5px; font-weight:600; padding:3px 9px 3px 7px; border-radius:var(--r-pill);
  background:var(--upp-cloud); opacity:0; transform:translateY(4px); transition:opacity .4s ease, transform .4s var(--out); }
.chips em svg{ width:12px; height:12px; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.chips em svg path{ stroke-dasharray:14; stroke-dashoffset:14; transition:stroke-dashoffset .5s ease; }
.chips em.ok{ color:var(--upp-ok); }
.chips em.ok svg{ stroke:var(--upp-ok); }
.chips em.no{ color:var(--upp-no); }
.chips em.no svg{ stroke:var(--upp-no); }
.stage.on5 .chips em{ opacity:1; transform:none; }
.stage.on5 .chips em svg path{ stroke-dashoffset:0; }
.stage.on5 .chips em:nth-child(1), .stage.on5 .chips em:nth-child(1) svg path{ transition-delay:1.5s; }
.stage.on5 .chips em:nth-child(2), .stage.on5 .chips em:nth-child(2) svg path{ transition-delay:1.75s; }
.stage.on5 .chips em:nth-child(3), .stage.on5 .chips em:nth-child(3) svg path{ transition-delay:2s; }

/* 아래 단계 표시 */
/* 진행 단계 — 검색줄 바로 아래(2026-10-13). 탭 밑줄처럼 글자 아래에 진행 막대 */
.st-steps{ list-style:none; margin:0; padding:9px 14px 0; display:flex; gap:6px; border-bottom:1px solid var(--upp-hairline); background:var(--upp-canvas, #fff); }
.st-steps li{ margin:0; flex:1; font-size:12px; color:var(--upp-graphite); padding:0 0 10px; position:relative; text-align:center; transition:color .4s; }
.st-steps li::before{ content:""; position:absolute; left:0; right:0; bottom:-1px; height:3px; border-radius:2px; background:var(--upp-fog); }
.st-steps li::after{ content:""; position:absolute; left:0; bottom:-1px; height:3px; width:0; border-radius:2px; background:var(--upp-navy); transition:width .6s var(--out); }
.st-steps li.done{ color:var(--upp-ink); }
.st-steps li.done::after{ width:100%; }

@media (max-width:900px){
  .st-map{ aspect-ratio:4 / 3; }
  .st-side{ position:static; width:auto; display:grid; grid-template-columns:1fr 1fr; padding:12px; background:var(--upp-cloud); border-top:1px solid var(--upp-hairline); }
  .sc{ box-shadow:none; border-color:var(--upp-hairline-card); }
  .st-tabs{ display:none; }
}
@media (max-width:560px){
  .hero2{ padding:40px 0 48px; }
  .st-side{ grid-template-columns:1fr; }
  .st-steps li{ font-size:10.5px; }
  .btn.xl{ width:100%; justify-content:center; }
  }
@media (prefers-reduced-motion: reduce){
  .stage *, .stage *::before, .stage *::after{ transition:none !important; animation:none !important; }
}

/* 축척 막대·방위표 — SVG 밖(HTML)에 둔다. 지도는 slice 로 잘리므로 막대 길이는 hero.js 가 실제 배율로 계산한다 */
.st-scale, .st-north{ position:absolute; color:#1A1A1A; opacity:0; transition:opacity .6s ease 1.6s; pointer-events:none; }
.stage.on2 .st-scale, .stage.on2 .st-north{ opacity:1; }
.st-scale{ left:14px; bottom:50px; display:flex; flex-direction:column-reverse; align-items:flex-start; gap:3px; font-size:11px; font-weight:600; }
.st-scale i{ display:block; height:6px; width:100px; border:1.5px solid #1A1A1A; border-top:0; }
.st-north{ left:16px; top:14px; display:flex; flex-direction:column; align-items:center; font-size:11px; font-weight:600; }
.st-north svg{ width:16px; height:24px; fill:#1A1A1A; }

/* 반복 재생 전환 — 지도 전체를 잠깐 흐리게 했다가 위성으로 돌아간다(흰 판·되감기 장면을 보이지 않게) */
.st-map::after{ content:""; position:absolute; inset:0; background:#fff; opacity:0; pointer-events:none; transition:opacity .45s ease; }
.st-map.fade::after{ opacity:1; }

/* 확대 중에는 그림을 다시 그리지 않고 GPU 로 늘리기만 한다 — 끝나면 hero.js 가 풀어 선명하게 다시 그린다 */
.st-map.zooming .seoul, .st-map.zooming .vec{ will-change:transform, opacity; }

/* 사용 설명서 책갈피(2026-10-13) — 넓은 화면: 카드 오른쪽 모서리 밖으로 튀어나온 색인 탭(카드 내용을 가리지 않는다).
   좁은 화면(옆자리 없음): 카드 윗변에 붙은 작은 탭. 남색·흰 글자 */
.guide-tab-anchor{ position:relative; max-width:1120px; margin:0 auto; height:0; z-index:1; }
.guide-tab{ position:absolute; left:100%; top:92px; width:46px; padding:12px 0 13px; display:flex; flex-direction:column; align-items:center; gap:6px;
  background:var(--upp-navy); color:#fff; text-decoration:none; font-size:11px; line-height:1.3; text-align:center; letter-spacing:-.01em;
  border-radius:0 9px 9px 0; box-shadow:6px 8px 18px rgba(9,39,64,.22); transition:transform .25s cubic-bezier(.2,.8,.2,1), background .2s; }
.guide-tab svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.guide-tab b{ font-size:9.5px; font-weight:700; letter-spacing:.08em; color:#9CC8F0; }
.guide-tab:hover, .guide-tab:focus-visible{ transform:translateX(5px); background:var(--upp-primary); }
.guide-tab:hover b, .guide-tab:focus-visible b{ color:#fff; }
.guide-tab:focus-visible{ outline:2px solid var(--upp-primary); outline-offset:3px; }
@media (max-width:1250px){
  .guide-tab{ left:auto; right:22px; top:4px; width:auto; height:32px; padding:0 12px; flex-direction:row; gap:6px; border-radius:9px 9px 0 0; box-shadow:none; }
  .guide-tab span br{ display:none; } .guide-tab svg{ width:14px; height:14px; }
  .guide-tab:hover, .guide-tab:focus-visible{ transform:translateY(-3px); }
}
@media (prefers-reduced-motion: reduce){ .guide-tab{ transition:none; } }
