/* ===================================================================
   메이커플렉스 (MakerFlex) — 디자인 시스템
   "스타벅스 시스템 구조 × 메이커플렉스 우드 팔레트"

   가져온 원칙 (Starbucks DS):
   - 4단계 브랜드 색 체계 → 우드 4단계(Walnut/Oak/Espresso/Uplift)로 매핑
   - 따뜻한 크림 캔버스(순백 금지), 색블록 페이지 리듬
   - 풀필 50px 버튼 + active scale(0.95), 겹겹 저알파 그림자
   - 플로팅 원형 CTA(Frap) → "전화 상담" 버튼으로 전용
   - 타이트 트래킹(-0.01em), 크기가 아닌 굵기·색으로 위계
   - 골드=리워드 전용 → 세이지 그린=Zero Waste 전용으로 대체
   =================================================================== */

:root {
  /* ---- 브랜드 우드 4단계 (Starbucks 4-green 매핑) ---- */
  --brand:        #5b4228;   /* Walnut  — 제목/주요 브랜드 신호 (≈ Starbucks Green) */
  --brand-accent: #7b5730;   /* Oak     — 채움형 CTA·플로팅 버튼 (≈ Green Accent) */
  --brand-deep:   #2e2519;   /* Espresso— 다크 밴드·푸터 (≈ House Green) */
  --brand-uplift: #4a3722;   /* 장식·그라데이션 보조 (≈ Green Uplift) */
  --brand-wash:   #ece2d1;   /* 옅은 우드 워시 — 유틸 표면 (≈ Green Light) */

  /* ---- 예약 색: Zero Waste(지속가능) 세리머니 전용 (≈ Gold 자리) ---- */
  --eco:      #5c6b4f;       /* 무광 세이지 — 지속가능 배지/포인트에만 */
  --eco-wash: #eef1e9;       /* 세이지 배경 워시 */

  /* ---- 표면 / 캔버스 ---- */
  --canvas:  #f4f0e9;        /* 웜 크림 — 기본 페이지 캔버스 (순백 금지) */
  --ceramic: #ece7dd;        /* 살짝 짙은 크림 — 존 구분 */
  --surface: #faf7f0;        /* 웜 오프화이트 — 크림 배경과 겉돌지 않게 톤다운 */
  --cool:    #f7f6f4;        /* 조용한 유틸 표면 */

  /* ---- 텍스트 (순흑 금지 — 웜톤 87%) ---- */
  --ink:        #211812;   /* 불투명 진한 브라운 — 또렷한 본문 */
  --ink-soft:   #473d31;   /* 보조 텍스트도 진하게(반투명 제거) */
  --on-dark:        rgba(255, 255, 255, 1);
  --on-dark-soft:   rgba(255, 255, 255, 0.72);
  --line: #e6ddce;

  /* ---- 반경 ---- */
  --r-card: 12px;
  --r-pill: 50px;

  /* ---- 그림자 (겹겹 저알파) ---- */
  --sh-card: 0 0 0.5px rgba(40,32,24,0.14), 0 1px 1px rgba(40,32,24,0.24);
  --sh-nav:  0 1px 3px rgba(40,32,24,0.10), 0 2px 2px rgba(40,32,24,0.06), 0 0 2px rgba(40,32,24,0.07);
  --sh-lift: 0 14px 40px rgba(40,32,24,0.12);
  --sh-frap-base: 0 0 6px rgba(0,0,0,0.24);
  --sh-frap-amb:  0 8px 12px rgba(0,0,0,0.14);

  /* ---- 간격 스케일 (px, 16 기준) ---- */
  --space-3: 16px; --space-4: 24px; --space-5: 32px;
  --space-6: 40px; --space-7: 48px; --space-9: 64px;

  --max: 1140px;
  --sans: "Inter", "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Noto Serif KR", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;                 /* 본문 기본 굵기 상향 — 또렷하게 */
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.55;
  letter-spacing: -0.01em;          /* 타이트 트래킹 — 시스템 전역 */
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

/* 위계는 굵기+색으로. 제목도 sans(Starbucks식). */
h1, h2, h3 { font-family: var(--sans); letter-spacing: -0.02em; margin: 0; }

a { color: var(--brand-accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--space-3); }
@media (min-width: 768px) { .container { padding: 0 var(--space-4); } }
@media (min-width: 1024px) { .container { padding: 0 var(--space-6); } }

/* 절제된 세리프 편집 포인트 (Starbucks가 Rewards에만 쓰듯 — 홈 About 등 극소수) */
.editorial { font-family: var(--serif); letter-spacing: -0.01em; font-weight: 500; }

/* -------------------- 헤더 / 네비게이션 -------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 240, 233, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--sh-nav);
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 0 8px;
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand .logo { font-size: 1.4rem; font-weight: 700; color: var(--brand); letter-spacing: -0.02em; }
.brand .addr { font-size: 0.75rem; color: var(--ink-soft); margin-top: 3px; }
.header-contact {
  font-size: 0.9rem; font-weight: 600; color: var(--brand-accent);
  white-space: nowrap; letter-spacing: -0.01em;
}
.nav { display: flex; gap: 2px; flex-wrap: wrap; padding-bottom: 10px; }
.nav a {
  padding: 8px 16px; border-radius: var(--r-pill); color: var(--ink);
  font-weight: 500; font-size: 0.95rem; transition: all 0.18s ease;
}
.nav a:hover { background: var(--brand-wash); color: var(--brand); }
.nav a.active { background: var(--brand-deep); color: #fff; }

/* -------------------- 히어로 (크림 캔버스) -------------------- */
.hero {
  position: relative; padding: 116px 0 104px; text-align: center;
  background:
    radial-gradient(1100px 480px at 50% -10%, rgba(123, 87, 48, 0.14), transparent 62%),
    linear-gradient(180deg, var(--ceramic) 0%, var(--canvas) 100%);
  overflow: hidden;
}
.hero::after {                        /* 은은한 나뭇결 텍스처 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    100deg, transparent, transparent 22px, rgba(74,55,34,0.03) 22px, rgba(74,55,34,0.03) 23px);
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-block; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.28em; color: var(--brand-accent);
  margin-bottom: 18px; padding-left: 0.28em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; line-height: 1.1; color: var(--brand); margin-bottom: 18px; }
.hero p { font-size: 1.15rem; color: var(--ink-soft); max-width: 620px; margin: 0 auto; line-height: 1.6; }
.hero-slogan { font-size: clamp(1.7rem, 3.8vw, 2.7rem); font-weight: 700; color: var(--brand); letter-spacing: -0.02em; margin: 0 auto 14px; max-width: 720px; }

/* -------------------- 섹션 공통 -------------------- */
.section { padding: 88px 0; }
.section.alt { background: var(--ceramic); }
.section-head { margin-bottom: 44px; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 700; color: var(--ink); margin-bottom: 12px; position: relative; padding-bottom: 16px; }
.section h2::after {                  /* 우아한 우드 언더라인 */
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 52px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-accent), var(--brand));
}
.section .lead { color: var(--ink-soft); max-width: 700px; margin: 0; font-size: 1.05rem; line-height: 1.6; }
.section p { max-width: 760px; line-height: 1.7; }

