/* 하비인테리어 habimade.com — 시안 v4 (2026-10-01) = 시안 A 사진 갤러리형 채택
   벤치마크: 지랩·817디자인스페이스·아울디자인·Olson Kundig. 색·글꼴 정본 = ci/habi-interior/final (A안 모양 + B안 색). */
:root {
  --pine: #23433A; --pine-900: #14271F; --glow: #E8B04B; --glow-600: #D69C33;
  --stone: #EEEBE4; --canvas: #F4F2EC; --paper: #FFFFFF;
  --ink: #1E2B27; --ink-2: #4A5450; --ink-3: #6B736F; --line: #D9D5CC;
  --font-ko: 'Gothic A1', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-en: 'Josefin Sans', 'Gothic A1', sans-serif;
  --pad: 20px; --bar-h: 64px; --ease: cubic-bezier(.2,.7,.2,1);
}
@media (min-width: 900px) { :root { --pad: 48px; } }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--canvas); color: var(--ink-2); font: 400 16px/1.7 var(--font-ko); word-break: keep-all; overflow-wrap: anywhere; padding-bottom: var(--bar-h); }
@media (min-width: 900px) { body { padding-bottom: 0; font-size: 17px; } }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.03em; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 2px; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: var(--pad); }
.draft-flag { background: var(--glow); color: var(--pine-900); font-size: 14px; font-weight: 700; text-align: center; padding: 8px var(--pad); }
.todo { background: #FFF1D2; color: var(--ink); padding: 0 4px; border-radius: 3px; }
.en { font-family: var(--font-en); letter-spacing: .16em; text-transform: uppercase; font-size: 12px; }

/* 헤더 — 사진 위 투명, 내려가면 돌담색 */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; margin-bottom: -72px; transition: background-color .3s var(--ease); --post:#EEEBE4; --bar:#E8B04B; --word:#EEEBE4; --sub:#E8B04B; color: var(--stone); }
.top.solid { background: rgba(244,242,236,.94); backdrop-filter: blur(8px); color: var(--ink); --post:#23433A; --word:#23433A; --sub:#23433A; box-shadow: 0 1px 0 var(--line); }
.top .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { height: 42px; display: block; } .logo svg { height: 100%; width: auto; display: block; }
.top nav { display: none; gap: 28px; font-size: 15px; }
.top nav a { text-decoration: none; opacity: .9; } .top nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.top .tel { font: 600 15px/1 var(--font-en); letter-spacing: .06em; text-decoration: none; display: none; }
@media (min-width: 960px) { .top nav, .top .tel { display: flex; } }

/* 히어로 — 사진 넘기기 */
.hero { position: relative; height: min(100svh, 920px); min-height: 560px; background: var(--pine-900); color: var(--stone); overflow: hidden; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; opacity: 0; transform: scale(1.04); transition: opacity 1.2s var(--ease), transform 6s linear; }
.slides img.on { opacity: 1; transform: scale(1); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,39,31,.55) 0%, rgba(20,39,31,0) 22%, rgba(20,39,31,0) 50%, rgba(20,39,31,.78) 100%); pointer-events: none; }
.hero .copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 120px; }
.hero h1 { color: var(--stone); font-size: clamp(36px, 6.4vw, 84px); font-weight: 700; line-height: 1.1; letter-spacing: -0.045em; max-width: 12em; }
.hero h1 em { font-style: normal; color: var(--glow); }
.hero .go { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px; border-radius: 999px; background: rgba(238,235,228,.12); box-shadow: inset 0 0 0 1.5px rgba(238,235,228,.7); backdrop-filter: blur(6px); color: var(--stone); text-decoration: none; font-weight: 700; transition: background-color .25s var(--ease), color .25s var(--ease); }
.hero .go:hover { background: var(--glow); color: var(--pine-900); box-shadow: none; }
.counter { position: absolute; z-index: 2; left: 0; right: 0; bottom: 32px; }
.counter .wrap { display: flex; align-items: center; gap: 18px; font-size: 14px; color: rgba(238,235,228,.85); }
.counter .num { font: 600 14px/1 var(--font-en); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.counter .track { width: 120px; height: 2px; background: rgba(238,235,228,.3); position: relative; flex: none; }
.counter .track i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--glow); }
.counter .cap { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.counter button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(238,235,228,.12); color: var(--stone); cursor: pointer; font-size: 16px; flex: none; }
.counter button:hover { background: rgba(238,235,228,.28); }
@media (max-width: 600px) { .counter .track { display: none; } .counter .wrap { gap: 12px; } .hero .copy { bottom: 104px; } }
@media (max-width: 899px) { .hero { height: calc(100svh - var(--bar-h) - env(safe-area-inset-bottom, 0px)); } }

/* 문장 한 줄 */
.statement { padding-block: clamp(72px, 12vw, 160px); }
.statement p { font-size: clamp(24px, 3.4vw, 44px); line-height: 1.45; letter-spacing: -0.03em; color: var(--ink); max-width: 24em; font-weight: 500; }
.statement a { color: var(--pine); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--glow); white-space: nowrap; }

