/* ==========================================================================
   한백하우징 천장텍스시공 — 디자인 토큰 (industry_mood: utility, brand_tier: standard)
   ========================================================================== */
:root {
  --dp-primary: #17140F;
  --dp-primary-2: #2B2620;
  --dp-primary-3: #221E18;
  --dp-primary-d: #0E0C08;

  --dp-accent: #A47A52;
  --dp-accent-soft: #C9A780;

  --dp-bg: #ffffff;
  --dp-bg-soft: #F2F2F2;
  --dp-bg-warm: #E8E8E8;
  --dp-bg-dark: #17140F;

  --dp-border: #DADADA;
  --dp-border-soft: #E5E5E5;

  --dp-text: #1A1A1A;
  --dp-text-sub: #4A4742;
  --dp-text-muted: #7A7670;
  --dp-text-invert: #F5F2ED;

  --dp-font-heading: "Gmarket Sans", "Pretendard", "Apple SD Gothic Neo", sans-serif;
  --dp-font-body: "Pretendard", "Apple SD Gothic Neo", sans-serif;

  --dp-fs-display: clamp(2.4rem, 5.6vw, 3.8rem);
  --dp-fs-h1: clamp(2rem, 4.4vw, 3rem);
  --dp-fs-h2: clamp(1.6rem, 3.2vw, 2.3rem);
  --dp-fs-h3: clamp(1.1rem, 1.8vw, 1.3rem);
  --dp-fs-body: 19px;
  --dp-fs-small: 0.9rem;

  --dp-max-w: 1200px;
  --dp-gutter: clamp(20px, 4vw, 40px);
  --dp-sec-pad: clamp(72px, 11vw, 128px);

  --dp-radius: 0px;
  --dp-shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --dp-shadow-md: 0 12px 32px rgba(0,0,0,.10);
  --dp-ease: cubic-bezier(.22,1,.36,1);
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--dp-font-body);
  font-size: var(--dp-fs-body);
  line-height: 1.85;
  color: var(--dp-text);
  background: var(--dp-bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

body, p, h1, h2, h3, h4, h5, h6, li, td, th, a, span, div, button {
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3 { font-family: var(--dp-font-heading); color: var(--dp-text); font-weight: 700; line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: var(--dp-fs-h1); }
h2 { font-size: var(--dp-fs-h2); }
h3 { font-size: var(--dp-fs-h3); }
p { margin: 0 0 1em; color: var(--dp-text-sub); }

.site-footer, article > section, .contact-cards, .operation-info {
  max-width: var(--dp-max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--dp-gutter);
  padding-right: var(--dp-gutter);
}

article > section {
  padding-top: var(--dp-sec-pad);
  padding-bottom: var(--dp-sec-pad);
  border-top: 1px solid var(--dp-border-soft);
}
article > section:first-of-type { border-top: none; }

/* 배경 교차 */
.intro, .coverage { background: var(--dp-bg-soft); }
.gallery--main, .process { background: var(--dp-bg-warm); }
.trust { background: var(--dp-bg-dark); color: var(--dp-text-invert); }
.trust h2 { color: var(--dp-text-invert); }
.trust li { color: var(--dp-text-invert); opacity: .92; }
.intro, .coverage, .gallery--main, .process, .trust {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.intro > *, .coverage > *, .gallery--main > *, .process > *, .trust > * {
  max-width: var(--dp-max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--dp-gutter);
  padding-right: var(--dp-gutter);
}
.trust ul, .trust h2 { padding-left: var(--dp-gutter); padding-right: var(--dp-gutter); max-width: var(--dp-max-w); margin-left: auto; margin-right: auto; }

/* ==========================================================================
   버튼 / CTA
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 32px;
  border-radius: var(--dp-radius);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: transform .2s var(--dp-ease), background .2s var(--dp-ease);
}
.btn-primary { background: var(--dp-primary); color: var(--dp-text-invert); }
.btn-primary:hover { background: var(--dp-primary-2); }
.btn-outline { background: transparent; border-color: var(--dp-primary); color: var(--dp-primary); }
@media (hover:hover) and (pointer:fine) {
  .btn:hover { transform: translateY(-2px); }
}

.cta-banner {
  text-align: center;
  background: var(--dp-bg-soft);
}
.cta-banner p { color: var(--dp-text); font-size: 1.1rem; margin-bottom: 1.2em; }

/* ==========================================================================
   헤더 / 로고 / 네비게이션
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--dp-gutter);
  border-bottom: 1px solid var(--dp-border-soft);
  position: sticky;
  top: 0;
  background: var(--dp-bg);
  z-index: 50;
}
.hdr-logo { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hdr-logo__icon { flex-shrink: 0; }
.hdr-logo__text { display: flex; flex-direction: column; min-width: 0; }
.hdr-logo__name {
  font-family: var(--dp-font-heading);
  font-size: 1.05rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hdr-logo__tagline {
  font-size: .72rem;
  color: var(--dp-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 480px) { .hdr-logo__tagline { display: none; } }
.hdr-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--dp-primary);
  color: var(--dp-text-invert);
  font-weight: 700;
  font-size: .9rem;
  border-radius: var(--dp-radius);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: clamp(48px, 8vw, 88px);
  padding-bottom: clamp(48px, 8vw, 88px);
  overflow: hidden;
}
.hero__media { order: -1; margin: 0 calc(var(--dp-gutter) * -1) 28px; position: relative; }
.hero__media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(98deg, rgba(23,20,15,.78) 0%, rgba(23,20,15,.4) 45%, rgba(23,20,15,0) 80%);
}
.hero h1 { font-size: var(--dp-fs-display); max-width: 16ch; }
.hero__lede { font-size: 1.1rem; max-width: 56ch; }
.hero__back { font-size: .9rem; color: var(--dp-text-muted); }
.hero__back a { text-decoration: underline; }
.hero__actions { margin-top: 24px; }

/* ==========================================================================
   서비스 그리드 (메인)
   ========================================================================== */
.service-grid ol {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.service-grid li article,
.service-grid li.service-grid__cta {
  height: 100%;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius);
  overflow: hidden;
  position: relative;
  transition: transform .25s var(--dp-ease);
}
.service-grid li.service-grid__cta { background: var(--dp-bg-soft); display: flex; }
.service-grid li.service-grid__cta a { display: flex; flex-direction: column; justify-content: center; padding: 28px; height: 100%; }
.service-grid a { display: block; }
.service-grid img, .service-grid .img-placeholder { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.service-grid h3, .service-grid p { padding-left: 20px; padding-right: 20px; }
.service-grid h3 { margin-top: 18px; }
.service-grid p { font-size: .92rem; color: var(--dp-text-muted); padding-bottom: 20px; }
.service-grid li article::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--dp-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--dp-ease);
}
@media (hover:hover) and (pointer:fine) {
  .service-grid li article:hover { transform: translateY(-4px); }
  .service-grid li article:hover::before { transform: scaleX(1); }
}
@media (max-width: 1024px) { .service-grid ol { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid ol { grid-template-columns: 1fr; } }

/* ==========================================================================
   프로세스 / 타임라인
   ========================================================================== */
.process__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.process__num {
  display: inline-block;
  font-family: var(--dp-font-heading);
  font-size: 1.4rem;
  color: var(--dp-accent);
  margin-bottom: 8px;
}
.process__list li { border-left: 2px solid var(--dp-border); padding-left: 16px; }
@media (max-width: 768px) { .process__list { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   진단 카드 (문제해결형)
   ========================================================================== */
.diagnosis__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.diagnosis__list li {
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius);
  padding: 20px;
  background: var(--dp-bg-soft);
}
@media (max-width: 768px) { .diagnosis__list { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   신뢰 카드 / 비교표 / 안내
   ========================================================================== */
.trust-cards ul { margin-top: 20px; }
.trust-cards li {
  padding: 14px 0;
  border-bottom: 1px solid var(--dp-border-soft);
  font-weight: 600;
}
.trust ul { margin-top: 20px; }
.trust li { padding: 10px 0; }

.compare table { margin-top: 24px; border: 1px solid var(--dp-border); }
.compare th, .compare td { border: 1px solid var(--dp-border); padding: 14px 16px; text-align: left; font-size: .95rem; }
.compare th { background: var(--dp-bg-soft); font-family: var(--dp-font-heading); }

.note p, .intro-extra p { font-size: 1rem; max-width: 68ch; }

/* ==========================================================================
   갤러리
   ========================================================================== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}
.gallery--main .gallery__grid { grid-template-columns: repeat(3, 1fr); }
.gallery__grid img, .gallery__grid .img-placeholder { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (max-width: 768px) { .gallery--main .gallery__grid { grid-template-columns: repeat(2, 1fr); } }

.img-placeholder { background: var(--dp-bg-soft); }

/* ==========================================================================
   관련 서비스 / 중간 네비게이션
   ========================================================================== */
.mid-nav { text-align: center; font-size: .95rem; color: var(--dp-text-muted); padding: 24px var(--dp-gutter) 0; }
.related-services__list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.related-services__list a {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius);
  font-size: .9rem;
}
@media (hover:hover) and (pointer:fine) {
  .related-services__list a:hover { border-color: var(--dp-accent); color: var(--dp-accent); }
}

/* ==========================================================================
   FAQ (details/summary — 네이티브 아코디언 + 마커 회전 애니메이션)
   ========================================================================== */
.faq__item {
  border-bottom: 1px solid var(--dp-border-soft);
  padding: 18px 0;
}
.faq__item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--dp-accent);
  transition: transform .25s var(--dp-ease);
  flex-shrink: 0;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin-top: 12px; }

/* ==========================================================================
   상담 페이지
   ========================================================================== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.contact-card {
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius);
  padding: 36px 28px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-card p { font-size: 1.15rem; font-weight: 700; color: var(--dp-text); }
@media (max-width: 640px) { .contact-cards { grid-template-columns: 1fr; } }

.operation-info ul { margin-top: 20px; }
.operation-info li { padding: 10px 0; border-bottom: 1px solid var(--dp-border-soft); font-size: .95rem; }

/* ==========================================================================
   메인 이동 링크
   ========================================================================== */
.back-main { text-align: center; padding: var(--dp-sec-pad) var(--dp-gutter); }
.back-main a {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--dp-border);
  border-radius: var(--dp-radius);
  font-size: .9rem;
}

/* ==========================================================================
   푸터
   ========================================================================== */
.site-footer {
  padding-top: 40px;
  padding-bottom: 40px;
  background: var(--dp-bg-soft);
  border-top: 1px solid var(--dp-border);
}
.ftr-biz { font-size: .9rem; color: var(--dp-text-sub); margin-bottom: 16px; }
.ftr-links { display: flex; gap: 20px; }
.ftr-links a { font-size: .9rem; font-weight: 600; }
@media (hover:hover) and (pointer:fine) {
  .ftr-links a:hover { color: var(--dp-accent); }
}

/* ==========================================================================
   스크롤 리빌 애니메이션 (main.js가 .reveal--in 토글)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--dp-ease), transform .6s var(--dp-ease);
}
.reveal--in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== CRO: Floating CTA + Mobile Sticky Bar (cro-designer Stage 6) ===== */
.float-cta {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dp-primary-3);
  border-radius: var(--dp-radius);
  border-left: 3px solid var(--dp-accent);
  color: var(--dp-text-invert);
  box-shadow: var(--dp-shadow-md);
  z-index: 900;
  animation: float-cta-pulse 2.4s ease-in-out infinite;
}
.float-cta__icon {
  width: 28px;
  height: 28px;
}
@media (hover: hover) and (pointer: fine) {
  .float-cta:hover {
    background: var(--dp-primary);
  }
}
@keyframes float-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(164, 122, 82, 0.45), var(--dp-shadow-md); }
  50% { box-shadow: 0 0 0 8px rgba(164, 122, 82, 0), var(--dp-shadow-md); }
}

.mob-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 899;
  background: var(--dp-bg);
  border-top: 1px solid var(--dp-border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.mob-bar__btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
  background: var(--dp-primary);
  color: var(--dp-text-invert);
  font-weight: 700;
  border-radius: var(--dp-radius);
}
@media (max-width: 768px) {
  .mob-bar { display: block; }
  .float-cta { bottom: 76px; right: 16px; width: 56px; height: 56px; }
  .float-cta__icon { width: 24px; height: 24px; }
}
