/* =========================================================
   상가인테리어업체 — 공용 스타일시트
   테마 변형은 body.theme-* 클래스의 CSS 변수 재정의로 처리한다.
   ========================================================= */

:root {
	--color-ink: #17130f;
	--color-paper: #faf7f2;
	--color-sand: #efe6d6;
	--color-line: #ddd0b8;
	--color-muted: #6b6055;
	--color-accent: #b08d57;
	--color-accent-deep: #8a6a3f;
	--color-white: #ffffff;
	--radius: 12px;
	--radius-sm: 8px;
	--container: 1160px;
	--shadow: 0 14px 36px rgba(23, 19, 15, 0.14);
	font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--color-ink);
	background: var(--color-paper);
	line-height: 1.7;
	font-size: 1rem;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 0.6em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--color-ink); }
ul, ol { padding-left: 1.25em; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
	position: absolute; left: -999px; top: 0; background: var(--color-ink); color: #fff;
	padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(250, 248, 245, 0.92);
	backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid var(--color-line);
}
.site-header__inner {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 24px; max-width: var(--container); margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 8px; }
.site-logo svg { width: 34px; height: 34px; }
.site-logo__text { font-weight: 800; font-size: 1.05rem; color: var(--color-ink); white-space: nowrap; }
@media (max-width: 560px) { .site-logo__text { display: none; } }
.site-logo:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.site-nav a {
	display: inline-block; padding: 10px 14px; border-radius: var(--radius-sm);
	font-size: 0.95rem; color: var(--color-ink); font-weight: 500;
	min-height: 44px; display: flex; align-items: center;
	background: none; border: none;
}
.site-nav a:hover, .site-nav a:focus-visible {
	background: var(--color-sand); outline: none;
}
.site-nav .nav-cta {
	background: var(--color-ink); color: var(--color-white); margin-left: 6px;
}
.site-nav .nav-cta:hover { background: var(--color-accent-deep); }

.menu-toggle {
	display: none; background: none; border: 1px solid var(--color-line); border-radius: var(--radius-sm);
	width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
	content: ""; display: block; width: 20px; height: 2px; background: var(--color-ink);
}

@media (max-width: 880px) {
	.menu-toggle { display: flex; }
	.site-nav {
		position: absolute; top: 100%; left: 0; right: 0; background: var(--color-white);
		border-bottom: 1px solid var(--color-line); flex-direction: column; align-items: stretch;
		max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
	}
	.site-nav.is-open { max-height: 640px; }
	.site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 2px; }
	.site-nav a { width: 100%; }
}