/* 공사 종류 — 화면 한 장씩 */
.chapter { position: relative; height: min(88svh, 860px); min-height: 480px; overflow: hidden; color: var(--stone); background: var(--pine-900); }
.chapter img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.chapter::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,39,31,0) 45%, rgba(20,39,31,.8) 100%); }
.chapter .t { position: absolute; z-index: 1; left: 0; right: 0; bottom: 44px; }
.chapter .t .wrap { display: grid; gap: 10px; }
.chapter .k { color: rgba(238,235,228,.75); }
.chapter h2 { color: var(--stone); font-size: clamp(28px, 4.4vw, 56px); max-width: 14em; }
.chapter p { color: rgba(238,235,228,.85); max-width: 32em; }
.chapter a.more { justify-self: start; margin-top: 8px; color: var(--glow); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--glow); padding-bottom: 2px; }
.chapter .ex { position: absolute; z-index: 1; top: 88px; right: var(--pad); font-size: 12px; color: rgba(238,235,228,.7); }
.pair { display: grid; }
@media (min-width: 900px) { .pair { grid-template-columns: 1fr 1fr; } .pair .chapter { height: min(76svh, 720px); } }

/* 전후 비교 */
.section { padding-block: clamp(72px, 10vw, 128px); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 40px; margin-bottom: 36px; }
.head h2 { font-size: clamp(28px, 4vw, 48px); }
.head p { max-width: 26em; }
.head .en { color: var(--pine); display: block; margin-bottom: 12px; }
.ba-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ba-tabs button { font: 700 15px/1 var(--font-ko); min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.ba-tabs button[aria-selected="true"] { background: var(--pine); color: var(--stone); box-shadow: none; }
.ba { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--pine-900); user-select: none; }
@media (min-width: 900px) { .ba { aspect-ratio: 16 / 9; } }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; pointer-events: none; }
.ba .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: var(--stone); pointer-events: none; }
.ba .handle::after { content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 50%; background: var(--glow); color: var(--pine-900); display: grid; place-items: center; font-size: 22px; }
.ba .tag { position: absolute; top: 16px; font: 600 12px/1 var(--font-en); letter-spacing: .18em; padding: 8px 12px; background: rgba(20,39,31,.6); color: var(--stone); pointer-events: none; }
.ba .tag--b { left: 16px; } .ba .tag--a { right: 16px; background: var(--glow); color: var(--pine-900); }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.ba-cap b { color: var(--ink); font-size: 17px; }

/* 시공 사례 */
.cases { display: grid; gap: 40px 24px; grid-template-columns: minmax(0,1fr); }
@media (min-width: 760px) { .cases { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.case { text-decoration: none; display: grid; gap: 14px; }
.case .ph { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--line); }
.case img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.case:hover img { transform: scale(1.04); }
.case .ex { position: absolute; left: 12px; top: 12px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.9); color: var(--ink-2); padding: 2px 8px; }
.case h3 { font-size: clamp(20px, 2vw, 26px); }
.case .info { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; }

