/* ===== 토큰 ===== */
:root {
	--bg: #F8FAFC;
	--bg-sub: #D9D9CE;
	--violet: #7C3AED;
	--orange: #F97316;
	--text: #1A202C;
	--radius: 12px;
	--gap-section: 48px;
	--pad-x: 24px;
}

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

h1, h2, h3, h4 { font-weight: 700; margin: 0; }
h1 { font-size: 29px; line-height: 1.35; }
h2 { font-size: 22px; line-height: 1.4; }
h3 { font-size: 18px; line-height: 1.45; }
p { font-size: 16px; line-height: 1.6; margin: 0 0 12px; }

.section-head { margin-bottom: 32px; }
.section-head h2 { font-weight: 700; }
.section-head .subtitle { font-weight: 400; color: #4A5568; margin-top: 8px; font-size: 16px; }

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

/* ===== 버튼 ===== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: var(--radius);
	font-weight: 700;
	font-size: 16px;
	border: none;
	cursor: pointer;
}
.btn-primary { background: var(--violet); color: #fff; }
.btn-outline { background: #fff; color: var(--violet); border: 1.5px solid var(--violet); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.cta-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== 헤더 ===== */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(248,250,252,0.96);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid #E2E8E4;
}
.header-inner {
	max-width: 1120px; margin: 0 auto; padding: 0 var(--pad-x);
	height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 32px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.site-nav .icon { color: var(--violet); }

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

.mobile-nav {
	max-height: 0; overflow: hidden;
	transition: max-height .3s ease;
	background: var(--bg);
	border-bottom: 1px solid #E2E8E4;
	position: absolute; left: 0; right: 0; top: 64px;
}
.mobile-nav.is-open { max-height: 320px; }
.mobile-nav a {
	display: flex; align-items: center; gap: 10px;
	padding: 14px var(--pad-x); font-weight: 500;
	min-height: 44px; border-top: 1px solid #ECEFEC;
}
.mobile-nav .icon { color: var(--violet); }

/* ===== 히어로 ===== */
.hero { position: relative; padding: 96px 0 64px; color: #fff; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: rgba(26,32,44,0.35); }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: 29px; margin-bottom: 12px; }
.hero-rotator { min-height: 26px; font-size: 17px; font-weight: 500; margin-bottom: 24px; opacity: 0; transition: opacity .6s ease; }
.hero-rotator.is-visible { opacity: 1; }
.hero .cta-group .btn-outline { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

/* 모바일: 오버레이 없이 배경 아래 텍스트 */
@media (max-width: 767px) {
	.hero { padding: 0; color: var(--text); }
	.hero-bg { position: relative; width: 100%; aspect-ratio: 4/3; background-size: cover; background-position: center; }
	.hero-overlay { display: none; }
	.hero-inner { padding: 32px var(--pad-x) 40px; }
	.hero h1 { color: var(--text); }
	.hero-rotator { color: #4A5568; }
	.hero .cta-group .btn-outline { background: #fff; color: var(--violet); border-color: var(--violet); }
}

/* ===== 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); }

/* ===== 카드 그리드 (시공사례/서비스) ===== */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 767px) {
	#cases .card-grid { grid-template-columns: 1fr; }
}
.card { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-body { padding: 16px; }
.card-body h3 { margin-bottom: 6px; }
.card-body p { font-size: 15px; color: #4A5568; margin: 0; }

/* 시공사례 카드: 클릭 불가, 호버 시 텍스트 슬라이드업 (배경 오버레이 없음) */
.case-card .card-media::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0) 55%);
	opacity: 0; transition: opacity .3s ease;
}
.case-card .card-media .overlay-label {
	position: absolute; left: 16px; right: 16px; bottom: -12px;
	color: #fff; font-weight: 700; font-size: 17px;
	opacity: 0; transform: translateY(12px);
	transition: opacity .3s ease, transform .3s ease;
}
.case-card:hover .card-media::after { opacity: 1; }
.case-card:hover .card-media .overlay-label { opacity: 1; transform: translateY(0); }
.case-card:hover .card-media img { transform: scale(1.05); }

/* 서비스 카드: 링크 인디케이터 */
.service-card { display: block; }
.service-link-indicator {
	position: absolute; right: 12px; bottom: 12px;
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--orange); color: #fff;
	display: flex; align-items: center; justify-content: center;
	transition: transform .3s ease;
}
.service-card:hover .card-media img { transform: scale(1.05); }
.service-card:hover .service-link-indicator { transform: translate(3px,-3px); }

/* ===== 모바일 가로 스와이프 (Pain Points / Why Us / About) ===== */
.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;
		padding-bottom: 4px;
	}
	.swipe-track::-webkit-scrollbar { display: none; }
	.swipe-track > * { flex: 0 0 100%; scroll-snap-align: center; }
}
@media (min-width: 768px) {
	.swipe-track { display: grid; grid-template-columns: repeat(3, 1fr); }
}
.swipe-dots { display: none; justify-content: center; gap: 8px; margin-top: 16px; }
@media (max-width: 767px) { .swipe-dots { display: flex; } }
.swipe-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #C9CDD6; }
.swipe-dots .dot.is-active { background: var(--violet); }

