/* ============================================================
   다시제주 — 제주 구옥/돌집 공간재생 랜딩페이지
   색상: 따뜻한 아이보리 배경 + 제주 돌담 차콜/브라운 포인트
   ============================================================ */

:root {
  --ivory:        #f7f3ec;   /* 기본 배경 (따뜻한 오프화이트) */
  --ivory-alt:    #efe8dc;   /* 교차 섹션 배경 */
  --beige:        #e4d8c5;   /* 이미지 로딩 전 베이스 */
  --beige-deep:   #d8c8af;
  --charcoal:     #2c2a26;   /* 제주 돌담 느낌의 짙은 차콜 (메인 텍스트/포인트) */
  --brown:        #5a4b3a;   /* 브라운 포인트 */
  --brown-soft:   #8a7a64;
  --line:         #ddd2c1;
  --white:        #fffdf9;

  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(44, 42, 38, 0.08);
  --shadow-sm: 0 6px 18px rgba(44, 42, 38, 0.06);

  --font: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    system-ui, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;

  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 236, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--brown);
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--charcoal); }

.nav-cta {
  background: var(--charcoal);
  color: var(--white);
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.nav-cta:hover { background: var(--brown); color: var(--white); transform: translateY(-1px); }

/* 햄버거 버튼 (모바일) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--charcoal);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--brown); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--charcoal);
}
.btn-outline:hover { background: var(--charcoal); color: var(--white); transform: translateY(-2px); }

/* ===== Section base ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--ivory-alt); }

.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  margin: 0 0 22px;
  letter-spacing: -0.02em;
}
.section-lead p { margin: 0 0 14px; color: var(--brown); font-size: 1.05rem; }
.section-lead p:last-child { margin-bottom: 0; }

.section-note {
  max-width: 720px;
  margin: 48px auto 0;
  text-align: center;
  color: var(--brown-soft);
  font-size: 1.02rem;
  line-height: 1.9;
}

/* ===== Hero ===== */
.hero {
  padding: 120px 0 110px;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(216, 200, 175, 0.45), transparent 70%),
    var(--ivory);
}
.hero-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.eyebrow {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brown-soft);
  text-transform: uppercase;
  margin: 0 0 22px;
}
.hero-title {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
}
.hero-copy p { margin: 0 0 18px; color: var(--brown); font-size: 1.08rem; }
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* ===== Card grid (소유주의 장점) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--beige-deep);
}
.card-num {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brown-soft);
  margin-bottom: 12px;
}
.card p { margin: 0; font-weight: 600; font-size: 1.05rem; line-height: 1.6; }

/* ===== Before & After (공간별 비교) ===== */
.ba-sets {
  display: grid;
  gap: 68px;
}

/* 공간 이름 + 얇은 구분선 */
.ba-set-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.ba-set-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.ba-set-num {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brown-soft);
}
.ba-set-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

/* PC: 좌우 2열 / 모바일: 위아래 1열 (하단 미디어쿼리) */
.ba-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.ba-item { margin: 0; }

/* 프레임이 비율을 잡고, 이미지는 cover 로 채워 왜곡을 막습니다.
   --ba-ratio 를 세트별로 지정해 세로형 이미지도 과도하게 잘리지 않게 합니다. */
.ba-frame {
  position: relative;
  aspect-ratio: var(--ba-ratio, 4 / 3);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--beige) 0%, var(--beige-deep) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ba-item:hover .ba-frame {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.ba-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 사진 좌측 상단 BEFORE / AFTER 배지 */
.ba-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  padding: 6px 13px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.ba-badge-before {
  background: rgba(255, 253, 249, 0.88);
  color: var(--brown);
  border: 1px solid rgba(221, 210, 193, 0.9);
}
.ba-badge-after {
  background: rgba(44, 42, 38, 0.86);
  color: var(--white);
}

.ba-item figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brown-soft);
}

/* 안내문 */
.ba-disclaimer {
  max-width: 760px;
  margin: 46px auto 0;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--brown-soft);
}

/* 강조 문구 */
.ba-statement {
  max-width: 760px;
  margin: 26px auto 0;
  padding: 28px 30px;
  text-align: center;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  font-weight: 700;
  line-height: 1.85;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ===== 계약 안내 ===== */
.contract-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.contract-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}
.contract-block h3 {
  font-size: 1.22rem;
  font-weight: 800;
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.contract-yes h3 { color: var(--charcoal); }
.contract-no h3 { color: var(--brown-soft); }

.check-list, .cross-list { list-style: none; margin: 0; padding: 0; }
.check-list li, .cross-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  font-weight: 500;
  line-height: 1.6;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--brown);
}
.cross-list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--brown-soft);
}

/* ===== 문의하기 ===== */
.contact { background: var(--charcoal); color: var(--ivory); }
.contact-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.contact .section-title { color: var(--white); }
.contact-body { color: rgba(247, 243, 236, 0.82); font-size: 1.08rem; margin: 0 0 36px; }
.contact-phones {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}
.contact-phone-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.contact-phone-label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(247, 243, 236, 0.7);
}
.contact-phone {
  display: inline-block;
  font-size: clamp(1.5rem, 6.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
  white-space: nowrap;
  max-width: 100%;
}
.contact-phone-alt { font-size: clamp(1.35rem, 5.6vw, 2.1rem); }
.contact-phone:hover { color: var(--beige); }
.contact-note { color: rgba(247, 243, 236, 0.65); margin: 0 0 36px; }
.contact-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact .btn-outline { color: var(--ivory); border-color: var(--ivory); }
.contact .btn-outline:hover { background: var(--ivory); color: var(--charcoal); }

/* ===== Footer ===== */
.site-footer {
  background: var(--ivory-alt);
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  justify-content: space-between;
}
.footer-brand .brand { font-size: 1.2rem; }
.footer-brand p { margin: 10px 0 0; color: var(--brown-soft); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; align-content: flex-start; }
.footer-nav a { font-weight: 600; color: var(--brown); transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--charcoal); }
.footer-contact a { font-weight: 700; font-size: 1.1rem; }
.footer-contact .footer-phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
}
.footer-phone-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown-soft);
  white-space: nowrap;
}
.footer-phone-row a { white-space: nowrap; }
.footer-contact p { margin: 8px 0 0; color: var(--brown-soft); font-size: 0.95rem; }
.footer-copy {
  text-align: center;
  margin: 40px 0 0;
  color: var(--brown-soft);
  font-size: 0.88rem;
}

/* ============================================================
   Responsive — 태블릿 / 모바일
   ============================================================ */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s ease;
  }
  .nav.open { max-height: 420px; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
  }
  .nav-list li { border-top: 1px solid var(--line); }
  .nav-link {
    display: block;
    padding: 16px 24px;
    font-size: 1.05rem;
  }
  .nav-cta {
    margin: 12px 24px 0;
    text-align: center;
    border-radius: 999px;
    padding: 14px 18px;
  }

  .contract-grid { grid-template-columns: 1fr; }
}

/* 좁은 화면에서는 비포/애프터를 위아래로 쌓아 사진을 크게 봅니다. */
@media (max-width: 720px) {
  .ba-sets { gap: 52px; }
  .ba-pair { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 80px 0 72px; }

  .ba-statement { padding: 24px 22px; }

  .hero-actions .btn,
  .contact-actions .btn { flex: 1 1 100%; }

  .footer-inner { flex-direction: column; gap: 28px; }
}

/* 접근성: 모션 최소화 선호 시 부드러운 스크롤 해제 */
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  * { transition: none !important; }
}
