/*
Theme Name: Yangsung
Description: 위반건축물 양성화 특별법 상담 커스텀 테마 (서울재개발정보)
Version: 3.0.0
Text Domain: yangsung
*/

/* design-v3 (/tmp/build-yangsung/design-v3.md): 각진 그리드, 사진 중심, radius·shadow·pill 없음.
   이 파일 = 토큰·리셋·헤더·푸터·버튼·표·FAQ 공통 + 홈 전용. 서브페이지 전용은 assets/css/pages.css */
:root {
    --ink: #111111; --ink-2: #3A3A3A; --muted: #7A7A7A;
    --paper: #FFFFFF; --paper-2: #F4F2EE;
    --line: #E3E1DC;
    --brick: #8C3B2A; --brick-dark: #6E2C1F;
    --font: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
    --container: 1320px;
    --gutter: 24px;
    --header-h: 76px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.75; color: var(--ink-2); background: var(--paper); word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(36px, 5.2vw, 76px); }
h2 { font-size: clamp(28px, 3.2vw, 46px); font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.4; }
p { margin: 0 0 1em; }
strong { color: var(--ink); font-weight: 600; }
table, .ys-num-cell, .ys-step-num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.ys-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: #fff; padding: 12px 20px; }
.ys-skip:focus { left: 0; }
.ys-container { max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.ys-label { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 0 18px; line-height: 1.4; }
.ys-note { font-size: 14px; color: var(--muted); line-height: 1.65; }
picture img { filter: saturate(.78) contrast(.96) sepia(.07); } /* 사진 톤 통일: 낮은 채도 + 약간 따뜻하게 */

/* ---------- buttons ---------- */
.ys-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 600 15px/1 var(--font); letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; white-space: nowrap; }
.ys-btn:hover { background: transparent; color: var(--ink); }
.ys-btn-lg { height: 56px; padding: 0 32px; }
.ys-btn-call { background: var(--brick); border-color: var(--brick); }
.ys-btn-call:hover { background: #fff; color: var(--brick); border-color: var(--brick); }
.ys-btn-outline { background: transparent; color: var(--ink); }
.ys-btn-outline:hover { background: var(--ink); color: #fff; }
.ys-btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.ys-btn-light:hover { background: transparent; color: #fff; }

/* ---------- header ---------- */
.ys-header { position: sticky; top: 0; z-index: 50; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); transition: background-color .3s, color .3s, border-color .3s; }
.ys-header-inner { display: flex; align-items: center; height: var(--header-h); padding: 0 40px; max-width: 1600px; margin: 0 auto; }
.ys-logo { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; margin-right: auto; display: flex; align-items: center; }
.ys-logo img { height: 28px; width: auto; }
.ys-logo-light { display: none; }
.ys-nav { display: flex; gap: 36px; }
.ys-nav a, .ys-header-tel { font-size: 14px; letter-spacing: .04em; text-decoration: none; }
.ys-nav a:hover, .ys-header-tel:hover { text-decoration: underline; text-underline-offset: 6px; }
.ys-header-tel { margin-left: 48px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* 홈: 히어로 위 투명 헤더, 스크롤(.is-solid)·메뉴 열림(.is-open) 시 흰 배경 */
.ys-header-over { position: fixed; left: 0; right: 0; background: transparent; color: #fff; border-bottom-color: rgba(255,255,255,.22); }
.ys-header-over.is-solid, .ys-header-over.is-open { background: #fff; color: var(--ink); border-bottom-color: var(--line); }
.ys-header-over:not(.is-solid):not(.is-open) .ys-logo-dark:has(+ .ys-logo-light) { display: none; }
.ys-header-over:not(.is-solid):not(.is-open) .ys-logo-light { display: block; }
.ys-mobile-menu { display: none; }
@media (max-width: 1023px) {
    :root { --header-h: 60px; --gutter: 20px; }
    .ys-header-inner { padding: 0 20px; }
    .ys-logo img { height: 22px; }
    .ys-nav, .ys-header-tel { display: none; }
    .ys-mobile-menu { display: block; }
    .ys-mobile-menu summary { list-style: none; cursor: pointer; font-size: 14px; letter-spacing: .04em; padding: 10px 0 10px 16px; }
    .ys-mobile-menu summary::-webkit-details-marker { display: none; }
    .ys-mobile-dropdown { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); }
    .ys-mobile-dropdown a { display: block; padding: 16px 20px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; }
}

/* ---------- tables (공통) ---------- */
.ys-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ys-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); font-size: 15px; line-height: 1.6; }
.ys-table th, .ys-table td { text-align: left; vertical-align: top; padding: 18px 24px 18px 0; border-bottom: 1px solid var(--line); }
.ys-table thead th { color: var(--ink); font-weight: 700; font-size: 13px; letter-spacing: .04em; padding-top: 16px; padding-bottom: 16px; border-bottom-color: var(--ink); white-space: nowrap; }
.ys-table tbody th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.ys-table td { color: var(--ink-2); }
.ys-num-cell { color: var(--ink) !important; font-weight: 600; }
@media (max-width: 767px) { .ys-table { min-width: 640px; font-size: 14px; } }

/* ---------- FAQ (template-parts/faq.php) ---------- */
.ys-faq-list { border-top: 1px solid var(--ink); }
.ys-faq-item { border-bottom: 1px solid var(--line); }
.ys-faq-item summary { list-style: none; cursor: pointer; position: relative; padding: 26px 56px 26px 0; }
.ys-faq-item summary::-webkit-details-marker { display: none; }
.ys-faq-item summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 200; line-height: 1; color: var(--ink); }
.ys-faq-item[open] summary::after { content: '\2212'; }
.ys-faq-item summary h3 { font-size: 18px; }
.ys-faq-item p { margin: 0; padding: 0 56px 28px 0; }

/* ---------- footer ---------- */
.ys-footer { background: var(--ink); color: rgba(255,255,255,.62); padding: 80px 0 56px; font-size: 14px; line-height: 1.8; }
.ys-footer a { color: inherit; text-decoration: none; }
.ys-footer a:hover { color: #fff; }
.ys-footer-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 16px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.16); margin-bottom: 40px; }
.ys-footer-name { margin: 0; color: #fff; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.ys-footer-tel { color: #fff !important; font-size: 28px; font-weight: 300; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ys-footer-grid { display: grid; gap: 40px; }
.ys-footer-info p { margin: 0; }
.ys-footer-note { margin-top: 20px !important; max-width: 720px; font-size: 13px; color: rgba(255,255,255,.45); }
.ys-footer .ys-label { color: rgba(255,255,255,.45); }
.ys-footer-links { list-style: none; margin: 0; padding: 0; }
@media (min-width: 960px) { .ys-footer-grid { grid-template-columns: 2fr 1fr; } }

/* 모바일 하단 전화바 */
.ys-callbar { display: none; }
@media (max-width: 767px) {
    body { padding-bottom: 56px; }
    .ys-callbar { display: grid; grid-template-columns: 2fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; }
    .ys-callbar a { display: flex; align-items: center; justify-content: center; height: 56px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
    .ys-callbar-call { background: var(--brick); }
    .ys-callbar-check { background: var(--ink); }
}

/* =========================================================
   HOME (front-page.php)
   ========================================================= */
.ys-section { padding: 128px 0; }
.ys-alt { background: var(--paper-2); }
.ys-head { margin-bottom: 56px; }
.ys-head-split { display: grid; gap: 24px 64px; }
.ys-head-split > p { margin: 0; max-width: 560px; }
@media (min-width: 960px) { .ys-head-split { grid-template-columns: 5fr 7fr; align-items: end; } }
@media (max-width: 767px) { .ys-section { padding: 80px 0; } .ys-head { margin-bottom: 40px; } }

/* photo fade-in (JS가 .ys-fade 부여) */
.ys-fade { opacity: 0; transition: opacity 1s ease; }
.ys-fade.is-in { opacity: 1; }

/* hero */
.ys-hero { position: relative; min-height: max(640px, 100svh); display: flex; align-items: flex-end; color: #fff; background: #2a2622; overflow: hidden; }
.ys-hero-photo, .ys-hero-photo picture { position: absolute; inset: 0; }
.ys-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.ys-hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,.18) 100%); } /* 가독성 scrim */
.ys-hero-inner { position: relative; width: 100%; padding-bottom: 88px; }
.ys-hero h1 { color: #fff; max-width: 15em; }
.ys-hero .ys-label { color: rgba(255,255,255,.82); }
.ys-hero .ys-lead { max-width: 640px; margin: 28px 0 40px; font-size: 17px; line-height: 1.75; color: rgba(255,255,255,.88); }
.ys-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 767px) {
    .ys-hero-inner { padding-bottom: 48px; }
    .ys-hero .ys-lead { font-size: 15px; margin: 20px 0 28px; }
    .ys-btn-row .ys-btn { flex: 1 1 100%; }
}

