/* ============================================
   니트메이커 — 따뜻한 니트 감성
   팔레트: 라놀린 크림 / 원사 캐멀 / 파인 그린
   타이포: Gowun Batang(제목) + Pretendard(본문)
   ============================================ */
:root {
  --cream: #FAF5EC;      /* 배경: 라놀린 크림 */
  --paper: #FFFDF8;      /* 카드 서피스 */
  --ink:   #372E26;      /* 본문: 다크 브라운 */
  --soft:  #7C6B58;      /* 보조 텍스트 */
  --camel: #A6713A;      /* 원사 캐멀 (포인트) */
  --pine:  #47604F;      /* 파인 그린 (링크/보조) */
  --line:  #E8DCC8;      /* 헤어라인 */
  --font-display: 'Gowun Batang', 'Nanum Myeongjo', serif;
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
a { color: var(--pine); text-decoration: none; }
a:hover { color: var(--camel); }
a:focus-visible { outline: 2px solid var(--camel); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; }

/* ── 시그니처 1: 골지(rib) 밴드 ── */
.rib-band {
  height: 14px;
  background:
    repeating-linear-gradient(90deg,
      var(--camel) 0 5px,
      #B98450 5px 7px,
      #91602F 7px 10px);
}

/* ── 시그니처 2: 스티치(V자 뜨개코) 디바이더 ── */
.stitch-divider {
  height: 10px;
  background:
    repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 8px, transparent 8px 12px),
    repeating-linear-gradient(45deg,  transparent 0 6px, var(--line) 6px 8px, transparent 8px 12px);
  background-size: 12px 10px;
  opacity: .9;
}

/* ── 헤더 ── */
.site-head { background: var(--paper); }
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; padding-top: 20px; padding-bottom: 16px;
}
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.brand-mark { color: var(--camel); font-size: 22px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.5px; }
.gnb { display: flex; gap: 4px; flex-wrap: wrap; }
.gnb a {
  color: var(--soft); font-size: 15px; padding: 6px 12px; border-radius: 20px;
  transition: background .15s, color .15s;
}
.gnb a:hover { background: var(--cream); color: var(--camel); }

/* ── 히어로 (메인) ── */
.hero { padding: 52px 0 40px; text-align: left; }
.hero-eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 3px; color: var(--camel);
  border-bottom: 1px dashed var(--camel); padding-bottom: 4px; margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 5vw, 42px); line-height: 1.35; letter-spacing: -1px;
  max-width: 620px;
}
.hero p { color: var(--soft); margin-top: 14px; max-width: 560px; }

/* ── 글 카드 그리드 ── */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 8px 0 48px; }
@media (max-width: 680px) { .post-grid { grid-template-columns: 1fr; } }
.post-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(90, 68, 40, .1); }
.post-card a { color: inherit; display: flex; flex-direction: column; height: 100%; }
.card-thumb { aspect-ratio: 1200 / 630; background: var(--line); object-fit: cover; width: 100%; display: block; }
.card-thumb-ph {
  aspect-ratio: 1200 / 630; display: flex; align-items: center; justify-content: center;
  color: var(--camel); font-size: 34px;
  background: repeating-linear-gradient(90deg, #F3EADB 0 8px, #EFE4D2 8px 16px);
}
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: 12.5px; color: var(--camel); letter-spacing: 1px; }
.card-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.45; }
.card-desc {
  color: var(--soft); font-size: 14.5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--soft); }

.section-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  margin: 40px 0 18px; padding-left: 14px; border-left: 4px solid var(--camel);
}

