/* Dalpaengi Marblegrind — 대리석연마 The달팽이
   Design DNA D 재해석 (counter 패밀리 계승, FLOORGRIND 코드 어댑트): 타이포그래피 중심 풀블리드 히어로,
   전/후 비교 행, 헤어라인 디바이더, 에디토리얼 여백
   컬러: deep #161616 / accent #8C4A52(wine/rosewood) / bg #FFFFFF / bg-soft #FAF6F5 / bar-chrome #F1E9E7
   FLOORGRIND 대비 차별점: 각진(radius 0) 대신 부드러운 라운드(카드 10px·버튼 pill)로 재해석,
   퀵링크 카드 비율/오버레이 방향 변경, sticky-cta 배경을 wine 톤으로 전환
*/

:root {
  --deep: #161616;
  --accent: #8C4A52;
  --accent-soft: #F3E7E6;
  --bg: #FDFBFA;
  --bg-soft: #FAF6F5;
  --ink: #1A1A1A;
  --desc: #57514F;
  --bar-chrome: #F1E9E7;
  --border: #E6DAD7;
  --radius: 10px;
  --radius-img: 10px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  /* 메인(index) 전용 DNA 토큰 — 서브페이지 기존 톤(--accent 등)에는 영향 없음 */
  --cream: #F2E9E6;
  --cream-soft: #EDE0DC;
  --terracotta: #8C4A52;
  --terracotta-hover: #723A41;
  --sand: #C7A9A0;
  /* 브랜드 accent: 헤더 로고「달팽이」= 푸터 로고「달팽이」= 상담하기 버튼 배경, 전부 동일 hex */
  --brand-accent: #8C4A52;
}

* { 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, .mg-eyebrow, .mg-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; }

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

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

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

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

/* ── 히어로 (타이포그래피 중심 풀블리드 · DNA D) ───────────── */
.mg-hero {
  position: relative; overflow: hidden; color: #fff;
  margin-top: -76px; padding-top: 76px;
  min-height: 640px; display: flex; align-items: center;
}
.mg-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; border-radius: 0;
  animation: mg-hero-fade 1s ease both;
}
.mg-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%);
}
.mg-hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 96px 24px 88px;
}
.mg-hero-copy { max-width: 720px; }
.mg-hero-copy .mg-eyebrow { color: var(--accent); }
.mg-hero h1 { color: #fff; font-size: clamp(38px, 6vw, 66px); }
.mg-hero-desc { color: #ececec; font-size: 18px; }
@media (min-width: 901px) { .mg-hero .mg-hero-desc { white-space: nowrap; } }
.mg-hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; }
.mg-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;
}
.mg-hero-badges span strong { color: var(--accent); margin-right: 4px; }

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

/* ── 전/후 비교 행 (DNA D) ────────────────────────────────── */
.mg-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mg-compare figure { margin: 0; position: relative; }
.mg-compare img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-img); }
.mg-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;
}

/* ── 서브히어로 (내부 페이지 공통 · 풀블리드) ──────────────── */
.mg-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%);
}
.mg-subhero:has(.mg-subhero-img) { min-height: 440px; }
.mg-subhero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 0;
}
.mg-subhero:has(.mg-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%);
}
.mg-subhero-content {
  position: relative; z-index: 1;
  max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 0 24px 44px;
}
.mg-subhero-content h1 { color: var(--deep); }
.mg-subhero-content .mg-hero-desc { color: var(--desc); }
.mg-subhero:has(.mg-subhero-img) .mg-subhero-content h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.mg-subhero:has(.mg-subhero-img) .mg-subhero-content .mg-eyebrow { color: #fff; opacity: .92; }
.mg-subhero:has(.mg-subhero-img) .mg-subhero-content .mg-hero-desc { color: #f2f2f2; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.mg-subhero-consult .mg-subhero-content { max-width: 640px; margin: 0 auto; text-align: center; }
.mg-subhero.mg-subhero-case, .mg-subhero.mg-subhero-region { min-height: 505px; }
.mg-subhero-gallery-link {
  display: inline-block; margin-top: 16px; font-size: 14px; color: #fff;
  text-decoration: underline; text-underline-offset: 4px;
}
.mg-subhero-gallery-link:hover { color: var(--sand); }
@media (max-width: 560px) { .mg-subhero.mg-subhero-case, .mg-subhero.mg-subhero-region { min-height: 380px; } }

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

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

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

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

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

/* ── CTA 밴드 ─────────────────────────────────────────────── */
.mg-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;
}
.mg-cta-band p { font-size: clamp(18px, 2.4vw, 22px); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.mg-cta-band .mg-btn { background: var(--accent); color: var(--deep); }
.mg-cta-band .mg-btn:hover { background: #dfc9ab; }

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

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

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

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

/* ── 상담 카드 ────────────────────────────────────────────── */
.mg-consult-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 800px; margin: 0 auto; }
.mg-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);
}
.mg-info-card svg { width: 44px; height: 44px; color: var(--deep); margin-bottom: 16px; }
.mg-info-card .mg-btn { margin-top: 16px; }
.mg-consult-card:hover { border-color: var(--deep); }

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

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

