/* Dalpaengi Marblesink — 싱크대대리석연마 The달팽이
   Design DNA D 재해석 (counter 패밀리 계승, MARBLEGRIND 코드 어댑트): 타이포그래피 중심 풀블리드 히어로,
   전/후 비교 행, 헤어라인 디바이더, 에디토리얼 여백
   컬러: deep #0A1628(DeepNavy) / accent #C49A32(웜골드) / bg #FFFFFF / bg-soft #F9F7F3(mid_band) / bar-chrome #EDEAE0
   폰트: Noto Serif KR 전체 적용(버튼 흰 글자만 Pretendard 600) — MARBLEGRIND(Pretendard 전체)와 차별화.
   design_id=1(4장 2x2 원그로브 호버 퀵링크) / brand_intro_layout=D(위 와이드1장+아래 글左·작은이미지3右)
*/

:root {
  --deep: #0A1628;
  --accent: #C49A32;
  --accent-soft: #F4EBD4;
  --bg: #FFFFFF;
  --bg-soft: #F9F7F3;
  --ink: #000000;
  --desc: #4B5563;
  --bar-chrome: #EDEAE0;
  --border: #E4DFC9;
  --radius: 10px;
  --radius-img: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Noto Serif KR", "Pretendard Variable", Pretendard, serif;
  --font-btn: "Pretendard Variable", Pretendard, sans-serif;
  /* 메인(index) 전용 DNA 토큰 — 서브페이지 기존 톤(--accent 등)에는 영향 없음 */
  --cream: #F4EBD4;
  --cream-soft: #F1EDE4;
  --terracotta: #C49A32;
  --terracotta-hover: #A47F26;
  --sand: #D8C79A;
  /* 브랜드 accent: 헤더 로고「달팽이」= 푸터 로고「달팽이」= 상담하기 버튼 배경, 전부 동일 hex */
  --brand-accent: #C49A32;
  --accent-btn-text: #1A1A1A;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; filter: contrast(1.06) saturate(1.1); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, .ms-eyebrow, .ms-btn { word-break: keep-all; }
h1, h2, h3 { margin: 0 0 16px; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: 20px; }
p { margin: 0 0 12px; }

.ms-skip {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--deep); color: #fff; padding: 10px 16px;
}
.ms-skip:focus { left: 0; }

.ms-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--desc); text-transform: uppercase; margin-bottom: 12px;
}