/* -------------------- 버튼 (풀필 50px + scale 0.95) -------------------- */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--r-pill);
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem;
  letter-spacing: -0.01em; border: 1.5px solid var(--ink); color: var(--ink);
  background: transparent; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn:active { transform: scale(0.95); }        /* 시그니처 마이크로 인터랙션 */
.btn.primary {
  background: var(--brand-accent); border-color: var(--brand-accent);
  color: #fff; box-shadow: var(--sh-card);
}
.btn.primary:hover { background: var(--brand); border-color: var(--brand); box-shadow: var(--sh-lift); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* 다크 밴드 위 버튼 페어링 (Green-on-Green Inverted 매핑) */
.contact-banner .btn { border-color: rgba(255,255,255,0.7); color: #fff; background: transparent; }
.contact-banner .btn:hover { background: #fff; color: var(--brand-deep); border-color: #fff; }
.contact-banner .btn.solid { background: #fff; color: var(--brand-deep); border-color: #fff; }
.contact-banner .btn.solid:hover { background: var(--brand-wash); border-color: var(--brand-wash); }

/* -------------------- 카드 / 그리드 -------------------- */
.grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; background: var(--surface); box-shadow: var(--sh-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-lift); }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { text-decoration: none; color: inherit; }
.card .thumb {
  aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--brand-wash);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(123,87,48,0.10), transparent 60%),
    repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(74,55,34,0.05) 14px, rgba(74,55,34,0.05) 28px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 0.85rem; text-align: center; padding: 12px;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.card .body { padding: 20px 22px 22px; }
.card .body h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.card .body p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; }

/* -------------------- 절차 단계 -------------------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  position: relative; padding: 24px 26px 24px 78px;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--sh-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step:hover { transform: translateX(4px); box-shadow: var(--sh-lift); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 22px; top: 22px;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-accent), var(--brand));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem; box-shadow: var(--sh-card);
}
.step h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.step p { margin: 0; color: var(--ink-soft); line-height: 1.6; }

/* -------------------- FAQ (아코디언) -------------------- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 4px 22px; margin-bottom: 14px; background: var(--surface);
  box-shadow: var(--sh-card); transition: box-shadow 0.18s ease;
}
.faq details[open] { box-shadow: var(--sh-lift); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; padding: 18px 0; list-style: none; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand-accent); font-size: 1.5rem; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; color: var(--ink-soft); line-height: 1.7; }

/* -------------------- 지속가능(Zero Waste) 배지 — 세이지 예약색 -------------------- */
.eco-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--eco); color: var(--eco);
  background: var(--eco-wash); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.02em;
}

