:root {
  --bg: #f7f5f0;
  --bg-alt: #efebe1;
  --ink: #23231f;
  --ink-soft: #6b685f;
  --line: #ddd6c6;
  --accent: #c8794a;
  --accent-dark: #a35f37;
  --accent-soft: #f2e2d2;
  --wrap: 1240px;
  --radius: 3px;
  --serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.32; margin: 0 0 12px; }
p { margin: 0 0 20px; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── 버튼 ───────────────────────────────────────────── */
.btn-call, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; font-weight: 700; font-size: 1rem; border-radius: var(--radius);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.btn-call { background: var(--ink); color: #fff; }
.btn-call:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-call.is-pending, .float-call.is-pending { opacity: .55; pointer-events: none; }

.float-call {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 54px; height: 54px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 6px 18px rgba(35,35,31,.25);
}
.float-call:hover { background: var(--accent-dark); }
.float-call .icon { width: 24px; height: 24px; }

.icon { width: 20px; height: 20px; flex: none; }

/* ── 헤더 ───────────────────────────────────────────── */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 28px; padding: 16px 24px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }
.brand-sub { font-weight: 600; font-size: .72rem; color: var(--ink-soft); }
.main-nav { display: flex; gap: 24px; }
.main-nav a { font-size: .92rem; color: var(--ink-soft); font-weight: 600; }
.main-nav a:hover { color: var(--accent); }
.hamburger-btn { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; flex: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.hamburger-btn span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.hamburger-btn.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-active span:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav-panel { position: fixed; top: 0; right: -280px; width: 260px; height: 100%; background: var(--bg); z-index: 70; padding: 90px 24px 24px; transition: right .25s ease; box-shadow: -8px 0 24px rgba(0,0,0,.08); }
.mobile-nav-panel.is-open { right: 0; }
.mobile-nav { display: flex; flex-direction: column; gap: 20px; }
.mobile-nav a { font-size: 1.05rem; font-weight: 700; }
.nav-backdrop { position: fixed; inset: 0; background: rgba(35,35,31,.4); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ── 공통 섹션 헤드 ─────────────────────────────────── */
.eyebrow { display: block; font-family: var(--serif); color: var(--accent); font-weight: 700; letter-spacing: .06em; font-size: .85rem; text-transform: uppercase; margin-bottom: 10px; }
.section-soft { background: var(--bg-alt); }
.section-head { margin-bottom: 34px; }
.section-head h2 { font-size: 1.7rem; }
.section-head p { color: var(--ink-soft); max-width: 560px; }
.section-head-center { text-align: center; }
section { padding: 64px 0; }

/* ── HERO: 상단 중앙 타이포 → 중앙 대형 사진 (좌우분할 사용 안 함) ── */
.hero { padding: 56px 0 0; text-align: center; }
.hero-copy { max-width: 640px; margin: 0 auto; }
.hero .eyebrow { justify-content: center; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.4rem); color: var(--ink); }
.hero-lead { font-size: 1.08rem; color: var(--ink-soft); margin-bottom: 26px; }
.hero-checklist { display: inline-flex; flex-direction: column; gap: 10px; text-align: left; margin: 0 auto 34px; }
.hero-checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-weight: 600; font-size: .96rem; }
.hero-checklist .icon { color: var(--accent); margin-top: 2px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; }
.hero-photo-frame { max-width: 620px; margin: 0 auto; padding: 0 24px 8px; }
.hero-photo-frame img { width: 100%; max-height: 46vh; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius); }
.hero-photo-cap { max-width: 620px; margin: 14px auto 0; padding: 0 24px; color: var(--ink-soft); font-size: .86rem; text-align: center; }

.hero-photo-frame-dual { max-width: 920px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.hero-photo-crossfade { position: relative; width: 100%; height: 560px; background: var(--bg-alt); border-radius: var(--radius); overflow: hidden; }
.hero-cf-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; pointer-events: none; transition: opacity 1s ease; }
.hero-cf-img.is-active { opacity: 1; pointer-events: auto; }
.hero-cf-tag { position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--ink); color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .04em; padding: 5px 12px; border-radius: var(--radius); transition: background .3s ease; }
.hero-cf-tag.is-after { background: var(--accent); }

