/* 바닥코팅기간 — 버건디/오렌지, 캘린더·스케줄 모티프 (스텝 트랙 + 캘린더 카드) */

:root {
  --primary: #540B0E;
  --primary-light: #7A1519;
  --accent: #F4A261;
  --ink: #2B1210;
  --paper: #FBF3EC;
  --card-bg: #FFFFFF;
  --line: #E8D5C4;
}

* { 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, h3, .btn, .phase-name, .cal-head {
  font-family: "Sunflower", "Noto Sans KR", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

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; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary);
  border-bottom: 3px 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: "Sunflower", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  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: 8px;
  cursor: pointer;
}
.menu-toggle span { width: 20px; height: 2px; background: var(--accent); display: block; border-radius: 2px; }

#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 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;
    flex-direction: row;
    width: auto;
    gap: 24px;
  }
  #primary-nav a { border-bottom: none; padding: 8px 0; }
}

/* ---------- 버튼: 라운드 사각형 + 하단 액센트 바 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px 15px;
  font-size: 1.02rem;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
}
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary::after { background: var(--primary); }
.btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-ghost::after { background: var(--accent); }

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

/* ---------- 히어로: 캘린더 그리드 배경 + 스텝 트랙 ---------- */
.hero {
  position: relative;
  background: var(--primary);
  background-image:
    linear-gradient(rgba(244,162,97,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,162,97,0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  padding: 56px 0 48px;
}
.hero-inner {
  position: relative;
  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(--primary);
  background: var(--accent);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 2.2rem;
  margin: 0 0 18px;
  color: #fff;
}
.hero-sub { font-size: 1.03rem; max-width: 58ch; color: #F1DCCE; }

@media (min-width: 768px) {
  .hero { padding: 84px 0 64px; }
  .hero h1 { font-size: 3rem; }
}

/* 스텝 트랙: 진단 → 시공 → 양생 → 통행재개 */
.phase-track { margin-top: 40px; }
.phase-track ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phase {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(244,162,97,0.55);
  border-radius: 10px;
  padding: 12px 16px;
  min-height: 44px;
}
.phase-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-family: "Sunflower", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}
.phase-name { color: #fff; font-size: 1rem; }

@media (min-width: 768px) {
  .phase-track ol {
    flex-direction: row;
    position: relative;
    padding-top: 4px;
  }
  .phase-track ol::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 2px;
    background-image: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
    background-size: 12px 2px;
    z-index: 0;
  }
  .phase {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    background: none;
    border: none;
    padding: 0;
    gap: 8px;
    position: relative;
    z-index: 1;
  }
}

/* ---------- 요인 카드 ---------- */
.factors-section { background: var(--paper); }
.factors-section h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 10px; }
.lead { max-width: 68ch; color: #4A3230; margin-bottom: 32px; }

.factor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.factor-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  position: relative;
}
.factor-card::before {
  content: "";
  position: absolute;
  top: 0; left: 22px;
  width: 34px; height: 5px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}
.factor-num {
  display: block;
  font-family: "Sunflower", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  -webkit-text-stroke: 1px var(--primary);
  margin-bottom: 8px;
}
.factor-card h3 { font-size: 1.12rem; color: var(--primary); margin: 0 0 10px; }
.factor-card p { margin: 0; font-size: 0.98rem; }

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

/* ---------- 스플릿 섹션 ---------- */
.split-section { background: #fff; border-top: 1px solid var(--line); }
.split-section.alt { background: var(--paper); }
.split-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 20px;
  display: grid;
  gap: 32px;
}
.split-text h2 { font-size: 1.45rem; color: var(--primary); margin-bottom: 16px; }
.split-text p { margin: 0 0 16px; }

.split-visual { display: flex; align-items: center; justify-content: center; padding: 20px; }

.cal-card {
  position: relative;
  width: 220px;
  max-width: 100%;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 22px 18px 18px;
  box-shadow: 6px 6px 0 var(--accent);
}
.cal-rings { position: absolute; top: -14px; left: 0; right: 0; display: flex; justify-content: center; gap: 44px; }
.cal-rings span { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid var(--paper); display: block; }
.cal-head { text-align: center; color: var(--primary); font-size: 0.92rem; letter-spacing: 0.1em; margin: 6px 0 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cal-grid span { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); }
.cal-grid span.on { background: var(--accent); border-color: var(--accent); }

.step-mark {
  font-family: "Sunflower", sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--primary);
  background: var(--accent);
  width: 90px; height: 90px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

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

/* ---------- 일정 단축 방법 ---------- */
.manage-section { background: #fff; border-top: 1px solid var(--line); }
.manage-section h2 { font-size: 1.55rem; color: var(--primary); margin-bottom: 28px; }
.manage-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.manage-card {
  background: var(--paper);
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 22px;
}
.manage-card h3 { font-size: 1.08rem; color: var(--primary); margin: 0 0 10px; }
.manage-card p { margin: 0; font-size: 0.98rem; }
.manage-note { margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--line); }
.manage-note a { color: var(--primary-light); font-weight: 700; text-decoration: underline; }

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

/* ---------- 관련 페이지 ---------- */
.related-section { background: #fff; border-top: 1px solid var(--line); }
.related-section h2 { font-size: 1.55rem; color: var(--primary); margin-bottom: 20px; }
.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.related-list li { margin: 0; }
.related-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--primary);
  background: var(--paper);
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.related-list a:hover { background: var(--primary); color: #fff; }

/* ---------- FAQ 아코디언 ---------- */
.faq-section { background: var(--paper); border-top: 1px solid var(--line); }
.faq-section h2 { font-size: 1.55rem; color: var(--primary); margin-bottom: 24px; }
.accordion-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.accordion-item h3 { margin: 0; }
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: "Sunflower", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  padding: 18px 20px;
  min-height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.accordion-trigger::after {
  content: "+";
  font-size: 1.3rem;
  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.98rem; }

/* ---------- CTA ---------- */
.cta-section {
  background: var(--primary);
  color: #fff;
  border-top: 4px solid var(--accent);
}
.cta-inner { text-align: center; }
.cta-section h2 { font-size: 1.55rem; margin-bottom: 12px; }
.cta-section p { color: #F1DCCE; margin: 0 auto 8px; max-width: 52ch; }
.cta-section .hero-cta { justify-content: center; }

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--ink);
  color: #E9DCD2;
  padding: 16px 20px;
}
.site-footer address { max-width: 1120px; margin: 0 auto 16px; font-style: normal; font-size: 0.9rem; line-height: 1.5; }
.site-footer address a { color: var(--accent); text-decoration: none; }
@media (min-width: 1280px) {
  .section-inner, .split-inner { padding-left: 0; padding-right: 0; }
}

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

/* ---------- 표 섹션 (AEO 비용/절차 표) ---------- */
.table-section { padding: 48px 20px; }
.table-section h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 16px; color: var(--primary); }
.table-section .lead { max-width: 68ch; margin: 0 0 24px; }
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
  background: #fff;
}
.table-scroll table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 0.94rem; }
.table-scroll thead th { background: var(--primary); color: #fff; font-weight: 600; text-align: left; padding: 14px 16px; }
.table-scroll tbody th { text-align: left; color: var(--primary); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-scroll tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-scroll tbody tr:last-child th, .table-scroll tbody tr:last-child td { border-bottom: none; }
