/* 바닥코팅견적 — 네이비/오렌지, 견적서(인보이스) 문서 스타일. 각진 버튼, 항목별 표 레이아웃 */

:root {
  --primary: #003049;
  --primary-dark: #001E2E;
  --accent: #F4A261;
  --ink: #1B2A32;
  --paper: #EFEDE6;
  --card-bg: #FFFFFF;
  --line: #C9CCC2;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans KR", -apple-system, "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, .btn {
  font-family: "Stylish", "Noto Sans KR", sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

h3 { font-family: "Noto Sans KR", sans-serif; font-weight: 700; }

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.section-inner { max-width: 1120px; margin: 0 auto; padding: 56px 20px; }
.table-scroll { overflow-x: auto; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary);
  border-bottom: 4px solid var(--accent);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  color: #fff;
  font-family: "Stylish", sans-serif;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.menu-toggle {
  width: 44px; height: 44px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  background: transparent;
  border: 2px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
}

#primary-nav {
  display: none;
  flex-direction: column;
  width: 100%;
  gap: 2px;
}

#primary-nav.is-open { display: flex; }

#primary-nav a {
  display: block;
  padding: 12px 8px;
  color: #fff;
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  min-height: 44px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  #primary-nav {
    display: flex !important;
    flex-direction: row;
    width: auto;
    gap: 4px;
  }
  #primary-nav a {
    border-top: none;
    padding: 10px 14px;
  }
}

/* ---------- 버튼 (각진 사각형) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 26px;
  border: 2px solid var(--primary);
  border-radius: 0;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- 히어로: 견적 요청서 문서 스타일 ---------- */
.hero {
  background: var(--primary);
  padding: 48px 0 64px;
}

.hero-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.doc-frame {
  background: var(--card-bg);
  border: 2px solid var(--primary-dark);
  border-top: 8px solid var(--accent);
  padding: 32px 24px;
  position: relative;
}

.doc-tag {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--primary);
  display: inline-block;
  padding: 4px 10px;
}

.hero h1 {
  margin: 12px 0 16px;
  font-size: 2rem;
  color: var(--primary);
}

.hero-sub {
  margin: 0;
  max-width: 62ch;
  color: var(--ink);
}

.doc-meta {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px dashed var(--line);
}

.doc-meta > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.doc-meta dt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
}

.doc-meta dd {
  margin: 0;
  font-size: 0.92rem;
}

/* ---------- 실측 필요성 카드 ---------- */
.why-section { background: var(--paper); }

.why-section h2, .items-section h2, .compare-section h2, .faq-section h2 {
  color: var(--primary);
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.lead {
  margin: 0 0 28px;
  max-width: 72ch;
  color: var(--ink);
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.why-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  padding: 20px;
}

.why-num {
  display: inline-block;
  font-family: "Stylish", sans-serif;
  font-size: 1.1rem;
  color: var(--accent);
  background: var(--primary);
  padding: 3px 10px;
  margin-bottom: 10px;
}

.why-card h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--primary-dark); }
.why-card p { margin: 0; }

/* ---------- 견적 항목 표 (인보이스 라인 아이템) ---------- */
.items-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.estimate-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.estimate-table thead th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.estimate-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.95rem;
}

.estimate-table tbody tr:nth-child(even) { background: var(--paper); }

.row-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--primary-dark);
  font-family: "Stylish", sans-serif;
  font-size: 0.9rem;
}

.estimate-table td[data-label="항목"] {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .table-scroll { overflow-x: visible; }
  .estimate-table { min-width: 0; border: 1px solid var(--line); }
  .estimate-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .estimate-table, .estimate-table tbody, .estimate-table tr, .estimate-table th, .estimate-table td { display: block; width: 100%; }
  .estimate-table tr { border-bottom: 2px solid var(--line); }
  .estimate-table tr:last-child { border-bottom: none; }
  .estimate-table td { border: none; border-bottom: 1px solid var(--line); padding-left: 46%; position: relative; min-height: 44px; display: flex; align-items: center; }
  .estimate-table tr td:last-child { border-bottom: none; }
  .estimate-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    width: 40%;
    font-weight: 800;
    color: var(--accent);
  }
  .estimate-table td[data-label="항목"] { white-space: normal; }
}

