/* 홈 전용 — 히어로·시공분야·계산기·FAQ 2단·문의 폼. 나머지는 components.css.
   토큰만 쓴다. 키커·버튼·섹션 여백은 여기서 다시 정하지 않는다. */

/* ---- 히어로 ----
   라이브 간격을 따른다: 슬로건이 헤더 밑에 바짝, 버튼 아래 여유, 신뢰 줄은 히어로 바닥에 붙임.
   포지맨은 오른쪽 바닥에 크게, 허벅지에서 잘린다(overflow hidden). 라이브처럼 페이드인. */
.hm-hero {
  position: relative; min-height: min(92vh, 820px);
  display: flex; flex-direction: column;
  color: var(--pz-white); overflow: hidden;
  background: #000 var(--hm-hero-bg) center / cover no-repeat;
}
body[data-header="hero"] .pz-hero.hm-hero { padding-top: calc(var(--pz-header-h) + 28px); padding-bottom: 0; }
.hm-hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 140px),
    linear-gradient(90deg, rgba(0, 0, 0, .58) 0%, rgba(0, 0, 0, .3) 45%, rgba(0, 0, 0, 0) 75%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .7) 100%);
  /* 잉크(파랑기) 오버레이는 사진이 탁해 보여서 검정으로. 양도 줄임 */
}
.hm-hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1 1 auto; }
.hm-hero__text { max-width: 620px; padding-top: clamp(52px, 8vw, 112px); }   /* 글은 바로 뜬다. 페이드인은 포지맨만 */
.hm-hero__slogan { display: block; width: min(300px, 60%); height: auto; margin-bottom: 22px; }
.hm-hero__h1 { margin-bottom: 42px; font-family: var(--pz-font-logo); font-weight: 700; font-size: clamp(64px, 8vw, 104px); letter-spacing: -.01em; line-height: 1.04; }
.hm-hero__sub { margin: 0 0 30px; font-size: clamp(16px, 1.6vw, 20px); font-weight: 700; color: rgba(255, 255, 255, .92); }
.hm-hero__cta { margin-bottom: clamp(28px, 5vw, 64px); }
/* 신뢰 줄 — 히어로 바닥에 붙는다 */
.hm-hero__stats { margin-top: auto; padding: 18px 0 26px; border-top: 1px solid rgba(255, 255, 255, .22); max-width: 620px; }
.hm-hero__stats .pz-stat__no { font-size: clamp(20px, 2vw, 26px); }
.hm-hero__stats .pz-stat__label { font-size: 12px; }
/* 포지맨 — 오른쪽, 히어로 높이의 124% 를 40% 아래로 내려 배쯤에서 잘린다. 머리가 헤더에 닿지 않게 위로는 안 올린다. 머리는 헤더 바로 밑 */
.hm-hero__mascot {
  position: absolute; right: clamp(0px, 5vw, 100px); bottom: -40%; z-index: 1;
  height: 124%; width: auto; max-width: none; object-fit: contain; object-position: top;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35));
  animation: hm-fade 1s .35s ease-out both;
}
@keyframes hm-fade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hm-hero__mascot { animation: none; } }
/* 폰 (2026-09-21 사용자: 라이브 모바일처럼) — 히어로가 **첫 화면에 딱** 들어간다. 글·버튼·신뢰 줄은 위에 촘촘히,
   포지맨은 남는 아래 공간을 채우며 **가운데**, 배쯤에서 히어로 바닥에 잘린다(object-fit: cover + 위 기준). */
@media (max-width: 900px) {
  .hm-hero { display: flex; flex-direction: column; min-height: 100svh; overflow: hidden; }
  body[data-header="hero"] .pz-hero.hm-hero { padding-top: calc(var(--pz-header-h) + 6px); }
  .hm-hero__inner { flex: 0 0 auto; }
  .hm-hero__text { padding-top: 8px; }
  .hm-hero__slogan { margin-bottom: 6px; width: min(180px, 50%); }
  .hm-hero__h1 { font-size: clamp(38px, 11.5vw, 60px); margin-bottom: 8px; }   /* 360px 에서 41px — 7글자가 한 줄에 */
  .hm-hero__sub { margin-bottom: 14px; font-size: 14px; }
  .hm-hero__cta { margin-bottom: 12px; gap: 8px; }
  .hm-hero__cta .pz-btn { width: 100%; min-height: 46px; font-size: 15px; }
  .hm-hero__stats { margin-top: 0; padding: 10px 0 0; gap: 20px; }
  .hm-hero__stats .pz-stat__no { font-size: 18px; }
  .hm-hero__stats .pz-stat__label { font-size: 11px; }
  .hm-hero__mascot {
    position: static; order: 9; display: block; align-self: center;
    flex: 1 1 190px; min-height: 0; height: auto; max-height: 52svh;
    width: min(78%, 330px); max-width: none; margin: 10px 0 0;
    object-fit: cover; object-position: top center;
  }
}

