/* === RESET + CWV === */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%}
/* 1. SPEED: System font stack — NO Pretendard CDN = 0KB font load */
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans KR","Helvetica Neue",sans-serif;font-size:1rem;line-height:1.7;color:#1a1a2e;background:#f8f9fc;-webkit-font-smoothing:antialiased;padding-bottom:96px;min-height:100vh}
img{max-width:100%;height:auto;display:block;border-radius:12px}
a{color:#2563eb;text-decoration:none;transition:color .2s;min-height:44px;display:inline-flex;align-items:center}
a:hover{color:#1d4ed8}
button{cursor:pointer;font-family:inherit}
ul,ol{list-style:none}

/* === LAYOUT === */
.container{max-width:960px;margin:0 auto;padding:0 20px}

/* === HEADER (landmark: already <header>) === */
.site-header{position:sticky;top:0;z-index:100;background:rgba(255,255,255,.97);backdrop-filter:blur(12px);border-bottom:1px solid #e5e7eb;padding:12px 0}
.site-header .container{display:flex;align-items:center;justify-content:space-between}
.logo{font-size:1.15rem;color:#1a1a2e;display:flex;align-items:center;gap:8px;min-height:44px}
.logo strong{font-weight:800}
.main-nav{display:none;gap:20px;align-items:center}
.main-nav a{color:#4b5563;font-size:.88rem;font-weight:500;min-height:44px;display:flex;align-items:center;padding:0 4px}
.main-nav a:hover{color:#1a1a2e}
.nav-cta{background:#2563eb;color:#fff !important;padding:8px 18px;border-radius:8px;font-weight:600;min-height:44px}
.nav-cta:hover{background:#1d4ed8}
.menu-toggle{display:flex;flex-direction:column;gap:5px;background:none;border:none;padding:10px;min-width:44px;min-height:44px;align-items:center;justify-content:center}
.menu-toggle span{display:block;width:22px;height:2px;background:#1a1a2e;border-radius:2px;transition:.3s}
.menu-toggle[aria-expanded="true"] span:nth-child(1){transform:rotate(45deg) translate(5px,5px)}
.menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.menu-toggle[aria-expanded="true"] span:nth-child(3){transform:rotate(-45deg) translate(5px,-5px)}
.main-nav.open{display:flex;flex-direction:column;position:fixed;top:56px;left:0;right:0;bottom:0;background:#fff;padding:32px 24px;gap:8px;z-index:99}
.main-nav.open a{font-size:1.1rem;padding:12px 0;min-height:48px;border-bottom:1px solid #f3f4f6}
.main-nav.open .nav-cta{text-align:center;margin-top:16px;border-bottom:none;border-radius:12px;padding:16px}

/* === HERO === */
.hero{background:linear-gradient(135deg,#1e3a5f 0%,#0f172a 100%);color:#fff;padding:48px 0 56px;text-align:center}
.hero h1{font-size:1.55rem;font-weight:800;line-height:1.4;margin-bottom:16px}
.hero h1 em{font-style:normal;color:#60a5fa}
.hero-sub{font-size:.95rem;color:#cbd5e1;max-width:640px;margin:0 auto 28px}
.hero-cta{display:inline-flex;align-items:center;justify-content:center;background:#f59e0b;color:#1a1a2e;font-weight:700;padding:14px 32px;border-radius:12px;font-size:1rem;box-shadow:0 4px 16px rgba(245,158,11,.3);transition:transform .2s,box-shadow .2s;min-height:48px}
.hero-cta:hover{transform:translateY(-2px);box-shadow:0 6px 24px rgba(245,158,11,.4);color:#1a1a2e}

/* === CATEGORY NAV === */
.cat-nav{padding:28px 0 8px}
.cat-nav h2{font-size:1.2rem;font-weight:700;margin-bottom:16px}
.cat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.cat-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:18px 10px;text-align:center;font-size:.85rem;font-weight:600;color:#374151;transition:all .2s;min-height:48px}
.cat-link:hover{border-color:#2563eb;color:#2563eb;box-shadow:0 4px 12px rgba(37,99,235,.1)}
.cat-icon{font-size:1.6rem}

/* === BREADCRUMB === */
.breadcrumb{padding:12px 0;font-size:.85rem;color:#6b7280}
.breadcrumb a{color:#6b7280;min-height:auto;padding:4px 0}
.breadcrumb a:hover{color:#2563eb}

/* === SECTION === */
.section{padding:32px 0}
.section h2{font-size:1.2rem;font-weight:700;margin-bottom:20px}
.section-desc{font-size:.9rem;color:#6b7280;margin-bottom:20px}

/* === PROPERTY CARDS === */
.card-grid{display:grid;gap:16px}
.card-link{display:block;text-decoration:none;color:inherit;border-radius:16px;overflow:hidden;background:#fff;border:1px solid #f3f4f6;box-shadow:0 2px 12px rgba(0,0,0,.06);transition:box-shadow .3s,transform .2s;min-height:auto}
.card-link:hover{box-shadow:0 8px 32px rgba(0,0,0,.12);transform:translateY(-3px);color:inherit}
.card-img{width:100%;height:200px;object-fit:cover;border-radius:0}
.card-img-placeholder{width:100%;height:200px;background:linear-gradient(135deg,#1e293b,#334155);display:flex;align-items:center;justify-content:center;font-size:2.5rem;border-radius:0;color:#fff;text-shadow:2px 2px 6px rgba(0,0,0,.9)}
.card-body{padding:16px 18px 20px}
.card-body h3{font-size:1.05rem;font-weight:700;margin-bottom:6px;line-height:1.4;color:#1a1a2e}
.card-meta{font-size:.83rem;color:#6b7280;margin-bottom:10px}
.card-specs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.card-specs span{background:#f1f5f9;color:#475569;font-size:.8rem;padding:3px 10px;border-radius:6px;font-weight:500}
.card-price{font-size:1rem;font-weight:700;color:#dc2626;margin-bottom:4px}

/* 2. ACCESSIBILITY: Badge contrast fix — 4.5:1 ratio */
.badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:6px;font-size:.78rem;font-weight:700;color:#fff;margin-bottom:8px;min-height:auto}
.badge-selling{background:#16a34a}
.badge-upcoming{background:#1e40af;color:#fff}
.badge-closing{background:#dc2626}

/* === DETAIL PAGE === */
.detail-hero{background:linear-gradient(135deg,#0f172a 0%,#1e3a5f 100%);color:#fff;padding:36px 0 44px}
.detail-hero h1{font-size:1.45rem;font-weight:800;line-height:1.4;margin-bottom:8px}
.detail-location{font-size:.9rem;color:#94a3b8;margin-bottom:20px}
.detail-specs{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:20px}
.spec-box{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);padding:14px;border-radius:12px}
.spec-box strong{display:block;font-size:.78rem;color:#94a3b8;font-weight:500;margin-bottom:4px}
.spec-box span{font-size:1.02rem;font-weight:700}
.detail-photos{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:24px}
.photo-placeholder{width:100%;height:200px;background:linear-gradient(135deg,#1e293b,#334155);border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:.9rem;font-weight:600;text-align:center;padding:16px;text-shadow:2px 2px 6px rgba(0,0,0,.9)}
.detail-content{padding:36px 0}
.detail-content h2{font-size:1.15rem;font-weight:700;margin-bottom:12px;color:#1e40af}
.detail-content h3{font-size:1.02rem;font-weight:700;margin:24px 0 10px;color:#1a1a2e}
.detail-content p{font-size:.95rem;color:#374151;margin-bottom:14px}
.detail-content ul{padding-left:20px;margin-bottom:16px}
.detail-content ul li{font-size:.93rem;color:#374151;padding:4px 0;list-style:disc}
.detail-cta-box{background:linear-gradient(135deg,#1e40af,#7c3aed);color:#fff;padding:32px 24px;border-radius:16px;text-align:center;margin:32px 0}
.detail-cta-box h3{font-size:1.1rem;font-weight:700;margin-bottom:8px}
.detail-cta-box p{font-size:.9rem;color:#ddd6fe;margin-bottom:20px}
.detail-cta-btn{display:inline-flex;align-items:center;justify-content:center;background:#f59e0b;color:#1a1a2e;font-weight:700;padding:14px 32px;border-radius:12px;font-size:1rem;min-height:48px}
.detail-cta-btn:hover{color:#1a1a2e}

/* === FAQ === */
.faq-list{display:flex;flex-direction:column;gap:10px}
.faq-item{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden}
.faq-item[open]{border-color:#2563eb}
.faq-item summary{padding:16px 44px 16px 18px;font-size:.95rem;font-weight:600;cursor:pointer;min-height:44px;list-style:none;position:relative;color:#1a1a2e}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:'+';position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:1.4rem;color:#6b7280;font-weight:300}
.faq-item[open] summary::after{content:'−'}
.faq-answer{padding:0 18px 16px;font-size:.9rem;color:#4b5563}

/* === FOOTER (landmark: already <footer>) === */
.site-footer{background:#0f172a;color:#94a3b8;padding:32px 0;font-size:.85rem;text-align:center}
.site-footer p{margin-bottom:10px}
.footer-links a{color:#94a3b8;min-height:auto;padding:4px 0}
.footer-links a:hover{color:#e2e8f0}
.footer-copy{color:#64748b;font-size:.8rem}

/* === DESKTOP === */
@media(min-width:768px){
  .menu-toggle{display:none}
  .main-nav{display:flex !important;position:static;background:transparent;padding:0}
  .main-nav a{font-size:.88rem;padding:0 4px;border-bottom:none}
  .hero{padding:64px 0 72px}
  .hero h1{font-size:2.1rem}
  .cat-grid{grid-template-columns:repeat(6,1fr)}
  .card-grid{grid-template-columns:repeat(2,1fr)}
  .detail-hero h1{font-size:1.9rem}
  .detail-specs{grid-template-columns:repeat(4,1fr)}
  .detail-photos{grid-template-columns:repeat(3,1fr)}
}
@media(min-width:1024px){
  .container{max-width:1080px}
  .card-grid{grid-template-columns:repeat(3,1fr)}
}

/* === PRICE SIMULATOR === */
.simulator{background:#fff;border:2px solid #2563eb;border-radius:16px;padding:24px;margin:32px 0}
.simulator h3{font-size:1.1rem;font-weight:700;margin-bottom:16px;color:#1e40af}
.sim-row{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.sim-row label{font-size:.88rem;font-weight:600;color:#374151}
.sim-row input,.sim-row select{width:100%;padding:12px 14px;border:1px solid #d1d5db;border-radius:10px;font-size:1rem;min-height:44px;font-family:inherit}
.sim-row input:focus,.sim-row select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
.sim-result{background:#eff6ff;border-radius:12px;padding:20px;text-align:center;margin-top:16px}
.sim-result .monthly{font-size:1.8rem;font-weight:800;color:#2563eb}
.sim-result .monthly-label{font-size:.85rem;color:#6b7280;margin-top:4px}
.sim-result .breakdown{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;text-align:left}
.sim-result .breakdown dt{font-size:.8rem;color:#6b7280}
.sim-result .breakdown dd{font-size:.95rem;font-weight:700;color:#1a1a2e}
.sim-btn{width:100%;padding:14px;background:#2563eb;color:#fff;border:none;border-radius:12px;font-size:1rem;font-weight:700;min-height:48px;margin-top:12px}
.sim-btn:hover{background:#1d4ed8}

/* === COMPARISON TABLE === */
.comparison{margin:32px 0}
.comparison h3{font-size:1.1rem;font-weight:700;margin-bottom:16px;color:#1e40af}
.comp-table{width:100%;border-collapse:collapse;font-size:.88rem;background:#fff;border-radius:12px;overflow:hidden;border:1px solid #e5e7eb}
.comp-table th{background:#f1f5f9;padding:12px 10px;text-align:left;font-weight:600;font-size:.82rem;color:#475569;border-bottom:2px solid #e5e7eb}
.comp-table td{padding:11px 10px;border-bottom:1px solid #f3f4f6;vertical-align:top;color:#374151}
.comp-table tr:hover td{background:#f8fafc}
.comp-table .highlight{background:#eff6ff;font-weight:700;color:#1e40af}
.comp-table .highlight td{background:#eff6ff}

/* === TIMELINE === */
.timeline{margin:32px 0}
.timeline h3{font-size:1.1rem;font-weight:700;margin-bottom:20px;color:#1e40af}
.tl-list{position:relative;padding-left:28px}
.tl-list::before{content:'';position:absolute;left:9px;top:6px;bottom:6px;width:2px;background:#d1d5db}
.tl-item{position:relative;padding-bottom:24px}
.tl-item:last-child{padding-bottom:0}
.tl-item::before{content:'';position:absolute;left:-28px;top:4px;width:20px;height:20px;border-radius:50%;background:#2563eb;border:3px solid #fff;box-shadow:0 0 0 2px #2563eb}
.tl-item.done::before{background:#22c55e;box-shadow:0 0 0 2px #22c55e}
.tl-item.current::before{background:#f59e0b;box-shadow:0 0 0 2px #f59e0b;animation:pulse 1.5s infinite}
@keyframes pulse{0%,100%{box-shadow:0 0 0 2px #f59e0b}50%{box-shadow:0 0 0 6px rgba(245,158,11,.3)}}
.tl-date{font-size:.82rem;font-weight:700;color:#2563eb;margin-bottom:2px}
.tl-item.done .tl-date{color:#22c55e}
.tl-item.current .tl-date{color:#f59e0b}
.tl-title{font-size:.95rem;font-weight:600;color:#1a1a2e}
.tl-desc{font-size:.85rem;color:#6b7280;margin-top:2px}

/* === NEIGHBORHOOD === */
.neighborhood{margin:32px 0}
.neighborhood h3{font-size:1.1rem;font-weight:700;margin-bottom:16px;color:#1e40af}
.nb-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.nb-item{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:14px;display:flex;align-items:flex-start;gap:10px;min-height:44px}
.nb-icon{font-size:1.4rem;flex-shrink:0;width:36px;height:36px;display:flex;align-items:center;justify-content:center}
.nb-info{flex:1}
.nb-info strong{display:block;font-size:.88rem;font-weight:600;color:#1a1a2e;margin-bottom:2px}
.nb-info span{font-size:.8rem;color:#6b7280}

/* === EXPERT QUOTE === */
.expert-quote{background:linear-gradient(135deg,#0f172a,#1e3a5f);color:#fff;border-radius:16px;padding:28px 24px;margin:32px 0;position:relative}
.expert-quote::before{content:'"';position:absolute;top:8px;left:16px;font-size:4rem;color:rgba(255,255,255,.1);font-family:Georgia,serif;line-height:1}
.expert-quote h3{font-size:.85rem;font-weight:600;color:#60a5fa;margin-bottom:12px;text-transform:uppercase;letter-spacing:.5px}
.expert-quote p{font-size:1rem;font-weight:600;line-height:1.7;margin-bottom:8px}
.expert-quote .expert-name{font-size:.82rem;color:#94a3b8;font-weight:400;margin-top:12px}

/* === ALERT CTA === */
.alert-cta{background:#fefce8;border:2px solid #fde68a;border-radius:16px;padding:24px;margin:32px 0;text-align:center}
.alert-cta h3{font-size:1.05rem;font-weight:700;color:#92400e;margin-bottom:8px}
.alert-cta p{font-size:.9rem;color:#78350f;margin-bottom:16px}
.alert-cta-btn{display:inline-flex;align-items:center;justify-content:center;background:#f59e0b;color:#fff;font-weight:700;padding:14px 32px;border-radius:12px;font-size:1rem;min-height:48px}
.alert-cta-btn:hover{background:#d97706;color:#fff}

/* === CWV: content-visibility + touch === */
.site-footer,.faq-list,.detail-cta-box,.comparison,.timeline{content-visibility:auto;contain-intrinsic-size:auto 300px}
a,button,summary,.card-link,.badge,.sim-btn,.alert-cta-btn{touch-action:manipulation}

@media(min-width:768px){
  .sim-row{flex-direction:row;align-items:center;gap:12px}
  .sim-row label{min-width:120px;margin-bottom:0}
  .nb-grid{grid-template-columns:repeat(4,1fr)}
}