/* ── Closing 사진 (B-25) ──────────────────────────────────── */
.mg-closing { position: relative; }
.mg-closing img { width: 100%; height: 650px; object-fit: cover; display: block; }
.mg-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;
}
.mg-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);
}
.mg-btn-closing { background: transparent; border: 1px solid var(--cream); color: var(--cream); }
.mg-btn-closing:hover { background: var(--cream); color: var(--deep); }
.mg-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) {
  .mg-closing-copy { font-size: 20px; }
}

/* ── 푸터 (uapti DNA · 다크 3열, 링크는 사이트맵으로 수렴) ──── */
.mg-footer { background: var(--deep); color: #9a9a9a; padding: 56px 24px 24px; }
.mg-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px;
}
.mg-footer-logo { font-size: 20px; font-weight: 800; color: #fff; }
.mg-footer-logo span { color: var(--brand-accent); }
.mg-footer-desc { font-size: 14px; margin-top: 8px; }
.mg-footer-col h3 { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.mg-footer-col a { display: block; font-size: 13px; padding: 4px 0; color: #9a9a9a; }
.mg-footer-col a:hover { color: #fff; }
.mg-footer-biz p { font-size: 13px; color: #9a9a9a; margin-bottom: 16px; line-height: 1.6; }
.mg-footer-addr { display: block; white-space: nowrap; font-size: 12px; }
.mg-footer-phone-note { font-size: 11px; color: #777; }
@media (max-width: 560px) { .mg-footer-addr { white-space: normal; } }
.mg-footer-biz .mg-btn { padding: 10px 20px; font-size: 13px; }
.mg-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분할) ────────────── */
.mg-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;
}
.mg-sticky-cta.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mg-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;
}
.mg-sticky-cta .mg-btn-sticky { flex: 1.4; width: auto; }
@media (min-width: 901px) { .mg-sticky-cta { display: none; } }

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

.mg-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;
}
.mg-home-hero-slides { position: absolute; inset: 0; }
.mg-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: mg-slow-zoom 16s ease-in-out infinite alternate;
}
.mg-home-hero-bg.is-active { opacity: 1; z-index: 1; }
.mg-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%);
}
.mg-home-hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 0 24px 88px;
}
.mg-home-hero-inner h1 {
  font-size: 25px; font-weight: 800; line-height: 1;
  color: #fff; margin: 0 0 18px;
}
.mg-home-hero-brand { font-size: 50px; font-weight: 600; letter-spacing: .04em; margin: 0 0 18px; color: #fff; }
.mg-home-hero-brand span { color: var(--accent); }
.mg-home-hero-desc { font-size: 17px; color: #ececec; white-space: nowrap; margin: 0 0 28px; }
@keyframes mg-slow-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

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

/* 브랜드소개 — 텍스트헤드(상단·중앙) + 4장 비대칭 콜라주(하단) 타입.
   FLOORGRIND(좌 콜라주 2x2 균등 그리드 / 우 텍스트, 좌우 분할)와 겹치지 않도록
   가로 분할 대신 세로 스택 + 균등 그리드 대신 비대칭 벤토 그리드로 재구성. */
.mg-about { padding: 88px 24px; background: var(--bg); }
.mg-about-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.mg-about-head .mg-eyebrow { display: block; }
.mg-about-bento {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 220px);
  gap: 14px;
}
.mg-about-bento img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-img); }
.mg-about-bento img:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
.mg-about-bento img:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 3; }
.mg-about-bento img:nth-child(3) { grid-column: 1 / 2; grid-row: 2 / 3; }
.mg-about-bento img:nth-child(4) { grid-column: 2 / 3; grid-row: 2 / 3; }
.mg-about-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 36px; border-top: 1px solid #e4e0da; padding-top: 24px; }
.mg-about-fact { display: flex; flex-direction: column; gap: 4px; }
.mg-about-fact h3 { font-size: 14px; color: var(--terracotta); margin: 0; }
.mg-about-fact p { font-size: 13px; color: var(--desc); margin: 0; }

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

.mg-portfolio-v2 { padding: 88px 24px; background: var(--bg); }
.mg-portfolio-v2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; }
.mg-portfolio-v2-card { position: relative; display: block; border: 1px solid var(--border); border-radius: var(--radius-img); overflow: hidden; }
.mg-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);
}
.mg-portfolio-v2-card:hover::before { transform: scaleX(1); }
.mg-portfolio-v2-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .4s var(--ease); }
.mg-portfolio-v2-card:hover img { transform: scale(1.05); }
.mg-portfolio-v2-body { padding: 18px 20px; }
.mg-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; }
.mg-portfolio-v2-body h3 { font-size: 17px; margin-bottom: 6px; }
.mg-portfolio-v2-body p { font-size: 13px; color: var(--desc); margin-bottom: 10px; }
.mg-portfolio-v2-body .mg-link-more { font-size: 12px; color: var(--terracotta); }
.mg-portfolio-v2-all { display: block; text-align: center; }