/* ---- 소개(미션) ---- */
.hm-mission__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; margin-bottom: clamp(40px, 6vw, 72px); padding-bottom: clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--pz-line); }
.hm-mission .pz-h2 { margin: 0; font-size: clamp(24px, 2.8vw, 34px); }
.hm-mission__body p { margin: 0 0 12px; color: var(--pz-body); font-size: clamp(15px, 1.3vw, 17px); line-height: 1.8; }
.hm-mission__body p:first-child { color: var(--pz-ink); font-weight: 600; }
@media (max-width: 900px) { .hm-mission__inner { grid-template-columns: 1fr; } }

/* ---- 시공분야 ---- */
.hm-svc { position: relative; display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--pz-line); border-radius: 16px; overflow: hidden; background: var(--pz-white); transition: transform .18s, box-shadow .18s; }
/* 10/02 네이버 카드형 구조(그림 링크 + h3 안 제목 링크) — 카드 어디를 눌러도 제목 링크로 가게 제목 링크를 카드 크기로 늘린다 */
.hm-svc__link { color: inherit; text-decoration: none; }
.hm-svc__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.hm-svc__link:focus-visible { outline: none; }
.hm-svc:has(.hm-svc__link:focus-visible) { outline: 3px solid var(--pz-blue); outline-offset: 2px; }   /* 키보드로 왔을 때만 카드 테두리 */
.hm-svc:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(23, 33, 43, .10); }
.hm-svc__pic { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--pz-blue-soft); }
.hm-svc__pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.hm-svc:hover .hm-svc__pic img { transform: scale(1.04); }
.hm-svc__body { display: flex; flex-direction: column; padding: 22px 24px 24px; }
.hm-svc__desc { margin: 0; color: var(--pz-body); line-height: 1.65; font-size: 15px; }
.hm-svc__more { margin-top: 14px; color: var(--pz-blue); font-size: 14px; font-weight: 700; }

/* ---- 계산기 유도 — 라이브(8월 리뉴얼) 디자인: 연파랑 배경, 제목 2줄째 파랑, 흰 카드 안 파랑 버튼. 전환 1위라 히어로 바로 뒤에 크게 ---- */
.hm-calc { padding: clamp(72px, 9vw, 120px) 0; }
.hm-calc__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 420px); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hm-calc .pz-h2 { font-size: clamp(30px, 3.8vw, 48px); }
.hm-calc__accent { color: var(--pz-blue); }
.hm-calc .pz-lede { font-size: clamp(16px, 1.5vw, 19px); max-width: 560px; }
.hm-calc__card { display: flex; flex-direction: column; gap: 12px; padding: clamp(24px, 3vw, 32px); background: var(--pz-white); border-radius: 20px; box-shadow: 0 18px 44px rgba(40, 120, 200, .12); }
.hm-calc__card-title { margin: 0 0 6px; color: var(--pz-ink); font-size: 17px; font-weight: 700; }
.hm-calc__card .pz-btn { width: 100%; min-height: 60px; }
@media (max-width: 800px) { .hm-calc__inner { grid-template-columns: 1fr; } }

