:root {
  --navy: #14305c;
  --navy-soft: #e8eef8;
  --gold: #b8923a; /* 브랜드 금색 (큰 면·장식용) */
  --gold-text: #8c6a1c; /* 흰/회색 배경 위 금색 글씨 (대비 확보) */
  --gold-on-dark: #f0cd7a; /* 영상·어두운 배경 위 금색 글씨 */
  --sky: #eaf3fb;
  --cream: #fbf3df;
  --mint: #e6f4ea;
  --gray-bg: #f3f4f6;
  --line: #e5e7eb;
  --text: #1c2430;
  --muted: #5d6676;
  --radius: 16px;
  --header-h: 72px;
  /* 스크롤 등장 모션 설정 (여기서만 수정) */
  --reveal-duration: .7s;
  --reveal-distance: 28px;
  --reveal-stagger: .1s;
  --reveal-pair-delay: .15s; /* 텍스트·사진 짝에서 사진이 늦게 나오는 시간 */
  --hero-overlay: .22; /* 히어로 영상 위 어두운 막 진하기 (0~1) */
  --detail-duration: .35s; /* 상세 뷰 열림/닫힘 */
  --photo-fade: .35s; /* 사진 교체 크로스페이드 */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); background: #fff; line-height: 1.65;
  font-family: Pretendard, "Noto Sans KR", -apple-system, "Malgun Gothic", sans-serif;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1130px; margin: 0 auto; padding: 0 20px; }
section[id] { scroll-margin-top: var(--header-h); }

