@import url('https://fonts.googleapis.com/css2?family=Hahmlet:wght@600;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  --bg: #F7F8F6;
  --text: #1B2426;
  --primary: #0F3D45;
  --secondary: #7FD4C1;
  --accent: #C24B2C;
  --font-display: 'Hahmlet', serif;
  --font-body: 'Pretendard', sans-serif;
}

/* ---- drain illustration ---- */
.drain-illustration {
  max-width: 480px;
  margin: 0 auto 8px;
  display: block;
}
.drain-illustration path {
  fill: none;
  stroke: var(--secondary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw-drain 1.8s ease-out forwards;
}
@keyframes draw-drain {
  to { stroke-dashoffset: 0; }
}

/* ---- body content ---- */
.main-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 20px 56px;
}
.main-body article + article { margin-top: 44px; }
.main-body h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--primary);
  padding-left: 14px;
  border-left: 4px solid var(--accent);
  margin-bottom: 14px;
}
.main-body p { font-size: 0.98rem; }
.main-body .intro { opacity: 0.85; margin-bottom: 18px; }

/* ---- step diagram (신호 단계) ---- */
.step-diagram {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  counter-reset: step;
}
.step-diagram li {
  list-style: none;
  position: relative;
  padding: 0 0 22px 40px;
  border-left: 2px solid var(--secondary);
}
.step-diagram li:last-child { border-left-color: transparent; padding-bottom: 0; }
.step-diagram li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -17px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-diagram strong { display: block; color: var(--primary); font-size: 1.02rem; margin-bottom: 4px; }
.step-diagram span { font-size: 0.92rem; opacity: 0.85; }

@media (min-width: 640px) {
  .step-diagram { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .step-diagram li { border-left: none; border-top: 3px solid var(--secondary); padding: 26px 4px 0 4px; }
  .step-diagram li::before { left: 4px; top: -17px; }
}

/* ---- comparison table ---- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table caption { text-align: left; font-size: 0.85rem; opacity: 0.65; margin-bottom: 8px; }
.data-table th, .data-table td {
  border: 1px solid rgba(15,61,69,0.15);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.data-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
}
.data-table tr:nth-child(even) td { background: rgba(127,212,193,0.1); }

/* ---- scope bars (처리 방식 범위 개념도) ---- */
.scope-bars { margin-top: 16px; }
.scope-bars .row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.scope-bars .row-label { flex: 0 0 100px; font-size: 0.85rem; }
.scope-bars .bar-track { flex: 1; background: rgba(15,61,69,0.08); border-radius: 999px; height: 20px; overflow: hidden; }
.scope-bars .bar-fill {
  height: 100%;
  background: var(--secondary);
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
}
.scope-bars .caption { font-size: 0.8rem; opacity: 0.6; margin-top: 6px; }

/* ---- before / after comparison ---- */
.before-after {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 4px;
}
.before-after .col {
  border-radius: 10px;
  padding: 18px 20px;
  border: 1px solid rgba(15,61,69,0.15);
}
.before-after .col.after { background: rgba(194,75,44,0.06); border-color: rgba(194,75,44,0.25); }
.before-after .col h3 { font-size: 0.95rem; color: var(--primary); margin-bottom: 8px; }
.before-after .col.after h3 { color: var(--accent); }
.before-after .col ul { font-size: 0.9rem; }
.before-after .col li { margin-bottom: 6px; padding-left: 14px; position: relative; }
.before-after .col li::before { content: '-'; position: absolute; left: 0; opacity: 0.5; }

@media (min-width: 640px) {
  .before-after { grid-template-columns: 1fr 1fr; }
}

/* ---- habit checklist grid ---- */
.habit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 4px;
}
.habit-grid li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(15,61,69,0.08);
}
.habit-grid svg { flex: 0 0 24px; width: 24px; height: 24px; color: var(--primary); margin-top: 2px; }
.habit-grid span { font-size: 0.92rem; }

@media (min-width: 640px) {
  .habit-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- site gallery (현장 사진) ---- */
.site-gallery { padding: 8px 0 16px; }
.site-gallery h2 {
  text-align: center;
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.gallery-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- faq ---- */
.faq { max-width: 760px; margin: 0 auto; padding: 8px 20px 56px; }
.faq h2 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 20px;
}
.faq details {
  background: #fff;
  border-radius: 10px;
  padding: 4px 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 8px rgba(15,61,69,0.08);
}
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; font-weight: 400; }
.faq details[open] summary::after { content: '−'; }
.faq details p { font-size: 0.92rem; padding-bottom: 18px; opacity: 0.9; }

/* ---- carousel ---- */
.carousel-section { padding: 8px 0 56px; }
.carousel-section h2 {
  text-align: center;
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 24px;
}
.carousel-wrap { position: relative; max-width: 1280px; margin-inline: auto; padding-inline: 20px; }
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-card {
  scroll-snap-align: start;
  flex: 0 0 calc(83.3% - 8px);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(15,61,69,0.08);
}
.carousel-card img { aspect-ratio: 4/3; object-fit: cover; }
.carousel-card-body { padding: 16px 18px 20px; }
.carousel-card-body h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 6px;
}
.carousel-card-body p { font-size: 0.88rem; opacity: 0.75; margin-bottom: 10px; }
.carousel-card-body a { font-size: 0.86rem; font-weight: 700; color: var(--accent); }
.carousel-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}
.carousel-nav button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  background: #fff;
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
}
.carousel-nav button:hover { background: var(--primary); color: #fff; }

@media (min-width: 640px) {
  .carousel-card { flex-basis: calc(50% - 8px); }
}
@media (min-width: 1024px) {
  .carousel-card { flex-basis: calc(33.333% - 11px); }
}
