/* ===== 세면대대리석리폼(Roots) — 스톤 그레이 앤 웨이퍼 디자인 시스템 =====
   design.md(MSR: 네이비+브라스, 각진) 기반 베리에이션:
   - Regent Gray(#899CA8)/Wafer(#DFD3CE) 컬러 컨셉 — 실제 대리석의 그레이/베이지 톤을 그대로 반영
     (두 색은 서로 대비가 낮아(1.94:1) 텍스트/배경 페어로 직접 쓰지 않고, 프라이머리는 Regent Gray를
     어둡게 가라앉힌 슬레이트, 액센트는 Regent Gray를 버튼 대비 기준(4.5:1 이상)까지 톤다운해 도출)
   - 각진(radius:0) 대신 부드러운 라운드(대리석 모서리 가공 느낌)
   - 폰트 Pretendard → Paperlogy
   - 섹션 순서/그리드 배치 변형 */

@import url('https://cdn.jsdelivr.net/gh/fonts-archive/Paperlogy/Paperlogy.css');

:root {
  --color-primary: #262b30;
  --color-primary-2: #333a40;
  --color-accent: #62727c;
  --color-accent-hover: #74858f;
  --color-accent-rgb: 98, 114, 124;
  --color-stone: #899ca8;
  --color-wafer: #dfd3ce;

  --text-on-light: #262b30;
  --text-on-light-muted: #5c6570;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #c3ccd2;

  --color-bg: #ffffff;
  --color-bg-alt: #dfd3ce;
  --color-border: #e6ded9;

  --radius: 10px;
  --radius-lg: 18px;
  --container-max: 1200px;
  --section-pad: 84px 24px;

  --font-body: 'Paperlogy', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, p, h1, h2, h3, h4, h5, h6, li, td, th, a, span, div, button {
  word-break: keep-all;
  overflow-wrap: break-word;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-on-light);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

.hero-h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.25; letter-spacing: -0.5px; margin: 0; }
.sec-title { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 800; letter-spacing: -0.3px; margin: 0 0 12px; }
.sec-sub { color: var(--text-on-light-muted); font-size: .95rem; margin: 0 0 40px; line-height: 1.7; }
h1, h2, h3, h4 { font-family: var(--font-body); }
p { line-height: 1.8; font-size: .95rem; color: var(--text-on-light-muted); }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--radius); font-weight: 700; font-size: .92rem;
  border: 1px solid transparent; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-dark { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--color-accent-hover); }
  .btn-outline-light:hover { border-color: var(--color-accent); color: var(--color-accent); }
  .btn-outline-dark:hover { border-color: var(--color-accent); color: var(--color-accent); }
  .card:hover { border-color: rgba(var(--color-accent-rgb), .5); transform: translateY(-4px); }
  .link-card:hover img { transform: scale(1.06); }
}
.btn:active { opacity: .85; }

