/* ============================================================
   도아홈데코 — style.css
   따뜻하고 밝은 부분 인테리어 무드 / 모바일 퍼스트
============================================================ */

/* ===== 컬러 & 토큰 ===== */
:root {
  --brown: #5C4A3A;       /* 메인 브라운 */
  --cream: #F7F2E8;       /* 크림 배경 */
  --terracotta: #D67352;  /* 포인트 */
  --terracotta-dk: #c05e3f;
  --navy: #0A1F45;        /* 보조 브랜드 컬러 */
  --text: #2E2620;        /* 본문 텍스트 */
  --text-sub: #6B6258;    /* 보조 텍스트 */
  --white: #ffffff;
  --line: #e7ded0;
  --kakao: #FEE500;
  --kakao-text: #3A1D1D;

  --radius: 16px;
  --pill: 999px;
  --shadow: 0 10px 30px rgba(60, 45, 30, .10);
  --shadow-sm: 0 4px 14px rgba(60, 45, 30, .08);
  --maxw: 1140px;
  --header-h: 76px;
}

/* ===== 리셋 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.br-mo { display: none; }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 26px;
  border-radius: var(--pill); border: 0; cursor: pointer;
  font-size: 1rem; font-weight: 700; line-height: 1;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-dk); }
.btn-ghost { background: rgba(255,255,255,.85); color: var(--brown); }
.btn-ghost:hover { background: #fff; }
.btn-brown { background: var(--brown); color: #fff; }
.btn-brown:hover { background: #4a3b2e; }
.btn-cream { background: #efe6d6; color: var(--brown); }
.btn-cream:hover { background: #e7dcc7; }
.btn-kakao { background: var(--kakao); color: var(--kakao-text); }
.btn-kakao:hover { background: #f5d800; }
.btn-outline-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-block { width: 100%; }

/* ===== 섹션 공통 헤드 ===== */
.service-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.eyebrow {
  color: var(--terracotta); font-weight: 800; letter-spacing: .15em;
  font-size: .82rem; margin-bottom: 10px;
}
.section-title { font-size: 2rem; font-weight: 800; color: var(--brown); margin-bottom: 14px; }
.section-desc { color: var(--text-sub); font-size: 1.05rem; }
.section-desc .hint { display: inline-block; font-size: .9rem; color: var(--terracotta); }

/* ============================================================
   (A) 헤더
============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--brown); color: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,.12);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
}
/* 로고: 헤더 바 안에 정상 배치 (타이틀 사진에 자체 로고가 있어 헤더 로고는 내려오지 않게) */
.logo { display: flex; align-items: center; }
.logo-img { height: 52px; width: auto; display: block; }
/* 로고 이미지가 없을 때 텍스트 대체 */
.logo-text {
  font-weight: 800; color: #fff; font-size: 1.35rem; letter-spacing: -.02em;
}

.gnb { display: flex; gap: 26px; margin-left: auto; }
.gnb a { font-weight: 600; font-size: 1rem; opacity: .92; transition: opacity .2s; }
.gnb a:hover { opacity: 1; }

.header-call {
  display: flex; align-items: center; gap: 10px;
  padding-left: 24px; margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,.25);
}
.header-call .ico { width: 26px; height: 26px; fill: var(--terracotta); }
.header-call-text { display: flex; flex-direction: column; line-height: 1.25; }
.header-call-text em { font-style: normal; font-size: .72rem; opacity: .8; }
.header-call-text strong { font-size: 1.18rem; font-weight: 800; }