/* deadline line */
.ys-deadline { border-bottom: 1px solid var(--line); }
.ys-deadline p { margin: 0; padding: 22px var(--gutter); text-align: center; font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }

/* building type tiles: 여백 없는 4분할 */
.ys-types { padding-top: 128px; }
.ys-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.ys-tiles a { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; background: #3a3530; }
.ys-tiles img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .8s ease; }
.ys-tiles a::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.28); transition: background-color .4s; }
.ys-tiles a:hover img { transform: scale(1.04); }
.ys-tiles a:hover::after { background: rgba(0,0,0,.42); }
.ys-tiles h3 { position: absolute; z-index: 1; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #fff; font-size: 22px; font-weight: 600; padding: 0 16px; }
.ys-tiles h3 span { font-weight: 200; margin-left: 4px; }
@media (max-width: 767px) {
    .ys-types { padding-top: 80px; }
    .ys-tiles { grid-template-columns: 1fr 1fr; }
    .ys-tiles img { aspect-ratio: 1 / 1; }
    .ys-tiles h3 { font-size: 17px; }
}

/* law: 3단 텍스트 */
.ys-cols3 { display: grid; gap: 48px; }
.ys-cols3 article { border-top: 1px solid var(--ink); padding-top: 28px; }
.ys-cols3 h3 { margin-bottom: 16px; }
.ys-cols3 p { margin: 0; }
@media (min-width: 960px) { .ys-cols3 { grid-template-columns: repeat(3, 1fr); } }

/* cost example */
.ys-example { display: grid; gap: 8px 64px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--ink); }
.ys-example p { margin: 0; max-width: 720px; }
@media (min-width: 960px) { .ys-example { grid-template-columns: 5fr 7fr; } }