/* ---------- Hero (base) ---------- */
.hero { padding: 72px 0 56px; }
.hero__inner { max-width: 760px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.hero__lead { font-size: 1.1rem; color: var(--color-muted); max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Hero (full-bleed photo variant) ---------- */
.hero--photo {
	position: relative;
	min-height: clamp(520px, 82vh, 820px);
	display: flex; align-items: center;
	background-size: cover; background-position: center;
}
.hero--photo::before {
	content: ""; position: absolute; inset: 0;
	background: rgba(255,255,255,0.18);
}
.hero--photo .hero__inner { position: relative; z-index: 1; }
.hero--photo h1 { color: var(--color-white); }
.hero--photo .hero__lead { color: rgba(255,255,255,0.85); }
.hero--photo .btn-quote { border-color: rgba(255,255,255,0.7); color: var(--color-white); }
.hero--photo .btn-quote:hover { background: var(--color-white); color: var(--color-ink); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 16px 30px; border-radius: 999px; font-weight: 700; font-size: 1rem;
	min-height: 52px; border: 2px solid transparent; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-call { background: var(--color-accent); color: var(--color-white); }
.btn-call:hover, .btn-call:focus-visible { background: var(--color-accent-deep); }
.btn-quote { background: transparent; border-color: var(--color-ink); color: var(--color-ink); }
.btn-quote:hover, .btn-quote:focus-visible { background: var(--color-ink); color: var(--color-white); }

/* ---------- Sections / typography ---------- */
main section { padding: 64px 0; }
main section + section { border-top: 1px solid var(--color-line); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head .eyebrow {
	display: inline-block; font-size: 0.8rem; letter-spacing: 0.08em; color: var(--color-accent);
	font-weight: 700; margin-bottom: 10px; text-transform: uppercase;
}
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.section-head p { color: var(--color-muted); }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }
.prose blockquote {
	margin: 1.6em 0; padding: 18px 22px; border-left: 3px solid var(--color-accent);
	background: var(--color-sand); border-radius: 0 var(--radius) var(--radius) 0; font-style: normal;
	color: var(--color-ink);
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }
.grid-2.keep-2col { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 380px) { .grid-2.keep-2col { gap: 12px; } .grid-2.keep-2col .card { padding: 14px; } }

.card {
	background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius);
	padding: 24px; height: 100%;
}
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card-icon { width: 30px; height: 30px; color: var(--color-accent); margin-bottom: 12px; }
.card .num { font-size: 1.6rem; font-weight: 800; color: var(--color-accent); display: block; margin-bottom: 8px; }

.checklist { list-style: none; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist li svg { flex: none; width: 20px; height: 20px; color: var(--color-accent); margin-top: 2px; }

.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; }
.flow__step {
	background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius);
	padding: 10px 14px; flex: 0 1 auto; min-width: 0; font-size: 0.85rem; text-align: center;
}
.flow__arrow { display: flex; align-items: center; justify-content: center; flex: none; width: 36px; color: var(--color-accent); }
@media (max-width: 720px) {
	.flow { flex-direction: column; }
	.flow__arrow { width: auto; height: 28px; transform: rotate(90deg); }
}

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--color-line); }
.timeline li { position: relative; padding: 4px 0 30px 28px; }
.timeline li::before {
	content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
	background: var(--color-accent); border: 2px solid var(--color-paper);
}
.timeline h3 { margin: 0 0 4px; font-size: 1.05rem; }
.timeline p { margin: 0; color: var(--color-muted); }

table.data-table { border: 1px solid var(--color-line); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--color-line); }
table.data-table th { background: var(--color-sand); font-size: 0.92rem; }
table.data-table tr:last-child td { border-bottom: none; }

.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge {
	display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
	background: var(--color-sand); font-size: 0.88rem; color: var(--color-ink); border: 1px solid var(--color-line);
}

.faq { display: grid; gap: 10px; }
.faq details {
	border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-white); padding: 4px 20px;
}
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-accent); font-size: 1.3rem; }
.faq details[open] summary::after { content: "-"; }
.faq .faq-a { padding: 0 0 18px; color: var(--color-muted); margin: 0; }

/* ---------- Photo placeholder ---------- */
.photo-grid { display: grid; gap: 24px; }
.photo-grid img {
	width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius);
	box-shadow: var(--shadow); transition: transform 0.4s ease;
}
.photo-grid.rows-2 { grid-template-columns: repeat(2, 1fr); }
.photo-grid.rows-2 img { aspect-ratio: 4 / 3; }
.photo-grid.rows-2 img:hover { transform: scale(1.02); }
@media (max-width: 560px) { .photo-grid.rows-2 { grid-template-columns: 1fr; } }

/* 대표사진(첫 장)을 크게, 나머지는 균일한 격자로 — 매거진 스타일 */
.photo-grid.cols-4 {
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 170px;
	grid-auto-flow: dense;
	gap: 18px;
}
.photo-grid.cols-4 img {
	box-shadow: 0 10px 26px rgba(16, 28, 46, 0.12);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.photo-grid.cols-4 img:hover { transform: scale(1.035); box-shadow: 0 16px 36px rgba(16, 28, 46, 0.2); }
.photo-grid.cols-4 img:first-child { grid-column: span 2; grid-row: span 2; }
.photo-grid.cols-4 img:nth-child(2) { grid-column: span 1; grid-row: span 2; }
@media (max-width: 880px) { .photo-grid.cols-4 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; } }
@media (max-width: 560px) {
	.photo-grid.cols-4 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; gap: 12px; }
	.photo-grid.cols-4 img:first-child,
	.photo-grid.cols-4 img:nth-child(2) { grid-row: span 1; }
}