/* 햄버거 */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto;
}
.hamburger span { width: 26px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 메뉴 */
.mobile-menu {
  display: none; flex-direction: column;
  background: var(--brown); border-top: 1px solid rgba(255,255,255,.12);
}
.mobile-menu a {
  padding: 16px 24px; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-menu.open { display: flex; }
.mobile-call { color: var(--kakao) !important; }

/* ============================================================
   (B) 히어로
============================================================ */
/* 히어로 = 타이틀 사진 통째로. 원본 비율 그대로 노출(잘림/왜곡 없음) */
.hero {
  position: relative; margin-top: var(--header-h);
  line-height: 0; background: #ebe0ca;
}
.hero-full { width: 100%; height: auto; display: block; }
/* 사진 속 버튼 위 투명 클릭영역 */
.hero-hit { position: absolute; display: block; z-index: 2; cursor: pointer; }
.hero-content { position: relative; z-index: 1; padding-top: 20px; padding-bottom: 20px; }
.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800;
  color: var(--brown); line-height: 1.18; letter-spacing: -.02em;
  margin-bottom: 18px;
}
.hero-sub { font-size: clamp(1rem, 2.2vw, 1.3rem); color: var(--text); margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-badge {
  display: inline-block; font-size: .92rem; font-weight: 600; color: var(--brown);
  background: rgba(255,255,255,.7); padding: 8px 16px; border-radius: var(--pill);
}

/* ============================================================
   (C) 강점 4가지
============================================================ */
.strengths { background: var(--cream); padding: 40px 0; }
.strengths-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.strength {
  text-align: center; padding: 22px 16px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.strength-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; margin-bottom: 14px;
  background: var(--cream); border-radius: 50%;
}
.strength-ico svg { width: 30px; height: 30px; fill: none; stroke: var(--terracotta); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.strength h3 { font-size: 1.12rem; color: var(--brown); margin-bottom: 8px; }
.strength p { font-size: .9rem; color: var(--text-sub); }

/* ============================================================
   (D) OUR SERVICE
============================================================ */
.service { padding: 80px 0; background: #fff; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-thumb { aspect-ratio: 4/3; background: var(--cream); }
.service-thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-card h3 { font-size: 1.25rem; color: var(--brown); margin: 16px 18px 7px; }
.service-card p { font-size: 1rem; color: var(--text-sub); margin: 0 18px 20px; }

/* ============================================================
   (E) 시공사례 — 비포애프터
============================================================ */
.cases { padding: 80px 0; background: var(--cream); }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.ba-card {
  position: relative; aspect-ratio: 3/2; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); margin: 0;
  background: #ded3c2; user-select: none; touch-action: pan-y;
}
.ba-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: .95rem; text-align: center;
}
.ba-before { background: linear-gradient(135deg, #9a8f7e, #b8ab95); }
.ba-after  { background: linear-gradient(135deg, #c98a5f, #e0a878); }
.ba-after-wrap {
  position: absolute; inset: 0; overflow: hidden; width: 50%;
  border-right: 3px solid #fff;
}
.ba-after-wrap .ba-img { width: 200%; }   /* 잘려도 중앙 정렬 유지용 */
.ba-tag {
  position: absolute; top: 12px; padding: 4px 12px; border-radius: var(--pill);
  font-size: .78rem; font-weight: 700; color: #fff; z-index: 3;
}
.ba-tag-before { right: 12px; background: rgba(46,38,32,.7); }
.ba-tag-after  { left: 12px; background: rgba(214,115,82,.9); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 40px;
  transform: translateX(-50%); cursor: ew-resize; z-index: 4;
  display: flex; align-items: center; justify-content: center;
}
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; }
.ba-handle span {
  width: 38px; height: 38px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--terracotta); font-size: .9rem; font-weight: 800;
}
.ba-handle span::before { content: "‹ ›"; letter-spacing: -2px; }
.ba-caption {
  position: absolute; bottom: 12px; left: 12px; z-index: 3;
  background: rgba(0,0,0,.45); color: #fff; padding: 4px 12px;
  border-radius: var(--pill); font-size: .82rem; font-weight: 600;
}

/* ============================================================
   (F) 고객후기
============================================================ */
.reviews { padding: 80px 0; background: #fff; }
.review-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.review-card {
  background: var(--cream); border-radius: var(--radius); padding: 26px 22px;
  box-shadow: var(--shadow-sm);
}
.review-card .stars { color: #f0a500; font-size: 1.05rem; letter-spacing: 2px; margin-bottom: 12px; }
.review-card p { font-size: .98rem; color: var(--text); margin-bottom: 16px; }
.review-card cite { font-style: normal; font-size: .85rem; color: var(--text-sub); font-weight: 600; }

/* ============================================================
   (G) 문의하기
============================================================ */
.contact { padding: 80px 0; background: var(--brown); color: #fff; }
.contact-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact-copy h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.3; margin-bottom: 16px; }
.contact-copy p { font-size: 1.05rem; opacity: .9; margin-bottom: 26px; }
.contact-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.contact-form {
  background: #fff; color: var(--text); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.contact-form h3 { color: var(--brown); font-size: 1.3rem; margin-bottom: 18px; }
.contact-form label { display: block; font-size: .9rem; font-weight: 600; color: var(--text-sub); margin-bottom: 14px; }
.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: #fcfaf5; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(214,115,82,.15);
}
.contact-form .agree {
  display: flex; align-items: flex-start; gap: 8px;
  font-weight: 500; font-size: .85rem; cursor: pointer;
}
.contact-form .agree input { margin-top: 3px; flex-shrink: 0; }
.form-note { margin-top: 12px; font-size: .9rem; font-weight: 600; text-align: center; min-height: 1.2em; }
.form-note.ok { color: #2f9e44; }
.form-note.err { color: #e03131; }

/* ============================================================
   (H) 푸터
============================================================ */
.site-footer { background: var(--navy); color: rgba(255,255,255,.85); padding: 44px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer-brand { display: flex; align-items: baseline; gap: 12px; }
.footer-brand strong { font-size: 1.3rem; color: #fff; }
.footer-brand span { font-size: .9rem; opacity: .75; }
.footer-info { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; }
.footer-info a { text-decoration: underline; text-underline-offset: 2px; }
.footer-copy { font-size: .82rem; opacity: .6; margin-top: 6px; }

/* ============================================================
   떠있는 카톡 버튼
============================================================ */
.float-kakao {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--kakao); color: var(--kakao-text);
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
  justify-content: center; transition: transform .2s;
}
.float-kakao:hover { transform: scale(1.06); }
.float-kakao svg { width: 26px; height: 26px; fill: var(--kakao-text); }
.float-kakao span { font-size: .62rem; font-weight: 800; }

/* ============================================================
   반응형 — 태블릿
============================================================ */
@media (max-width: 900px) {
  .gnb, .header-call { display: none; }
  .hamburger { display: flex; }

  .strengths-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; gap: 32px; }
  .section-title { font-size: 1.7rem; }
}

/* ============================================================
   반응형 — 모바일
============================================================ */
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .br-mo { display: inline; }

  .header-inner { gap: 12px; }
  .logo-img { height: 40px; }

  .strengths-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .strength { padding: 18px 10px; }

  .service, .cases, .reviews, .contact { padding: 56px 0; }
  .service-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .case-grid { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }

  .contact-cta { flex-direction: column; }
  .contact-cta .btn { width: 100%; }
  .contact-form { padding: 22px; }

  .float-kakao { width: 56px; height: 56px; right: 14px; bottom: 14px; }
}