/* -------------------- 다크 밴드 (Espresso feature band) -------------------- */
.contact-banner {
  position: relative; color: #fff; padding: 84px 0; text-align: center;
  background:
    radial-gradient(820px 420px at 50% 0%, rgba(123,87,48,0.42), transparent 66%),
    var(--brand-deep);
  overflow: hidden;
}
.contact-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(100deg, transparent, transparent 24px, rgba(255,255,255,0.025) 24px, rgba(255,255,255,0.025) 25px);
}
.contact-banner .container { position: relative; z-index: 1; }
.contact-banner h2 { color: #fff; }
.contact-banner h2::after { background: var(--brand-accent); }
.contact-banner p { color: var(--on-dark-soft); max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* -------------------- 푸터 (Espresso) -------------------- */
.site-footer {
  background: var(--brand-deep); color: var(--on-dark-soft);
  padding: 56px 0; font-size: 0.9rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.site-footer strong { color: #fff; display: block; margin-bottom: 8px; font-size: 1.05rem; font-weight: 600; }
.site-footer a { color: var(--on-dark-soft); }
.site-footer a:hover { color: #fff; }

/* -------------------- 플로팅 전화상담 버튼 (Frap 매핑) -------------------- */
.frap {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand-accent); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-frap-base), var(--sh-frap-amb);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.frap svg { width: 26px; height: 26px; fill: #fff; }
.frap:hover { box-shadow: var(--sh-frap-base), 0 12px 20px rgba(0,0,0,0.20); }
.frap:active { transform: scale(0.95); box-shadow: var(--sh-frap-base), 0 8px 12px rgba(0,0,0,0); }
.frap::after {
  content: "전화 상담"; position: absolute; right: 68px; white-space: nowrap;
  background: var(--brand-deep); color: #fff; font-size: 0.8rem; font-weight: 600;
  padding: 6px 12px; border-radius: var(--r-pill);
  opacity: 0; transform: translateX(6px); transition: all 0.2s ease; pointer-events: none;
}
.frap:hover::after { opacity: 1; transform: translateX(0); }
@media (max-width: 640px) { .frap { right: 16px; bottom: 16px; } .frap::after { display: none; } }

/* -------------------- 스크롤 등장 효과 -------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* -------------------- 반응형 -------------------- */
@media (max-width: 640px) {
  .header-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero { padding: 84px 0 70px; }
  .section { padding: 60px 0; }
}

/* -------------------- 포트폴리오: 프로젝트 지그재그 -------------------- */
.project {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; margin-bottom: 80px;
}
.project:last-of-type { margin-bottom: 0; }
.project.reverse .project-media { order: 2; }
.project-media img {
  width: 100%; height: 100%; max-height: 380px; object-fit: cover;
  border-radius: var(--r-card); box-shadow: var(--sh-lift); display: block;
}
.project-num {
  display: inline-block; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.2em; color: var(--brand-accent); margin-bottom: 10px;
}
.project-body h3 { font-size: 1.5rem; font-weight: 700; color: var(--ink); margin-bottom: 16px; line-height: 1.3; }
.project-body p { color: var(--ink-soft); line-height: 1.85; font-size: 1rem; margin: 0; }
@media (max-width: 760px) {
  .project { grid-template-columns: 1fr; gap: 22px; margin-bottom: 52px; }
  .project.reverse .project-media { order: 0; }
  .project-media img { max-height: 300px; }
}

/* -------------------- 포트폴리오: 납품 실적 -------------------- */
.years { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 30px; }
.year-col strong {
  display: block; color: var(--brand); font-size: 1.25rem; font-weight: 700;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--brand-wash);
}
.year-col ul { list-style: none; padding: 0; margin: 0; }
.year-col li { font-size: 0.92rem; color: var(--ink-soft); padding: 3px 0; line-height: 1.5; }
.year-col li.more { color: var(--brand-accent); font-weight: 600; margin-top: 4px; }
.record-summary {
  margin-top: 44px; padding: 30px 34px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--brand-accent);
  border-radius: var(--r-card); box-shadow: var(--sh-card);
  font-size: 1.08rem; line-height: 1.85; color: var(--ink);
}
.record-summary strong { color: var(--brand); }

/* -------------------- 가구수리: 수리 가능 품목 -------------------- */
.repair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.repair-cat {
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface); box-shadow: var(--sh-card); overflow: hidden;
}
.repair-cat > h3 {
  background: var(--brand-deep); color: #fff; margin: 0;
  padding: 15px 20px; font-size: 1.08rem; font-weight: 600;
}
.repair-cat ul { list-style: none; margin: 0; padding: 6px 0; }
.repair-cat li {
  padding: 11px 20px; font-size: 0.95rem; color: var(--ink);
  border-top: 1px solid var(--brand-wash); display: flex; align-items: center; gap: 10px;
}
.repair-cat li:first-child { border-top: none; }
.repair-cat li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-accent); flex: 0 0 auto;
}