.photo-slot {
	margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--color-sand);
	border: 1px dashed var(--color-line); display: flex; flex-direction: column; align-items: center;
	justify-content: center; gap: 10px; color: var(--color-muted); text-align: center; padding: 16px;
}
.photo-slot__icon svg { width: 40px; height: 40px; }
.photo-slot__caption { font-size: 0.85rem; }

/* ---------- Track (carousel / testimonial) ---------- */
.track { position: relative; }
.track__viewport { overflow: hidden; }
.track__list { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; transition: transform 0.35s ease; }
.track__item { flex: 0 0 calc((100% - 40px) / 3); }
@media (max-width: 1023px) { .track__item { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 639px) { .track__item { flex-basis: 100%; } }

.track__controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; }
.track__prev, .track__next {
	width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--color-line);
	background: var(--color-white); display: flex; align-items: center; justify-content: center;
}
.track__prev:disabled, .track__next:disabled { opacity: 0.35; cursor: default; }
.track__dots { display: flex; gap: 8px; }
.track__dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--color-line); padding: 0; }
.track__dot.is-active { background: var(--color-accent); width: 22px; border-radius: 999px; }

.service-card {
	background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius);
	padding: 26px; height: 100%; display: flex; flex-direction: column; gap: 10px;
}
.service-card h3 { margin: 0; }
.service-card p { color: var(--color-muted); margin: 0; flex: 1; }
.service-card .link-arrow { color: var(--color-accent); font-weight: 700; }

.service-card--photo {
	position: relative; display: block; padding: 0; border: none; overflow: hidden;
	aspect-ratio: 4 / 3; transition: transform 0.25s ease;
}
.service-card--photo:hover { transform: translateY(-4px); }
.service-card--photo .service-card__img { width: 100%; height: 100%; object-fit: cover; }
.service-card--photo .service-card__label {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px;
	color: var(--color-white); font-weight: 700; font-size: 1.1rem;
	background: linear-gradient(180deg, rgba(15,12,9,0) 0%, rgba(15,12,9,0.72) 100%);
}

.testimonial-card {
	background: var(--color-white); border: 1px solid var(--color-line); border-radius: var(--radius);
	padding: 24px; height: 100%; color: var(--color-muted);
}

.testimonial-empty {
	background: var(--color-white); border: 1px dashed var(--color-line); border-radius: var(--radius);
	padding: 40px; text-align: center; display: grid; gap: 18px; justify-items: center; max-width: 520px; margin: 0 auto;
}
.testimonial-empty p { color: var(--color-muted); margin: 0; }

/* ---------- CTA block ---------- */
.cta-block {
	background: var(--color-ink); color: var(--color-white); border-radius: var(--radius);
	padding: 48px; text-align: center; margin: 0 24px;
}
.cta-block h2 { color: var(--color-white); }
.cta-block p { color: rgba(255,255,255,0.7); }
.cta-block .hero__cta { justify-content: center; }
.cta-block .btn-quote { border-color: rgba(255,255,255,0.6); color: var(--color-white); }
.cta-block .btn-quote:hover { background: var(--color-white); color: var(--color-ink); }
section.cta-section { border-top: none; padding-top: 0; padding-bottom: 64px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-sand); border-top: 1px solid var(--color-line); padding: 24px 0 12px; }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; margin-bottom: 12px; align-items: start; }
@media (max-width: 720px) { .site-footer__grid { grid-template-columns: 1fr; } }
.biz-info { font-size: 0.92rem; color: var(--color-muted); display: grid; gap: 4px; }
.biz-info strong { color: var(--color-ink); font-size: 1.05rem; display: block; margin-bottom: 6px; }
.biz-info a { color: var(--color-ink); font-weight: 700; }
.sitemap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 8px 28px; }
@media (max-width: 560px) { .sitemap { grid-template-columns: repeat(2, auto); } }
.sitemap a { color: var(--color-muted); font-size: 0.92rem; }
.sitemap a:hover { color: var(--color-ink); }
.site-footer__bottom { border-top: 1px solid var(--color-line); padding-top: 10px; font-size: 0.82rem; color: var(--color-muted); }

