/* 테마: editorial(에디토리얼) · 팔레트: 딥그린 Primary #2C4A35 / Accent #5A8B5C */
:root {
  --primary: #2C4A35;
  --accent: #5A8B5C;
  --ink: #1A1A1A;
  --gray: #6B7280;
  --border: #E5E5E5;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  color: var(--ink);
  background: #FFFFFF;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.font-serif { font-family: 'Nanum Myeongjo', serif; }

.eyebrow {
  font-family: 'Pretendard', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
}

.prose-body { max-width: 68ch; }
.prose-body p { color: #3F3F3F; line-height: 1.9; }

.hairline { border-color: var(--border) !important; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-radius: 2px;
  transition: opacity .2s ease, transform .2s ease;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.btn-outline {
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 2px;
  transition: border-color .2s ease, transform .2s ease;
}
.btn-outline:hover { border-color: var(--primary); transform: translateY(-1px); }

.card-hair {
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-hair:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.06); }

.grid-3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.grid-3-strict { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (min-width: 768px) { .grid-3-strict { grid-template-columns: repeat(3, 1fr); } }

.grid-1-mobile-3 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .grid-1-mobile-3 { grid-template-columns: repeat(3, 1fr); } }

/* 시공사진 갤러리 — 모바일 2열/PC 3열 (스크롤 과다 방지) */
.grid-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .grid-gallery { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

/* 메인 최근 작업 사진 — 항상 3열 */
.grid-gallery-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
@media (min-width: 768px) { .grid-gallery-3 { gap: 1.25rem; } }

/* 서브페이지 작업 사진(4장) — 항상 4열 한 줄 */
.grid-gallery-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
@media (min-width: 768px) { .grid-gallery-4 { gap: 1.25rem; } }

.grid-4-strict { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (min-width: 768px) { .grid-4-strict { grid-template-columns: repeat(4, 1fr); } }

.grid-2-strict { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1.25rem; }
@media (min-width: 768px) { .grid-2-strict { grid-template-columns: repeat(2, 1fr); } }

img { max-width: 100%; height: auto; }
.img-tile { aspect-ratio: 4/3; object-fit: cover; width: 100%; display: block; }

.photo-figure { margin: 0; }
.photo-caption {
  margin-top: .5rem;
  font-size: .78rem;
  color: var(--gray);
  line-height: 1.5;
  word-break: keep-all;
}

.phone-num { cursor: default; }

/* Floating */
#floatBtns { position: fixed; right: 1rem; bottom: 1.25rem; z-index: 50; display: flex; flex-direction: column; gap: .6rem; }
#topBtn { opacity: 0; pointer-events: none; transition: opacity .2s ease; }
#topBtn.show { opacity: 1; pointer-events: auto; }

/* Lightbox */
#lightbox { position: fixed; inset: 0; background: rgba(20,20,20,.92); display: none; align-items: center; justify-content: center; z-index: 100; padding: 2rem; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
#lightbox-close { position: absolute; top: 1.25rem; right: 1.5rem; color: #fff; font-size: 1.75rem; cursor: pointer; }

/* 숫자 라벨 */
.num-label { font-family: 'Pretendard', sans-serif; font-size: .8rem; color: var(--border); font-weight: 700; }

/* FAQ accordion */
.faq-item summary { cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary .faq-plus { transform: rotate(45deg); }
.faq-plus { transition: transform .2s ease; display: inline-block; }
