/* ==========================================================
   메인 페이지 (front-page.php) — 스크롤 장면형
   영상 없이 CSS·SVG로 그린 화면 조각만 사용
   ========================================================== */
.home .site-main { padding-top: 0; }

/* ---------- 2. 스토리 ---------- */
.kh-story { position: relative; height: 220vh; }
.kh-story__sticky { position: sticky; top: 0; height: 100vh; padding-top: var(--nav-h); box-sizing: border-box; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.kh-story__center { position: relative; z-index: 2; text-align: center; padding: 0 1.5rem; }
.kh-story__statement { font-size: clamp(1.875rem, 3.4vw, 3rem); font-weight: 700; line-height: 1.4; letter-spacing: -0.04em; }
.kh-story__line {
	display: block;
	background: linear-gradient(90deg, var(--gray-900) 50%, var(--gray-300) 50%) no-repeat;
	background-size: 200% 100%;
	background-position: calc(100% - var(--fill, 0%)) 0;
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.kh-story__points {
	display: inline-flex; flex-direction: column; gap: 1rem; margin-top: 3rem; text-align: left;
	opacity: var(--pts, 0); transform: translateY(calc((1 - var(--pts, 0)) * 30px));
}
.kh-story__points li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 1.1875rem; font-weight: 500; color: var(--gray-700); }
.kh-story__points svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; color: var(--primary); }

/* 떠다니는 조각 (이미지 대신 CSS 카드) */
.kh-story__floats { position: absolute; inset: 0; z-index: 1; }
.kh-float {
	position: absolute; display: flex; align-items: center; justify-content: center;
	transform: translateY(calc(var(--drift, 0) * var(--sp, 1) * -1px));
	box-shadow: 0 16px 40px rgba(18, 18, 18, 0.08);
	will-change: transform;
}
.kh-float--tile { width: 128px; height: 128px; border-radius: 28px; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, #fff); }
.kh-float--tile svg { width: 52px; height: 52px; }
.kh-float--ui { flex-direction: column; align-items: stretch; width: 250px; padding: 20px 22px; border-radius: 24px; background: #fff; border: 1px solid var(--gray-200); }
.kh-float__title { font-size: 0.875rem; font-weight: 700; margin-bottom: 10px; }
.kh-float--ui li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.875rem; color: var(--gray-500); }
.kh-float--ui li svg { width: 18px; height: 18px; }
.kh-float--ui li.is-on { color: var(--gray-900); }
.kh-float--ui li.is-on svg { color: var(--primary); }
.kh-float--chip { gap: 10px; padding: 14px 20px; border-radius: 999px; background: #fff; border: 1px solid var(--gray-200); font-size: 0.9375rem; font-weight: 600; }
.kh-float--chip svg { width: 18px; height: 18px; color: var(--primary); }
.kh-float--0 { left: 6%; top: 12%; }
.kh-float--1 { right: 6%; top: 10%; }
.kh-float--2 { left: 3%; top: 52%; }
.kh-float--3 { right: 9%; top: 62%; }
.kh-float--4 { left: 17%; bottom: 6%; }
.kh-float--5 { right: 22%; bottom: 2%; }
.kh-float--tile.kh-float--1, .kh-float--tile.kh-float--3 { background: var(--primary); color: #fff; }
.kh-float--tile.kh-float--5 { background: #fff3c4; color: #8a5a00; }

/* ---------- 3. 자주 찾는 질문 흐름 ---------- */
.kh-marquee { overflow: hidden; padding: 2rem 0 7.5rem; }
.kh-marquee__track { display: flex; width: max-content; animation: kh-flow 48s linear infinite; }
.kh-marquee:hover .kh-marquee__track, .kh-marquee:focus-within .kh-marquee__track { animation-play-state: paused; }
.kh-marquee__list { display: flex; gap: 1rem; padding-right: 1rem; }
@keyframes kh-flow { to { transform: translateX(-50%); } }
.kh-qcard {
	display: flex; flex-direction: column; gap: 0.75rem; width: 300px; height: 100%; padding: 1.75rem 1.5rem;
	border-radius: 20px; background: var(--gray-100); transition: background 0.3s, transform 0.4s var(--ease);
}
.kh-qcard__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--primary); }
.kh-qcard__icon svg { width: 24px; height: 24px; }
.kh-qcard__q { font-size: 1.125rem; font-weight: 600; line-height: 1.45; }
.kh-qcard__cat { margin-top: auto; font-size: 0.875rem; color: var(--gray-600); }

/* ---------- 4·5. 일반 섹션 ---------- */
.kh-sec { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 7.5rem; }
.kh-sec__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 3rem; }
.kh-sec__title { max-width: 9.5em; font-size: clamp(1.75rem, 3vw, 2.625rem); font-weight: 700; line-height: 1.35; letter-spacing: -0.04em; }
.kh-more {
	display: inline-flex; align-items: center; gap: 0.375rem; flex-shrink: 0;
	padding: 0.625rem 1.125rem; border-radius: 999px; background: var(--gray-100); font-size: 0.9375rem; font-weight: 600; transition: background 0.25s, color 0.25s;
}
.kh-more svg { width: 18px; height: 18px; }

.kh-latest__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4rem; border-top: 1px solid var(--gray-900); }
.kh-post { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--gray-300); }
.kh-post__thumb { flex-shrink: 0; width: 88px; height: 88px; border-radius: 18px; overflow: hidden; background: color-mix(in srgb, var(--primary) 10%, #fff); }
.kh-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.kh-post__ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--font-eulyoo); font-size: 1.75rem; font-weight: 600; color: var(--primary); letter-spacing: 0; }
.kh-post__body { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.kh-post__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 1.1875rem; font-weight: 600; line-height: 1.45; transition: color 0.25s; }
.kh-post__meta { display: flex; gap: 0.75rem; font-size: 0.875rem; color: var(--gray-600); }
.kh-post__meta time { font-family: var(--font-eulyoo); letter-spacing: 0; }

