/* ============ Base ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ffffff;
  --ink: #0a1a13;
  --ink-soft: #4a5a52;
  --line: #e3e8e5;
  --sky: #3D8266;          /* mid green */
  --sky-deep: #0E4A36;     /* Pantone 627U deep green (main) */
  --sky-soft: #EDF3EF;     /* green-tinted off-white */
  --beige: #F4EBD3;        /* warm cream */
  --salmon: #F96E5B;       /* coral accent (complement) */
  --max: 1180px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.5em; font-weight: 800; }

/* ============ SVG icons ============ */
.ic {
  width: 18px; height: 18px;
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}
.ic-r { width: 16px; height: 16px; }
.ic-md { width: 22px; height: 22px; vertical-align: -4px; }
.ic-chk {
  width: 16px; height: 16px;
  color: var(--sky-deep);
  vertical-align: -3px;
  margin-right: 6px;
  flex-shrink: 0;
}

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1rem; font-weight: 800; letter-spacing: -0.03em; color: var(--sky-deep); }
.brand-text small { font-size: 0.7rem; color: var(--ink-soft); margin-top: 2px; }
.topbar-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sky-deep); color: #fff;
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 80px 20px 100px;
  background: linear-gradient(180deg, var(--sky-soft) 0%, #fff 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(14,74,54,0.18), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(249,110,91,0.12), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 50px;
  align-items: start;
}
.hero-text { min-width: 0; padding-top: 10px; }

.hero-desc {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 28px;
  line-height: 1.7;
}
.hd-line {
  display: block;
  margin-bottom: 4px;
}
.hd-line em {
  font-style: normal;
  color: var(--sky-deep);
  font-weight: 700;
}
.hd-line strong {
  color: var(--salmon);
  font-weight: 800;
  font-size: 1.15em;
}
.hd-sub {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--ink);
}
.hd-sub strong {
  color: var(--sky-deep);
  font-size: 1em;
}

/* Hero 우상단에 띄우는 캐릭터 (text가 옆으로 자연스레 흐름) */
.hero-floating-art {
  float: right;
  width: 240px;
  height: auto;
  margin: -20px -10px 10px 20px;
  shape-outside: margin-box;
}
.hero-cta {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 0;
  clear: both;
  padding-top: 16px;
}

