/* 바닥코팅DIY — 버건디/오커, 노트/스케치북 느낌 (줄노트 배경 + 손글씨 헤딩 + 손그림 버튼) */

:root {
  --primary: #A4243B;
  --primary-dark: #7A1B2C;
  --accent: #D8973C;
  --ink: #2B1B16;
  --paper: #FBF4E8;
  --card-bg: #FFFFFF;
  --line: #E3D2B8;
  --rule: #D8C9A8;
}

* { 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 {
  font-family: "Nanum Pen Script", "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 {
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 34px,
    var(--rule) 34px,
    var(--rule) 35px
  );
  background-color: var(--paper);
}
.section.alt {
  background-color: #F7ECDA;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 34px,
    #E5D3AC 34px,
    #E5D3AC 35px
  );
}

.section-inner { max-width: 1120px; margin: 0 auto; padding: 52px 20px; position: relative; }
.section-inner::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(164, 36, 59, 0.18);
}
@media (min-width: 768px) { .section-inner::before { left: 26px; } }

.table-scroll { overflow-x: auto; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary-dark);
  border-bottom: 3px dashed 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: "Nanum Pen Script", sans-serif;
  font-size: 1.5rem;
  text-decoration: none;
}

.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: 60% 40% 55% 45% / 45% 55% 40% 60%;
  cursor: pointer;
}
.menu-toggle span { width: 20px; height: 2px; background: var(--accent); display: block; }

#primary-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
#primary-nav.is-open { display: flex; }
#primary-nav a {
  color: #fff;
  text-decoration: none;
  padding: 12px 8px;
  border-bottom: 1px dashed rgba(255,255,255,0.25);
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.98rem;
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  #primary-nav {
    display: flex;
    flex-direction: row;
    width: auto;
    gap: 24px;
  }
  #primary-nav a { border-bottom: none; padding: 8px 0; }
}

/* ---------- 버튼: 손그림 느낌 (비대칭 라운드 + 이중 테두리) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-family: "Noto Sans KR", sans-serif;
  font-weight: 700;
  text-decoration: none;
  border: 2.5px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: rotate(-1deg) translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--ink); box-shadow: 3px 3px 0 var(--primary-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- 히어로 ---------- */
.hero {
  position: relative;
  background: var(--primary-dark);
  background-image:
    radial-gradient(circle at 88% 18%, rgba(216,151,60,0.35), transparent 55%),
    repeating-linear-gradient(to bottom, transparent 0, transparent 34px, rgba(255,255,255,0.06) 34px, rgba(255,255,255,0.06) 35px);
  padding: 60px 0 72px;
}
.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  color: #fff;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  background: var(--accent);
  padding: 5px 14px;
  margin-bottom: 18px;
  border-radius: 40% 60% 50% 50% / 50% 50% 60% 40%;
}
.hero h1 {
  font-size: 3.4rem;
  line-height: 1.15;
  margin: 0 0 18px;
  color: #fff;
}
.hero-sub { font-size: 1.05rem; max-width: 56ch; color: #F3E3D5; }

@media (min-width: 768px) {
  .hero { padding: 92px 0 108px; }
  .hero h1 { font-size: 4.4rem; }
}

/* ---------- 공통 섹션 헤딩 ---------- */
.section h2 { font-size: 2rem; color: var(--primary-dark); margin: 0 0 10px; }
.lead { max-width: 68ch; color: #4A342B; margin-bottom: 30px; }

/* ---------- DIY 범위: 2단 노트 카드 ---------- */
.note-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.note-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  padding: 24px 22px;
}
.note-card h3 { font-size: 1.1rem; color: var(--primary-dark); margin: 0 0 10px; }
.note-card p { margin: 0; font-size: 0.98rem; }

@media (min-width: 768px) {
  .note-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 전문 시공 이유: 핀 카드 ---------- */
.reason-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.reason-card {
  position: relative;
  background: var(--card-bg);
  border: 1.5px dashed var(--line);
  padding: 26px 22px 22px;
}
.pin {
  position: absolute;
  top: -14px; left: 20px;
  width: 30px; height: 30px;
  border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
  background: var(--primary);
  color: #fff;
  font-family: "Nanum Pen Script", sans-serif;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 0 var(--accent);
}
.reason-card h3 { font-size: 1.1rem; color: var(--primary-dark); margin: 6px 0 10px; }
.reason-card p { margin: 0; font-size: 0.98rem; }

@media (min-width: 768px) {
  .reason-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 비교 표 ---------- */
.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--card-bg);
}
.compare-table th, .compare-table td {
  border: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.96rem;
}
.compare-table thead th {
  background: var(--primary);
  color: #fff;
  font-family: "Nanum Pen Script", sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
}
.compare-table tbody th {
  background: #F7ECDA;
  color: var(--primary-dark);
  font-weight: 700;
  white-space: nowrap;
}
.compare-table tbody tr:nth-child(even) td { background: #FCF8EF; }
.table-note { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--rule); }
.table-note a { color: var(--primary); font-weight: 700; text-decoration: underline; }

/* ---------- 실패 요인 ---------- */
.fail-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.fail-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--primary);
  padding: 22px 20px;
}
.fail-card h3 { font-size: 1.05rem; color: var(--primary-dark); margin: 0 0 8px; }
.fail-card p { margin: 0; font-size: 0.96rem; }

