:root {
    --bg: #FDFCFB;
    --bg-sub: #F5F3F1;
    --gray: #4A4A4A;
    --accent: #C5A059;
    --text: #1A1A1A;
    --header-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* 여백/이미지 유틸리티 (인라인 스타일 대체) */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.my-16 { margin: 16px 0; }
.img-rounded { border-radius: 4px; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
[data-cols="2"] { --cols: 2; }
[data-cols="3"] { --cols: 3; }
[data-cols="4"] { --cols: 4; }
h1, h2, h3, h4 { font-weight: 700; margin: 0; }
h1 { font-size: 29px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section-sub { color: var(--gray); }
.section-label {
    color: var(--accent);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    margin: 0 0 8px;
}
.section-head { margin-bottom: 32px; }
.section-head h2 { margin-bottom: 8px; }
.bg-sub { background: var(--bg-sub); }

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.icon { width: 24px; height: 24px; }

/* 헤더 */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background .25s ease, border-color .25s ease;
}
.site-header.is-scrolled { background: var(--bg); border-bottom-color: var(--bg-sub); }
.header-inner {
    height: var(--header-h);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-text { font-weight: 700; font-size: 16px; }
.nav-pc { display: flex; align-items: center; gap: 28px; }
.btn-nav { min-height: 40px; }

.hamburger-btn {
    width: 44px; height: 44px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    background: none; border: 0; padding: 0; cursor: pointer;
}
.hamburger-btn span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.hamburger-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--bg-sub);
    display: flex; flex-direction: column;
    padding: 8px 24px 24px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 99;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav a { min-height: 44px; display: flex; align-items: center; font-weight: 700; border-bottom: 1px solid var(--bg-sub); }
.mobile-nav a:last-child { border-bottom: 0; margin-top: 12px; justify-content: center; }

main { padding-top: var(--header-h); }

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

/* 히어로 */
.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    align-items: flex-end;
    background-image: url('/images/KakaoTalk_20260728_195137889_01.webp');
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(26,26,26,.35) 0%, rgba(26,26,26,.75) 100%);
}
.hero-inner { position: relative; padding-top: 48px; padding-bottom: 48px; }
.hero h1 { margin-bottom: 16px; }
.hero p { margin-bottom: 24px; }
.hero .hero-sub { font-weight: 700; margin-bottom: 8px; }

/* 카드 그리드 공통 */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}
.card img { border-radius: 4px 4px 0 0; }
.card-body { padding: 16px; }
.card-body h3 { margin-bottom: 8px; }

/* Before & After */
.ba-card .ba-images { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.ba-images figure { margin: 0; position: relative; overflow: hidden; }
.ba-images img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.ba-tag {
    position: absolute; top: 10px;
    padding: 4px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .04em;
    box-shadow: 0 4px 12px -4px rgba(26,26,26,.35);
}
.ba-before { left: 10px; background: rgba(26,26,26,.78); color: #fff; }
.ba-after { right: 10px; background: var(--accent); color: #fff; }
.ba-card .case-tag {
    display: inline-block; padding: 4px 12px; border-radius: 6px;
    background: var(--bg-sub); color: var(--accent);
    font-size: 12px; font-weight: 700;
}
.ba-card .card-body h3 { margin-top: 10px; }

/* 체크리스트 카드 */
.check-card { background: var(--bg-sub); border-radius: 4px; padding: 24px; display: flex; gap: 16px; align-items: flex-start; }
.check-card p { margin: 0; }

/* 서비스 카드 */
.service-card { position: relative; display: block; border-radius: 4px; overflow: hidden; }
.service-card .card-img-wrap { overflow: hidden; }
.service-card .card-img-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.service-card img { transition: transform .4s ease; }
.service-card:hover img { transform: scale(1.06); }
.service-card .arrow-indicator {
    position: absolute; right: 16px; bottom: 16px;
    width: 40px; height: 40px;
    box-shadow: 0 2px 8px rgba(26,26,26,.2);
    border-radius: 50%;
}

/* 비교 카드 (자재/공법) */
.compare-card { background: var(--bg-sub); border-radius: 4px; padding: 24px; }
.compare-card .icon { margin-bottom: 16px; }

/* 포트폴리오(시공사례) 카드 - 호버 오버레이 + 텍스트 슬라이드업 */
.portfolio-card { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 4/3; }
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-card .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(26,26,26,.85) 0%, rgba(26,26,26,0) 55%);
    display: flex; align-items: flex-end;
    padding: 20px;
}
.portfolio-card .overlay h3 {
    color: #fff;
    transition: transform .35s ease;
}

/* About us 강점 카드 */
.strength-card { text-align: left; }
.strength-card .icon-badge {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-sub); border-radius: 4px;
    margin-bottom: 16px;
}
.strength-card .icon-badge img { width: 24px; height: 24px; }

/* FAQ 아코디언 (native <details> - 닫힘 상태는 콘텐츠 자체가 렌더되지 않아 border 잔상 문제 없음) */
.faq-item { border-top: 1px solid var(--bg-sub); }
.faq-item:last-child { border-bottom: 1px solid var(--bg-sub); }
.faq-item summary {
    list-style: none;
    padding: 20px 32px 20px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    font-weight: 700;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "";
    position: absolute; right: 4px; top: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item .faq-a { padding: 0 0 20px; color: var(--gray); }

/* 사이트맵 페이지 목록 */
.sitemap-list { display: flex; flex-direction: column; gap: 12px; }
.sitemap-list li a {
    display: block;
    background: var(--bg-sub);
    border-radius: 4px;
    padding: 16px 20px;
    color: var(--text);
    font-weight: 700;
}

/* 스크롤 스냅 슬라이더 (모바일 전용, 767px 이하에서 활성화) */
.snap-track { display: flex; gap: 16px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.dot {
    -webkit-appearance: none; appearance: none;
    border: 0; padding: 0; margin: 0;
    width: 8px; height: 8px; border-radius: 50%; background: rgba(26,26,26,.2);
}
.dot.is-active { background: var(--accent); }

footer.site-footer { background: var(--gray); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-info p { margin: 0 0 4px; color: rgba(255,255,255,.7); font-size: 14px; }
.footer-company { color: #fff !important; font-weight: 700; font-size: 16px !important; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { display: flex; align-items: center; gap: 6px; min-height: 44px; color: rgba(255,255,255,.85); font-size: 14px; }

.consult-cta { text-align: center; }
.consult-cta .cta-buttons { justify-content: center; }

/* ===== 모바일 (767px 이하) ===== */
@media (max-width: 767px) {
    .nav-pc { display: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

    .snap-scroll { display: block; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .snap-scroll::-webkit-scrollbar { display: none; }
    .snap-scroll .snap-track { flex-wrap: nowrap; }
    .snap-scroll .snap-item { flex: 0 0 100%; scroll-snap-align: start; }
    .snap-scroll .snap-item.peek { flex: 0 0 85%; }
    .snap-scroll .dots { position: sticky; left: 0; width: 100%; }
}

/* ===== 데스크톱 ===== */
@media (min-width: 768px) {
    .hamburger-btn { display: none; }
    h1 { font-size: 40px; }
    h2 { font-size: 28px; }
    h3 { font-size: 20px; }
    .hero { min-height: 720px; }
    .header-inner, .container { padding: 0 40px; }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .snap-scroll .snap-track { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); }
    .snap-scroll { overflow: visible; }
    .snap-scroll .dots { display: none; }

    .portfolio-card .overlay h3 { transform: translateY(140%); }
    .portfolio-card:hover .overlay h3,
    .portfolio-card:focus-within .overlay h3 { transform: translateY(0); }
}
