/* 고쳐주기 · 대형나무벌목 — 공통 디자인 시스템 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  --primary: #1F3D2C;
  --primary-dark: #152B1F;
  --sage: #8B9A6B;
  --sage-light: #EFF1E5;
  --ink: #20241D;
  --sub: #5B6358;
  --bg-main: #FBF8F1;
  --bg-sub: #F3EEDD;
  --line: #E3DFCB;
  --white: #FFFFFF;
  --radius-card: 18px;
  --radius-btn: 999px;
  --radius-sm: 10px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .container { padding: 0 32px; } }

.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-sub { background: var(--bg-sub); }
.section-tight { padding: clamp(32px, 5vw, 56px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--sage);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.28;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.35rem, 5.4vw, 4rem); line-height: 1.16; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--sub); }
.section-head { max-width: 640px; margin: 0 0 clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: rgba(255,255,255,.14); }
.btn-line { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-line:hover { background: var(--primary); color: var(--white); }
.btn-sage { background: var(--sage); color: var(--white); }
.btn-sage:hover { background: #7A8A5C; }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* 헤더 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,248,241,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--primary); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem;
}
.nav-desktop { display: none; align-items: center; gap: 34px; }
.nav-desktop a { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.nav-desktop a:hover { color: var(--primary); }
.header-cta { display: none; }
.menu-toggle {
  width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}
.mobile-menu {
  display: none; position: fixed; inset: 72px 0 0 0; background: var(--bg-main); z-index: 49;
  padding: 28px 20px; overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 16px 4px; font-size: 1.15rem; font-weight: 700; border-bottom: 1px solid var(--line); }
.mobile-menu .cta-row { margin-top: 24px; }

/* 히어로 */
.hero {
  display: flex; flex-direction: column-reverse; gap: 32px;
  padding: 36px 0 clamp(40px, 6vw, 72px);
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero-copy .lede { max-width: 46ch; }
.hero-media {
  position: relative; width: 100%; aspect-ratio: 4/5; border-radius: var(--radius-card);
  overflow: hidden; background: var(--sage-light);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media .tag {
  position: absolute; left: 18px; bottom: 18px; background: rgba(32,36,29,.72); color: #fff;
  font-size: 0.78rem; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-btn); backdrop-filter: blur(4px);
}
@media (min-width: 900px) {
  .hero { flex-direction: row; align-items: center; gap: 56px; padding: 56px 0 96px; }
  .hero-copy { flex: 0 0 44%; }
  .hero-media { flex: 1; aspect-ratio: 3/4; max-height: 640px; }
}

/* 이미지 그리드 (실제 현장 쇼케이스) */
.photo-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.photo-grid a { border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 3/4; background: var(--sage-light); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.photo-grid a:hover img { transform: scale(1.05); }
.photo-grid .feature { grid-column: span 2; aspect-ratio: 16/10; }
@media (min-width: 720px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .photo-grid .feature { grid-column: span 2; grid-row: span 2; aspect-ratio: 3/4; }
}

/* 서비스 카드 */
.grid-cards {
  display: grid; grid-template-columns: 1fr; gap: 20px;
}
@media (min-width: 640px) { .grid-cards.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid-cards.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -20px rgba(31,61,44,.35); }
.card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--sage-light); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .body .num { color: var(--sage); font-weight: 800; font-size: 0.85rem; }
.card .body p { color: var(--sub); font-size: 0.95rem; }
.card .body .spacer { flex: 1; }

/* 상황/체크리스트 */
.check-list { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .check-list { grid-template-columns: repeat(2, 1fr); } }
.check-item {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-card);
}
.check-item .ico {
  flex: 0 0 40px; height: 40px; width: 40px; border-radius: 10px; background: var(--sage-light);
  display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 800;
}
.check-item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.check-item p { color: var(--sub); font-size: 0.92rem; }

/* 표 */
.info-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--line); }
.info-table th, .info-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.info-table th { background: var(--sage-light); color: var(--primary-dark); font-weight: 700; width: 32%; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

/* FAQ 아코디언 */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 22px; display: flex; align-items: center; gap: 14px;
  font-weight: 700; font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .q-mark {
  flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--sage-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800;
}
.faq-item summary .caret { margin-left: auto; transition: transform .2s ease; color: var(--sage); }
.faq-item[open] summary .caret { transform: rotate(180deg); }
.faq-item .a { padding: 0 22px 22px 62px; color: var(--sub); font-size: 0.95rem; }

/* CTA 밴드 */
.cta-band { background: var(--primary); color: #fff; border-radius: var(--radius-card); padding: clamp(32px, 5vw, 56px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 46ch; }

/* 갤러리(시공사례 상세) */
.case-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .case-gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.case-gallery a { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 3/4; background: var(--sage-light); }
.case-gallery img { width: 100%; height: 100%; object-fit: cover; }
.case-gallery video { width: 100%; height: 100%; object-fit: cover; }

/* 브레드크럼 */
.breadcrumb { font-size: 0.85rem; color: var(--sub); display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 0 0; }
.breadcrumb a:hover { color: var(--primary); }

/* 하위 히어로(서브페이지) */
.sub-hero {
  padding: 40px 0 12px;
  display: flex; flex-direction: column; gap: 16px;
}
.sub-hero .badge { color: var(--sage); font-weight: 800; font-size: 0.8rem; letter-spacing: .08em; text-transform: uppercase; }

/* 풋터 */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.78); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
@media (min-width: 780px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid .brand { color: #fff; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 20px; font-size: 0.82rem; color: rgba(255,255,255,.55); display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: space-between; }

/* 플로팅 CTA */
.floating-cta { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.floating-cta .btn { box-shadow: 0 12px 24px -10px rgba(31,61,44,.45); }
.to-top-btn {
  width: 46px; height: 46px; border-radius: 50%; background: var(--white); border: 1px solid var(--line);
  display: none; align-items: center; justify-content: center; cursor: pointer; color: var(--primary);
}
.to-top-btn.show { display: flex; }

/* 라이트박스 */
.lightbox { position: fixed; inset: 0; background: rgba(15,18,13,.92); z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 86vh; border-radius: 12px; }
.lightbox .close-btn { position: absolute; top: 18px; right: 18px; color: #fff; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* 404 */
.error-page { text-align: center; padding: clamp(64px, 12vw, 120px) 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* 유틸 */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.prose p + p { margin-top: 14px; }
.prose { max-width: 68ch; color: var(--sub); font-size: 1.02rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: var(--sage-light); color: var(--primary-dark); font-size: 0.8rem; font-weight: 700; padding: 6px 12px; border-radius: var(--radius-btn); }

/* 서비스/작업유형 상세 — 이미지+텍스트 교차 행 */
.feature-row { display: flex; flex-direction: column; gap: 28px; align-items: center; }
.feature-row .feature-media { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-card); overflow: hidden; background: var(--sage-light); }
.feature-row .feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-row .feature-copy { display: flex; flex-direction: column; gap: 14px; }
.feature-row + .feature-row { margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 860px) {
  .feature-row { flex-direction: row; gap: 56px; }
  .feature-row.reverse { flex-direction: row-reverse; }
  .feature-row .feature-media { flex: 0 0 46%; aspect-ratio: 4/3; }
  .feature-row .feature-copy { flex: 1; }
}
.feature-copy .step-no { color: var(--sage); font-weight: 800; font-size: 0.85rem; letter-spacing: .06em; }

/* 영상 프레임 */
.video-frame { width: 100%; border-radius: var(--radius-card); overflow: hidden; background: #000; aspect-ratio: 16/9; }
.video-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