/* ===== 헤더 ===== */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--color-primary); height: 68px; display: flex; align-items: center; border-bottom: 1px solid rgba(var(--color-accent-rgb), .22); }
.hdr .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.hdr-logo { color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.hdr-logo span { color: var(--color-accent); }
.hdr-nav { display: flex; gap: 28px; }
.hdr-nav a { color: var(--text-on-dark-muted); font-size: .9rem; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .hdr-nav a:hover { color: #fff; } }
.hdr-nav a.active { color: var(--color-accent); }
.hdr-cta { background: var(--color-accent); color: #fff; padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.hdr-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hdr-burger span { width: 22px; height: 2px; background: #fff; display: block; }

#mob-nav { position: fixed; top: 68px; left: 0; right: 0; background: var(--color-primary); z-index: 49; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
#mob-nav.open { max-height: 400px; }
#mob-nav a { display: block; padding: 16px 24px; color: #fff; border-top: 1px solid rgba(255,255,255,.08); font-weight: 600; }

/* ===== 히어로 ===== */
.hero { position: relative; min-height: min(88vh, 720px); max-width: 1760px; margin: 0 auto; display: flex; align-items: stretch; background: var(--color-primary); overflow: hidden; }
.hero-text { position: relative; z-index: 2; flex: 0 0 46%; display: flex; flex-direction: column; justify-content: center; padding: 60px clamp(24px, 5vw, 72px); }
.hero-media { position: relative; flex: 1; overflow: hidden; clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%); }
.hero-text .hero-h1 { color: #fff; font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1.15; letter-spacing: -1px; }
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.4s ease; }
.hero-slide.active { opacity: 1; }
.hero-badge { display: inline-block; background: rgba(var(--color-accent-rgb), .14); border: 1px solid rgba(var(--color-accent-rgb), .4); color: var(--color-accent); font-size: .78rem; font-weight: 700; padding: 6px 16px; border-radius: 999px; margin-bottom: 22px; letter-spacing: .3px; align-self: flex-start; }
.hero-sub { color: rgba(255,255,255,.8); font-size: 1.05rem; margin: 22px 0 36px; max-width: 460px; line-height: 1.8; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
@keyframes hero-drift { 0%,100% { transform: scale(1.02) translateY(0); } 50% { transform: scale(1.06) translateY(-1%); } }
.hero-slide.active { animation: hero-drift 14s ease-in-out infinite; }

/* ===== 그리드 ===== */
.dp-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dp-g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.case-grid { margin-top: 8px; }
.dp-stat3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; text-align: center; align-items: center; }
@media(max-width:768px) { .dp-g2, .dp-g3 { grid-template-columns: 1fr; } }
@media(max-width:600px) { .dp-stat3 { grid-template-columns: 1fr; gap: 16px; } }

/* ===== 카드 ===== */
.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 28px; transition: transform .25s ease, border-color .25s ease; }
.card-icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(var(--color-accent-rgb), .12); color: var(--color-accent); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 18px; }
.card h3 { font-size: 1.05rem; margin: 0 0 10px; }
.card p { margin: 0; font-size: .88rem; }

.link-card { display: block; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); background: #fff; }
.link-card figure { margin: 0; overflow: hidden; aspect-ratio: 4/3; }
.link-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.link-card figcaption { padding: 18px 20px; }
.link-card figcaption h3 { font-size: 1rem; margin: 0 0 6px; }
.link-card figcaption p { margin: 0; font-size: .82rem; }
.case-more figure { background: var(--color-primary); display: flex; align-items: center; justify-content: center; }
.case-more figure span { font-size: 2.6rem; font-weight: 300; color: var(--color-accent); line-height: 1; }
.case-more figcaption h3 { color: var(--color-primary); }
@media (hover: hover) and (pointer: fine) { .case-more:hover figure { background: var(--color-primary-2); } }

/* ===== 배지 ===== */
.card-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-block; padding: 5px 14px; font-size: .74rem; font-weight: 700; border-radius: 6px; background: rgba(var(--color-accent-rgb), .09); border: 1px solid rgba(var(--color-accent-rgb), .3); color: var(--color-accent); }

/* ===== 섹션 배경 사진(옅게) ===== */
.section-photo-bg { position: relative; overflow: hidden; }
.section-photo-bg::before {
  content: ''; position: absolute; inset: 0; background-image: var(--bgimg); background-size: cover; background-position: center;
  opacity: .07; z-index: 0;
}
.section-photo-bg > .container { position: relative; z-index: 1; }

/* ===== 섹션 ===== */
.section { padding: var(--section-pad); }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-primary); color: var(--text-on-dark); }
.section-dark .sec-sub { color: var(--text-on-dark-muted); }
.section-dark h2, .section-dark h3 { color: #fff; }

/* ===== 프로세스 (연결선: proc-step 기준, gap 금지) ===== */
.proc-list { display: flex; list-style: none; margin: 0; padding: 0; }
.proc-step { flex: 1; position: relative; padding: 0 12px; text-align: center; }
.proc-step:not(:last-child)::after {
  content: ''; position: absolute; top: 24px; left: 50%; width: 100%; height: 2px;
  background: var(--color-border); z-index: 0;
}
.section-dark .proc-step:not(:last-child)::after { background: rgba(255,255,255,.18); }
.proc-num {
  position: relative; z-index: 1; margin: 0 auto 14px; width: 48px; height: 48px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--color-accent); color: #fff; font-weight: 800; font-size: 1.05rem;
}
.proc-step h4 { margin: 0 0 6px; font-size: .92rem; }
.proc-step p { font-size: .8rem; margin: 0; }
@media(max-width:768px) {
  .proc-list { flex-direction: column; gap: 10px; }
  .proc-step { padding: 24px 0; }
  .proc-step::after { display: none; }
}

/* ===== Before/After ===== */
.ba-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: var(--radius-lg); overflow: hidden; }
.ba-item { position: relative; aspect-ratio: 4/3; }
.ba-item img { width: 100%; height: 100%; object-fit: cover; }
.ba-tag { position: absolute; top: 14px; left: 14px; background: rgba(38,43,48,.72); color: #fff; font-size: .74rem; font-weight: 800; padding: 5px 14px; border-radius: 6px; letter-spacing: .5px; }
@media(max-width:600px) { .ba-wrap { grid-template-columns: 1fr; } }

/* ===== 통계 ===== */
.stat-num { font-size: 2.1rem; font-weight: 800; color: var(--color-accent); }
.stat-label { font-size: .82rem; color: var(--text-on-dark-muted); margin-top: 6px; }

/* ===== FAQ ===== */
.faq-list { border-top: 1px solid var(--color-border); }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-q { display: flex; align-items: center; justify-content: space-between; padding: 20px 4px; cursor: pointer; font-weight: 700; font-size: .95rem; }
.faq-q::after { content: '+'; font-size: 1.4rem; color: var(--color-accent); transition: transform .25s ease; flex-shrink: 0; margin-left: 12px; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 4px 20px; margin: 0; font-size: .88rem; }

/* ===== CTA 밴드 ===== */
.cta-band { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2)); color: #fff; text-align: center; border-radius: var(--radius-lg); padding: 56px 32px; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--text-on-dark-muted); }