/* ---------- 전화견적 vs 현장확인 비교 섹션 ---------- */
.split-section { background: var(--paper); }

.split-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.split-text h2 { color: var(--primary); font-size: 1.5rem; margin: 0 0 14px; }
.split-text p { margin: 0 0 14px; }
.split-text p:last-child { margin-bottom: 0; }

.split-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.stamp {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  font-family: "Stylish", sans-serif;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.stamp.alt {
  border-color: var(--accent);
  color: var(--primary-dark);
  background: var(--accent);
  transform: rotate(1deg);
}

/* ---------- 견적 비교 섹션 ---------- */
.compare-section { background: #fff; }
.compare-section p { max-width: 78ch; margin: 0 0 16px; }
.compare-section a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.compare-note { font-weight: 600; }

/* ---------- FAQ 아코디언 ---------- */
.faq-section { background: var(--paper); }

.accordion-item {
  border: 1px solid var(--line);
  background: var(--card-bg);
  margin-bottom: 10px;
}

.accordion-item h3 { margin: 0; }

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 16px 18px;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-trigger::after {
  content: "+";
  color: var(--accent);
  font-size: 1.2rem;
  margin-left: 12px;
}

.accordion-trigger[aria-expanded="true"]::after { content: "-"; }

.accordion-panel { padding: 0 18px 18px; }
.accordion-panel p { margin: 0; }

/* ---------- CTA ---------- */
.cta-section {
  background: var(--primary);
  color: #fff;
}

.cta-inner { text-align: left; }

.cta-section h2 {
  color: #fff;
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.cta-section p { margin: 0 0 20px; max-width: 60ch; }

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--primary-dark);
  color: #E7E9E5;
  padding: 40px 20px 28px;
}

.footer-nav {
  max-width: 1120px;
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-nav a {
  color: #E7E9E5;
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-nav a:hover { color: var(--accent); }

.site-footer address {
  max-width: 1120px;
  margin: 0 auto 16px;
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #B9BFB8;
}

.site-footer address a { color: var(--accent); text-decoration: none; }

.site-footer p { max-width: 1120px; margin: 0 auto; font-size: 0.8rem; color: #8C948C; }

/* ---------- 반응형 breakpoints ---------- */
@media (min-width: 480px) {
  .hero h1 { font-size: 2.2rem; }
}

@media (min-width: 768px) {
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .split-inner { grid-template-columns: 1.4fr 1fr; }
  .hero h1 { font-size: 2.5rem; }
  .doc-meta { grid-template-columns: repeat(3, 1fr); border-top: none; }
  .doc-meta > div { grid-template-columns: 1fr; border-bottom: none; border-left: 1px dashed var(--line); padding: 0 16px; }
  .doc-meta > div:first-child { border-left: none; padding-left: 0; }
}

@media (min-width: 1024px) {
  .section-inner { padding: 72px 20px; }
  .hero { padding: 64px 0 84px; }
  .doc-frame { padding: 44px 48px; }
  .hero h1 { font-size: 2.8rem; }
}

@media (min-width: 1280px) {
  .section-inner, .split-inner, .hero-inner, .footer-nav, .site-footer address, .site-footer p {
    max-width: 1200px;
  }
}

/* 현장 사진 */
.site-photo-section { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }
.site-photo-section h2 { color: var(--primary); margin: 0 0 18px; }
.site-photo-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.site-photo-grid picture { display: block; aspect-ratio: 4/3; overflow: hidden; }
.site-photo-grid img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .site-photo-grid { grid-template-columns: repeat(2, 1fr); } }