/* 하비를 고르는 이유 — 글 네 칸 */
.why { background: var(--stone); }
.claims { display: grid; gap: 0; grid-template-columns: minmax(0,1fr); border-top: 1px solid var(--line); }
@media (min-width: 800px) { .claims { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.claims div { padding: 32px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
@media (min-width: 800px) { .claims div:nth-child(odd) { padding-right: 40px; border-right: 1px solid var(--line); } .claims div:nth-child(even) { padding-left: 40px; } }
.claims h3 { font-size: clamp(22px, 2.4vw, 30px); }
.claims h3 em { font-style: normal; color: var(--pine); box-shadow: inset 0 -0.3em 0 rgba(232,176,75,.5); }

/* 문의 */
.contact { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 56px; align-items: start; } }
.contact .intro h2 { font-size: clamp(30px, 4.4vw, 56px); }
.contact .intro p { margin-top: 14px; max-width: 26em; }
.contact .ways { margin-top: 28px; display: grid; gap: 4px; border-top: 1px solid var(--line); }
.contact .ways div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact .ways b { color: var(--ink); }
.contact .ways span { text-align: right; }
.contact .office { margin-top: 28px; position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.contact .office img { width: 100%; height: 100%; object-fit: cover; }
.contact .office small { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: rgba(255,255,255,.85); }
form.step-form { background: var(--paper); padding: 32px 24px; display: grid; gap: 22px; box-shadow: 0 1px 0 var(--line); }
@media (min-width: 768px) { form.step-form { padding: 40px; } }
.progress { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-3); }
.progress i { flex: 1; height: 3px; background: var(--line); }
.progress i::after { content: ""; display: block; height: 100%; width: var(--p, 50%); background: var(--pine); transition: width .3s var(--ease); }
.step h3 { font-size: clamp(21px, 2.2vw, 26px); margin-bottom: 18px; }
.pick { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 600px) { .pick { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.pick label { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick .opt { display: block; background: var(--canvas); box-shadow: inset 0 0 0 1.5px var(--line); }
.pick .opt img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.pick .opt b { display: block; padding: 8px 10px; font-size: 15px; color: var(--ink); }
.pick input:checked + .opt { box-shadow: inset 0 0 0 3px var(--pine); }
.pick input:checked + .opt b { background: var(--pine); color: var(--stone); }
.pick input:focus-visible + .opt { outline: 3px solid var(--glow); }
.fields { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; color: var(--ink); font-size: 15px; }
.field small { color: var(--ink-3); font-weight: 400; }
.field input, .field textarea { font: 400 16px/1.5 var(--font-ko); color: var(--ink); background: var(--canvas); border: 1.5px solid var(--line); padding: 12px 14px; min-height: 50px; width: 100%; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pine); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.agree input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--pine); flex: none; }
.nav-btns { display: flex; gap: 10px; }
.btn { flex: 1; min-height: 54px; border: 0; cursor: pointer; font: 700 16px/1 var(--font-ko); }
.btn--main { background: var(--pine); color: var(--stone); } .btn--main:hover { background: var(--pine-900); }
.btn--ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.sent { background: var(--stone); color: var(--ink); padding: 12px 14px; font-size: 15px; }
.sent--err { background: #FBE3DC; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 푸터 */
.foot { background: var(--pine-900); color: rgba(238,235,228,.72); font-size: 14px; padding-block: 64px 48px; --post:#EEEBE4; --bar:#E8B04B; --word:#EEEBE4; --sub:#E8B04B; }
.foot .wrap { display: grid; gap: 32px; }
@media (min-width: 900px) { .foot .wrap { grid-template-columns: auto minmax(0,1fr) auto; gap: 64px; } }
.foot dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 4px 20px; }
.foot dt { color: rgba(238,235,228,.5); } .foot dd { margin: 0; color: var(--stone); }
.foot nav { display: grid; gap: 8px; align-content: start; } .foot nav a { color: var(--stone); text-decoration: none; }

/* 휴대폰 하단 고정 */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--paper); box-shadow: 0 -1px 0 var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); }
.bar a { display: grid; place-items: center; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--pine); }
.bar a.main { background: var(--pine); color: var(--stone); }
@media (min-width: 900px) { .bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .slides img { transition: none; transform: none; } html { scroll-behavior: auto; } }

.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 8px 16px; }
.agree a { color: var(--pine); }
.foot .copy { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(238,235,228,.12); color: rgba(238,235,228,.5); margin: 0; }

/* 사례 상세 */
.case-hero { position: relative; height: min(80svh, 780px); min-height: 520px; overflow: hidden; background: var(--pine-900); color: var(--stone); }
.case-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.case-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,39,31,.5) 0%, rgba(20,39,31,0) 25%, rgba(20,39,31,.15) 50%, rgba(20,39,31,.88) 100%); }
.case-hero .t { position: absolute; z-index: 1; left: 0; right: 0; bottom: 44px; }
.case-hero h1 { color: var(--stone); font-size: clamp(32px, 5vw, 64px); line-height: 1.12; letter-spacing: -0.04em; }
.case-hero h1 em { font-style: normal; color: var(--glow); }
.case-hero .ex { position: absolute; z-index: 1; top: 88px; right: var(--pad); font-size: 12px; color: rgba(238,235,228,.7); }
.crumb { font-size: 14px; color: rgba(238,235,228,.8); margin-bottom: 14px; } .crumb a { color: var(--stone); text-decoration: none; }
.spec { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 768px) { .spec { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.spec li { border-top: 2px solid var(--glow); padding-top: 10px; font-size: 14px; color: rgba(238,235,228,.75); }
.spec b { display: block; color: var(--stone); font-size: 16px; margin-top: 2px; }
.story { max-width: 880px; }
.story h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 64px 0 18px; }
.story h2:first-child { margin-top: 0; }
.story > p { font-size: clamp(18px, 1.8vw, 22px); color: var(--ink); line-height: 1.6; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.points li { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 14px; align-items: start; }
.points li::before { content: ""; width: 10px; height: 10px; margin-top: 9px; background: var(--glow); }
blockquote { margin: 0; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.5; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
blockquote cite { display: block; margin-top: 12px; font: 400 14px/1.5 var(--font-ko); color: var(--ink-3); }
.acts { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px; }
.act { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; font-weight: 700; text-decoration: none; }
.act--main { background: var(--pine); color: var(--stone); } .act--main:hover { background: var(--pine-900); }
.act--ghost { color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.fine { margin-top: 28px; font-size: 14px; color: var(--ink-3); }
.spec b.todo { color: var(--ink); display: table; padding: 0 6px; margin-top: 4px; }
.story > p.fine { font-size: 14px; color: var(--ink-3); }

/* 개인정보처리방침 등 글 페이지 */
body.plain { padding-bottom: 0; }
.plain .top { margin-bottom: 0; }
.legal { padding-top: 24px; }
.legal h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 16px; }
.legal h2 { font-size: clamp(19px, 2vw, 23px); margin: 44px 0 12px; }
.legal > p { font-size: 16px; color: var(--ink-2); line-height: 1.75; }
.legal > p.fine { font-size: 14px; }