/* 서브페이지(NSEO/예약) 히어로 - 좁고 사진 없이 상단 정보만 (메인 HERO와 구분) */
.page-hero { padding: 40px 0 8px; text-align: center; }
.breadcrumb { font-size: .82rem; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--accent); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 2.7rem); }
.page-lead { max-width: 620px; margin: 0 auto 24px; color: var(--ink-soft); font-size: 1.02rem; }
.point-row { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-bottom: 8px; }
.point-item { display: flex; align-items: center; gap: 7px; font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.point-item .icon { width: 17px; height: 17px; color: var(--accent); }

/* ── 대표사진(하단 페이지 상단부 큰 사진) ───────────── */
/* BEFORE/AFTER 원칙: 문 전체가 보여야 하므로 crop하지 않는다(object-fit:contain).
   두 사진 컨테이너는 항상 동일한 높이를 가지며, 빈 공간은 사이트 배경톤(--bg-alt)으로 채운다. */
.lead-photo { max-width: 520px; margin: 30px auto 0; height: 560px; background: var(--bg-alt); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lead-photo img { width: 100%; height: 100%; object-fit: contain; }
.lead-photo-cap { text-align: center; color: var(--ink-soft); font-size: .86rem; margin: 12px 0 48px; }

.detail-photos-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 26px auto 0; }
.photo-box { position: relative; height: 560px; background: var(--bg-alt); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-box img { width: 100%; height: 100%; object-fit: contain; }
.photo-box .tag { position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: var(--radius); z-index: 2; }
.photo-box.after .tag { background: var(--accent); }
.detail-photo-cap { text-align: center; color: var(--ink-soft); font-size: .86rem; max-width: 900px; margin: 14px auto 48px; }

/* ── 상황(situation) 리스트 - 카드 반복 대신 번호+구분선 리스트 ── */
.situation-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.situation-item { display: flex; gap: 16px; padding: 22px 4px; border-bottom: 1px solid var(--line); }
.situation-item:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 24px; }
.situation-item:nth-child(even) { padding-left: 24px; }
.situation-item .icon-circle { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: flex; align-items: center; justify-content: center; }
.situation-item h3 { font-family: var(--sans); font-size: 1.02rem; margin-bottom: 4px; }
.situation-item p { color: var(--ink-soft); font-size: .9rem; margin: 0; }

/* ── NSEO 5개 - 번호가 붙은 에디토리얼 스트립 ────────── */
.nseo-strip { display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.nseo-item { display: grid; grid-template-columns: 64px 160px 1fr; align-items: center; gap: 22px; padding: 20px 4px; border-bottom: 1px solid var(--line); transition: background .15s ease; }
.nseo-item:hover { background: var(--accent-soft); }
.nseo-num { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); font-weight: 700; }
.nseo-photo { display: block; width: 160px; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); }
.nseo-photo img { width: 100%; height: 100%; object-fit: cover; }
.nseo-body { display: flex; flex-direction: column; gap: 4px; }
.nseo-title { font-size: 1.2rem; font-weight: 800; }
.nseo-summary { color: var(--ink-soft); font-size: .92rem; }

/* ── 작업 범위 / PROCESS ─────────────────────────────── */
.process-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid var(--ink); padding-top: 26px; }
.process-step .num { font-family: var(--serif); font-size: 1.8rem; color: var(--accent); display: block; margin-bottom: 8px; }
.process-step h3 { font-family: var(--sans); font-size: 1rem; margin-bottom: 4px; }
.process-step p { color: var(--ink-soft); font-size: .88rem; margin: 0; }

/* ── 체크포인트 ───────────────────────────────────────── */
.checkpoint-list { display: flex; flex-direction: column; gap: 14px; }
.checkpoint-list li { display: flex; gap: 10px; align-items: flex-start; }
.checkpoint-list .icon { color: var(--accent); margin-top: 3px; flex: none; }

/* ── 작업 절차 표 ─────────────────────────────────────── */
.process-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.process-table th, .process-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: keep-all; }
.process-table th { color: var(--accent-dark); font-family: var(--sans); font-size: .92rem; }
.process-table td:first-child { white-space: nowrap; font-weight: 600; }

/* ── 본문 섹션(article) ──────────────────────────────── */
.article-body { max-width: 720px; }
.article-section { padding: 30px 0; border-bottom: 1px solid var(--line); }
.article-section:first-child { padding-top: 0; }
.article-section h2 { display: flex; align-items: center; gap: 10px; font-size: 1.28rem; margin-bottom: 16px; }
.article-section h2 .icon { color: var(--accent); }
.article-section h3 { font-family: var(--sans); font-size: 1.02rem; margin: 20px 0 10px; }
.article-section ul { display: flex; flex-direction: column; gap: 12px; }
.article-section li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.article-section li .icon { margin-top: 3px; color: var(--accent); flex: none; }

