/* ═══ 디자인 클론 출처 ═══
   참조: https://bathcr.haengjipsaveteran.com/
   배경1~3: 흰색(#fff) / 연한 회색(#f8fafc) 섹션 교차, 다크 CTA 섹션 1개
   폰트: 'Pretendard' (본문/제목) + 'Space Grotesk' (영문 라벨/숫자), heading letter-spacing -0.02~-0.04em
   카드: border-radius 0(각짐), shadow none 기본 → hover 시에만 shadow 등장
   버튼: 거의 각진 형태(border-radius 2px), hover 시 배경 어둡게 + translateY(-1px) + shadow
   레이아웃: 4열/3열 그리드, max-width 1200px, gap 1.25~1.5rem, 섹션 세로 padding 120px(PC)/72px(모바일)
   헤더: 72px 고정, 반투명 흰색 + blur(20px), 스크롤 시 shadow 추가
   배경패턴: base-alt 섹션 교차
   Primary 컬러는 참조와 무관하게 랜덤 파스텔 고정: 파스텔 스틸블루 #A0C4D8
   ═══════════════════════ */

:root {
  --primary: #A0C4D8;
  --primary-text: #2d2d2d;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg-alt: #f8fafc;
  --header-h: 72px;
  --container: 1200px;
  --card-radius: 0px;
  --radius-sm: 2px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.14);
  --section-pad: 120px;
}
@media (max-width: 768px) {
  :root { --section-pad: 72px; }
}

* { box-sizing: border-box; }
body svg { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.125em; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  color: var(--text);
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.6;
  font-weight: 400;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.label-eng {
  font-family: 'Space Grotesk', 'Pretendard', sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--primary);
}
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-head p { color: var(--text-muted); font-weight: 300; margin-top: .75rem; }

/* ── FOUC 방지 인라인 스타일 대응 클래스(핵심 타이틀) ── */
h2.hero-title, h1.portfolio-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.3;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
}

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .22s ease;
}
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); filter: brightness(0.94); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--primary); }

/* ── ① Header ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); border-color: var(--border); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.site-header .logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.05rem; }
.site-header .logo img { height: 30px; width: 30px; }
.nav-menu { display: flex; align-items: center; gap: 1.75rem; font-weight: 500; font-size: .92rem; }
.nav-menu a:hover { color: var(--primary); }
.header-cta { display: flex; align-items: center; gap: .75rem; }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }
@media (max-width: 768px) {
  .nav-menu, .header-cta .btn-outline { display: none; }
  .hamburger { display: block; }
}
.mobile-menu { position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); display: none; flex-direction: column; padding: 1rem 1.25rem; gap: 1rem; z-index: 99; }
.mobile-menu.is-open { display: flex; }

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

/* ── ② 포트폴리오 섹션 ── */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 1024px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .portfolio-grid { grid-template-columns: 1fr; } }
.portfolio-grid.is-compact { grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; }
@media (max-width: 640px) { .portfolio-grid.is-compact { grid-template-columns: minmax(0, 340px); } }

.portfolio-card {
  border: 1px solid var(--border); border-radius: var(--card-radius);
  overflow: hidden; transition: all .3s ease; cursor: pointer; text-decoration: none; display: block; background: #fff;
}
.portfolio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.portfolio-card .card-thumb { aspect-ratio: 4/3; overflow: hidden; }
.portfolio-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.portfolio-card:hover .card-thumb img { transform: scale(1.05); }
.portfolio-card .card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; }
.card-badge { font-size: .65rem; font-weight: 700; letter-spacing: .08em; background: var(--primary); color: var(--primary-text); display: inline-block; padding: .2rem .6rem; border-radius: var(--radius-sm); align-self: flex-start; }
.card-title { font-weight: 800; font-size: 1rem; line-height: 1.4; color: var(--text); }
.card-sub { font-weight: 300; font-size: .875rem; color: var(--text-muted); display: flex; align-items: center; gap: .3rem; }
.card-more { font-size: .875rem; font-weight: 600; color: var(--text-muted); margin-top: .25rem; transition: color .3s ease; }
.portfolio-card:hover .card-more { color: var(--primary); }
.pin-icon { width: 13px; height: 13px; flex: none; }