@media (max-width: 900px) {
  .mg-quicklinks-grid { grid-template-columns: repeat(2, 1fr); }
  .mg-about-bento {
    grid-template-columns: 1fr 1fr; grid-template-rows: none;
  }
  .mg-about-bento img { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 4/3; height: auto; }
  .mg-process-v2-grid { grid-template-columns: 1fr; gap: 24px; }
  .mg-portfolio-v2-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .mg-home-hero-inner { padding-bottom: 56px; }
  .mg-quicklinks-grid, .mg-portfolio-v2-grid { grid-template-columns: 1fr; }
  .mg-about-facts { grid-template-columns: 1fr; }
  .mg-about-bento { grid-template-columns: 1fr; }
  .mg-home-hero-desc { white-space: normal; }
}

/* ── Guide 허브/관련 사례 (이 블록만 추가, 기존 디자인 불변) ── */
.mg-guide-hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1280px; margin: 0 auto; }
.mg-guide-card { display: block; overflow: hidden; border-radius: var(--radius-img); background: #fff; border: 1px solid var(--border); }
.mg-guide-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.mg-guide-card-body { padding: 18px 20px 22px; }
.mg-guide-card-body h3 { font-size: 20px; margin: 4px 0 8px; }
.mg-guide-card-body p { font-size: 14px; color: var(--desc); }
.mg-guide-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.mg-guide-related .mg-related-card img { width: 100%; height: 170px; aspect-ratio: auto; object-fit: cover; }
.mg-footer-col a, .mg-nav-mobile a, .mg-related-card h3, .mg-guide-card h3 { word-break: keep-all; }
@media (max-width: 900px) {
  .mg-guide-hub, .mg-guide-related { grid-template-columns: 1fr 1fr; }
  .mg-nav-mobile.is-open { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .mg-nav-mobile a { padding: 10px 2px; border-bottom: 0; text-align: center; font-size: 13px; white-space: nowrap; }
  .mg-nav-mobile .mg-btn { padding: 10px 2px; font-size: 13px; }
}
@media (max-width: 767px) {
  .mg-guide-hub, .mg-guide-related { grid-template-columns: 1fr; }
  .mg-guide-related .mg-related-card img { height: 160px; }
}
@media (min-width: 768px) and (max-width: 900px) { .mg-guide-related { grid-template-columns: repeat(3, 1fr); } }

/* ══ IA 개편: 탑 4칸 · 작업완료예 · 허브/세부 ══ */
body, p, li, h1, h2, h3, h4, a, button, .mg-related-card, .mg-portfolio-v2-card, footer, nav {
  word-break: keep-all; overflow-wrap: break-word; line-break: strict;
}
.mg-header, .mg-header.is-scrolled { position: sticky; background: #fff; border-bottom: 1px solid var(--border); }
.mg-header .mg-logo, .mg-header .mg-logo-tagline { color: var(--deep); }
.mg-header .mg-nav a { color: var(--ink); opacity: 1; }
.mg-nav { display: flex; align-items: center; gap: 22px; }
.mg-nav .mg-btn-header { display: inline-flex; color: #fff; padding: 9px 16px; opacity: 1; }
.mg-nav .mg-btn-header::after { display: none; }
.mg-hero, .mg-home-hero, .mg-subhero { margin-top: 0; padding-top: 0; }
.mg-home-hero { min-height: min(78vh, 640px); }
.mg-work-example { margin: 0; text-align: center; background: #f6f3ee; padding: 20px 16px 0; }
.mg-work-label { display: inline-block; margin: 0 0 10px; padding: 4px 14px; font-size: 13px; font-weight: 700; color: #fff; background: var(--brand-accent); border-radius: 999px; }
.mg-work-example img { width: 100%; max-width: 960px; height: auto; max-height: 560px; object-fit: cover; margin: 0 auto; display: block; border-radius: var(--radius-img); }
.mg-narrow { max-width: 820px; }
.mg-lead { font-size: 17px; color: var(--ink); margin: 14px 0 24px; }
.mg-table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 15px; }
.mg-table th, .mg-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #e4e0da; vertical-align: top; }
.mg-table th { width: 28%; color: var(--desc); font-weight: 600; background: #faf8f5; }
.mg-steps { padding-left: 20px; }
.mg-steps li { margin-bottom: 8px; }
.mg-faq-h3 h3 { font-size: 17px; margin: 22px 0 6px; }
.mg-faq-h3 p { color: var(--desc); margin: 0; }
.mg-more { margin-top: 8px; }
.mg-more > summary { list-style: none; cursor: pointer; display: inline-block; }
.mg-more > summary::-webkit-details-marker { display: none; }
.mg-more[open] > summary { display: none; }
.mg-more-grid { margin-top: 24px; }
.mg-gallery-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .mg-gallery-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .mg-header-inner { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .mg-header-right { width: 100%; gap: 0; }
  .mg-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
  .mg-nav a { text-align: center; font-size: 14px; padding: 8px 2px; white-space: nowrap; }
  .mg-nav .mg-btn-header { display: flex; justify-content: center; padding: 8px 2px; }
  .mg-btn-header { display: flex; }
  .mg-table th { width: 34%; }
  .mg-footer-addr { white-space: normal; }
  .mg-gallery-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