/* =========================================================
   테마 변형 — 페이지마다 다른 톤을 CSS 변수 재정의로 표현
   ========================================================= */

/* 메인 — 고급스럽고 넓은 여백 */
body.theme-home .hero { padding: 130px 0 90px; }
body.theme-home .hero__inner { max-width: 820px; }
body.theme-home main section { padding: 88px 0; }

/* 상가인테리어 — 건축 도면 스타일 */
body.theme-blueprint { --color-accent: #b08d57; --color-accent-deep: #8a6a3f; }
body.theme-blueprint .hero {
	background:
		linear-gradient(90deg, rgba(46,88,120,0.08) 1px, transparent 1px) 0 0/32px 32px,
		linear-gradient(rgba(46,88,120,0.08) 1px, transparent 1px) 0 0/32px 32px,
		var(--color-paper);
}
body.theme-blueprint .card { border-style: dashed; }

/* 상가인테리어비용 — 숫자/카드 중심 */
body.theme-cost { --color-accent: #a8823f; --color-accent-deep: #7d5f2d; }
body.theme-cost .card { border-top: 3px solid var(--color-accent); }

/* 상가인테리어견적 — 견적서/체크리스트 */
body.theme-estimate { --color-accent: #b7935c; --color-accent-deep: #8f7040; }
body.theme-estimate .prose, body.theme-estimate table.data-table { font-family: "Pretendard", monospace; }
body.theme-estimate table.data-table th { text-transform: none; }

/* 상가인테리어시공 — 공정 타임라인 */
body.theme-construction { --color-accent: #a68b5b; --color-accent-deep: #7c6640; }

/* 매장인테리어 — 동선 다이어그램 */
body.theme-flow { --color-accent: #bb9765; --color-accent-deep: #8f7247; }
body.theme-flow .flow__step { background: var(--color-sand); }

/* 상가리모델링 — Before/After */
body.theme-beforeafter { --color-accent: #ad8a52; --color-accent-deep: #82662f; }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .ba-grid { grid-template-columns: 1fr; } }
.ba-card { border-radius: var(--radius); padding: 22px; border: 1px solid var(--color-line); }
.ba-card--before { background: var(--color-sand); }
.ba-card--after { background: var(--color-white); border-color: var(--color-accent); }
.ba-card .tag { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--color-accent); }

/* 허브 — 방사형 정보구조 */
body.theme-hub { --color-accent: #b3925f; --color-accent-deep: #87693f; }
.radial { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 12px 0; }
.radial__item {
	width: 190px; text-align: center; background: var(--color-white); border: 1px solid var(--color-line);
	border-radius: 50%; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center;
	justify-content: center; padding: 20px; gap: 6px;
}
.radial__item strong { font-size: 1rem; }
.radial__item span { font-size: 0.8rem; color: var(--color-muted); }
.radial__center {
	width: 190px; aspect-ratio: 1; border-radius: 50%; background: var(--color-ink); color: var(--color-white);
	display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 800; padding: 20px;
}

/* 울산상가인테리어 — 지역 지도 느낌 */
body.theme-region-map { --color-accent: #a98b57; --color-accent-deep: #7f6537; }
body.theme-region-map .hero {
	background-image: radial-gradient(circle at 20% 30%, rgba(47,95,138,0.14) 0, transparent 45%),
		radial-gradient(circle at 80% 60%, rgba(47,95,138,0.10) 0, transparent 50%);
}
.pin-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--color-sand); padding: 8px 14px; border-radius: 999px; font-size: 0.86rem; font-weight: 700; }

/* 울산사무실인테리어 — 업무공간 미니멀 */
body.theme-region-minimal { --color-accent: #8a7a5c; --color-accent-deep: #5f5340; }
body.theme-region-minimal .hero { max-width: none; }
body.theme-region-minimal .hero__inner { max-width: 640px; }

/* 상담 페이지 */
body.theme-consult { --color-accent: #b08d57; }
.consult-steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 16px; }
.consult-steps li { display: flex; gap: 16px; align-items: flex-start; }
.consult-steps li::before {
	counter-increment: step; content: counter(step); flex: none; width: 36px; height: 36px; border-radius: 50%;
	background: var(--color-accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800;
}
