/* =============================================================
   sykimlaw — typography.css
   Phase 4-1: Global Typography System + Reading Experience
   ============================================================= */

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */

:root {
	/* Soft dark navy-gray — not pure black */
	--sykim-text-body: #2D3341;
	--sykim-text-muted: rgba(45, 51, 65, 0.6);
	--sykim-text-subtle: rgba(45, 51, 65, 0.42);

	/* Link underline animation */
	--sykim-link-underline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   1. BODY TYPOGRAPHY
   Fluid: 16px (mobile) → 17px (tablet) → 18px (desktop)
   ═══════════════════════════════════════════════════════════ */

body {
	font-family: var(--wp--preset--font-family--noto-sans-kr);
	font-size: clamp(1rem, 0.625rem + 0.9375vw, 1.125rem);
	line-height: 1.92;
	color: var(--sykim-text-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	word-break: keep-all;
	overflow-wrap: anywhere;
	letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════
   2. HEADING HIERARCHY
   H1-H4: Noto Serif KR (프리미엄 에디토리얼)
   H5-H6: Noto Sans KR (레이블/서브섹션)
   ═══════════════════════════════════════════════════════════ */

/* H1 — hero-level */
h1 {
	font-family: var(--wp--preset--font-family--noto-serif-kr);
	font-size: clamp(1.875rem, 1rem + 3.5vw, 3rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.025em;
	color: var(--wp--preset--color--navy-900);
	word-break: keep-all;
}

/* H2 — 섹션 앵커: subtle navy bar */
h2 {
	font-family: var(--wp--preset--font-family--noto-serif-kr);
	font-size: clamp(1.375rem, 0.75rem + 2vw, 1.875rem);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.018em;
	color: var(--wp--preset--color--navy-900);
	word-break: keep-all;
}

/* H3 — article subsection */
h3 {
	font-family: var(--wp--preset--font-family--noto-serif-kr);
	font-size: clamp(1.125rem, 0.625rem + 1.5vw, 1.5rem);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.012em;
	color: var(--wp--preset--color--navy-900);
	word-break: keep-all;
}

/* H4 */
h4 {
	font-family: var(--wp--preset--font-family--noto-sans-kr);
	font-size: clamp(1rem, 0.75rem + 0.75vw, 1.25rem);
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: -0.008em;
	color: var(--wp--preset--color--navy-900);
	word-break: keep-all;
}

/* H5, H6 — small labels */
h5,
h6 {
	font-family: var(--wp--preset--font-family--noto-sans-kr);
	font-size: var(--wp--preset--font-size--md);
	font-weight: 600;
	line-height: 1.55;
	letter-spacing: 0;
	color: var(--wp--preset--color--navy-900);
}

/* ═══════════════════════════════════════════════════════════
   3. BLOG ARTICLE READING LAYOUT
   Target: .entry-content, .wp-block-post-content (global scope)
   Note: .sykim-single__body .wp-block-post-content in article.css
         has higher specificity and takes precedence on single.html.
   ═══════════════════════════════════════════════════════════ */

.entry-content,
.wp-block-post-content {
	font-family: var(--wp--preset--font-family--noto-sans-kr);
	font-size: clamp(1rem, 0.625rem + 0.9375vw, 1.125rem);
	line-height: 1.92;
	color: var(--sykim-text-body);
	word-break: keep-all;
	overflow-wrap: anywhere;
}

/* Paragraph */
.entry-content p,
.wp-block-post-content p {
	margin-bottom: 1.625rem;
	line-height: 1.92;
}

/* Lists */
.entry-content ul,
.entry-content ol,
.wp-block-post-content ul,
.wp-block-post-content ol {
	padding-left: 1.625rem;
	margin-bottom: 1.5rem;
}

.entry-content li,
.wp-block-post-content li {
	margin-bottom: 0.5rem;
	line-height: 1.85;
}

/* Ordered list: tabular numerals via Inter */
.entry-content ol,
.wp-block-post-content ol {
	font-variant-numeric: tabular-nums;
}

/* Nested lists */
.entry-content li > ul,
.entry-content li > ol,
.wp-block-post-content li > ul,
.wp-block-post-content li > ol {
	margin-top: 0.375rem;
	margin-bottom: 0.25rem;
}

/* ── Blockquote ── */
.entry-content blockquote,
.entry-content .wp-block-quote,
.wp-block-post-content blockquote,
.wp-block-post-content .wp-block-quote {
	border-left: 3px solid var(--wp--preset--color--gold-500);
	border-right: none;
	border-top: none;
	border-bottom: none;
	padding: 1.25rem 1.75rem;
	margin: 2rem 0;
	background-color: rgba(244, 245, 247, 0.65);
	border-radius: 0 4px 4px 0;
}

.entry-content .wp-block-quote p,
.wp-block-post-content .wp-block-quote p {
	margin-bottom: 0;
	font-style: normal;
	font-size: clamp(0.9375rem, 0.5rem + 1vw, 1.0625rem);
	line-height: 1.85;
	color: var(--wp--preset--color--navy-900);
}

.entry-content .wp-block-quote cite,
.wp-block-post-content .wp-block-quote cite {
	display: block;
	margin-top: 0.75rem;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--sykim-text-muted);
	font-style: normal;
}

/* ── Strong / Emphasis ── */
.entry-content strong,
.wp-block-post-content strong {
	font-weight: 700;
	color: var(--wp--preset--color--navy-900);
}

.entry-content em,
.wp-block-post-content em {
	font-style: italic;
	color: inherit;
}

/* ── Inline code ── */
.entry-content code,
.wp-block-post-content code {
	font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
	font-size: 0.875em;
	background-color: rgba(13, 31, 60, 0.07);
	color: var(--wp--preset--color--navy-900);
	padding: 0.125em 0.375em;
	border-radius: 3px;
	word-break: break-all;
}

/* ── Code block ── */
.entry-content pre,
.wp-block-post-content pre {
	background-color: var(--wp--preset--color--navy-900);
	color: #E4EAF5;
	padding: 1.25rem 1.5rem;
	border-radius: 4px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
	font-size: 0.875rem;
	line-height: 1.7;
	margin: 2rem 0;
}

.entry-content pre code,
.wp-block-post-content pre code {
	background: none;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
	color: inherit;
	word-break: normal;
}

/* ── Table: mobile horizontal scroll ── */
.entry-content .wp-block-table,
.wp-block-post-content .wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 2rem 0;
}

/* ── Link hover animation ── */
.entry-content a,
.wp-block-post-content a {
	color: var(--wp--preset--color--gold-500);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: var(--sykim-link-underline-offset);
	transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.entry-content a:hover,
.wp-block-post-content a:hover {
	color: var(--wp--preset--color--navy-900);
	text-decoration-color: currentColor;
}

/* ═══════════════════════════════════════════════════════════
   4. LEGAL CONTENT COMPONENTS
   사용: 에디터에서 직접 클래스 추가 또는 패턴으로 삽입
   ═══════════════════════════════════════════════════════════ */

/* ── 판례 요약 박스 ── */
.case-summary {
	border-left: 4px solid rgba(13, 31, 60, 0.18);
	background-color: rgba(244, 245, 247, 0.8);
	padding: 1.5rem 1.75rem;
	margin: 2rem 0;
	border-radius: 0 4px 4px 0;
}

.case-summary__label {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	font-family: var(--wp--preset--font-family--noto-sans-kr);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--sykim-text-muted);
	margin-bottom: 0.75rem;
}

.case-summary p {
	margin-bottom: 0.75rem;
	font-size: clamp(0.9375rem, 0.5rem + 1vw, 1rem);
	line-height: 1.85;
	color: var(--sykim-text-body);
}

.case-summary p:last-child {
	margin-bottom: 0;
}

/* ── 핵심 결론 박스 ── */
.legal-conclusion {
	background-color: var(--wp--preset--color--navy-900);
	color: rgba(255, 255, 255, 0.92);
	padding: 2rem 2.25rem;
	margin: 2.5rem 0;
	border-radius: 4px;
	border-left: 4px solid var(--wp--preset--color--gold-500);
}

.legal-conclusion__label {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	font-family: var(--wp--preset--font-family--noto-sans-kr);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-500);
	margin-bottom: 0.875rem;
}

.legal-conclusion p,
.legal-conclusion__body {
	margin-bottom: 0.75rem;
	font-size: clamp(0.9375rem, 0.5rem + 1vw, 1.0625rem);
	line-height: 1.85;
	color: rgba(255, 255, 255, 0.92);
	word-break: keep-all;
}

.legal-conclusion p:last-child,
.legal-conclusion__body:last-child {
	margin-bottom: 0;
}

.legal-conclusion strong,
.legal-conclusion__body strong {
	color: #FFFFFF;
	font-weight: 700;
}

/* ── 체크리스트 박스 ── */
.legal-checklist {
	background-color: #FFFFFF;
	border: 1px solid rgba(13, 31, 60, 0.1);
	border-top: 3px solid var(--wp--preset--color--navy-900);
	padding: 1.5rem 1.75rem;
	margin: 2rem 0;
	border-radius: 0 0 4px 4px;
}

.legal-checklist__label {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	font-family: var(--wp--preset--font-family--noto-sans-kr);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--navy-900);
	margin-bottom: 1rem;
}