/* -------------------- 홈: 신뢰 지표 스트립 -------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px; text-align: center; }
.stat .num { font-size: clamp(2.1rem, 4.4vw, 2.9rem); font-weight: 700; color: var(--brand); line-height: 1; }
.stat .num small { font-size: 1.2rem; font-weight: 700; }
.stat .label { margin-top: 10px; color: var(--ink-soft); font-size: 0.95rem; }

/* -------------------- 포트폴리오: 소재·특징 태그 -------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag {
  font-size: 0.82rem; font-weight: 600; color: var(--brand-accent);
  background: var(--brand-wash); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px;
}

/* -------------------- 입력 폼 (상담/AS) -------------------- */
.mf-form { max-width: 660px; }
.mf-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.mf-field { margin-bottom: 24px; }
.mf-field label { display: block; font-size: 0.92rem; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.mf-field label .req { color: var(--brand-accent); }
.mf-field input, .mf-field textarea {
  width: 100%; border: none; border-bottom: 1.5px solid #cbbfa9; background: transparent;
  padding: 10px 2px; font-family: inherit; font-size: 1rem; font-weight: 500; color: var(--ink);
}
.mf-field input::placeholder, .mf-field textarea::placeholder { color: #a89b84; }
.mf-field input:focus, .mf-field textarea:focus { outline: none; border-bottom-color: var(--brand-accent); }
.mf-field textarea { resize: vertical; min-height: 120px; }
.mf-note { font-size: 0.92rem; color: var(--ink-soft); margin: 4px 0 22px; }
.mf-form .btn.submit { width: 100%; border: none; }
.mf-ok {
  display: none; margin-top: 18px; padding: 16px 20px; border-radius: var(--r-card);
  background: var(--brand-wash); border: 1px solid var(--line); color: var(--brand);
  font-weight: 600;
}
@media (max-width: 600px) { .mf-form .row { grid-template-columns: 1fr; gap: 0; } }

/* -------------------- 팝업(모달) -------------------- */
.mf-modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: flex-start; justify-content: center;
  padding: 48px 16px; overflow-y: auto;
  background: rgba(46, 37, 25, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.mf-modal.open { display: flex; animation: mfFade 0.2s ease; }
@keyframes mfFade { from { opacity: 0; } to { opacity: 1; } }
.mf-modal-box {
  position: relative; width: 100%; max-width: 620px; margin: auto;
  background: var(--surface); border-radius: var(--r-card);
  box-shadow: var(--sh-lift); padding: 44px 40px 40px;
}
.mf-modal-box .mf-brand { text-align: center; margin-bottom: 8px; }
.mf-modal-box .mf-brand img { width: 96px; height: auto; margin: 0 auto 6px; display: block; }
.mf-modal-box h2 { font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: 22px; }
.mf-modal-close {
  position: absolute; top: 14px; right: 16px; width: 40px; height: 40px;
  border: none; background: none; font-size: 1.7rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer; border-radius: 50%;
}
.mf-modal-close:hover { background: var(--brand-wash); color: var(--ink); }
.mf-modal .mf-form { max-width: none; }
@media (max-width: 600px) { .mf-modal-box { padding: 40px 22px 28px; } }
