/* 은하수 인테리어 — 시공업 템플릿 CSS v3. 토큰은 공장/디자인계획_은하수_0905.md */
:root {
  --ceramic: #ffffff;
  --tile: #eef0ec;
  --grout: #c9cbc6;
  --grout-faint: rgba(32, 35, 38, 0.07);
  --slate: #5f6468;
  --cement: #202326;
  --cement-deep: #16191b;
  --waterproof: #1d62c8;
  --waterproof-deep: #123e85;
  --measure: 680px;
  --wrap: 1160px;
  --gutter: 20px;
  --space: 72px;
  --band: 10px;
  --display: "Pretendard Site", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
@media (min-width: 900px) {
  :root { --gutter: 40px; --space: 120px; }
}

@font-face {
  font-family: "Pretendard Site";
  src: url("/fonts/pretendard-site.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ceramic);
  color: var(--cement);
  font-family: "Pretendard Site", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--waterproof); color: #fff; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--waterproof); text-underline-offset: 3px; }
a:hover { color: var(--waterproof-deep); }
:focus-visible { outline: 3px solid var(--waterproof); outline-offset: 3px; }
h1, h2, h3 { margin: 0; hyphens: none; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }
h1 { font-size: 36px; line-height: 1.12; }
h2 { font-size: 28px; line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 800; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
strong { font-weight: 700; }
@media (min-width: 900px) {
  h1 { font-size: 64px; line-height: 1.05; }
  h2 { font-size: 40px; letter-spacing: -0.03em; }
  h3 { font-size: 22px; }
}
@media (min-width: 481px) {
  h1, h2 { text-wrap: balance; }
}

.skip {
  position: absolute; left: 8px; top: -60px;
  background: var(--cement); color: #fff; padding: 10px 14px; z-index: 100;
}
.skip:focus { top: 8px; }
.skip:hover, .skip:focus { color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.measure { max-width: var(--measure); }
.section { padding-top: var(--space); }
.section > .wrap > h2, .band .wrap > h2, .band-dark .wrap > h2, .bleed .panel > h2 { margin-bottom: 24px; }
.section > .wrap > h2::before, .band .wrap > h2::before, .band-dark .wrap > h2::before, .bleed .panel > h2::before, .story-grid .measure > h2::before { content: ""; display: block; width: 44px; height: 4px; background: var(--waterproof); margin-bottom: 18px; }
.lead { font-size: 19px; line-height: 1.55; }
@media (min-width: 900px) { .lead { font-size: 21px; } }
.muted { color: var(--slate); }
.small { font-size: 15px; }

/* 방수선 — 페이지 맨 위 파란 띠 */
.band-top { height: var(--band); background: var(--waterproof); }

/* 상단 바 */
.top { background: var(--ceramic); border-bottom: 1px solid var(--grout); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 19px; letter-spacing: 0.04em; color: var(--cement); text-decoration: none; white-space: nowrap; }
.brand .mark { width: 24px; height: 24px; flex: none; }
.nav { display: none; gap: 28px; }
.nav a { color: var(--cement); text-decoration: none; font-weight: 600; font-size: 16px; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; }
.nav a:hover { color: var(--waterproof); }
@media (min-width: 900px) { .nav { display: flex; } .top .wrap { min-height: 76px; } .brand { font-size: 21px; } .brand .mark { width: 28px; height: 28px; } }
.topnav { display: flex; gap: 18px; padding: 4px 0; overflow-x: auto; }
.topnav a { color: var(--cement); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.topnav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.topnav-wrap { border-bottom: 1px solid var(--grout); padding: 6px 0 8px; }
@media (min-width: 900px) { .topnav-wrap { display: none; } }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px; border-radius: 4px;
  font-weight: 700; font-size: 17px; text-decoration: none; line-height: 1.2;
  border: 2px solid transparent;
}
.btn-primary { background: var(--waterproof); color: #fff; }
.btn-primary:hover { background: var(--waterproof-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--cement); border-color: var(--cement); }
.btn-ghost:hover { background: var(--tile); color: var(--cement); }
.btn-top { padding: 8px 14px; min-height: 40px; font-size: 16px; }
.btn-top .num { display: none; }
@media (min-width: 600px) { .btn-top .num { display: inline; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 599px) { .cta-row .btn { flex: 1 1 100%; } }
@media (min-width: 900px) { .btn { min-height: 56px; font-size: 18px; padding: 14px 26px; } .btn-top { min-height: 44px; font-size: 16px; padding: 8px 16px; } }

/* 홈 히어로 — 전면 사진 안에 반투명 유리 판 배너 */
.hero-plate { position: relative; }
.hero-plate .photo { aspect-ratio: 4 / 3; overflow: hidden; border: 0; }
.hero-plate .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero-plate .plate-wrap { position: relative; margin-top: -56px; }
.hero-plate .plate {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: var(--band) solid var(--waterproof);
  padding: 26px 22px 24px;
}
.hero-plate .plate h1 { margin-bottom: 14px; }
.hero-plate .plate .lead { max-width: 560px; }
@media (min-width: 900px) {
  .hero-plate .photo { aspect-ratio: auto; height: min(80vh, 840px); }
  .hero-plate .plate-wrap { position: absolute; left: 0; right: 0; bottom: 64px; margin-top: 0; }
  .hero-plate .plate { max-width: 700px; padding: 44px 48px 40px; }
}
/* 하위 페이지 히어로 — 사진이 오른쪽 화면 끝까지 */
.hero { display: grid; gap: 22px; padding-bottom: var(--space); }
.hero .hero-photo { order: 1; }
.hero .hero-text { order: 2; padding-left: var(--gutter); padding-right: var(--gutter); }
.hero .hero-text h1 { margin-bottom: 16px; }
.hero .hero-photo figcaption { padding-left: var(--gutter); padding-right: var(--gutter); }
.hero.no-photo .hero-text { padding-top: 28px; }
.ratio-4x3 { aspect-ratio: 4 / 3; overflow: hidden; }
.ratio-4x3 img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .hero {
    grid-template-columns: [full-start] minmax(var(--gutter), 1fr) [content-start] minmax(0, calc(var(--wrap) / 2 - var(--gutter))) [mid] minmax(0, calc(var(--wrap) / 2 - var(--gutter))) [content-end] minmax(var(--gutter), 1fr) [full-end];
    column-gap: 0; row-gap: 0; align-items: center; padding-bottom: var(--space);
  }
  .hero .hero-text { grid-column: content-start / mid; grid-row: 1; order: 0; padding: 56px 56px 56px 0; }
  .hero.no-photo .hero-text { grid-column: content-start / content-end; padding-right: 0; }
  .hero .hero-photo { grid-column: mid / full-end; grid-row: 1; order: 0; }
  .hero .hero-photo figcaption { padding-left: 0; padding-right: var(--gutter); }
  .hero .ratio-4x3 { aspect-ratio: 5 / 4; }
  .hero .tile { border-left: 1px solid var(--grout); border-right: 0; border-top: 0; }
}
.hero-text .lead { max-width: 560px; }
.facts-line { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: var(--slate); }
.facts-line li { display: inline-flex; align-items: center; gap: 8px; }
.facts-line li::before { content: ""; width: 8px; height: 8px; background: var(--waterproof); flex: none; }

/* 사진 = 타일 */
.tile { border: 1px solid var(--grout); background: var(--tile); position: relative; }
.tile img { width: 100%; }
.ratio-4x5 { aspect-ratio: 4 / 5; overflow: hidden; }
.ratio-4x5 img { width: 100%; height: 100%; object-fit: cover; }
figure { margin: 0; }
figcaption { font-size: 15px; color: var(--slate); margin-top: 10px; line-height: 1.5; }
.tag { position: absolute; top: 12px; left: 12px; background: var(--ceramic); color: var(--cement); font-weight: 800; font-size: 15px; padding: 4px 10px; line-height: 1.3; }
.tag.blue { background: var(--waterproof); color: #fff; }

/* 하는 일 — 사진 카드 3칸 */
.svc { display: grid; gap: 28px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .svc { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.svc li { border: 1px solid var(--grout); background: var(--ceramic); display: flex; flex-direction: column; }
.svc .ratio-4x3 { border-bottom: 1px solid var(--grout); }
.svc .body { padding: 20px 20px 24px; }
.svc h3 { font-family: var(--display); font-size: 24px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.svc h3 a { color: var(--cement); text-decoration: none; }
.svc h3 a:hover { color: var(--waterproof); text-decoration: underline; }
.svc .price { font-size: 21px; font-weight: 800; margin: 12px 0 4px; }

/* 맡기셔도 되는 이유 — 4칸, 칸마다 방수선 */
.why { display: grid; gap: 28px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .why { grid-template-columns: repeat(2, 1fr); gap: 32px; } }
@media (min-width: 1000px) { .why { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.why li { padding-top: 18px; border-top: 4px solid var(--waterproof); }
.why h3 { font-size: 20px; margin-bottom: 8px; }
.why p { font-size: 16px; color: var(--slate); }

/* 띠(밴드) — 타일 회백 + 은은한 줄눈 격자 */
.band {
  margin-top: var(--space); padding: var(--space) 0;
  background-color: var(--tile);
}
.band .wrap > h2 { margin-bottom: 24px; }
.band-dark { margin-top: var(--space); padding: var(--space) 0; background: var(--cement); color: #fff; }
.band-dark a { color: #fff; }
.band-dark .btn-primary { background: var(--waterproof); }
.band-dark .btn-ghost { color: #fff; border-color: #fff; }
.band-dark .btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.band-dark .muted { color: rgba(255,255,255,0.72); }
.band-dark .lead { color: rgba(255,255,255,0.92); }

/* 전후 — 두 장은 같은 비율(4:5)로 맞춘다 */
.pair { display: grid; gap: 20px; }
.pair .tile { aspect-ratio: 4 / 5; overflow: hidden; }
.pair .tile img { width: 100%; height: 100%; object-fit: cover; }
.gallery .tile { aspect-ratio: 4 / 5; overflow: hidden; }
.gallery .tile img { width: 100%; height: 100%; object-fit: cover; }
.steps .tile { aspect-ratio: 4 / 5; overflow: hidden; }
.steps .tile img { width: 100%; height: 100%; object-fit: cover; }
.split .tile { aspect-ratio: 4 / 5; overflow: hidden; }
.split .tile img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 720px) { .pair { grid-template-columns: 1fr 1fr; gap: 28px; } }

/* 문단 구역 */
.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; } }
.split .photo { max-width: 520px; }

/* 사례 카드 */
.cases { display: grid; gap: 32px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .cases { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.cases .ratio-4x5 { margin-bottom: 12px; }
.cases h3 { font-family: var(--display); font-size: 22px; font-weight: 800; }
.cases h3 a { color: var(--cement); text-decoration: none; }
.cases h3 a:hover { color: var(--waterproof); text-decoration: underline; }
.cases .meta { color: var(--slate); font-size: 15px; margin-top: 6px; }

/* 사례 상세 갤러리 */
.gallery { display: grid; gap: 28px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* 공정 순서 */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 40px; }
.steps li { display: grid; gap: 14px; counter-increment: step; }
.steps .num::before { content: counter(step, decimal-leading-zero); font-weight: 800; font-size: 15px; color: var(--waterproof); letter-spacing: 0.04em; }
.steps h3 { margin-bottom: 8px; font-family: var(--display); font-size: 26px; font-weight: 800; }
@media (min-width: 720px) {
  .steps li { grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
  .steps li:nth-child(even) > div { order: 2; }
}

/* 되는 집 / 안 되는 집 */
.two-lists { display: grid; gap: 32px; }
@media (min-width: 900px) { .two-lists { grid-template-columns: 1fr 1fr; gap: 56px; } }
.two-lists h2, .two-lists h3 { margin-bottom: 12px; }
.two-lists ol { padding-left: 1.3em; }
.two-lists li { margin-bottom: 10px; }

/* Q&A */
.qa { border-top: 2px solid var(--cement); padding-top: 4px; }
.qa details { border-bottom: 1px solid var(--grout); }
.qa summary { cursor: pointer; padding: 18px 0; font-size: 19px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-weight: 400; color: var(--slate); flex: none; }
.qa details[open] summary::after { content: "−"; }
.qa .answer { padding: 0 0 20px; max-width: var(--measure); }

/* 사실표 */
.facts { display: grid; gap: 0; margin: 0; border-top: 2px solid var(--cement); }
.facts div { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--grout); }
.facts dt { font-weight: 800; }
.facts dd { margin: 0; }
@media (min-width: 720px) { .facts div { grid-template-columns: 180px 1fr; gap: 20px; } }

/* 인용 */
.quote { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.3; margin: 22px 0 8px; letter-spacing: -0.02em; }
@media (min-width: 900px) { .quote { font-size: 34px; } }
.quote + .small { margin-top: 0; }

/* 문의 */
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 0; border-top: 2px solid var(--cement); }
.contact-list li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--grout); }
.contact-list .k { font-weight: 800; }
.form { display: grid; gap: 16px; max-width: 560px; margin-top: 24px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input, .form select, .form textarea {
  font: inherit; padding: 12px; border: 1px solid var(--grout); border-radius: 4px; background: #fff; color: var(--cement);
}
.form textarea { min-height: 120px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .hp { position: absolute; left: -9999px; }

/* 푸터 — 시멘트색 */
.footer { background: var(--cement-deep); color: #fff; margin-top: 0; padding: 48px 0 120px; font-size: 15px; border-top: var(--band) solid var(--waterproof); }
.band-dark + .footer { border-top: 1px solid rgba(255,255,255,0.15); }
.footer .wrap { display: grid; gap: 24px; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer .links a { color: #fff; }
.footer address { font-style: normal; line-height: 1.75; color: rgba(255,255,255,0.85); }
.footer address a { color: #fff; }
@media (min-width: 900px) {
  .footer { padding: 64px 0 56px; }
  .footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
}

/* 폰 하단 고정 전화 바 */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--ceramic); border-top: 1px solid var(--grout);
}
.callbar .btn { min-height: 52px; font-size: 17px; }
@media (min-width: 900px) { .callbar { display: none; } }

/* 404·감사 */
.plain { padding-top: var(--space); padding-bottom: var(--space); min-height: 50vh; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .callbar, .topnav-wrap, .skip, .band-top { display: none; }
}

/* 전후 비교 슬라이더 — 두 실사진을 손잡이로 가르며 본다 (내용은 두 <img> 그대로, 스크립트는 손잡이 위치만) */
.compare { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--grout); background: var(--tile); }
@media (min-width: 720px) { .compare { aspect-ratio: 1 / 1; max-width: 720px; } }
.compare .layer { position: absolute; inset: 0; }
.compare .layer img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.compare .after { clip-path: inset(0 0 0 var(--pos)); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-1.5px); pointer-events: none; }
.compare .knob { position: absolute; top: 50%; left: var(--pos); width: 48px; height: 48px; border-radius: 50%; background: var(--waterproof); border: 3px solid #fff; transform: translate(-50%, -50%); pointer-events: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: 2px; }
.compare .knob::before { content: "\2039 \203A"; }
.compare .tag-right { left: auto; right: 12px; }
.compare .compare-input { position: absolute; inset: 0; margin: 0; }
.compare .compare-input input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare:focus-within { outline: 3px solid var(--waterproof); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 전면 어두운 띠 — 왼쪽 시멘트 판 + 오른쪽 사진이 화면 끝까지 */
.bleed { display: grid; margin-top: var(--space); background: var(--cement); color: #fff; }
.bleed .panel { padding: 48px var(--gutter); }
.bleed .panel .lead { color: rgba(255,255,255,0.92); }
.bleed .btn-ghost { color: #fff; border-color: #fff; }
.bleed .btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
.bleed .photo-side .tile { border: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.bleed .photo-side .tile img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .bleed { grid-template-columns: [full-start] minmax(var(--gutter), 1fr) [content-start] minmax(0, calc(var(--wrap) / 2 - var(--gutter))) [mid] minmax(0, calc(var(--wrap) / 2 - var(--gutter))) [content-end] minmax(var(--gutter), 1fr) [full-end]; align-items: center; }
  .bleed .panel { grid-column: content-start / mid; grid-row: 1; padding: 72px 64px 72px 0; }
  .bleed .photo-side { grid-column: mid / full-end; grid-row: 1; }
  .bleed .photo-side .tile { aspect-ratio: 5 / 4; }
}
.bleed + .section { padding-top: var(--space); }

/* AI 시안 칸 — 시공 사례와 분리, 각 장에 AI 시안 표시 */
.sian { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .sian { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.sian .meta { margin-top: 10px; font-weight: 700; }
.styles { display: grid; grid-template-columns: 1fr; gap: 36px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 600px) { .styles { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (min-width: 1000px) { .styles { grid-template-columns: repeat(3, 1fr); } }
.styles h3 { font-family: var(--display); font-size: 22px; margin: 12px 0 6px; }
.styles p { margin: 0 0 4px; }

/* 슬라이더 안내 — 눈에 띄게 */
.compare + figcaption { font-size: 17px; color: var(--cement); margin-top: 14px; line-height: 1.6; }
.compare + figcaption .hint { color: var(--waterproof); font-weight: 800; font-size: 19px; }
@media (min-width: 900px) { .compare + figcaption .hint { font-size: 21px; } }
.compare .knob { width: 56px; height: 56px; font-size: 20px; box-shadow: 0 0 0 4px rgba(29,98,200,0.25); }

@media (min-width: 720px) { .cases.two { grid-template-columns: repeat(2, 1fr); max-width: 780px; } }

/* 브랜드 — 푸터 로고·태그라인, 소개 「이름에 담은 뜻」 */
.footer .brand-logo { margin-bottom: 10px; }
.footer .brand-logo img { display: block; height: 52px; width: auto; }
.footer .tagline { color: rgba(255,255,255,0.72); font-size: 15px; letter-spacing: 0.06em; margin: 0 0 20px; }
.story { padding-top: 8px; }
.story-grid { display: grid; gap: 28px; align-items: start; border-top: 1px solid var(--grout); padding-top: 40px; }
.story-logo { display: block; width: 132px; height: auto; }
.story .tagline { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: 0.02em; line-height: 1.3; margin-top: 24px; color: var(--cement); }
@media (min-width: 900px) {
  .footer .brand-logo img { height: 60px; }
  .story { padding-top: 16px; }
  .story-grid { grid-template-columns: 200px 1fr; gap: 64px; align-items: center; padding-top: 56px; }
  .story-logo { width: 200px; }
  .story .tagline { font-size: 28px; }
}