/* ── ③ 서비스 카드 (G-4: BEFORE/AFTER + 번호배지 + 체크리스트 구조, 세로 리스트) ── */
.service-list { display: flex; flex-direction: column; gap: 1.5rem; }
.service-card {
  display: grid; grid-template-columns: 1fr 320px;
  border: 1px solid var(--border); border-radius: var(--card-radius);
  overflow: hidden; background: #fff; transition: all .3s ease; cursor: pointer;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--primary); }
@media (max-width: 1024px) { .service-card { grid-template-columns: 1fr 280px; } }
@media (max-width: 900px) { .service-card { grid-template-columns: 1fr; } }

.service-ba { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.service-ba figure { margin: 0; position: relative; aspect-ratio: 4/3; overflow: hidden; }
.service-ba img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.service-card:hover .service-ba img { transform: scale(1.04); }
.ba-tag { position: absolute; top: .6rem; left: .6rem; font-size: .65rem; font-weight: 700; letter-spacing: .06em; padding: .2rem .55rem; border-radius: var(--radius-sm); background: rgba(0,0,0,.55); color: #fff; z-index: 1; }
.service-ba .ba-arrow { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 28px; height: 28px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); z-index: 2; }

.service-info { padding: 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.service-num { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--primary); font-size: .95rem; }
.service-info h3 { font-size: 1.15rem; }
.service-info .service-desc { font-weight: 300; color: var(--text-muted); font-size: .9rem; }
.service-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; }
.service-check li { display: flex; align-items: center; gap: .45rem; }
.service-check svg { flex: none; width: 15px; height: 15px; color: var(--primary); }
.service-cta { margin-top: .25rem; font-weight: 700; font-size: .875rem; color: var(--text); transition: color .2s ease; }
.service-card:hover .service-cta { color: var(--primary); }

/* ── ④ Hero ── */
.hero { position: relative; min-height: 640px; display: flex; align-items: center; color: #fff; background-size: cover; background-position: center; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.40); }
.hero .container { position: relative; z-index: 1; }
.hero h2 { font-size: clamp(1.8rem, 4.2vw, 3rem); text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero .hero-sub { margin-top: 1rem; font-size: 1.05rem; font-weight: 300; text-shadow: 0 1px 8px rgba(0,0,0,.5); max-width: 560px; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-stats .stat b { font-size: 1.4rem; font-family: 'Space Grotesk', sans-serif; }
.hero-stats .stat span { display: block; font-size: .8rem; font-weight: 300; opacity: .9; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.25rem; flex-wrap: wrap; }

/* ── ④-1 시공 전·후 비교 ── */
.ba-compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 560px) { .ba-compare-grid { grid-template-columns: 1fr; } }
.ba-compare-card figure { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0; }
.ba-compare-card img { aspect-ratio: 4/3; object-fit: cover; }
.ba-compare-card figcaption { margin-top: .65rem; font-size: .875rem; color: var(--text-muted); font-weight: 300; }

/* ── ⑤ 프로세스 ── */
.process-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .process-row { grid-template-columns: 1fr; } }
.process-step { text-align: center; }
.process-step .step-num { width: 44px; height: 44px; margin: 0 auto .9rem; border-radius: 50%; background: var(--primary); color: var(--primary-text); display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.process-step h3 { font-size: 1rem; margin-bottom: .4rem; }
.process-step p { font-size: .875rem; color: var(--text-muted); font-weight: 300; }

/* ── ⑥ 회사소개 ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.about-stats .stat-box { text-align: center; border: 1px solid var(--border); padding: 1.5rem 1rem; border-radius: var(--card-radius); }
.about-stats .stat-box b { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; color: var(--primary); }
.about-stats .stat-box span { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }

/* ── ⑥-1 고객 후기 (참조: 무한 auto-scroll 마퀴 캐러셀) ── */
.reviews-track-wrap { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.reviews-track { display: flex; gap: 1.5rem; width: max-content; animation: reviews-scroll 55s linear infinite; }
.reviews-track-wrap:hover .reviews-track { animation-play-state: paused; }
@keyframes reviews-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.review-card { width: 300px; flex: none; border: 1px solid var(--border); border-radius: var(--card-radius); padding: 1.5rem; background: #fff; }
.review-stars { color: var(--primary); display: flex; gap: 2px; margin-bottom: .75rem; }
.review-stars svg { width: 15px; height: 15px; }
.review-text { font-size: .9rem; color: var(--text); margin-bottom: 1.1rem; line-height: 1.6; }
.review-meta { display: flex; align-items: center; gap: .6rem; }
.review-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--primary-text); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex: none; }
.review-name { font-size: .85rem; font-weight: 700; }
.review-loc { font-size: .78rem; color: var(--text-muted); }

/* ── ⑦ 서비스 지역 ── */
.areas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .areas-grid { grid-template-columns: 1fr; } }
.area-card { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 1.75rem; }
.area-card h3 { display: flex; align-items: center; gap: .4rem; font-size: 1.05rem; margin-bottom: .9rem; }
.area-card .area-list { font-size: .875rem; color: var(--text-muted); line-height: 2; font-weight: 300; }

/* ── ⑧ FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: .75rem; max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; }
.faq-q { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.3rem; cursor: pointer; font-weight: 700; font-size: .95rem; background: #fff; }
.faq-q .faq-num { font-family: 'Space Grotesk', sans-serif; color: var(--primary); flex: none; }
.faq-q .faq-caret { margin-left: auto; transition: transform .25s ease; flex: none; }
.faq-item.is-open .faq-caret { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; background: var(--bg-alt); }
.faq-item.is-open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 1.3rem 1.1rem 2.8rem; font-size: .875rem; color: var(--text-muted); font-weight: 300; }

/* ── ⑨ CTA ── */
.cta-section { background: #111827; color: #fff; padding: var(--section-pad) 0; }
.cta-section h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); text-align: center; }
.cta-badges { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin: 2rem 0; }
.cta-badges .badge { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: #cbd5e1; }
.cta-badges svg { width: 18px; height: 18px; color: var(--primary); }
.cta-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── ⑩ Footer ── */
.site-footer { background: #1e293b; color: #cbd5e1; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-grid h4 { color: #fff; font-size: .9rem; margin-bottom: 1rem; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.1rem; margin-bottom: .6rem; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; font-size: .85rem; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid #334155; margin-top: 3rem; padding-top: 1.5rem; font-size: .78rem; color: #94a3b8; line-height: 1.8; }

/* ── ⑪ Floating 버튼 ── */
.floating-wrap { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.floating-item { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--border); border-radius: 9999px; padding: .7rem 1.1rem; font-size: .82rem; font-weight: 700; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(10px) scale(.9); pointer-events: none; transition: all .25s ease; }
.floating-wrap.is-open .floating-item { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.floating-item svg { width: 16px; height: 16px; color: var(--primary); }
.floating-toggle { width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: var(--primary-text); border: none; box-shadow: var(--shadow-lg); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .25s ease; }
.floating-toggle svg { width: 22px; height: 22px; transition: transform .25s ease; }
.floating-wrap.is-open .floating-toggle svg { transform: rotate(135deg); }

/* ── 상세페이지 ── */
.detail-hero { position: relative; min-height: 420px; display: flex; align-items: flex-end; color: #fff; background-size: cover; background-position: center; }
.detail-hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.detail-hero .container { position: relative; z-index: 1; padding-bottom: 2.5rem; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; margin-bottom: 1rem; opacity: .9; }
.info-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--card-radius); padding: 1.5rem; margin-top: -3rem; position: relative; z-index: 2; }
@media (max-width: 768px) { .info-bar { grid-template-columns: 1fr 1fr; } }
.info-bar .info-item span { display: block; font-size: .75rem; color: var(--text-muted); margin-bottom: .3rem; }
.info-bar .info-item b { font-size: .95rem; }
.content-block { max-width: 760px; margin: 0 auto; }
.content-block p { margin-bottom: 1.1rem; color: var(--text); font-weight: 400; }
.content-block p:last-child { margin-bottom: 0; }
.ba-section { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .ba-section { grid-template-columns: 1fr; } }
.ba-col { border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; background: #fff; }
.ba-col figure { position: relative; margin: 0; }
.ba-col img { aspect-ratio: 4/3; object-fit: cover; width: 100%; display: block; }
.ba-col-text { padding: 1.25rem; }
.ba-col-text p { font-size: .9rem; color: var(--text-muted); font-weight: 300; }
.summary-box { background: var(--bg-alt); border-left: 4px solid var(--primary); border-radius: var(--card-radius); padding: 1.5rem 1.75rem; }
.summary-box ul { margin: 0; padding-left: 1.2rem; }
.summary-box li { margin-bottom: .5rem; font-size: .92rem; }
.quote-box { border-left: 4px solid var(--primary); padding: 0 0 0 1.5rem; }
.quote-box p { font-size: 1.02rem; font-style: normal; color: var(--text); margin-bottom: .9rem; }
.quote-box .quote-sign { font-size: .82rem; color: var(--text-muted); font-weight: 700; }
.related-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.related-links a { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1.2rem; font-size: .875rem; font-weight: 600; transition: all .2s ease; }
.related-links a:hover { border-color: var(--primary); color: var(--primary); }

/* ── NSEO 파생 페이지 ── */
.keyword-banner { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 2.5rem; text-align: center; background: var(--bg-alt); }

/* ── 사이트맵 페이지 ── */
.sitemap-search { max-width: 480px; margin: 0 auto 1.5rem; }
.sitemap-search input { width: 100%; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; }
.sitemap-cats { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.sitemap-cats button { border: 1px solid var(--border); background: #fff; padding: .5rem 1rem; border-radius: 9999px; font-size: .82rem; cursor: pointer; }
.sitemap-cats button.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.sitemap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 1024px) { .sitemap-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .sitemap-grid { grid-template-columns: repeat(2, 1fr); } }
.sitemap-grid a { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 1.1rem; font-size: .85rem; font-weight: 600; transition: all .2s ease; }
.sitemap-grid a:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ── 상담 페이지 ── */
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 640px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card { border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; }
.guide-card img { aspect-ratio: 4/3; object-fit: cover; }
.guide-card .guide-text { padding: 1.25rem; }
.guide-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.guide-card p { font-size: .85rem; color: var(--text-muted); font-weight: 300; }
.benefit-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) { .benefit-list { grid-template-columns: 1fr; } }
.benefit-item { text-align: center; }
.benefit-item svg { width: 28px; height: 28px; color: var(--primary); margin-bottom: .75rem; }

/* ── 애니메이션 ── */
.fade-in-up { opacity: 0; transform: translateY(30px); transition: .8s cubic-bezier(.16,1,.3,1); }
.fade-in-up.is-visible { opacity: 1; transform: translateY(0); }

/* ── 404 ── */
.error-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4rem 1rem; }
.error-page .error-code { font-family: 'Space Grotesk', sans-serif; font-size: 5rem; font-weight: 700; color: var(--primary); }
