/* 살림힌트 — 생활 정보 매거진 스타일 */
:root {
  --ink: #1b1a18;
  --ink-soft: #4a4844;
  --ink-mute: #7c7973;
  --paper: #fbf9f5;
  --paper-2: #ffffff;
  --line: #e7e2d8;
  --line-strong: #d6cfc1;
  --accent: #1f4d3d;
  --accent-soft: #e8f0eb;
  --warm: #c2622f;
  --warm-soft: #fbeee5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 26, 24, .04), 0 8px 24px rgba(27, 26, 24, .05);
  --wrap: 1080px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.78;
  word-break: keep-all;
  overflow-wrap: anywhere;
  letter-spacing: -0.01em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 249, 245, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; }
.logo { font-weight: 800; font-size: 21px; letter-spacing: -0.03em; display: inline-flex; align-items: baseline; }
.logo-mark { color: var(--accent); }
.logo-rest { color: var(--warm); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  font-size: 15.5px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a.active { background: var(--accent); color: #fff; }
.nav a.active:hover { background: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 34px; align-items: center;
  padding: 58px 0 44px;
}
.eyebrow {
  margin: 0 0 12px; font-size: 13.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--warm);
}
.hero h1 {
  margin: 0 0 18px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.28;
  letter-spacing: -0.035em; font-weight: 800;
}
.hero-desc { margin: 0 0 26px; color: var(--ink-soft); font-size: 17.5px; max-width: 46ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700;
  padding: 12px 20px; border-radius: 999px; font-size: 15.5px; transition: transform .15s, background .15s;
}
.btn:hover { background: #17392d; color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--line-strong); }
.btn.ghost:hover { background: var(--accent-soft); }
.hero-card {
  display: block; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}
.hero-card strong { display: block; font-size: 19px; line-height: 1.5; margin: 12px 0 10px; letter-spacing: -0.02em; }
.hero-card .meta { color: var(--ink-mute); font-size: 13.5px; }

/* ---------- sections & cards ---------- */
.section { padding: 14px 0 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2, .section > h2 {
  margin: 0; font-size: 24px; letter-spacing: -0.03em;
}
.section-head p { margin: 0; color: var(--ink-mute); font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  display: flex; flex-direction: column; gap: 10px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 18px;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h3 { margin: 0; font-size: 18.5px; line-height: 1.5; letter-spacing: -0.025em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.card .meta { margin-top: auto; color: var(--ink-mute); font-size: 13px; }
.tag {
  align-self: flex-start; display: inline-block; font-size: 12.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: 0; white-space: nowrap;
}
.tag-living { background: var(--accent-soft); color: var(--accent); }
.tag-support { background: #e8eefb; color: #2b4d94; }
.tag-saving { background: var(--warm-soft); color: var(--warm); }

.intro-cats { border-top: 1px solid var(--line); padding-top: 34px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.cat {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius);
  background: var(--paper-2); border: 1px solid var(--line);
}
.cat strong { font-size: 17px; }
.cat span { color: var(--ink-mute); font-size: 14.5px; }
.cat:hover { border-color: var(--accent); }

/* ---------- page head ---------- */
.page-head { padding: 46px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.page-head h1 { margin: 0 0 12px; font-size: clamp(27px, 3.8vw, 38px); letter-spacing: -0.035em; line-height: 1.3; }
.lede { margin: 0; color: var(--ink-soft); font-size: 17.5px; max-width: 62ch; }
.page-category .section, .page-static .section { padding-top: 0; }
.empty { color: var(--ink-mute); }

/* ---------- post ---------- */
.post { max-width: 760px; margin: 0 auto; padding: 42px 0 10px; }
.post-head { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.post-head h1 { margin: 14px 0 12px; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.34; letter-spacing: -0.035em; }
.post-head .meta { color: var(--ink-mute); font-size: 14px; }

.summary-box {
  background: linear-gradient(180deg, #f2f7f3, #eef5f0);
  border: 1px solid #d5e4da; border-left: 5px solid var(--accent);
  border-radius: 12px; padding: 20px 22px 16px; margin: 0 0 30px;
}
.summary-box strong { display: block; font-size: 15px; letter-spacing: .02em; color: var(--accent); margin-bottom: 8px; }
.summary-box ol { margin: 0; padding-left: 20px; }
.summary-box li { margin: 4px 0; font-size: 16px; }

.post-body { font-size: 17.5px; line-height: 1.85; }
.post-body > h2 {
  margin: 46px 0 14px; font-size: 23px; line-height: 1.45; letter-spacing: -0.03em;
  padding-left: 14px; border-left: 5px solid var(--warm); scroll-margin-top: 84px;
}
.post-body > h3 { margin: 30px 0 10px; font-size: 19px; letter-spacing: -0.02em; }
.post-body p { margin: 0 0 18px; }
.post-body strong { font-weight: 700; }
.post-body > p strong, .post-body > ul > li strong, .post-body > ol > li strong {
  background: linear-gradient(transparent 62%, #fdf0c9 62%);
}
.post-body a { color: #1b5c93; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #b9d3e6; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 22px; }
.post-body li { margin: 7px 0; }
.post-body ul li::marker { color: var(--accent); }
.post-body li.check { list-style: none; position: relative; padding-left: 30px; }
.post-body li.check::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 17px; height: 17px;
  border: 1.6px solid var(--line-strong); border-radius: 5px; background: #fff;
}
.post-body li.check.done::before { background: var(--accent); border-color: var(--accent); }
.post-body blockquote {
  margin: 0 0 22px; padding: 16px 20px; background: #f6f3ec; border-radius: 10px;
  border-left: 4px solid var(--line-strong); color: var(--ink-soft);
}
.post-body blockquote p { margin: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }
.post-body code { background: #f2efe7; padding: 2px 6px; border-radius: 5px; font-size: .94em; }

.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 420px; }
.post-body th, .post-body td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body thead th { background: #f4f1ea; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.post-body tbody tr:last-child td { border-bottom: 0; }
.post-body tbody tr:nth-child(even) { background: #fcfbf8; }

.notice {
  margin: 38px 0 0; padding: 18px 20px; border-radius: 12px; background: #fdf6ef;
  border: 1px solid #f0ddcb; font-size: 15px; color: var(--ink-soft);
}
.notice strong { display: block; color: var(--warm); margin-bottom: 4px; font-size: 14.5px; }
.notice p { margin: 0; }

.post-nav {
  display: flex; justify-content: space-between; gap: 12px; margin: 34px 0 0;
  padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600;
}
.post-nav a { color: var(--accent); }

.related { max-width: 1080px; margin: 54px auto 10px; padding-top: 30px; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -0.03em; }

/* ---------- static pages ---------- */
.page { max-width: 780px; margin: 0 auto; padding-bottom: 20px; }
.page-static .page-head { padding-top: 10px; border-bottom: 0; margin-bottom: 10px; }
.page-static .post-body h2:first-child { margin-top: 20px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 60px; background: #20211f; color: #cfccc4; font-size: 14.5px; }
.footer-inner { padding: 40px 22px 34px; display: grid; gap: 18px; }
.logo-footer { font-size: 19px; }
.logo-footer .logo-mark { color: #8fc6aa; }
.logo-footer .logo-rest { color: #e2a37c; }
.footer-brand p { margin: 6px 0 0; color: #9d9a92; font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: #e6e3db; font-weight: 600; }
.footer-links a:hover { color: #8fc6aa; }
.footer-corp { font-style: normal; color: #9d9a92; line-height: 1.9; }
.footer-corp span { white-space: nowrap; }
.copyright { margin: 0; color: #7d7a72; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 36px 0 28px; gap: 24px; }
  .cards, .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; line-height: 1.8; }
  .wrap { padding: 0 18px; }
  .header-inner { flex-wrap: wrap; gap: 0; padding-top: 8px; padding-bottom: 6px; }
  .logo { font-size: 20px; }
  .nav { width: 100%; overflow-x: auto; padding: 4px 0 8px; gap: 2px; -webkit-overflow-scrolling: touch; }
  .nav a { font-size: 14.5px; padding: 7px 11px; white-space: nowrap; }
  .hero h1 { font-size: 30px; }
  .cards, .cat-grid { grid-template-columns: 1fr; }
  .post-body { font-size: 17px; }
  .post-body > h2 { font-size: 21px; margin-top: 38px; }
  .summary-box { padding: 18px 16px 14px; }
  .footer-inner { padding: 32px 18px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