/* 50/50 split: 사진 반(화면 끝까지) + 글 반 */
.ys-split { display: grid; background: var(--paper); }
.ys-split-photo { position: relative; background: #3a3530; min-height: 360px; }
.ys-split-photo picture { position: sticky; top: 0; display: block; height: 100%; max-height: 100svh; }
.ys-split-photo img { width: 100%; height: 100%; object-fit: cover; }
.ys-split-body { padding: 128px clamp(24px, 7vw, 120px); max-width: 780px; }
.ys-split-body h2 { margin-bottom: 24px; }
@media (min-width: 960px) {
    .ys-split { grid-template-columns: 1fr 1fr; min-height: 760px; }
    .ys-split-rev .ys-split-photo { order: 2; }
}
@media (max-width: 959px) {
    .ys-split-photo { min-height: 0; }
    .ys-split-photo picture { position: static; }
    .ys-split-photo img { aspect-ratio: 4 / 3; }
    .ys-split-body { padding: 72px var(--gutter); }
}

/* quiz: 각진 토글 */
.ys-quiz { margin: 40px 0 24px; }
.ys-quiz fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 22px 0 24px; min-width: 0; }
.ys-quiz legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.5; }
.ys-q-num { display: inline-block; width: 32px; color: var(--muted); font-weight: 300; font-variant-numeric: tabular-nums; }
.ys-toggles { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.ys-toggle { position: relative; cursor: pointer; }
.ys-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ys-toggle span { display: block; padding: 10px 16px; border: 1px solid #cfccc5; font-size: 14px; line-height: 1.4; color: var(--ink-2); background: #fff; transition: background-color .15s, color .15s, border-color .15s; }
.ys-toggle:hover span { border-color: var(--ink); }
.ys-toggle input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.ys-toggle input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.ys-quiz button { margin-top: 12px; }
.ys-result { margin-top: 36px; padding-top: 24px; border-top: 2px solid var(--ink); }
.ys-result:focus { outline: none; }
.ys-result-label { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; margin-bottom: 8px; }
.ys-result-no .ys-result-label { color: var(--brick); }
.ys-result-note { font-size: 13px; color: var(--muted); }

/* process: 큰 얇은 숫자 + 가로선 */
.ys-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 48px; }
.ys-steps li { border-top: 1px solid var(--ink); padding: 28px 0 56px; }
.ys-step-num { display: block; font-size: 56px; font-weight: 300; line-height: 1; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 28px; }
.ys-steps h3 { margin-bottom: 10px; }
.ys-steps p { margin: 0; }
.ys-who { margin-top: 12px !important; font-size: 13px; letter-spacing: .04em; color: var(--muted); }
@media (min-width: 768px) { .ys-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .ys-steps { grid-template-columns: repeat(3, 1fr); } }

/* hard / how */
.ys-lines { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.ys-lines li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.65; }
.ys-defs { margin: 32px 0 40px; border-top: 1px solid var(--ink); }
.ys-defs dt { color: var(--ink); font-weight: 600; padding-top: 18px; }
.ys-defs dd { margin: 4px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 15px; }

/* guide grid: 사진 + 제목만 */
.ys-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 16px; }
.ys-grid a { display: block; text-decoration: none; color: var(--ink); }
.ys-grid-img { display: block; overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 5; }
.ys-grid-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.ys-grid a:hover img { transform: scale(1.04); }
.ys-grid-title { display: block; margin-top: 16px; font-size: 16px; font-weight: 500; line-height: 1.5; letter-spacing: -0.02em; }
.ys-grid a:hover .ys-grid-title { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 960px) { .ys-grid { grid-template-columns: repeat(4, 1fr); gap: 64px 24px; } }

/* faq section layout */
#faq .ys-head-split { align-items: start; }

/* closing CTA: 풀블리드 사진 */
.ys-cta { position: relative; min-height: 640px; display: flex; align-items: center; color: #fff; background: #2a2622; overflow: hidden; }
.ys-cta-photo, .ys-cta-photo picture { position: absolute; inset: 0; }
.ys-cta-photo img { width: 100%; height: 100%; object-fit: cover; }
.ys-cta-photo::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.ys-cta-inner { position: relative; width: 100%; text-align: center; }
.ys-cta h2 { color: #fff; }
.ys-cta p { max-width: 560px; margin: 24px auto 40px; color: rgba(255,255,255,.85); }
@media (max-width: 767px) { .ys-cta { min-height: 520px; } }