.legal-checklist ul {
	list-style: none;
	padding-left: 0;
	margin-bottom: 0;
}

.legal-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	margin-bottom: 0.75rem;
	font-size: clamp(0.9375rem, 0.5rem + 1vw, 1rem);
	line-height: 1.75;
	color: var(--sykim-text-body);
}

.legal-checklist li::before {
	content: "✓";
	flex-shrink: 0;
	color: var(--wp--preset--color--gold-500);
	font-weight: 700;
	font-size: 0.875rem;
	margin-top: 0.125em;
}

.legal-checklist li:last-child {
	margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   5. MOBILE READING EXPERIENCE
   ═══════════════════════════════════════════════════════════ */

/* Tablet (≤900px) */
@media (max-width: 900px) {
	body {
		font-size: 1.0625rem; /* 17px */
	}

	.entry-content,
	.wp-block-post-content {
		font-size: 1.0625rem;
	}
}

/* Mobile (≤599px) */
@media (max-width: 599px) {
	body {
		font-size: 1rem; /* 16px */
		line-height: 1.85;
		letter-spacing: 0;
	}

	.entry-content,
	.wp-block-post-content {
		font-size: 1rem;
		line-height: 1.85;
	}

	.entry-content p,
	.wp-block-post-content p {
		margin-bottom: 1.25rem;
	}

	/* Heading overflow 방지 — 긴 한글 법률 제목 대응 */
	h1, h2, h3, h4, h5, h6 {
		overflow-wrap: anywhere;
		word-break: keep-all;
	}

	h1 {
		font-size: clamp(1.625rem, 7vw, 2.25rem);
		line-height: 1.25;
		letter-spacing: -0.02em;
	}

	h2 {
		font-size: clamp(1.25rem, 5.5vw, 1.625rem);
		letter-spacing: -0.015em;
	}

	h3 {
		font-size: clamp(1.0625rem, 4.5vw, 1.375rem);
	}

	/* Blockquote: 좁은 화면 padding 축소 */
	.entry-content blockquote,
	.entry-content .wp-block-quote,
	.wp-block-post-content blockquote,
	.wp-block-post-content .wp-block-quote {
		padding: 1rem 1.25rem;
		margin: 1.5rem 0;
	}

	/* Code block: 가독성 유지 */
	.entry-content pre,
	.wp-block-post-content pre {
		font-size: 0.8125rem;
		padding: 1rem 1.125rem;
	}

	/* Lists: 모바일 indent 최적화 */
	.entry-content ul,
	.entry-content ol,
	.wp-block-post-content ul,
	.wp-block-post-content ol {
		padding-left: 1.375rem;
	}

	/* Legal components: 패딩 축소 */
	.case-summary,
	.legal-checklist {
		padding: 1.125rem 1.25rem;
	}

	.legal-conclusion {
		padding: 1.375rem 1.5rem;
	}

	/* Legal checklist: gap 축소 */
	.legal-checklist li {
		gap: 0.5rem;
		margin-bottom: 0.625rem;
	}
}
