/* ════════════════════════════════════════════════════════════════════════
   로컬트리나 가이드 — 아티클 스타일

   랜딩(index.html)의 토큰을 그대로 쓴다. 랜딩은 CSS 를 인라인으로 들고
   있지만(첫 페인트 RTT 절약), 가이드는 여러 페이지가 공유하므로 파일로
   뺐다. 토큰 값이 갈리면 안 되니 `client/src/app/globals.css` 의 brand-*
   팔레트가 바뀌면 양쪽 다 손볼 것.
   ════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #fbf7f4;
  --surface: #ffffff;
  --text: #1a1a1f;

  --accent: #f97316;
  --accent-2: #fb7a5c;
  --gradient: linear-gradient(135deg, #f97316 0%, #fb7a5c 100%);

  --accent-100: #fff4ed;
  --accent-200: #ffe4d3;
  --accent-300: #fecdaa;
  --accent-400: #fdaa74;
  --accent-600: #ea580c;
  --accent-700: #c2410b;

  --n-100: #fdfaf8;
  --n-200: #f4efeb;
  --n-300: #e7dfd8;
  --n-400: #cfc5bc;
  --n-500: #a99e94;
  --n-600: #6b625a;
  --n-700: #4a433d;
  --n-800: #2e2a26;

  --line: rgba(26, 26, 31, 0.10);
  --line-soft: rgba(26, 26, 31, 0.06);
  --line-strong: rgba(26, 26, 31, 0.16);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 9999px;

  --shadow-card: 0 1px 0 rgba(26, 26, 31, 0.04), 0 12px 32px -16px rgba(26, 26, 31, 0.12);
  --shadow-cta: 0 8px 20px -8px rgba(249, 115, 22, 0.5);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI",
          system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
}

::selection { background: #ffd9c2; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

a { color: var(--accent-700); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── 셸 ───────────────────────────────────────────────────────────────── */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: block; width: 26px; height: 26px; flex: none; }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.brand:hover .brand-name { color: var(--accent-700); }
.brand-tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit;
  border-radius: var(--r-pill);
  background-image: var(--gradient); color: #fff;
  font-weight: 600; box-shadow: var(--shadow-cta);
  transition: transform 150ms cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 150ms cubic-bezier(0.25, 1, 0.5, 1);
  text-decoration: none;
}
.btn:hover { color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-sm { font-size: 14px; padding: 11px 20px; }
.btn-md { font-size: 16px; font-weight: 700; padding: 15px 28px; }

/*
 * 푸터 — §10.6 은 **전 페이지** 푸터에 사업자 정보와 약관·방침·환불 링크를 요구한다.
 * 전에는 이 규칙이 두 칸짜리 flex 였고 그 칸만으로는 §10.6 을 담을 수 없었다. 세로로
 * 쌓고 위 줄만 좌우로 벌린다 — 가이드 13편이 이 파일 하나를 쓰므로 여기서 한 번 고친다.
 */
.site-footer {
  padding: 24px 0 56px 0; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--n-600);
}
.site-footer a { color: var(--n-600); }
.site-footer-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.business-meta {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 11px; line-height: 1.65; color: var(--n-500);
}
/* 약관·방침·환불은 사업자 정보보다 크게 둔다. 사람이 실제로 눌러야 하는 링크다. */
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px;
  font-size: 13px; line-height: 1.65;
}
.footer-legal a:hover { color: var(--accent-700); }

/* ── 브레드크럼 ───────────────────────────────────────────────────────── */
.crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 28px 0 0 0; font-size: 13px; color: var(--n-600);
}
.crumbs a { color: var(--n-600); }
.crumbs a:hover { color: var(--accent-700); }
.crumbs span[aria-hidden] { color: var(--n-400); }

/* ── 아티클 ───────────────────────────────────────────────────────────── */
.article { max-width: 820px; margin: 0 auto; padding: 40px 0 96px 0; }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent);
}

.article h1 {
  font-size: clamp(30px, 4vw, 46px); line-height: 1.18; font-weight: 700;
  letter-spacing: -0.035em; margin: 18px 0 22px 0;
}

.article-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 14px; color: var(--n-600);
  padding-bottom: 30px; border-bottom: 1px solid var(--line);
}
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--n-400); }

.summary {
  background: var(--accent-100); border: 1px solid rgba(249, 115, 22, 0.20);
  border-radius: var(--r-lg); padding: 28px 30px; margin: 34px 0;
}
.summary h2 {
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--accent-700); margin: 0 0 14px 0;
}
.summary ul { margin: 0; padding-left: 20px; display: grid; gap: 9px; }
.summary li { font-size: 16px; line-height: 1.7; color: var(--n-800); }