@media (min-width: 480px) {
  .fail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .fail-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 우선순위 스플릿 ---------- */
.split-inner {
  display: grid;
  gap: 30px;
}
.split-text p { margin: 0 0 16px; }
.split-text a { color: var(--primary); font-weight: 700; text-decoration: underline; }

.split-visual {
  min-height: 150px;
  background: var(--primary-dark);
  border-radius: 30% 70% 65% 35% / 40% 45% 55% 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px;
}
.split-visual .tag {
  background: var(--accent);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 40% 60% 50% 50% / 50% 50% 60% 40%;
}
.split-visual .tag.alt { background: transparent; color: #fff; border: 2px solid #fff; }

@media (min-width: 768px) {
  .split-inner { grid-template-columns: 1.3fr 1fr; align-items: center; }
}

/* ---------- FAQ 아코디언 ---------- */
.accordion-item { border: 1px dashed var(--line); background: #fff; margin-bottom: 12px; }
.accordion-item h3 { margin: 0; }
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: "Noto Sans KR", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary-dark);
  padding: 18px 20px;
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.accordion-trigger::after {
  content: "+";
  font-family: "Nanum Pen Script", sans-serif;
  font-size: 1.6rem;
  color: var(--accent);
  flex-shrink: 0;
}
.accordion-trigger[aria-expanded="true"]::after { content: "\2212"; }
.accordion-panel { padding: 0 20px 20px; }
.accordion-panel p { margin: 0; font-size: 0.96rem; }

/* ---------- CTA ---------- */
.cta-section {
  background: var(--primary-dark);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 34px, rgba(255,255,255,0.06) 34px, rgba(255,255,255,0.06) 35px);
  color: #fff;
}
.cta-inner { text-align: center; }
.cta-inner::before { display: none; }
.cta-section h2 { color: #fff; font-size: 2rem; margin-bottom: 12px; }
.cta-section p { color: #F3E3D5; margin: 0 auto 8px; max-width: 52ch; }
.cta-section .hero-cta { justify-content: center; }

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--ink);
  color: #E9DED0;
  padding: 44px 20px 28px;
}
.footer-nav {
  max-width: 1120px;
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.footer-nav a {
  color: #E9DED0;
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--accent); }
.site-footer address { max-width: 1120px; margin: 0 auto 16px; font-style: normal; font-size: 0.9rem; line-height: 1.8; }
.site-footer address a { color: var(--accent); text-decoration: none; }
.site-footer p { max-width: 1120px; margin: 0 auto; font-size: 0.82rem; color: #A8988A; }

@media (min-width: 1024px) {
  .hero h1 { font-size: 4.8rem; }
}

@media (min-width: 1280px) {
  .section-inner { padding-left: 0; padding-right: 0; }
  .section-inner::before { display: none; }
}

/* 현장 사진 */
.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); } }

/* 모바일: 비교 표 가로 스크롤 대신 행을 쌓아 화면에 한번에 표시 */
@media (max-width: 639px) {
  .table-scroll { overflow-x: visible; }
  .compare-table { min-width: 0; border: 1px solid var(--line); }
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; width: 100%; }
  .compare-table tr { border-bottom: 2px solid var(--line); }
  .compare-table tr:last-child { border-bottom: none; }
  .compare-table tr th[scope="row"] { background: #F7ECDA; color: var(--primary-dark); font-weight: 800; border: none; border-bottom: 1px solid var(--line); }
  .compare-table td { border: none; border-bottom: 1px solid var(--line); padding-left: 46%; position: relative; min-height: 44px; display: flex; align-items: center; }
  .compare-table tr td:last-child { border-bottom: none; }
  .compare-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    width: 40%;
    font-weight: 800;
    color: var(--primary-dark);
  }
}