/* header */
.header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { height: 44px; width: auto; }
.nav { display: flex; gap: 26px; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.nav a { color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--navy); border-color: var(--navy); }
.nav .en { margin-left: 6px; font-size: 11px; font-weight: 500; letter-spacing: .06em; color: #a3abb9; transition: color .15s; }
.nav a:hover .en, .nav a.active .en { color: var(--muted); }
.header-right { display: flex; align-items: center; gap: 12px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 9px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--navy); margin: 6px 0; border-radius: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 15px; border: 1.5px solid var(--navy); cursor: pointer; transition: background .15s, color .15s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #0e2447; }
.btn-outline { background: #fff; color: var(--navy); }
.btn-outline:hover { background: var(--navy-soft); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* hero */
.hero { position: relative; padding-top: var(--header-h); min-height: min(86vh, 760px); display: flex; align-items: center; }
.hero-media { position: absolute; inset: var(--header-h) 0 0 0; overflow: hidden; background: #cfd3da; }
.hero-poster, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media video { opacity: 0; transition: opacity .6s ease-in-out; }
.hero-media video.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: rgba(8, 18, 38, var(--hero-overlay)); }
.hero-wrap { position: relative; padding-top: 48px; padding-bottom: 48px; display: flex; justify-content: center; }
.hero-card { width: 100%; max-width: 760px; text-align: center; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.hero-card-body { padding: 0 0 28px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--gold-text); margin-bottom: 12px; }
.hero .eyebrow { color: var(--gold-on-dark); text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.hero h1 { font-size: 40px; line-height: 1.25; color: #fff; font-weight: 800; }
.hero h1 span { display: block; font-size: 16px; letter-spacing: .18em; color: #fff; font-weight: 600; margin-top: 10px; }
.hero-sub { margin-top: 16px; color: #fff; font-weight: 500; font-size: 17px; }
.hero .btn-row { justify-content: center; }
.hero .btn { text-shadow: none; }
.hero .btn-primary { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn-primary:hover { background: var(--navy-soft); }
.hero .btn-outline { background: transparent; color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: rgba(255, 255, 255, .16); }
.hero-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; margin-top: 8px; }
.hero-strip b { color: var(--gold-on-dark); text-shadow: 0 1px 8px rgba(0, 0, 0, .35); letter-spacing: .04em; font-size: 14px; margin-right: 4px; }
.hero-strip span { border: 1px solid #fff; border-radius: 999px; padding: 6px 16px; font-size: 14px; font-weight: 500; color: #fff; background: transparent; }

/* 히어로 로드 시 순서대로 등장 */
.hero-seq { opacity: 0; animation: hero-in var(--reveal-duration) ease-out both; animation-delay: calc(.15s + var(--i, 0) * var(--reveal-stagger) * 2); }
@keyframes hero-in { from { opacity: 0; transform: translateY(var(--reveal-distance)); } to { opacity: 1; transform: none; } }

/* sections */
.section { padding: 96px 0; }
.section-gray { background: var(--gray-bg); }
.section-head { margin-bottom: 40px; }
.section h2 { font-size: 28px; line-height: 1.35; color: var(--navy); font-weight: 800; }
.section h2 em { font-style: normal; color: var(--gold); }
.lead { margin-top: 8px; color: var(--muted); }

/* listings (최신 매매 · 최신 임대 · 계약 사례 공통) */
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 56px 20px; border: 1px dashed #cfd4dc; border-radius: var(--radius); }
.lcard { display: block; background: #fff; color: inherit; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .2s ease-out, box-shadow .2s ease-out; }
.lcard:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
@media (hover: hover) { .lcard:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(20, 48, 92, .1); } }
.lcard-img { position: relative; aspect-ratio: 16 / 9; background: #d9dce1; }
.lcard-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.noimg { background: #eceef2; }
.noimg img, img.fb { object-fit: contain; padding: 8%; }
.badge { position: absolute; left: 12px; top: 12px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.lcard-body { padding: 18px 20px 22px; }
.lcard h3 { font-size: 17px; color: var(--text); }
.price { margin-top: 6px; font-size: 20px; font-weight: 800; color: var(--navy); }
.area { margin-top: 2px; font-size: 14px; color: var(--muted); }
.ldesc { margin-top: 10px; font-size: 14px; color: #3a4352; }

/* detail view (매물·사례 공용 전체화면 상세) */
html.lock, html.lock body { overflow: hidden; }
.detail { position: fixed; inset: 0; z-index: 100; background: #fff; overflow-y: auto; overscroll-behavior: contain; opacity: 0; transform: translateY(16px); transition: opacity var(--detail-duration) ease-out, transform var(--detail-duration) ease-out; }
.detail.open { opacity: 1; transform: none; }
.detail:focus { outline: none; }
.back-btn:focus-visible, .d-more:focus-visible, .g-thumb:focus-visible, .g-nav:focus-visible, .lb-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 8px; }
.lb-btn:focus-visible { outline-color: #fff; }
.detail-bar { position: sticky; top: 0; z-index: 3; height: 64px; background: #fff; border-bottom: 1px solid var(--line); }
.detail-bar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; padding: 10px 12px 10px 0; }
.back-btn svg, .lb-btn svg, .g-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.d-wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 80px; }
.d-wrap > * + * { margin-top: 32px; }
.g-stage { position: relative; aspect-ratio: 16 / 9; background: #eceef2; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.g-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--photo-fade) ease-out; }
.g-stage img.on { opacity: 1; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-count { position: absolute; right: 12px; bottom: 12px; background: rgba(10, 20, 40, .6); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.g-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.g-thumb { flex: none; width: 88px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #eceef2; cursor: pointer; opacity: .65; transition: opacity .2s ease-out; }
.g-thumb.on { border-color: var(--navy); opacity: 1; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-tag { display: inline-block; background: var(--navy-soft); color: var(--navy); font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.d-title { margin-top: 10px; font-size: 26px; line-height: 1.35; color: var(--navy); font-weight: 800; overflow-wrap: anywhere; }
.d-lead { margin-top: 8px; color: var(--muted); }
.d-priceline { margin-top: 16px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-price-label { color: var(--muted); font-size: 14px; }
.d-price { font-size: 28px; font-weight: 800; color: var(--navy); }
.d-h { font-size: 19px; color: var(--navy); font-weight: 800; margin-bottom: 14px; }
.d-info { margin: 0; border-top: 1px solid var(--navy); }
.d-row { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.d-row dt { color: var(--muted); font-weight: 600; }
.d-row dd { margin: 0; overflow-wrap: anywhere; }
.d-row-solo { grid-template-columns: 1fr; }
.d-desc { white-space: pre-line; overflow-wrap: anywhere; color: #2c3543; }
.d-desc.clamp { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.d-more { margin-top: 10px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.d-cta { background: var(--gray-bg); border-radius: var(--radius); padding: 28px 24px; }
.d-cta .d-h { margin-bottom: 6px; }
.d-cta p { color: var(--muted); }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 12, 20, .93); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; opacity: 0; transition: opacity var(--photo-fade) ease-out; }
.lightbox img.on { opacity: 1; }
.lb-btn { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-close { top: 16px; right: 16px; } .lb-prev { left: 12px; top: 50%; transform: translateY(-50%); } .lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }

/* 전화 안내 토스트 (PC에서 전화 버튼을 누르면 번호 복사 후 표시) */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; max-width: calc(100vw - 32px); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--navy); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 20px; border-radius: 999px; text-align: center; transition: opacity var(--detail-duration) ease-out, transform var(--detail-duration) ease-out; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tel-link { text-decoration: underline; text-underline-offset: 3px; }

/* 상세 화면 하단 고정 전화 버튼: 폰·좁은 화면에서만 */
.call-bar { display: none; }
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .call-bar { display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 110; padding: 16px; font-size: 16px; box-shadow: 0 8px 24px rgba(20, 48, 92, .28); opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity var(--detail-duration) ease-out, transform var(--detail-duration) ease-out; }
  .call-bar.show { opacity: 1; transform: none; pointer-events: auto; }
  .d-wrap { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* contact */
.contact-box { display: grid; grid-template-columns: 1fr 1fr; background: var(--gray-bg); border-radius: 20px; overflow: hidden; }
.contact-text { padding: 48px 44px; }
.contact-text h2 span { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; color: var(--muted); }
.info { margin: 24px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: 15px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.contact-img img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.map-box { margin-top: 24px; height: 320px; border-radius: 20px; overflow: hidden; background: var(--gray-bg); }
.map-box iframe { display: block; width: 100%; height: 100%; border: 0; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; background: #fff; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; gap: 20px; align-items: flex-start; }
.footer-logo { width: 44px; height: 44px; object-fit: contain; }
.footer-text p + p { margin-top: 2px; }
.footer-text strong { color: var(--text); }
.footer-text .copy { margin-top: 12px; font-size: 13px; }

/* responsive */
@media (max-width: 900px) {
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px 20px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .en { display: none; }
  .menu-toggle { display: block; }
  .socials { display: none; }
  .contact-box { grid-template-columns: 1fr; }
  .listing-grid { grid-template-columns: 1fr; }
  .d-row { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .hero h1 { font-size: 29px; }
  .hero-sub { font-size: 15px; }
  .hero-strip { max-width: 340px; margin-left: auto; margin-right: auto; }
  .hero-strip b { flex-basis: 100%; margin: 0; }
  .hero-strip span { font-size: 13px; padding: 6px 13px; }
  .contact-text { padding: 32px 24px; }
  .map-box { height: 240px; }
  .d-title { font-size: 22px; }
  .d-price { font-size: 24px; }
  .d-wrap { padding-top: 16px; padding-left: 16px; padding-right: 16px; }
  .g-thumb { width: 72px; }
  .brand-logo { height: 36px; }
}
/* scroll reveal: .reveal 클래스는 app.js가 붙인다 (JS가 없으면 처음부터 보임) */
.reveal { opacity: 0; transform: translateY(var(--reveal-distance)); transition: opacity var(--reveal-duration) ease-out, transform var(--reveal-duration) ease-out; transition-delay: calc(var(--i, 0) * var(--reveal-stagger) + var(--extra, 0s)); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-seq { opacity: 1; animation: none; }
  .detail, .g-stage img, .lightbox img, .lcard, .g-thumb, .toast, .call-bar { transition: none; }
  .lcard:hover { transform: none; }
}
