/* ===== 변수 & 리셋 ===== */
:root {
    --bg: #FDFCF8;
    --bg-sub: #E5E5E5;
    --accent-1: #94A3B8;
    --accent-2: #334155;
    --text: #2C2C2C;
    --space-side: 24px;
    --space-section: 48px;
    --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--space-side); }

h1 { font-size: 29px; font-weight: 700; line-height: 1.3; }
h2 { font-size: 22px; font-weight: 700; line-height: 1.35; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.4; }

.section-eyebrow { font-size: 14px; font-weight: 700; color: var(--accent-2); letter-spacing: .02em; margin-bottom: 8px; }
.section-sub { font-size: 15px; font-weight: 400; color: var(--accent-2); margin-top: 8px; }

section { padding: var(--space-section) 0; }
.bg-sub { background: var(--bg-sub); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-btn { width: 20px; height: 20px; }
.icon-nav { width: 20px; height: 20px; }

/* fade-in */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.is-visible { opacity: 1; transform: none; }

/* ===== 버튼 / CTA ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 999px;
    font-size: 16px; font-weight: 700; border: 2px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--accent-2); color: var(--bg); }
.btn-outline { background: transparent; color: var(--accent-2); border-color: var(--accent-2); }
.cta-header .btn-primary { background: var(--bg); color: var(--accent-2); border-color: var(--accent-2); }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-group.center { justify-content: center; }

/* ===== 헤더 ===== */
.site-header {
    position: sticky; top: 0; z-index: 50; background: rgba(253,252,248,.92);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--bg-sub);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--accent-2); }
.logo img { border-radius: 8px; }

.nav-desktop { display: none; align-items: center; gap: 28px; }
.nav-desktop a { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.nav-desktop a:hover { color: var(--accent-2); }

.header-mobile-actions { display: flex; align-items: center; gap: 10px; }
.hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 999px; border: none; background: var(--bg-sub); color: var(--accent-2);
}

.mobile-menu {
    max-height: 0; overflow: hidden; background: var(--bg);
    border-bottom: 1px solid var(--bg-sub);
    transition: max-height .35s ease;
}
.mobile-menu.is-open { max-height: 320px; }
.mobile-menu a {
    display: flex; align-items: center; gap: 10px; padding: 14px var(--space-side);
    font-weight: 600; border-top: 1px solid var(--bg-sub); min-height: 44px;
}

/* ===== 히어로 ===== */
.hero { position: relative; padding: 72px 0; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: rgba(253,252,248,.15); }
.hero-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero h1 { font-size: 32px; }
.hero .hero-copy { font-size: 16px; color: var(--accent-2); max-width: 34em; }
.hero .cta-group { margin-top: 12px; }

@media (max-width: 767px) {
    .hero { padding: 0 0 40px; }
    .hero-bg { position: static; height: 260px; background-size: cover; background-position: center; }
    .hero-overlay { display: none; }
    .hero-inner { padding: 28px var(--space-side) 0; text-align: left; align-items: flex-start; }
}

/* PC 히어로: 사진이 어두워 밝은 글자색으로 대비 확보 */
@media (min-width: 768px) {
    .hero h1 { color: var(--bg); }
    .hero .hero-copy { color: var(--bg); }
}

/* ===== Before/After 슬라이더 ===== */
.ba-card {
    position: relative; width: 100%; max-width: 560px; margin: 28px auto 0;
    aspect-ratio: 5 / 3; border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 8px 24px rgba(44,44,44,.12);
}
.ba-slider { position: relative; width: 100%; height: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ba-slider img { -webkit-user-drag: none; }
.ba-before, .ba-after { position: absolute; inset: 0; }
.ba-before img, .ba-after img { width: 100%; height: 100%; object-fit: cover; }
.ba-after { width: 50%; overflow: hidden; border-right: 2px solid var(--bg); }
.ba-after img { width: var(--ba-img-w, 560px); max-width: none; height: 100%; }
.ba-label { position: absolute; top: 12px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(51,65,85,.75); color: var(--bg); }
.ba-label-before { right: 12px; }
.ba-label-after { left: 12px; }
.ba-handle {
    position: absolute; top: 0; bottom: 0; left: 50%; width: 44px; height: 44px; top: 50%;
    transform: translate(-50%, -50%); border-radius: 999px; background: var(--bg);
    display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.25);
    cursor: ew-resize; color: var(--accent-2);
}
.ba-hint { text-align: center; font-size: 14px; color: var(--accent-2); margin-top: 12px; }

/* ===== 서비스 카드 ===== */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 28px; }
.service-card {
    position: relative; display: block; background: #fff; border-radius: var(--radius);
    overflow: hidden; box-shadow: 0 4px 14px rgba(44,44,44,.08); transition: transform .25s ease;
}
.service-card:hover { transform: translateY(-4px); }
.service-card .card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.service-card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.service-card:hover .card-media img { transform: scale(1.06); }
.card-link-indicator {
    position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 999px;
    background: rgba(253,252,248,.92); color: var(--accent-2); display: flex; align-items: center; justify-content: center;
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.card-body h3 { margin: 0; }
.card-body p { font-size: 14px; color: var(--accent-2); }

/* 시공사례 카드는 클릭 불가 — 링크 인디케이터 없음 */
.case-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 14px rgba(44,44,44,.08); }
.case-card .card-media { aspect-ratio: 4/3; overflow: hidden; }
.case-card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.case-card .card-body { padding: 16px 20px; }