/* ── 글 상세 ── */
.post-head { padding: 46px 0 8px; max-width: 720px; margin: 0 auto; }
.post-cat { font-size: 13.5px; color: var(--camel); letter-spacing: 1.5px; }
.post-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 4.6vw, 38px); line-height: 1.4; letter-spacing: -0.8px; margin-top: 10px;
}
.post-meta { color: var(--soft); font-size: 14px; margin-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.post-hero-img { border-radius: 14px; margin: 26px auto 0; display: block; max-width: 720px; width: 100%; }

.post-body { max-width: 720px; margin: 30px auto 0; }
.post-body p { margin: 0 0 1.3em; }
.post-body h2 {
  font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.4;
  margin: 2em 0 .8em; padding-bottom: 10px; border-bottom: 1px dashed var(--line);
}
.post-body h3 { font-size: 19px; margin: 1.6em 0 .6em; }
.post-body ul, .post-body ol { margin: 0 0 1.3em; padding-left: 1.4em; }
.post-body li { margin-bottom: .4em; }
.post-body blockquote {
  border-left: 4px solid var(--camel); background: var(--paper);
  padding: 14px 18px; margin: 0 0 1.3em; border-radius: 0 10px 10px 0; color: var(--soft);
}
.post-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.3em; background: var(--paper); font-size: 15px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post-body th { background: #F3EADB; font-weight: 600; }
.post-body img { border-radius: 10px; }

/* 핵심 요약 (AEO 정답 문단) */
.answer-box {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--pine);
  border-radius: 0 12px 12px 0; padding: 20px 22px; margin: 30px auto 0; max-width: 720px;
}
.answer-box .ab-label { font-size: 12.5px; letter-spacing: 2px; color: var(--pine); margin-bottom: 8px; }
.answer-box p { margin: 0; font-size: 16.5px; }

/* FAQ */
.faq-sec { max-width: 720px; margin: 40px auto 0; }
.faq-sec details {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin-bottom: 10px;
}
.faq-sec summary {
  cursor: pointer; font-weight: 600; font-size: 16px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-sec summary::after { content: '＋'; color: var(--camel); font-size: 18px; flex-shrink: 0; }
.faq-sec details[open] summary::after { content: '－'; }
.faq-sec details p { margin: 12px 0 0; color: var(--soft); font-size: 15px; }

/* 광고 슬롯 */
.ad-slot { margin: 28px auto; max-width: 720px; text-align: center; min-height: 90px; }

/* 관련 글 */
.related { max-width: 720px; margin: 48px auto 0; }

/* ── 카테고리 페이지 ── */
.cat-head { padding: 46px 0 10px; }
.cat-head h1 { font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 36px); }
.cat-head p { color: var(--soft); margin-top: 8px; }

/* 페이지네이션 */
.paging { display: flex; justify-content: center; gap: 8px; padding: 8px 0 56px; }
.paging a, .paging span {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 14.5px;
}
.paging .cur { background: var(--camel); border-color: var(--camel); color: #fff; }

/* ── 푸터 ── */
.site-foot { background: var(--paper); margin-top: 40px; }
.foot-inner { padding: 34px 20px 40px; text-align: center; }
.foot-brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.foot-desc { color: var(--soft); font-size: 14px; margin-top: 6px; }
.foot-links { margin-top: 14px; font-size: 14px; }
.foot-links a { color: var(--soft); }
.foot-copy { color: #B4A48E; font-size: 13px; margin-top: 10px; }

/* 정적 페이지 */
.page-body { max-width: 720px; margin: 46px auto 56px; }
.page-body h1 { font-family: var(--font-display); font-size: 30px; margin-bottom: 20px; }
.page-body h2 { font-size: 20px; margin: 1.8em 0 .6em; }
.page-body p { margin-bottom: 1.2em; }

/* AI 생성 이미지 표시 */
.post-hero-fig { max-width: 720px; margin: 26px auto 0; }
.post-hero-fig .post-hero-img { margin: 0; }
.ai-mark { text-align: right; color: #B4A48E; font-size: 12.5px; margin-top: 6px; }

/* 본문 소제목 이미지 */
.post-body .body-fig { margin: 18px 0 26px; }
.post-body .body-fig img { width: 100%; border-radius: 12px; display: block; }
.post-body .body-fig .ai-mark { text-align: right; color: #B4A48E; font-size: 12.5px; margin-top: 6px; }

/* 카테고리 도입문 */
.cat-intro {
  margin-top: 16px; padding: 18px 20px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--soft); font-size: 15.5px; line-height: 1.8; max-width: 760px;
}

/* 카테고리 도입문 */
.cat-intro {
  margin-top: 18px; padding: 18px 20px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--soft); font-size: 15.5px; line-height: 1.8; max-width: 760px;
}