/* ---- 시공사례 ---- */
.hm-head-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hm-head-row .pz-h2 { margin-bottom: 0; }
.hm-case::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(23, 33, 43, .75) 100%); }
.hm-case img { transition: transform .35s; }
.hm-case:hover img { transform: scale(1.04); }
.hm-case .pz-photo__label { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 홈 시공사례는 사진만(2026-10-04 사용자) — 분야 딱지·제목 글씨는 화면에서만 숨김(HTML·alt 에는 남김), 아래 그라데이션은 둔다 */
body[data-page-type="home"] .hm-case .pz-photo__tag, body[data-page-type="home"] .hm-case .pz-photo__label { display: none; }

/* ---- 왜 칼라강판 ---- */
.hm-reason__icon { display: block; width: 64px; height: 64px; margin-bottom: 18px; border-radius: 16px; overflow: hidden; }
.hm-reason__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 원본 PNG(120x120)에 연파랑 네모 배경이 이미 들어 있다. 박스를 또 씌우지 않고 모서리만 둥글게 깎는다 */
.hm-reason p { margin: 0; font-size: 15px; }

/* ---- 중간 CTA ---- */
.hm-mid-cta { grid-template-columns: minmax(0, 1fr) auto auto; overflow: hidden; }
.hm-mid-cta__mascot { width: 120px; height: auto; margin: -48px -8px -60px 0; align-self: end; }
@media (max-width: 900px) { .hm-mid-cta { grid-template-columns: 1fr; } .hm-mid-cta__mascot { display: none; } }

/* ---- 진행순서: 5단계 ---- */
.hm-steps.pz-steps--row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1000px) { .hm-steps.pz-steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hm-steps.pz-steps--row { grid-template-columns: 1fr; } }

/* ---- FAQ 2단 ---- */
.hm-faq { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.hm-faq__side { position: sticky; top: 96px; }
@media (max-width: 900px) { .hm-faq { grid-template-columns: 1fr; } .hm-faq__side { position: static; } }

/* ---- 견적문의 ---- */
.hm-contact { position: relative; overflow: hidden; }
.hm-contact__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) clamp(220px, 24vw, 300px) minmax(300px, 480px); gap: clamp(20px, 3vw, 44px); align-items: start; }
.hm-contact .pz-h2 { font-size: clamp(24px, 2.7vw, 34px); }
.hm-contact__figure { position: relative; align-self: stretch; min-height: 320px; }
.hm-contact__tel { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 18px; color: var(--pz-lemon); font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.hm-contact__tel svg { width: 26px; height: 26px; fill: currentColor; }
.hm-contact__mascot {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(-1 * clamp(64px, 8vw, 104px) - 42%);
  height: 154%; width: auto; max-width: none; object-fit: contain; object-position: top;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35));
}
/* 포지맨(지붕맨 하나) — 글과 폼 사이 열, 열 바닥에 크게 (사용자가 고른 자리, 2026-09-20).
   섹션 위아래 여백은 그대로(오른쪽 폼 기준) — 캐릭터는 여백 밑으로 나가서 잘린다 */
.hm-form { background: var(--pz-white); color: var(--pz-ink); border-radius: 20px; padding: clamp(22px, 3vw, 32px); }
.hm-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hm-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--pz-body); }
.hm-field em { font-style: normal; color: var(--pz-danger); font-weight: 600; }
.hm-field--full { grid-column: 1 / -1; }
.hm-field input, .hm-field textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--pz-line); border-radius: var(--pz-radius);
  font: inherit; font-weight: 500; color: var(--pz-ink); background: var(--pz-ivory);
}
.hm-field input:focus, .hm-field textarea:focus { outline: 2px solid var(--pz-blue); outline-offset: 0; background: var(--pz-white); }
.hm-consent { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; font-size: 14px; font-weight: 600; color: var(--pz-body); }
.hm-consent__detail { margin-bottom: 18px; font-size: 12.5px; color: var(--pz-muted); }
.hm-consent__detail summary { cursor: pointer; }
.hm-consent__detail ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.hm-form .pz-btn { width: 100%; }
@media (max-width: 1000px) { .hm-contact__inner { grid-template-columns: 1fr; } .hm-contact__figure { display: none; } }