.kh-cats__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4rem; }
.kh-cat {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 1.25rem 0.25rem; border-bottom: 1px solid var(--gray-300); transition: color 0.25s, padding 0.35s var(--ease);
}
.kh-cat__name { font-size: 1.25rem; font-weight: 600; }
.kh-cat__name sup { margin-left: 0.25rem; font-size: 0.75rem; font-weight: 500; color: var(--gray-500); vertical-align: super; }
.kh-cat svg { width: 22px; height: 22px; color: var(--gray-400); transition: color 0.25s, transform 0.35s var(--ease); }
.kh-search { padding-bottom: 0; }
.kh-search .board-search__input { border: 0; border-radius: 999px; background: var(--gray-100); padding: 0.625rem 1rem 0.625rem 1.25rem; }

@media (hover: hover) and (pointer: fine) {
	.kh-qcard:hover { background: color-mix(in srgb, var(--primary) 10%, #fff); transform: translateY(-4px); }
	.kh-more:hover { background: var(--gray-900); color: #fff; }
	.kh-post:hover .kh-post__title { color: var(--primary); }
	.kh-cat:hover { color: var(--primary); padding-left: 0.75rem; }
	.kh-cat:hover svg { color: var(--primary); transform: translateX(4px); }
}

@media (max-width: 1024px) {
	.kh-float--ui { width: 210px; padding: 16px; }
	.kh-float--tile { width: 96px; height: 96px; border-radius: 22px; }
	.kh-float--tile svg { width: 40px; height: 40px; }
	.kh-latest__list, .kh-cats__list { gap: 0 2rem; }
}

@media (max-width: 800px) {

	.kh-story { height: 200vh; }
	.kh-story__points { margin-top: 2rem; }
	.kh-story__points li { font-size: 1rem; }
	.kh-float { opacity: 0.55; }
	.kh-float--ui, .kh-float--chip { display: none; }
	.kh-float--tile { width: 64px; height: 64px; border-radius: 16px; }
	.kh-float--tile svg { width: 28px; height: 28px; }
	.kh-float--0 { left: 4%; top: 13%; }
	.kh-float--2 { left: 6%; top: 76%; }
	.kh-float--4 { left: 70%; bottom: 8%; }
	.kh-float--5 { right: 6%; bottom: 82%; }

	.kh-marquee { padding: 1rem 0 4.5rem; }
	.kh-qcard { width: 240px; padding: 1.25rem; }
	.kh-qcard__q { font-size: 1rem; }

	.kh-sec { padding-bottom: 4.5rem; }
	.kh-sec__head { flex-direction: column; align-items: stretch; gap: 1.25rem; margin-bottom: 1.5rem; }
	.kh-more { align-self: flex-start; }
	.kh-latest__list, .kh-cats__list { grid-template-columns: 1fr; }
	.kh-post { gap: 1rem; padding: 1.125rem 0; }
	.kh-post__thumb { width: 72px; height: 72px; border-radius: 14px; }
	.kh-post__title { font-size: 1.0625rem; }
	.kh-cat__name { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
	.kh-marquee__track { animation: none; }
}