/* 목차 */
.toc {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-lg); padding: 26px 30px; margin: 34px 0 44px 0;
}
.toc h2 { font-size: 15px; font-weight: 700; margin: 0 0 14px 0; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.toc li { font-size: 15px; line-height: 1.5; }
.toc a { color: var(--n-700); }
.toc a:hover { color: var(--accent-700); }

/* 본문 타이포 */
.article h2 {
  font-size: clamp(23px, 2.6vw, 29px); line-height: 1.3; font-weight: 700;
  letter-spacing: -0.03em; margin: 62px 0 20px 0;
  padding-top: 20px; border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
/* 박스 안의 h2 는 본문 h2 가 아니다 — 구분선과 큰 여백을 되돌린다.
   .article h2 와 특이도가 같으므로 반드시 그 뒤에 와야 이긴다. */
.summary h2, .toc h2, .article-cta h2, .post-card h2 {
  border-top: none; padding-top: 0; margin-top: 0;
}

.article h3 {
  font-size: 19px; line-height: 1.4; font-weight: 700;
  letter-spacing: -0.02em; margin: 38px 0 14px 0;
}
.article p {
  font-size: 17px; line-height: 1.85; color: var(--n-700); margin: 0 0 20px 0;
}
.article strong { color: var(--text); font-weight: 700; }
.article ul, .article ol { margin: 0 0 22px 0; padding-left: 22px; display: grid; gap: 10px; }
.article li { font-size: 17px; line-height: 1.8; color: var(--n-700); }
.article li::marker { color: var(--n-500); }

/* 표 — 좁은 화면에서 가로 스크롤 */
.table-scroll { overflow-x: auto; margin: 0 0 26px 0; -webkit-overflow-scrolling: touch; }
.article table {
  width: 100%; border-collapse: collapse; font-size: 15.5px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  min-width: 520px;
}
.article caption {
  caption-side: bottom; text-align: left; padding-top: 12px;
  font-size: 13.5px; color: var(--n-600); line-height: 1.6;
}
.article th, .article td {
  padding: 14px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line); line-height: 1.65;
}
.article thead th {
  background: var(--n-200); font-weight: 700; color: var(--text);
  white-space: nowrap;
}
.article tbody tr:last-child td { border-bottom: none; }
.article td.num, .article th.num { text-align: right; white-space: nowrap; }
.article tbody tr:hover { background: var(--n-100); }

/* 강조 박스 */
.note {
  border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 20px 24px; margin: 0 0 26px 0;
}
.note p { margin: 0; font-size: 16px; }
.note p + p { margin-top: 12px; }
.note-label {
  display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-700); margin-bottom: 8px;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 22px 0;
  font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: none; font-size: 22px; font-weight: 400; line-height: 1;
  color: var(--accent); transition: transform 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent-700); }
.faq-item p { padding-bottom: 22px; margin: 0; font-size: 16px; }

/* 글 끝 CTA */
.article-cta {
  background-image: var(--gradient); color: #fff;
  border-radius: 28px; padding: 46px 44px; margin: 64px 0 0 0; text-align: center;
  box-shadow: 0 24px 60px -28px rgba(249, 115, 22, 0.65);
}
.article-cta h2 {
  font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.2;
  letter-spacing: -0.03em; margin: 0 0 16px 0; border: none; padding: 0; color: #fff;
}
.article-cta p {
  font-size: 17px; line-height: 1.65; color: rgba(255,255,255,0.92);
  margin: 0 auto 26px auto; max-width: 46ch;
}
.article-cta .btn-light {
  display: inline-block; border-radius: var(--r-pill);
  background: #fff; color: var(--accent-700);
  font-size: 17px; font-weight: 700; padding: 17px 30px; text-decoration: none;
  box-shadow: 0 10px 30px -12px rgba(26, 26, 31, 0.35);
  transition: transform 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.article-cta .btn-light:hover { transform: translateY(-1px); text-decoration: none; color: var(--accent-700); }

/* ── 가이드 허브 ──────────────────────────────────────────────────────── */
.hub { max-width: 900px; margin: 0 auto; padding: 56px 0 96px 0; }
.hub-head { margin-bottom: 48px; }
.hub-head h1 {
  font-size: clamp(32px, 4vw, 48px); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.035em; margin: 18px 0 18px 0;
}
.hub-head p { font-size: 18px; line-height: 1.7; color: var(--n-700); max-width: 54ch; }

.post-list { display: grid; gap: 20px; }
.post-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 32px 34px; box-shadow: var(--shadow-card);
  color: inherit; text-decoration: none;
  transition: transform 150ms cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 150ms cubic-bezier(0.25, 1, 0.5, 1);
}
.post-card:hover {
  text-decoration: none; color: inherit; transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(26,26,31,0.04), 0 20px 44px -20px rgba(26,26,31,0.20);
}
.post-card h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.025em;
  line-height: 1.35; margin: 12px 0 12px 0;
}
.post-card p { font-size: 16px; line-height: 1.7; color: var(--n-700); margin: 0; }
.post-card .article-meta { border: none; padding: 0; margin-top: 16px; font-size: 13px; }

/* ── 반응형 ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .article { padding: 28px 0 72px 0; }
  .article h2 { margin-top: 48px; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .site-header { flex-wrap: wrap; gap: 14px; }
  .nav { gap: 18px; flex-wrap: wrap; font-size: 13px; }
  .article p, .article li { font-size: 16.5px; }
  .summary, .toc { padding: 22px 20px; }
  .article-cta { padding: 36px 24px; }
  .post-card { padding: 26px 22px; }
  .site-footer-top { flex-direction: column; gap: 12px; }
  .business-meta { display: grid; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