.info-card { background: #fff; border-radius: var(--radius); padding: 24px; }
.info-card .icon { color: var(--violet); margin-bottom: 12px; width: 32px; height: 32px; }
.info-card h3 { margin-bottom: 8px; }
.info-card p { font-size: 15px; color: #4A5568; margin: 0; }

/* ===== 풀스크린 슬라이드 ===== */
.fullscreen-slide { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.fullscreen-slide .slide {
	position: absolute; inset: 0;
	background-size: cover; background-position: center;
	opacity: 0; transition: opacity 2.5s ease;
}
.fullscreen-slide .slide.is-active { opacity: 1; }

/* ===== FAQ 아코디언 ===== */
.faq-item { border-bottom: 1px solid #E2E8E4; }
.faq-q {
	width: 100%; text-align: left; background: none; border: none; cursor: pointer;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 44px; padding: 18px 0; font-size: 16px; font-weight: 700; color: var(--text);
}
.faq-q .icon { transition: transform .25s ease; color: var(--violet); }
.faq-item.is-open .faq-q .icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding-bottom: 18px; color: #4A5568; }
.faq-item.is-open .faq-a { max-height: 400px; }

/* ===== 상담 문의 CTA ===== */
.consult-cta { text-align: center; background: var(--bg-sub); }
.consult-cta h2 { margin-bottom: 8px; }
.consult-cta .subtitle { margin-bottom: 24px; color: #4A5568; }
.consult-cta .cta-group { justify-content: center; }

/* ===== 푸터 ===== */
.site-footer { background: var(--text); color: #CBD5E0; padding: 40px 0; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad-x); }
.footer-nav { display: flex; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-nav a { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 500; }
.footer-nav .icon { width: 20px; height: 20px; }
.footer-info p { margin: 0 0 6px; font-size: 14px; color: #A0AEC0; }
.footer-brand { color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 8px !important; }
.footer-copy { margin-top: 12px !important; }

/* ===== 데스크톱 확장 ===== */
@media (min-width: 768px) {
	:root { --pad-x: 32px; }
	h1 { font-size: 44px; }
	h2 { font-size: 30px; }
	h3 { font-size: 20px; }
	.card-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
	#services .card-grid { grid-template-columns: repeat(2, 1fr); }
	.hero { min-height: 520px; display: flex; align-items: center; }
	.hero-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
}

/* ===== 콘텐츠 페이지 공용(세부페이지) ===== */
.content-page .section:first-of-type { padding-top: 56px; }
.detail-hero { padding-bottom: 24px; }
.detail-hero .lead { font-size: 17px; color: #4A5568; }
.detail-hero-img { border-radius: var(--radius); margin-top: 16px; }
.detail-block { margin-bottom: var(--gap-section); }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .detail-grid { grid-template-columns: repeat(2, 1fr); } }
.locale-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.locale-list li {
	background: #fff; border-radius: var(--radius); padding: 10px 16px;
	font-size: 15px; font-weight: 500; border: 1px solid #E2E8E4;
}

/* ===== 사이트맵 페이지 ===== */
.sitemap-group { margin-bottom: 32px; }
.sitemap-group h2 { margin-bottom: 16px; }
.sitemap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sitemap-list a { display: block; padding: 14px 16px; background: #fff; border-radius: var(--radius); min-height: 44px; display: flex; align-items: center; }

/* ===== 상담안내(contact) 페이지 ===== */
.contact-info { background: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.contact-info h3 { margin-bottom: 8px; }
.contact-cta { margin-top: 32px; }