/* ---- 품질기준 4 + 블로그·유튜브 (소개 바로 아래, 라이브 2번째 줄 재현) ---- */
.hm-quality__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hm-quality__list { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; margin: 0; padding: 0; list-style: none; }
.hm-q { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.hm-q__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--pz-blue); color: var(--pz-white); }
.hm-q__mark svg { width: 18px; height: 18px; fill: currentColor; }
.hm-q strong { display: block; color: var(--pz-ink); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.hm-q__en { display: block; margin: 2px 0 6px; color: var(--pz-muted); font-size: 12px; letter-spacing: .04em; }
.hm-q p { margin: 0; color: var(--pz-body); font-size: 14.5px; line-height: 1.65; }
.hm-quality__channels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* 원본 타일이 300x300 정사각(글자 포함)이라 자르지 않는다 */
.hm-channel { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--pz-line); background: var(--pz-white); transition: transform .18s, box-shadow .18s; }
.hm-channel img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.hm-channel:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(23, 33, 43, .12); }
@media (max-width: 900px) { .hm-quality__inner { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hm-quality__list { grid-template-columns: 1fr; } .hm-quality__channels { gap: 10px; } }   /* 블로그·유튜브 타일은 폰에서도 한 줄에 둘 (2026-09-21 사용자) */

/* ================= 폰: 스크롤 줄이기 (2026-09-21 사용자 모바일 점검) =================
   문구·순서는 그대로, 배치만 촘촘히. 데스크톱은 안 건드린다. */
@media (max-width: 700px) {
  /* 시공분야 카드 — 세로 큰 카드(사진 4:3 + 글) → 가로형(왼쪽 작은 사진 + 오른쪽 글). 높이가 절반 아래로 */
  .hm-svc-grid { gap: 10px; }
  .hm-svc { flex-direction: row; align-items: stretch; border-radius: 12px; }
  .hm-svc__pic { flex: 0 0 104px; aspect-ratio: auto; min-height: 96px; }
  .hm-svc__body { flex: 1 1 auto; min-width: 0; justify-content: center; padding: 12px 14px; }
  .hm-svc .pz-card__no, .hm-svc__more { display: none; }
  .hm-svc .pz-h3 { margin: 0 0 4px; font-size: 15.5px; line-height: 1.35; }
  .hm-svc__desc { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

  /* 왜 칼라강판인가 — 아이콘을 제목 옆으로. 높이 약 2/3 */
  .hm-reason { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 16px 16px 18px; }
  .hm-reason__icon { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
  .hm-reason .pz-h3 { margin: 0; font-size: 16.5px; }
  .hm-reason p { grid-column: 1 / -1; margin-top: 10px; font-size: 14px; line-height: 1.6; }

  /* 진행순서 — 번호(01)를 제목과 같은 줄에 */
  .hm-steps { gap: 10px; }
  .hm-steps li { padding: 14px 16px 16px; border-radius: 12px; }
  .hm-steps li::before { display: inline; margin: 0 8px 0 0; font-size: 14px; }
  .hm-steps strong { display: inline; margin: 0; font-size: 16.5px; }
  .hm-steps p { margin-top: 6px; font-size: 14px; line-height: 1.6; }

  /* 견적문의 폼 — 폼 상자가 한 화면에 다 보이게: 이름·연락처를 한 줄에, 칸 높이와 간격을 줄임 */
  .hm-contact .pz-h2 { font-size: 21px; line-height: 1.35; }
  .hm-contact__tel { margin: 2px 0 10px; font-size: 26px; }
  .hm-contact .pz-lede { font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
  .hm-form { padding: 16px 16px 18px; border-radius: 16px; }
  .hm-form__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hm-form__grid .hm-field:nth-child(3) { grid-column: 1 / -1; }
  .hm-field { gap: 4px; font-size: 12.5px; }
  .hm-field input { height: 44px; padding-top: 0; padding-bottom: 0; }
  .hm-field textarea { height: 68px; min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .hm-consent { margin: 12px 0 4px; font-size: 13px; }
  .hm-consent__detail { margin-bottom: 12px; font-size: 12px; }
  .hm-form .pz-btn { min-height: 50px; }

  /* 시공사례 — 폰에서는 정사각 사진만, 한 줄에 둘. 분류 꼬리표·제목 글씨·어둡게 덮는 그라데이션은 뺀다(제목은 img alt 에 있다).
     홈 · 스틸방수 · /시공사례/ · 카테고리 목록이 같은 카드(hm-case)를 쓴다 (2026-09-21 사용자) */
  .pz-grid.hm-case-grid, .pz-grid.pj-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pz-photo.hm-case, .pj-grid .pz-photo.hm-case { aspect-ratio: 1 / 1; border-radius: 10px; }
  .hm-case .pz-photo__tag, .hm-case .pz-photo__label { display: none; }
  .hm-case::after { display: none; }
}