/* ── 버튼 ─────────────────────────────────────────────────── */
.ms-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--deep); color: #fff; font-family: var(--font-btn);
  padding: 13px 26px; font-size: 15px; font-weight: 600;
  /* wine 톤 에디토리얼 재해석: 버튼 pill + 카드/이미지 라운드로 FLOORGRIND의 각진 통일과 차별화 */
  border-radius: 999px; border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.ms-btn:hover { background: #2b2b2b; transform: translateY(-1px); }
.ms-btn-lg { padding: 16px 34px; font-size: 16px; }
.ms-btn-header {
  background: var(--brand-accent); color: var(--accent-btn-text); font-family: var(--font-btn); font-weight: 600;
}
.ms-btn-header:hover { background: var(--terracotta-hover); }
.ms-btn-sticky { width: 100%; background: var(--brand-accent); color: var(--accent-btn-text); font-family: var(--font-btn); font-weight: 600; }
.ms-btn-sticky:hover { background: var(--terracotta-hover); }

/* ── 헤더 (2-state sticky: top=완전투명 / scrolled=연회색+ink, B-22) ── */
.ms-header {
  position: sticky; top: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.ms-header.is-scrolled {
  background: var(--bar-chrome);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 18px rgba(22,22,22,.10);
}
.ms-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.ms-logo-group { display: flex; flex-direction: column; gap: 2px; }
.ms-logo { font-size: 20px; font-weight: 800; color: #fff; transition: color .3s; }
.ms-logo span { color: var(--brand-accent); }
.ms-logo-tagline { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 500; transition: color .3s; }
.ms-header.is-scrolled .ms-logo { color: var(--deep); }
.ms-header.is-scrolled .ms-logo-tagline { color: var(--desc); }
.ms-header-right { display: flex; align-items: center; gap: 28px; }
.ms-nav { display: flex; gap: 24px; }
.ms-nav a {
  position: relative; color: #fff; font-size: 15px; font-weight: 500; opacity: .85;
  transition: opacity .3s, color .3s; padding-bottom: 3px;
}
.ms-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--brand-accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.ms-nav a:hover { opacity: 1; }
.ms-nav a:hover::after { transform: scaleX(1); }
.ms-header.is-scrolled .ms-nav a { color: var(--ink); }
.ms-burger { display: none; }
.ms-burger span { background: #fff; transition: background .3s; }
.ms-header.is-scrolled .ms-burger span { background: var(--ink); }
.ms-nav-mobile { display: none; }

/* ── 히어로 (타이포그래피 중심 풀블리드 · DNA D) ───────────── */
.ms-hero {
  position: relative; overflow: hidden; color: #fff;
  margin-top: -76px; padding-top: 76px;
  min-height: 640px; display: flex; align-items: center;
}
.ms-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; border-radius: 0;
  animation: ms-hero-fade 1s ease both;
}
.ms-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg,
    rgba(22,22,22,.86) 0%, rgba(22,22,22,.66) 30%,
    rgba(22,22,22,.30) 60%, rgba(22,22,22,.08) 100%);
}
.ms-hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 96px 24px 88px;
}
.ms-hero-copy { max-width: 720px; }
.ms-hero-copy .ms-eyebrow { color: var(--accent); }
.ms-hero h1 { color: #fff; font-size: clamp(38px, 6vw, 66px); }
.ms-hero-desc { color: #ececec; font-size: 18px; }
@media (min-width: 901px) { .ms-hero .ms-hero-desc { white-space: nowrap; } }
.ms-hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.ms-hero-badges span {
  font-size: 13px; padding: 8px 14px; border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.08); border-radius: 999px; color: #fff;
}
.ms-hero-badges span strong { color: var(--accent); margin-right: 4px; }

/* ── CRO: CTA 하단 안심 마이크로카피 ─────────────────────── */
.ms-cta-note { margin-top: 10px; font-size: 13px; color: var(--desc); }
.ms-subhero:has(.ms-subhero-img) .ms-subhero-content .ms-cta-note { color: #f2f2f2; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.ms-cta-band .ms-cta-note { color: rgba(255,255,255,.7); margin-top: 0; width: 100%; }
@keyframes ms-hero-fade {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}

/* ── 전/후 비교 행 (DNA D) ────────────────────────────────── */
.ms-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ms-compare figure { margin: 0; position: relative; }
.ms-compare img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-img); }
.ms-compare figcaption {
  position: absolute; left: 16px; top: 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  padding: 6px 12px; background: var(--deep); color: #fff;
}