/* Hero 폼 카드 */
.hero-form-wrap {
  background: #fff;
  border-radius: 24px;
  padding: 28px 26px;
  box-shadow: 0 20px 50px rgba(13,27,42,0.10), 0 0 0 1px rgba(14,74,54,0.05);
  position: relative;
  overflow: hidden;
}
.hero-form-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--sky-deep), var(--salmon));
}
.hero-form-head {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}
.hero-form-head h2 {
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--sky-deep);
}
.hero-form-head p {
  font-size: 0.88rem;
  color: var(--ink-soft);
}
/* Hero 안에 들어간 quote-form은 카드 스타일 끄고 슬림하게 */
.hero-form-wrap .quote-form {
  background: transparent;
  box-shadow: none;
  padding: 0;
  max-width: none;
  margin: 0;
}
.hero-form-wrap .form-grid {
  grid-template-columns: 1fr;
}
.hero-tag {
  display: inline-block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--sky-deep);
  background: #fff;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--sky-deep); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 900;
  margin-bottom: 18px;
}
.hero h1 .hl {
  background: linear-gradient(120deg, var(--sky-deep), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-desc { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
  list-style: none; display: flex; gap: 28px; flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 800; color: var(--sky-deep); }
.hero-stats span { font-size: 0.8rem; color: var(--ink-soft); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 0.95rem;
  transition: transform .15s, box-shadow .15s;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--sky-deep); color: #fff; box-shadow: 0 6px 18px rgba(14,74,54,0.30); }
.btn-primary:hover { background: #0a3a2a; }
.btn-secondary { background: var(--salmon); color: #fff; box-shadow: 0 6px 18px rgba(249,110,91,0.25); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--sky-deep); color: var(--sky-deep); }
.btn.big { padding: 16px 28px; font-size: 1rem; }

/* ============ Who ============ */
.who {
  padding: 80px 20px;
  max-width: var(--max); margin: 0 auto;
}
.who h2 { text-align: center; margin-bottom: 40px; }
.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.who-card {
  padding: 28px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.who-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(13,27,42,0.08);
  border-color: var(--sky);
}
.who-ico {
  width: 56px; height: 56px;
  margin-bottom: 14px;
  color: var(--sky-deep);
  background: var(--sky-soft);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.who-ico svg {
  width: 36px; height: 36px;
}
.who-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.who-card p { color: var(--ink-soft); font-size: 0.92rem; }

/* ============ Gallery (Marquee) ============ */
.gallery {
  padding: 80px 0;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.gallery-head {
  max-width: var(--max);
  margin: 0 auto 30px;
  padding: 0 20px;
  display: flex; justify-content: space-between; align-items: end;
}
.gallery-head h2 { color: #fff; }
.gallery-head p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

.marquee {
  position: relative;
  cursor: grab;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  /* 좌우 페이드 마스크 */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.marquee:active { cursor: grabbing; }

.marquee-track {
  display: flex;
  gap: 14px;
  padding: 0 20px;
  will-change: transform;
}

.pair-card {
  flex: 0 0 auto;
  width: clamp(280px, 80vw, 720px);
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #1a2737;
  pointer-events: none; /* 드래그 시 이미지가 잡혀가지 않도록 */
}
.pair-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-drag: none;
}

.gallery-tags {
  max-width: var(--max);
  margin: 30px auto 0;
  padding: 0 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.gallery-tags span {
  padding: 6px 14px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}

/* ============ Why ============ */
.why {
  padding: 80px 20px;
  max-width: var(--max); margin: 0 auto;
}
.why h2 { text-align: center; margin-bottom: 50px; }
.why-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}
.why-item {
  position: relative;
  padding: 30px 24px;
  background: var(--sky-soft);
  border-radius: 16px;
  border-top: 4px solid var(--salmon);
}
.why-num {
  font-size: 0.85rem; font-weight: 800;
  color: var(--sky-deep);
  margin-bottom: 10px;
  letter-spacing: 0.1em;
}
.why-item h3 { font-size: 1.15rem; margin-bottom: 10px; }
.why-item p { color: var(--ink-soft); font-size: 0.93rem; }

/* ============ Estimate ============ */
.estimate {
  padding: 80px 20px;
  background: linear-gradient(180deg, #fff, var(--sky-soft));
}
.estimate h2 { text-align: center; }
.estimate-lead { text-align: center; color: var(--ink-soft); margin-bottom: 40px; }
.estimate-grid {
  max-width: var(--max); margin: 0 auto 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.est-card {
  padding: 32px 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(13,27,42,0.06);
}
.est-card h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  display: flex; align-items: center; gap: 8px;
  color: var(--sky-deep);
}
.est-card ul { list-style: none; }
.est-card li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
  display: flex; align-items: center;
}
.est-card li:last-child { border-bottom: 0; }
.estimate-cta {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
}

/* ============ Quote form ============ */
.quote-form {
  max-width: 720px;
  margin: 0 auto 20px;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 6px 24px rgba(13,27,42,0.06);
}
.form-row { margin-bottom: 22px; }
.form-row-full { grid-column: 1 / -1; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-label {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.form-label .req { color: var(--salmon); margin-left: 2px; }
.form-hint {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.8rem;
  margin-left: 6px;
}
.quote-form input[type=text],
.quote-form input[type=tel],
.quote-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fafbf7;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.quote-form input::placeholder,
.quote-form textarea::placeholder {
  color: #a8b0a8;
  font-weight: 400;
}
.quote-form input:focus,
.quote-form textarea:focus {
  outline: 0;
  border-color: var(--sky-deep);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14,74,54,0.10);
}
.quote-form input.invalid,
.quote-form textarea.invalid {
  border-color: var(--salmon);
  background: #fff6f4;
}
.quote-form textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

/* segmented control */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--sky-soft);
  padding: 5px;
  border-radius: 14px;
}
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 8px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 700; font-size: 0.88rem;
  color: var(--ink-soft);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg input:checked + .seg-opt {
  background: #fff;
  color: var(--sky-deep);
  box-shadow: 0 2px 8px rgba(13,27,42,0.08);
}

/* file drop */
.file-drop {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  cursor: pointer;
  background: #fafbf7;
  color: var(--ink-soft);
  transition: border-color .15s, background .15s;
}
.file-drop:hover { border-color: var(--sky); background: var(--sky-soft); }
.file-drop-txt { flex: 1; font-size: 0.9rem; }
.file-drop-name {
  font-size: 0.85rem;
  color: var(--sky-deep);
  font-weight: 600;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check {
  display: flex; align-items: flex-start; gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.check input { margin-top: 4px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--sky-deep); }
.check small { color: #888; }

/* chip row (창 상태 다중선택) */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative;
  cursor: pointer;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: #fafbf7;
  color: var(--ink-soft);
  transition: all .15s;
}
.chip:hover span { border-color: var(--sky); color: var(--sky-deep); }
.chip input:checked + span {
  background: var(--sky-deep);
  border-color: var(--sky-deep);
  color: #fff;
  font-weight: 600;
}

/* 유형별 분기 표시 — JS가 .form-grid에 data-kind 부여 */
.only-apt, .only-villa, .only-biz { display: none; }
.form-grid[data-kind="아파트"] .only-apt,
.form-grid[data-kind="빌라"]   .only-villa,
.form-grid[data-kind="상가"]   .only-biz { display: block; }
/* 동일 row가 두 유형에 모두 보이는 경우 (only-villa + only-biz) */
.form-grid[data-kind="빌라"] .only-villa.only-biz,
.form-grid[data-kind="상가"] .only-villa.only-biz { display: block; }
.form-grid[data-kind="아파트"] .only-apt.only-villa { display: block; }

.btn-submit {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  border-radius: 14px;
  padding: 18px;
  font-size: 1.05rem;
  font-weight: 800;
}

.estimate-or {
  text-align: center;
  margin: 30px 0 16px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  position: relative;
}
.estimate-or::before, .estimate-or::after {
  content: '';
  display: inline-block;
  width: 60px; height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 12px;
}

/* ============ Modal ============ */
/* hidden 속성이 살아있게 — display 충돌 방지 */
.modal[hidden] { display: none !important; }
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(13,27,42,0.55);
  backdrop-filter: blur(4px);
  animation: fadeIn .2s ease;
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 36px 28px 28px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: pop .25s cubic-bezier(.2,.9,.3,1.2);
}
.modal-icon { margin: 0 auto 16px; width: 72px; height: 72px; }
.modal-icon svg { width: 100%; height: 100%; }
.modal-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.modal-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 20px; }
.modal-card .btn { width: 100%; justify-content: center; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ============ FAQ ============ */
.faq {
  padding: 80px 20px;
  max-width: 800px; margin: 0 auto;
}
.faq h2 { text-align: center; margin-bottom: 30px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--sky-deep);
  transition: transform .2s;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ============ Footer ============ */
.foot {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  padding: 50px 20px 30px;
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.foot-logo {
  width: 60px; height: 60px;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  margin-bottom: 12px;
  display: block;
}
.foot-brand strong {
  display: block;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 4px;
}
.foot-brand span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.foot-info p {
  font-size: 0.88rem;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.foot-info a { color: var(--sky); }
.foot-credit {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  align-self: end;
}
.foot-credit a { color: var(--sky); }

/* ============ Mobile ============ */
@media (max-width: 640px) {
  .hero { padding: 50px 16px 70px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-form-wrap { padding: 24px 20px; border-radius: 20px; }
  .hero-floating-art {
    float: none;
    display: block;
    width: 200px;
    margin: 0 auto 16px;
  }
  .hero-cta { padding-top: 12px; flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; padding: 13px 16px; font-size: 0.92rem; }
  .brand-text small { display: none; }
  .gallery-head { flex-direction: column; align-items: start; gap: 8px; }
  .pair-card { width: 88vw; }
  .estimate-cta { flex-direction: column; }
  .estimate-cta .btn { width: 100%; justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .quote-form { padding: 24px 20px; }
}
