/* ==========================================================================
   육아휴직급여 계산기 — 디자인 시스템 (따뜻한 크림 + 테라코타 / 라운드 버튼 / Poppins / 라인 아이콘)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --primary: #E17B4D;
  --primary-soft: rgba(225, 123, 77, 0.12);
  --text: #3A2E27;
  --sub: #8A7768;
  --bg: #FBF3EA;
  --surface: #F3E4D5;
  --border: #E8D5C4;

  --chart-1: #E17B4D; /* 6+6 / 일반 급여 */
  --chart-2: #EDA97C;
  --chart-net: #F3E4D5;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--primary); }

.icon {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.site-header { border-bottom: 1px solid var(--border); padding: 18px 0; }
.site-header .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); }
.site-header .brand .icon { color: var(--primary); }

/* ---------- 스크롤 리빌 애니메이션 (가벼운 IntersectionObserver 기반) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 히어로 ---------- */
.hero { padding: 40px 0 8px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.4; }
.hero p { font-size: 15px; color: var(--sub); line-height: 1.8; }

/* ---------- 계산기 카드 ---------- */
.calculator-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-top: 20px;
}

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--text); margin-bottom: 14px;
}
.section-title .icon { width: 18px; height: 18px; color: var(--primary); }

.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group.full { grid-column: 1 / -1; }
.input-group label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--sub); }
.input-group label .icon { width: 15px; height: 15px; }

.input-group input[type="number"],
.input-group select {
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; width: 100%; outline: none; transition: border-color .15s;
}
.input-group input[type="number"]:focus, .input-group select:focus { border-color: var(--primary); background: var(--bg); }
.input-hint { font-size: 11.5px; color: var(--sub); }

/* 육아휴직 유형 토글 */
.type-toggle { display: flex; gap: 8px; }
.type-toggle button {
  flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--sub); font-family: inherit; font-weight: 600; font-size: 13.5px;
  cursor: pointer; transition: .15s;
}
.type-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- 결과 영역 ---------- */
.result-hero { text-align: center; background: var(--surface); border-radius: 14px; padding: 28px 16px; margin-top: 24px; }
.result-hero .label { font-size: 13px; color: var(--sub); font-weight: 500; margin-bottom: 6px; }
.result-hero .value { font-size: clamp(2rem, 8vw, 2.6rem); font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }
.result-hero .sub-value { margin-top: 10px; font-size: 14px; color: var(--sub); }
.result-hero .sub-value strong { color: var(--text); font-weight: 600; }

.rate-summary { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rate-chip { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; color: var(--sub); }
.rate-chip strong { color: var(--text); }

/* ---------- 월별 내역 표 ---------- */
.breakdown-table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 13.5px; }
.breakdown-table th, .breakdown-table td { padding: 11px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.breakdown-table th { color: var(--sub); font-weight: 500; }
.breakdown-table td:last-child, .breakdown-table th:last-child { text-align: right; }
.breakdown-table tr:last-child td { border-bottom: none; font-weight: 700; }
.breakdown-table-wrap { max-height: 320px; overflow-y: auto; margin-top: 24px; border: 1px solid var(--border); border-radius: 12px; }
.breakdown-table-wrap .breakdown-table { margin-top: 0; }
.breakdown-table-wrap thead th { position: sticky; top: 0; background: var(--bg); }

/* ---------- 버튼 ---------- */
.btn {
  border-radius: 10px; padding: 12px 20px; font-weight: 700; font-family: inherit; font-size: 14px;
  background: var(--primary); color: #fff; border: none; cursor: pointer; transition: .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { filter: brightness(.95); }
.btn.btn-block { width: 100%; justify-content: center; margin-top: 18px; }
.btn.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn .icon { width: 16px; height: 16px; color: inherit; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 안내 문구 ---------- */
.disclaimer {
  display: flex; gap: 10px; background: var(--surface); border-left: 3px solid var(--primary);
  border-radius: 8px; padding: 14px 16px; margin-top: 22px; font-size: 12.5px; color: var(--sub); line-height: 1.6;
}
.disclaimer .icon { width: 16px; height: 16px; color: var(--primary); margin-top: 1px; }

/* ---------- 콘텐츠 섹션 ---------- */
.content-section { margin-top: 40px; }
.content-section h2 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.content-section h2 .icon { color: var(--primary); }
.content-section p, .content-section li { color: var(--text); font-size: 14.5px; line-height: 1.75; }
.content-section ul { padding-left: 20px; margin: 0 0 12px; }
.content-block + .content-block { margin-top: 28px; }

.rate-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.rate-list li { display: flex; justify-content: space-between; background: var(--surface); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; }
.rate-list li span:last-child { color: var(--sub); }

.faq-item { margin-top: 16px; }
.faq-item h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.faq-item p { font-size: 14px; color: var(--sub); }

/* ---------- 푸터 ---------- */
.site-footer { margin-top: 48px; padding: 24px 0 40px; border-top: 1px solid var(--border); text-align: center; color: var(--sub); font-size: 12px; }
.footer-nav { display: flex; justify-content: center; gap: 18px; margin-bottom: 12px; }
.footer-nav a { color: var(--sub); text-decoration: none; font-weight: 500; }
.footer-nav a:hover { color: var(--primary); }

/* ---------- 정적 페이지 (소개/방침) ---------- */
.static-page { padding: 40px 0 60px; }
.static-page h1 { font-size: 24px; margin-bottom: 18px; }
.static-page h2 { font-size: 17px; margin-top: 28px; margin-bottom: 8px; }
.static-page p, .static-page li { font-size: 14.5px; color: var(--text); line-height: 1.8; }
.static-page ul { padding-left: 20px; }
.static-page .updated { color: var(--sub); font-size: 12.5px; margin-bottom: 24px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--primary); text-decoration: none; margin-bottom: 20px;
}

/* ---------- 반응형 ---------- */
@media (max-width: 600px) {
  .input-grid { grid-template-columns: 1fr; }
  .calculator-card { padding: 18px; }
}