/* ===== 모바일 가로 스와이프 (Pain Points / Why Us / About) ===== */
.swipe-wrap { margin-top: 28px; }
.swipe-track {
    display: flex; gap: 16px;
}
@media (max-width: 767px) {
    .swipe-track {
        overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .swipe-track::-webkit-scrollbar { display: none; }
    .swipe-track > * { flex: 0 0 100%; scroll-snap-align: start; }
}
@media (min-width: 768px) {
    .swipe-track { display: grid; grid-template-columns: repeat(3, 1fr); }
}
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--bg-sub); }
.dot.is-active { background: var(--accent-2); }
.bg-sub .dot { background: var(--bg); }
.bg-sub .dot.is-active { background: var(--accent-2); }
@media (min-width: 768px) { .dots { display: none; } }

.info-card { background: #fff; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 4px 14px rgba(44,44,44,.06); height: 100%; }
.info-card .icon-wrap { width: 48px; height: 48px; border-radius: 999px; background: var(--bg-sub); display: flex; align-items: center; justify-content: center; color: var(--accent-2); }
.info-card p { font-size: 14px; color: var(--accent-2); }

/* ===== FAQ 아코디언 ===== */
.faq-list { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border-radius: var(--radius); overflow: hidden; }
.faq-q {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 20px; min-height: 44px; text-align: left; background: none; border: none; font-size: 16px; font-weight: 700; color: var(--text);
}
.faq-q .icon { transition: transform .25s ease; }
.faq-item.is-open .faq-q .icon { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.is-open .faq-a { max-height: 320px; }
.faq-a p { padding: 0 20px 18px; font-size: 15px; color: var(--accent-2); }

/* ===== 상담 문의 CTA 섹션 ===== */
.consult-cta { background: var(--accent-2); color: var(--bg); text-align: center; }
.consult-cta h2 { color: var(--bg); margin-top: 4px; }
.consult-cta .section-eyebrow { color: var(--accent-1); }
.consult-cta .section-sub { color: var(--bg-sub); }
.consult-cta .cta-group { justify-content: center; margin-top: 20px; }
.consult-cta .btn-primary { background: var(--bg); color: var(--accent-2); }
.consult-cta .btn-outline { border-color: var(--bg); color: var(--bg); }

/* ===== 푸터 ===== */
.site-footer { background: var(--bg-sub); padding: 32px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 20px; }
.footer-brand { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.footer-info p { font-size: 14px; color: var(--accent-2); margin: 2px 0; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; min-height: 44px; }

/* ===== 상세페이지 공통 ===== */
.detail-hero { padding: 40px 0 8px; }
.detail-hero h1 { font-size: 26px; }
.detail-body { display: flex; flex-direction: column; gap: 16px; }
.detail-body p { font-size: 16px; }
.detail-body img { border-radius: var(--radius); margin: 8px 0; }
.detail-section { padding-top: var(--space-section); }
.detail-list { display: flex; flex-direction: column; gap: 12px; }
.detail-list li { display: flex; gap: 12px; background: #fff; border-radius: var(--radius); padding: 16px 18px; font-size: 15px; }
.detail-list li .icon { color: var(--accent-2); margin-top: 2px; }
.process-steps { display: flex; flex-direction: column; gap: 0; counter-reset: step; }
.process-steps li {
    position: relative; padding: 16px 0 16px 44px; border-bottom: 1px solid var(--bg-sub);
}
.process-steps li:before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: 14px; width: 28px; height: 28px; border-radius: 999px;
    background: var(--accent-2); color: var(--bg); font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td { border: 1px solid var(--bg-sub); padding: 10px 12px; text-align: left; }
.compare-table th { background: var(--bg-sub); }

/* ===== 상세페이지 부가 요소(구성요소별) ===== */
.detail-extra { margin-top: 20px; }
.table-scroll { overflow-x: auto; margin-top: 20px; }
.section-center { text-align: center; }
.cta-wrap { margin-top: 20px; }
.detail-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.detail-facts li { background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--accent-2); font-weight: 600; }

/* ===== 사이트맵 페이지 ===== */
.sitemap-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sitemap-list a {
    display: flex; align-items: center; justify-content: space-between; min-height: 44px;
    padding: 12px 16px; background: #fff; border-radius: var(--radius); font-weight: 600;
}
.sitemap-group-title { margin-top: 32px; }
.sitemap-group-title:first-child { margin-top: 0; }

/* ===== PC 레이아웃 ===== */
@media (min-width: 768px) {
    :root { --space-section: 96px; }
    h1 { font-size: 48px; }
    h2 { font-size: 32px; }
    h3 { font-size: 20px; }
    .nav-desktop { display: flex; }
    .header-mobile-actions { display: none; }
    .hero h1 { font-size: 48px; }
    .hero .hero-copy { font-size: 18px; }
    .card-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
    .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