/* ===== 상담 히어로(전화번호 노출 전용) ===== */
.contact-hero { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2)); padding: 72px 24px 64px; text-align: center; }
.contact-hero .badge { background: rgba(var(--color-accent-rgb), .16); border-color: rgba(var(--color-accent-rgb), .4); }
.contact-phone-big { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800; color: #fff; letter-spacing: 1px; margin: 18px 0 6px; }
.contact-phone-big small { display: block; font-size: .78rem; font-weight: 500; color: var(--text-on-dark-muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.contact-hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ===== 상담 카드 ===== */
.contact-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 32px; }
.phone-display { font-size: 1.6rem; font-weight: 800; border-left: 3px solid var(--color-accent); padding-left: 16px; margin: 10px 0 24px; }
.contact-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media(max-width:480px) { .contact-btns { grid-template-columns: 1fr; } }
.btn-contact { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; border-radius: var(--radius); font-weight: 700; }
.btn-contact.call { background: var(--color-accent); color: #fff; }
.btn-contact.sms { background: var(--color-primary); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-contact:hover { opacity: .88; } }
.btn-contact small { font-weight: 400; font-size: .74rem; opacity: .85; }

/* ===== 푸터 ===== */
.ftr { background: var(--color-primary); color: var(--text-on-dark-muted); padding: 64px 24px 28px; }
.ftr-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.ftr h4 { color: var(--color-accent); font-size: .78rem; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 18px; }
.ftr p { font-size: .82rem; line-height: 2; margin: 0; color: var(--text-on-dark-muted); }
.ftr li { margin-bottom: 10px; }
.ftr a { font-size: .84rem; color: var(--text-on-dark-muted); }
@media (hover: hover) and (pointer: fine) { .ftr a:hover { color: var(--color-accent); } }
.ftr-bottom { max-width: var(--container-max); margin: 44px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .74rem; text-align: center; color: #837f8c; }
@media(max-width:768px) { .ftr-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ===== 모바일 스티키 바 ===== */
#mob-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: #fff; border-top: 1px solid var(--color-border); padding: 10px 14px; gap: 10px; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
#mob-bar a { flex: 1; text-align: center; padding: 13px; border-radius: var(--radius); font-weight: 700; font-size: .88rem; }
#mob-bar a.call { background: var(--color-accent); color: #fff; }
#mob-bar a.page { background: var(--color-bg-alt); color: var(--color-primary); }
#float-cta { position: fixed; right: 24px; bottom: 28px; z-index: 55; background: var(--color-accent); color: #fff; padding: 14px 24px; border-radius: 999px; font-weight: 700; box-shadow: 0 8px 20px rgba(var(--color-accent-rgb), .4); }

@media(max-width:1024px) {
  #mob-bar { display: flex; }
  #float-cta { display: none; }
  .hdr-nav, .hdr-phone, .hdr-cta { display: none; }
  .hdr-burger { display: flex; }
  body { padding-bottom: 64px; }
}
@media(min-width:769px) and (max-width:1024px) {
  .dp-g3.services-grid { grid-template-columns: repeat(2,1fr); }
}

/* ===== 표 래퍼(가로스크롤 방지) ===== */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
table th, table td { border: 1px solid var(--color-border); padding: 12px 14px; font-size: .85rem; text-align: left; }
table th { background: var(--color-bg-alt); }

/* ===== 체크리스트/타임라인(가이드 페이지용) ===== */
.check-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--color-border); font-size: .9rem; }
.check-list li::before { content: '✓'; color: var(--color-accent); font-weight: 800; flex-shrink: 0; }
.tl { position: relative; padding-left: 28px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--color-border); }
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item::before { content: ''; position: absolute; left: -28px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-accent); }
.tl-item h4 { margin: 0 0 6px; font-size: .92rem; }
.tl-item p { margin: 0; font-size: .85rem; }
.compare-table td.good { color: #1a7a4c; font-weight: 700; }
.compare-table td.bad { color: #b0393f; }

/* ===== 스크롤 리빌 ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.show { opacity: 1; transform: translateY(0); }
.stagger.show > * { transition-delay: calc(var(--i, 0) * .08s); }

@media(max-width:768px) {
  .hero-h1 br.br-desktop { display: none; }
}
@media(min-width:769px) {
  .hero-h1 br.br-mobile { display: none; }
}
@media(max-width:860px) {
  .hero { flex-direction: column; min-height: 0; }
  .hero-media { flex: none; height: 46vh; clip-path: none; order: -1; }
  .hero-text { flex: none; padding: 40px 24px 48px; align-items: flex-start; }
  .hero-text .hero-h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
}