/* ── 서브히어로 (내부 페이지 공통 · 풀블리드) ──────────────── */
.ms-subhero {
  position: relative; overflow: hidden;
  margin-top: -76px; padding-top: 76px;
  min-height: 300px;
  display: flex; align-items: flex-end;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg-soft) 100%);
}
.ms-subhero:has(.ms-subhero-img) { min-height: 440px; }
.ms-subhero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0;
}
.ms-subhero:has(.ms-subhero-img)::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.12) 40%, rgba(0,0,0,.58) 100%);
}
.ms-subhero-content {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 24px 44px;
}
.ms-subhero-content h1 { color: var(--deep); }
.ms-subhero-content .ms-hero-desc { color: var(--desc); }
.ms-subhero:has(.ms-subhero-img) .ms-subhero-content h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.ms-subhero:has(.ms-subhero-img) .ms-subhero-content .ms-eyebrow { color: #fff; opacity: .92; }
.ms-subhero:has(.ms-subhero-img) .ms-subhero-content .ms-hero-desc { color: #f2f2f2; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.ms-subhero-consult .ms-subhero-content { max-width: 640px; margin: 0 auto; text-align: center; }
.ms-subhero.ms-subhero-case { min-height: 60vh; }
.ms-subhero-gallery-link {
  display: inline-block; margin-top: 16px; font-size: 14px; color: #fff;
  text-decoration: underline; text-underline-offset: 4px;
}
.ms-subhero-gallery-link:hover { color: var(--sand); }
@media (max-width: 560px) { .ms-subhero.ms-subhero-case { min-height: 50vh; } }

/* ── 섹션 공통 ─────────────────────────────────────────────── */
.ms-section { padding: 72px 24px; border-top: 1px solid #ececec; scroll-margin-top: 88px; }
.ms-section-alt { background: var(--bg-soft); }
.ms-section-inner { max-width: 1200px; margin: 0 auto; }

/* ── 증상 리스트 ──────────────────────────────────────────── */
.ms-symptom-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ms-symptom-item {
  padding: 24px; background: var(--bg-soft); border-radius: var(--radius);
  border-left: 3px solid var(--accent); font-size: 15px; color: var(--desc);
}
.ms-symptom-item strong { color: var(--ink); display: block; margin-bottom: 6px; font-size: 16px; }
.ms-symptom-item svg, .ms-checklist-item svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 10px; display: block; }

/* ── 프로세스 세로 타임라인 ───────────────────────────────── */
.ms-steps { list-style: none; margin: 0; padding: 0; max-width: 640px; }
.ms-steps li { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid #e4e0da; }
.ms-steps li:last-child { border-bottom: none; }
.ms-steps span { font-size: 22px; font-weight: 800; color: var(--accent); min-width: 44px; }
.ms-steps li div strong { display: block; margin-bottom: 4px; font-size: 16px; }

/* ── 갤러리 그리드 ────────────────────────────────────────── */
.ms-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.ms-gallery-grid-full { grid-template-columns: repeat(4, 1fr); }
.ms-related-card { display: block; overflow: hidden; border-radius: var(--radius-img); }
.ms-related-card img { aspect-ratio: 4/3; object-fit: cover; transition: transform .3s, filter .3s; }
.ms-related-card:hover img { transform: scale(1.04); filter: brightness(1.06); }
.ms-case-gallery .ms-related-card { border-radius: var(--radius-img); }
.ms-link-more { display: inline-block; font-weight: 600; color: var(--deep); transition: transform .25s var(--ease); }
.ms-link-more:hover { transform: translateX(4px); }

/* ── 시공사례 상세 관련 링크 ───────────────────────────────── */
.ms-case-related { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ── CTA 밴드 ─────────────────────────────────────────────── */
.ms-cta-band {
  background: var(--deep); color: #fff; padding: 52px 24px;
  border-top: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap;
  text-align: center;
}
.ms-cta-band p { font-size: clamp(18px, 2.4vw, 22px); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.ms-cta-band .ms-btn { background: var(--accent); color: var(--accent-btn-text); }
.ms-cta-band .ms-btn:hover { background: #dfc9ab; }

/* ── 지역 칩 그리드 ───────────────────────────────────────── */
.ms-region-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ms-region-chip {
  padding: 16px; text-align: center; background: var(--bg); border: 1px solid #e0e0e0;
  border-radius: var(--radius); font-weight: 600; font-size: 14px;
}
.ms-region-chip:hover { border-color: var(--deep); background: var(--bg-soft); }

/* ── FAQ ──────────────────────────────────────────────────── */
.ms-faq-list { max-width: 800px; }
.ms-faq-item { border-bottom: 1px solid #e4e0da; padding: 18px 0; }
.ms-faq-item summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; }
.ms-faq-item summary::-webkit-details-marker { display: none; }
.ms-faq-item summary::after { content: '+'; float: right; font-size: 20px; color: var(--accent); }
.ms-faq-item[open] summary::after { content: '−'; }
.ms-faq-item p { margin-top: 12px; color: var(--desc); }

/* ── 크로스 레이아웃 (교차 이미지-텍스트, 고정 스펙) ───────── */
.ms-cross-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  margin-bottom: 56px;
}
.ms-cross-row img { border-radius: var(--radius-img); aspect-ratio: 4/3; object-fit: cover; }
.ms-cross-row-rev { direction: rtl; }
.ms-cross-row-rev > * { direction: ltr; }

/* ── 체크리스트 ───────────────────────────────────────────── */
.ms-checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ms-checklist-item {
  padding: 20px; background: var(--bg); border: 1px solid #e4e0da; border-radius: var(--radius);
  font-size: 14px; color: var(--desc);
}
.ms-checklist-item strong { color: var(--ink); display: block; margin-bottom: 6px; }

/* ── 재질별 안내 표 ───────────────────────────────────────── */
.ms-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ms-table th, .ms-table td { padding: 14px 16px; border-bottom: 1px solid #e4e0da; text-align: left; }
.ms-table th { color: var(--ink); font-weight: 700; background: var(--bg); }
.ms-table td { color: var(--desc); }
.ms-table tr:last-child th, .ms-table tr:last-child td { border-bottom: none; }

/* ── 상담 카드 ────────────────────────────────────────────── */
.ms-consult-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.ms-info-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 40px 24px; border: 1px solid #e4e0da; border-radius: var(--radius);
  background: var(--bg-soft);
}
.ms-info-card svg { width: 44px; height: 44px; color: var(--deep); margin-bottom: 16px; }
.ms-info-card .ms-btn { margin-top: 16px; }
.ms-consult-card:hover { border-color: var(--deep); }

/* ── 리스트/본문 ──────────────────────────────────────────── */
.ms-list { padding-left: 20px; max-width: 700px; color: var(--desc); }
.ms-list li { margin-bottom: 8px; }
.ms-body-text { max-width: 760px; color: var(--desc); font-size: 16px; }

/* ── 사이트맵 ─────────────────────────────────────────────── */
.ms-sitemap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.ms-sitemap-col-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-img); margin-bottom: 14px; }
.ms-sitemap-col-desc { color: var(--desc); font-size: 14px; margin: -4px 0 12px; }
.ms-sitemap-col a { display: block; padding: 6px 0; color: var(--desc); }
.ms-sitemap-col a:hover { color: var(--deep); text-decoration: underline; }

/* ── Closing 사진 (B-25) ──────────────────────────────────── */
.ms-closing { position: relative; }
.ms-closing img { width: 100%; height: 650px; object-fit: cover; display: block; }
.ms-closing-overlay {
  position: absolute; inset: 0;
  background: rgba(19,19,19,.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 24px; padding: 40px;
}
.ms-closing-copy {
  color: #fff; font-size: 28px; font-weight: 700; line-height: 1.4; margin: 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.ms-btn-closing { background: transparent; border: 1px solid var(--cream); color: var(--cream); border-radius: 0; }
.ms-btn-closing:hover { background: var(--cream); color: var(--deep); }
.ms-closing-quote { color: #f2f2f2; font-size: 14px; font-style: italic; margin: 0; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
@media (max-width: 560px) {
  .ms-closing-copy { font-size: 20px; }
}

/* ── 푸터 (uapti DNA · 다크 3열, 링크는 사이트맵으로 수렴) ──── */
.ms-footer { background: var(--deep); color: #9a9a9a; padding: 56px 24px 24px; }
.ms-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px;
}
.ms-footer-logo { font-size: 20px; font-weight: 800; color: #fff; }
.ms-footer-logo span { color: var(--brand-accent); }
.ms-footer-desc { font-size: 14px; margin-top: 8px; }
.ms-footer-col h3 { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.ms-footer-col a { display: block; font-size: 13px; padding: 4px 0; color: #9a9a9a; }
.ms-footer-col a:hover { color: #fff; }
.ms-footer-biz p { font-size: 13px; color: #9a9a9a; margin-bottom: 16px; line-height: 1.6; }
.ms-footer-addr { display: block; white-space: nowrap; font-size: 12px; }
.ms-footer-phone-note { font-size: 11px; color: #777; }
@media (max-width: 560px) { .ms-footer-addr { white-space: normal; } }
.ms-footer-biz .ms-btn { padding: 10px 20px; font-size: 13px; }
.ms-footer-bottom {
  max-width: 1200px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid #333;
  font-size: 12px; color: #808080;
}

/* ── 하단 고정 CTA 바 (B-23, CRO: 모바일 2분할) ────────────── */
.ms-sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  min-height: 48px; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--bar-chrome);
  border-top: 1px solid #E5E7EB; box-shadow: 0 -6px 22px rgba(0,0,0,.08);
  transform: translateY(100%); opacity: 0; pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}
.ms-sticky-cta.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.ms-sticky-quick {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 14px; font-size: 14px; font-weight: 600; color: var(--ink);
  background: #fff; border: 1px solid #D8D4CC;
}
.ms-sticky-cta .ms-btn-sticky { flex: 1.4; width: auto; }

/* ── 애니메이션 훅 ────────────────────────────────────────── */
[data-anim] { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
[data-anim].is-in { opacity: 1; transform: none; }
[data-anim="slide-left"] { transform: translateX(-24px); }
[data-anim="slide-left"].is-in { transform: none; }
[data-anim="scale-in"] { transform: scale(.94); }
[data-anim="scale-in"].is-in { transform: none; }
[data-anim][data-delay="1"] { transition-delay: .05s; }
[data-anim][data-delay="2"] { transition-delay: .1s; }
[data-anim][data-delay="3"] { transition-delay: .15s; }
[data-anim][data-delay="4"] { transition-delay: .2s; }
[data-anim][data-delay="5"] { transition-delay: .25s; }

/* ── 반응형 ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ms-hero { min-height: 520px; }
  .ms-symptom-list, .ms-checklist, .ms-region-grid { grid-template-columns: repeat(2, 1fr); }
  .ms-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .ms-gallery-grid-full { grid-template-columns: repeat(2, 1fr); }
  .ms-cross-row, .ms-cross-row-rev { grid-template-columns: 1fr; direction: ltr; }
  .ms-footer-inner, .ms-sitemap-grid { grid-template-columns: 1fr 1fr; }
  .ms-consult-cards { grid-template-columns: 1fr; }
  .ms-nav { display: none; }
  .ms-btn-header { display: none; }
  .ms-burger {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none;
    cursor: pointer; margin-left: auto; padding: 8px;
  }
  .ms-burger span { width: 22px; height: 2px; }
  .ms-nav-mobile {
    display: none; flex-direction: column; background: var(--bg); padding: 16px 24px;
    border-top: 1px solid #eee;
  }
  .ms-nav-mobile.is-open { display: flex; }
  .ms-nav-mobile a { padding: 10px 0; border-bottom: 1px solid #eee; color: var(--ink); }
}
@media (max-width: 560px) {
  .ms-symptom-list, .ms-checklist, .ms-region-grid, .ms-gallery-grid, .ms-gallery-grid-full, .ms-sitemap-grid, .ms-footer-inner, .ms-compare {
    grid-template-columns: 1fr;
  }
}
/* ── 홈(메인) 전용 컴포넌트 — uapti DNA 재구성, 서브페이지 클래스와 분리 ── */
body.home { background: var(--cream); }

.ms-home-hero {
  position: relative; overflow: hidden; color: #fff;
  margin-top: -76px; padding-top: 76px;
  height: 100vh; min-height: 640px;
  display: flex; align-items: flex-end;
}
.ms-home-hero-slides { position: absolute; inset: 0; }
.ms-home-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; z-index: 0;
  transition: opacity 1.6s ease;
  animation: ms-slow-zoom 16s ease-in-out infinite alternate;
}
.ms-home-hero-bg.is-active { opacity: 1; z-index: 1; }
.ms-home-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(19,19,19,.05) 0%, rgba(19,19,19,.18) 45%, rgba(19,19,19,.78) 100%);
}
.ms-home-hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 0 24px 88px;
}
.ms-home-hero-inner h1 {
  font-size: 25px; font-weight: 800; line-height: 1;
  color: #fff; margin: 0 0 18px;
}
.ms-home-hero-brand { font-size: 50px; font-weight: 600; letter-spacing: .04em; margin: 0 0 18px; color: #fff; }
.ms-home-hero-brand span { color: var(--accent); }
.ms-home-hero-desc { font-size: 17px; color: #ececec; white-space: nowrap; margin: 0 0 28px; }
@keyframes ms-slow-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

.ms-quicklinks { padding: 72px 24px; background: var(--cream); }
.ms-quicklinks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ms-quicklink-card { position: relative; display: flex; align-items: flex-end; overflow: hidden; border-radius: var(--radius-img); aspect-ratio: 4/3; background: var(--deep); }
.ms-quicklink-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.ms-quicklink-card:hover img { transform: scale(1.05); filter: brightness(1.08); }
.ms-quicklink-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,19,19,0) 40%, rgba(19,19,19,.75) 100%); }
.ms-quicklink-card span { position: relative; z-index: 1; padding: 18px; color: #fff; font-weight: 700; font-size: 15px; }

/* 브랜드소개 — layout D: 상단 와이드 이미지 1장 + 하단(좌 텍스트 / 우 스택 이미지 3장).
   MARBLEGRIND(비대칭 벤토 콜라주)와 겹치지 않도록 상하 분할 구조로 재구성. */
.ms-about { padding: 88px 24px; background: var(--bg); }
.ms-about-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.ms-about-head .ms-eyebrow { display: block; }
.ms-about-wide { margin-bottom: 14px; }
.ms-about-wide img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--radius-img); display: block; }
.ms-about-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: stretch; }
.ms-about-text { display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; }
.ms-about-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ms-about-images img { width: 100%; height: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-img); }
.ms-about-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; border-top: 1px solid #e4e0da; padding-top: 24px; }
.ms-about-fact { display: flex; flex-direction: column; gap: 4px; }
.ms-about-fact h3 { font-size: 14px; color: var(--terracotta); margin: 0; }
.ms-about-fact p { font-size: 13px; color: var(--desc); margin: 0; }

.ms-process-v2 { padding: 88px 24px; background: var(--cream-soft); }
.ms-process-v2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 8px; list-style: none; padding: 0; margin-left: 0; }
.ms-process-v2-step span { display: block; font-size: 36px; font-weight: 800; color: var(--terracotta); margin-bottom: 12px; }
.ms-process-v2-step h3 { margin-bottom: 8px; }
.ms-process-v2-step p { color: var(--desc); font-size: 14px; margin: 0; }

.ms-portfolio-v2 { padding: 88px 24px; background: var(--bg); }
.ms-portfolio-v2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; }
.ms-portfolio-v2-card { position: relative; display: block; border: 1px solid var(--border); border-radius: var(--radius-img); overflow: hidden; }
.ms-portfolio-v2-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px; z-index: 2;
  background: var(--deep); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.ms-portfolio-v2-card:hover::before { transform: scaleX(1); }
.ms-portfolio-v2-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .4s var(--ease); }
.ms-portfolio-v2-card:hover img { transform: scale(1.05); }
.ms-portfolio-v2-body { padding: 18px 20px; }
.ms-portfolio-v2-meta { font-size: 12px; color: var(--terracotta); font-weight: 700; letter-spacing: .04em; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #d8d6d0; }
.ms-portfolio-v2-body h3 { font-size: 17px; margin-bottom: 6px; }
.ms-portfolio-v2-body p { font-size: 13px; color: var(--desc); margin-bottom: 10px; }
.ms-portfolio-v2-body .ms-link-more { font-size: 12px; color: var(--terracotta); }
.ms-portfolio-v2-all { display: block; text-align: center; }

/* design_id=1: 4장 2x2 원그로브 호버 (홈 시공사례 미리보기 전용) */
.ms-portfolio-v2-grid--four { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin-left: auto; margin-right: auto; }
.ms-portfolio-v2-card--groove { position: relative; }
.ms-groove-ring {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.5) rotate(-40deg);
  transition: opacity .35s var(--ease), transform .4s var(--ease);
}
.ms-groove-ring em {
  display: block; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--accent); font-style: normal;
}
.ms-portfolio-v2-card--groove:hover .ms-groove-ring { opacity: 1; transform: scale(1) rotate(0); }
@media (max-width: 900px) { .ms-portfolio-v2-grid--four { max-width: none; } }
@media (max-width: 560px) { .ms-portfolio-v2-grid--four { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .ms-quicklinks-grid { grid-template-columns: repeat(2, 1fr); }
  .ms-about-split { grid-template-columns: 1fr; }
  .ms-about-images { grid-template-columns: repeat(3, 1fr); }
  .ms-process-v2-grid { grid-template-columns: 1fr; gap: 24px; }
  .ms-portfolio-v2-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ms-home-hero-inner { padding-bottom: 56px; }
  .ms-quicklinks-grid, .ms-portfolio-v2-grid { grid-template-columns: 1fr; }
  .ms-about-facts { grid-template-columns: 1fr; }
  .ms-about-images { grid-template-columns: repeat(3, 1fr); }
  .ms-home-hero-desc { white-space: normal; }
}

/* ── Guide 허브 (services 섹션 레이아웃) · Guide 상세 관련 사례 ── */
.ms-guide-hub-inner { max-width: 1280px; margin: 0 auto; text-align: center; }
.ms-guide-hub h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 6px 0 10px; }
.ms-guide-hub-sub { color: var(--desc); margin-bottom: 36px; }
.ms-guide-hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; justify-content: center; text-align: left; }
.ms-guide-hub-card { border: 1px solid var(--border); border-radius: var(--radius-img); overflow: hidden; background: var(--bg); }
.ms-guide-hub-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ms-guide-hub-body { padding: 18px 20px 22px; }
.ms-guide-hub-body h3 { font-size: 20px; margin-bottom: 6px; }
.ms-guide-hub-body p { font-size: 14px; color: var(--desc); margin-bottom: 10px; }
.ms-guide-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 16px; }
.ms-guide-related-card { display: block; border-radius: var(--radius-img); overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
.ms-guide-related-card img { width: 100%; height: 170px; object-fit: cover; display: block; }
.ms-guide-related-card span { display: block; padding: 12px 14px; font-size: 14px; font-weight: 600; word-break: keep-all; }
@media (max-width: 767px) {
  .ms-guide-hub-grid, .ms-guide-related-grid { grid-template-columns: 1fr; }
  .ms-nav-mobile.is-open { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 10px; }
  .ms-nav-mobile a { padding: 10px 2px; border-bottom: 0; text-align: center; font-size: 13px; white-space: nowrap; word-break: keep-all; }
  .ms-nav-mobile a.ms-btn { padding: 10px 2px; font-size: 13px; }
  h1, h2, h3, .ms-btn, .ms-cta-band p { word-break: keep-all; }
}

/* ── 모노형 IA (1+5+60): 같은 content 칼럼 · 작업완료예 1장 · 3열 카드 · 3+더보기 ───────── */
body, p, li, h1, h2, h3, h4, a, button, .ms-card, .ms-footer, .ms-nav, .ms-nav-mobile {
  word-break: keep-all; overflow-wrap: break-word; line-break: strict;
}
.ms-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.ms-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ms-done { padding: 96px 0 0; background: var(--bg-soft, #f7f5f1); }
.ms-done-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--terracotta, #8a6a1f); margin: 0 0 10px; }
.ms-done img { width: 100%; aspect-ratio: 3/2; max-height: 560px; object-fit: cover; border-radius: var(--radius-img, 8px); display: block; }
.ms-article { padding-top: 32px; padding-bottom: 24px; }
.ms-article h1 { font-size: clamp(26px, 4.2vw, 40px); line-height: 1.3; }
.ms-article h2 { font-size: clamp(21px, 3vw, 28px); margin-top: 44px; }
.ms-article p { color: var(--desc, #444); line-height: 1.8; }
.ms-answer { font-size: 17px; color: var(--ink, #111) !important; margin: 0 0 24px; }
.ms-article .ms-table { margin: 8px 0 8px; }
.ms-article .ms-table th { width: 28%; background: var(--bg-soft, #f7f5f1); }
.ms-process-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ms-process-list li { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid #e4e0da; border-radius: 8px; line-height: 1.6; }
.ms-process-list li span { font-weight: 800; color: var(--terracotta, #8a6a1f); }
.ms-faq-q { border-bottom: 1px solid #e4e0da; padding: 18px 0; }
.ms-faq-q h3 { font-size: 17px; margin: 0 0 8px; }
.ms-faq-q p { margin: 0; }
.ms-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0; }
.ms-card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.ms-card-grid--4 { grid-template-columns: repeat(2, 1fr); }
.ms-card { display: block; border: 1px solid #e4e0da; border-radius: 10px; overflow: hidden; background: #fff; transition: transform .25s, box-shadow .25s; }
.ms-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.ms-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ms-card-body { display: block; padding: 14px 16px; }
.ms-card-body strong { display: block; font-size: 16px; line-height: 1.4; color: var(--ink, #111); }
.ms-card-body em { display: block; font-style: normal; font-size: 13px; color: var(--desc, #555); margin-top: 4px; }
.ms-more { margin: 4px 0 0; }
.ms-more summary { cursor: pointer; text-align: center; padding: 12px; border: 1px solid #d8d6d0; border-radius: 8px; font-weight: 700; list-style: none; }
.ms-more summary::-webkit-details-marker { display: none; }
.ms-more[open] summary { margin-bottom: 8px; }
.ms-related-two { border-top: 1px solid #ececec; padding: 8px 0 56px; }
.ms-related-two h2 { margin-top: 32px; font-size: clamp(21px, 3vw, 28px); }
.ms-footer-biz a { display: inline; color: #cfcfcf; }
@media (max-width: 900px) { .ms-card-grid { grid-template-columns: repeat(2, 1fr); } .ms-card-grid:not(.ms-card-grid--2):not(.ms-card-grid--4) > .ms-card:nth-child(3):last-child { grid-column: auto; } }
@media (max-width: 560px) {
  .ms-done { padding-top: 76px; }
  .ms-card-grid, .ms-card-grid--2, .ms-card-grid--4 { grid-template-columns: 1fr; }
  .ms-article h1 { font-size: 24px; }
  .ms-answer { font-size: 16px; }
}
#services .ms-card-grid, #portfolio .ms-card-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 767px) { #services .ms-card-grid, #portfolio .ms-card-grid { grid-template-columns: 1fr; } }
.ms-nav a, .ms-nav-mobile a { white-space: nowrap; }
@media (max-width: 767px) { .ms-nav-mobile .ms-btn { padding: 10px 2px; font-size: 13px; } }
.ms-home-hero { height: min(100vh, 760px) !important; min-height: 560px !important; }