.detail-split { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
.faq-col h2 { font-size: 1.2rem; }
.faq-cta-photo { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); margin-bottom: 18px; }
@media (min-width: 1081px) {
  /* 왼쪽 컬럼의 "FAQ" 라벨+제목 높이만큼 사진을 내려서 첫 FAQ 카드 상단 테두리와 맞춤 */
  .faq-cta-photo { margin-top: 116px; }
}

/* ── FAQ 아코디언 ─────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; background: #fff; }
.faq-item summary { cursor: pointer; padding: 18px 0; font-weight: 700; list-style: none; position: relative; padding-right: 24px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 0; top: 16px; font-size: 1.3rem; color: var(--accent); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-a p { color: var(--ink-soft); font-size: .93rem; padding-bottom: 20px; margin: 0; line-height: 1.7; }

/* ── OTHER PROJECTS / OTHER SERVICES ─────────────────── */
.other-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.other-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.other-card img { width: 100%; max-height: 32vh; aspect-ratio: 4/3; object-fit: cover; }
.other-card-title { display: block; padding: 12px 14px; font-weight: 700; font-size: .95rem; }
.other-projects { margin-bottom: 8px; }

/* NSEO 페이지 전용 - 하단 카드 사진을 detail-photos-top(중문수리 시공사례)과 동일한 크기로 맞춤 */
.other-wrap-lg .other-grid { max-width: 900px; margin: 0 auto; grid-template-columns: 1fr 1fr; gap: 16px; }
.other-wrap-lg .other-card img { max-height: 40vh; }

/* 메인 "다른 실제 작업 현장"(카드 3개) - 모바일에서도 3열 유지해 2번째 줄(외톨이 카드)로 늘어나지 않게 함 */
.other-grid.onsite-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.onsite-grid .other-card-title { padding: 8px 8px; font-size: .78rem; }

/* ── FINAL CTA ────────────────────────────────────────── */
.final-cta { text-align: center; padding: 70px 0; background: var(--ink); color: #fff; }
.final-cta h2 { color: #fff; font-size: 1.5rem; }
.final-cta .btn-call { background: var(--accent); }
.final-cta .btn-call:hover { background: #fff; color: var(--ink); }

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 52px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 30px; }
.footer-col h4 { font-family: var(--sans); font-size: .9rem; margin-bottom: 12px; color: var(--ink-soft); letter-spacing: .03em; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a:hover { color: var(--accent); }
.footer-biz { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--ink-soft); }
.footer-pending { color: var(--ink-soft); }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-copy { margin: 0; font-size: .82rem; color: var(--ink-soft); }

/* ── 404 ──────────────────────────────────────────────── */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 2.2rem; }

/* ── 스크롤 reveal / 라이트박스 ───────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.is-zoomable { cursor: zoom-in; }
.lightbox-overlay { position: fixed; inset: 0; background: rgba(20,20,18,.9); display: flex; align-items: center; justify-content: center; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s ease; padding: 24px; }
.lightbox-overlay.is-open { opacity: 1; pointer-events: auto; }
.lightbox-img { max-width: 92vw; max-height: 92vh; border-radius: var(--radius); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-cf-img { transition: none; }
}

/* ── 반응형 ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .detail-split { grid-template-columns: 1fr; }
  .faq-col { max-width: 720px; }
  .process-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .hamburger-btn { display: flex; }
  .other-grid { grid-template-columns: repeat(2, 1fr); }
  .situation-list { grid-template-columns: 1fr; }
  .situation-item:nth-child(odd) { border-right: none; padding-right: 4px; }
  .situation-item:nth-child(even) { padding-left: 4px; }
  .nseo-item { grid-template-columns: 40px 112px 1fr; gap: 14px; }
  .nseo-photo { width: 112px; }
}

@media (max-width: 600px) {
  .header-inner { padding: 13px 16px; gap: 10px; }
  .brand-name { font-size: .98rem; }
  .brand-sub { font-size: .66rem; }
  .btn-call-header { padding: 9px 14px; font-size: .85rem; }
  .wrap { padding: 0 16px; }
  section { padding: 46px 0; }
  .hero { padding: 40px 0 0; }
  .hero-photo-frame { padding: 0 16px 8px; }
  .hero-photo-frame-dual { grid-template-columns: 1fr; max-width: 420px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .detail-photos-top { grid-template-columns: 1fr; max-width: 420px; }
  .photo-box, .lead-photo, .hero-photo-crossfade { height: 320px; }
  .other-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .process-row { grid-template-columns: 1fr 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .final-cta { padding: 54px 0; }
  .float-call { width: 48px; height: 48px; right: 14px; bottom: 14px; }
}

@media (max-width: 400px) {
  .other-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .nseo-item { grid-template-columns: 32px 100px 1fr; gap: 10px; }
  .nseo-photo { width: 100px; }
}
