/* ==========================================================
   와우오더 — 고객센터 섹션 (#support, 리뷰 섹션 바로 아래 · 브랜드 섹션 위)
   리뷰 섹션 위로 둥근 시트가 올라오며 이어진다. 머리(불편 → 약속) + 카드 네 장을 엇갈린 칸(7:5 / 5:7)으로.
   ① 365 연중무휴 고객센터(상담원 사진이 카드를 채움)  ② 1:1 전담 컨설턴트(매장 사진 위 폰 + 카톡 대화)
   ③ 무상 A/S(처리 순서 + 전국 지도, 선이 서울에서 퍼짐)  ④ 연락(먹색 카드 + 전화·카톡 칸 + 3D 헤드셋)
   글자는 HTML, 그림은 /img/support/. 움직임은 js/main/cs.js
   ========================================================== */

/* 지도 선이 퍼지는 반지름(가림판) — 부드럽게 바뀌도록 등록 */
@property --cs-r { syntax: "<percentage>"; inherits: false; initial-value: 150%; }

/* 섹션 = 시트 — 위 모서리를 크게 둥글게 하고 리뷰 섹션 바닥 위로 72px 올려 겹친다 */
/* main.css 의 .page-table section(여백)·.page-table h2(Paperlogy 글꼴)보다 이기도록 section.cs / .cs .cs__title 로 쓴다 */
section.cs {
  position: relative; z-index: 2; margin-top: -72px; padding: 116px 0 128px;
  border-radius: 72px 72px 0 0; background: #f3f5f8;
}
.cs__grab { position: absolute; left: 50%; top: 22px; width: 48px; height: 5px; border-radius: 5px; background: #d3d8e0; transform: translateX(-50%); }  /* 시트 손잡이 */
.cs__inner { max-width: 1280px; margin: 0 auto; padding: 0 80px; }

/* 머리 — 회색 윗줄(불편을 짚는 말) + 먹색 아랫줄(약속), 약속 구절만 파랑 */
.cs .cs__title {
  margin-bottom: 56px; font-family: "Pretendard Variable", Pretendard, sans-serif;
  font-size: 44px; font-weight: 800; line-height: 1.32; letter-spacing: -0.02em; color: #171717; text-align: center;
}
.cs .cs__title .cs__pre { color: #a1a8b3; }
.cs .cs__title em { font-style: normal; color: #1d63e6; }

/* 카드 판 — 12칸 위에 7:5 / 5:7 로 엇갈려 놓는다 */
.cs-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 440px 420px; gap: 16px; }
.cs-tile { position: relative; overflow: hidden; padding: 40px 40px 0; border-radius: 28px; background: #fff; isolation: isolate; }
.cs-tile--agent   { grid-column: span 7; }
.cs-tile--consult { grid-column: span 5; }
.cs-tile--as      { grid-column: span 5; }
.cs-tile--call    { grid-column: span 7; }
.cs-tile__txt { position: relative; z-index: 3; }
.cs-tile__photo { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-sub { position: relative; z-index: 3; margin-bottom: 10px; font-size: 18px; font-weight: 700; line-height: 1.4; color: #1d63e6; }
.cs .cs-tit { position: relative; z-index: 3; font-size: 30px; font-weight: 800; line-height: 1.36; letter-spacing: -0.02em; color: #171717; }

/* ① 상담원 사진이 카드를 채우고, 왼쪽 밝은 사무실 쪽에 글 */
.cs-tile--agent { padding: 48px 48px 0; }
.cs-tile--agent .cs-tile__photo { object-position: 78% 30%; }
.cs-tile--agent::before {                               /* 글 쪽만 살짝 밝게 */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .74) 30%, rgba(255, 255, 255, 0) 56%);
}

/* ② 매장 사진(위는 하얗게 덮어 글 자리) + 폰 */
.cs-tile--consult .cs-tile__photo { object-position: 30% 60%; }
.cs-tile--consult::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .78) 34%, rgba(255, 255, 255, .22) 70%, rgba(255, 255, 255, .1) 100%);
}
.cs-phone { --s: .6460; position: absolute; z-index: 2; right: 34px; top: 176px; width: 290px; filter: drop-shadow(0 24px 34px rgba(40, 30, 10, .2)); }
.cs-phone__body { position: relative; width: 100%; aspect-ratio: 640 / 1390; }
.cs-phone__frame { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.cs-phone__scr {     /* 프레임 이미지의 화면 구멍(실측 42·33 / 556×1326, 모서리 80) — 리뷰 섹션 폰과 같은 값 */
  position: absolute; left: 6.5625%; top: 2.374%; width: 86.875%; height: 95.396%; z-index: 1;
  border-radius: 14.39% / 6.03%; overflow: hidden; background: #b2c7da;
}

/* 카카오톡 대화 화면 — 실제 폰 크기(390)로 짓고 줄인다(글자는 줄인 뒤에도 읽히게 조금 크게) */
.kk {
  position: absolute; left: 0; top: 0; width: 390px; height: 846px; transform: scale(var(--s)); transform-origin: 0 0;
  background: #b2c7da; color: #171717; font-family: "Pretendard Variable", Pretendard, sans-serif; letter-spacing: -0.02em; text-align: left;
}
.kk-status { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 0 30px 0 46px; font-size: 17px; }
.kk-status b { font-weight: 700; }
.kk-status__ic { width: 64px; height: 12px; border-radius: 3px; background: linear-gradient(90deg, #171717 0 30%, transparent 30% 38%, #171717 38% 62%, transparent 62% 70%, #171717 70%); opacity: .85; }
.kk-head { display: flex; align-items: center; gap: 14px; height: 54px; padding: 0 20px; font-size: 19px; }
.kk-head b { font-weight: 700; }
.kk-back { width: 12px; height: 12px; border-left: 2.5px solid #171717; border-bottom: 2.5px solid #171717; transform: rotate(45deg); }
.kk-body { position: absolute; left: 0; right: 0; top: 104px; bottom: 0; padding: 18px 14px 0; overflow: hidden; }
.kk-list { display: flex; flex-direction: column; gap: 16px; transition: transform .45s cubic-bezier(.3, .7, .2, 1); }
.kk-msg { display: flex; align-items: flex-end; gap: 6px; margin: 0; }
.kk-msg--me { justify-content: flex-end; }
.kk-bub { padding: 12px 15px; border-radius: 17px; font-size: 18px; line-height: 1.42; color: #171717; word-break: keep-all; }
.kk-msg--me .kk-bub { background: #fee500; border-top-right-radius: 5px; }
.kk-msg--you { align-items: flex-start; gap: 9px; }
.kk-msg--you .kk-bub { background: #fff; border-top-left-radius: 5px; }
.kk-time { flex: none; font-size: 13px; line-height: 1; color: rgba(23, 23, 23, .5); }
.kk-pf {                                   /* 카카오톡 기본 프로필 — 회청 둥근 사각 + 사람 실루엣 */
  flex: none; width: 44px; height: 44px; border-radius: 17px;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 7px, transparent 7.5px),
    radial-gradient(ellipse 15px 10px at 50% 100%, #fff 0 99%, transparent 100%),
    #9bb5d0;
}
.kk-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kk-name { font-size: 14px; line-height: 1; color: rgba(23, 23, 23, .72); }
.kk-line { display: flex; align-items: flex-end; gap: 6px; margin: 0; }
/* 대화 움직임 — 스크립트가 .is-armed 를 붙이면 숨겨 두었다가 한 줄씩 .is-on */
.kk.is-armed .kk-msg { display: none; }
.kk.is-armed .kk-msg.is-on { display: flex; animation: kk-in .42s cubic-bezier(.2, .9, .3, 1.15) both; }
.kk.is-armed .kk-msg--me.is-on { transform-origin: 100% 100%; }
.kk.is-armed .kk-msg--you.is-on { transform-origin: 0 100%; }
@keyframes kk-in { from { opacity: 0; transform: translateY(12px) scale(.94); } to { opacity: 1; transform: none; } }
.kk.is-fade .kk-list { opacity: 0; transition: opacity .3s; }

/* ③ 무상 A/S — 처리 순서(번호 원 + 연결선, 세로) + 지도 */
.cs-steps { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 20px; width: max-content; margin: 32px 0 0; padding: 0; list-style: none; }
.cs-steps::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: #d9dee6; }   /* 번호 원을 잇는 선 */
.cs-step { position: relative; display: flex; align-items: center; gap: 13px; font-size: 17px; font-weight: 700; line-height: 1; color: #171717; transition: color .3s; }
.cs-step__no {
  position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #171717; color: #fff; font-size: 13px; font-weight: 800; transition: background-color .3s, color .3s, box-shadow .3s;
}
.cs-step--go { color: #1d63e6; }
.cs-step--go .cs-step__no { background: #1d63e6; }
/* 움직임 — 스크립트가 .is-armed 로 회색으로 꺼 두었다가 차례로 .is-on */
.cs-steps.is-armed .cs-step { color: #a1a8b3; }
.cs-steps.is-armed .cs-step__no { background: #fff; color: #a1a8b3; box-shadow: inset 0 0 0 2px #d9dee6; }
.cs-steps.is-armed .cs-step.is-on { color: #171717; }
.cs-steps.is-armed .cs-step.is-on .cs-step__no { background: #171717; color: #fff; box-shadow: none; }
.cs-steps.is-armed .cs-step--go.is-on { color: #1d63e6; }
.cs-steps.is-armed .cs-step--go.is-on .cs-step__no { background: #1d63e6; }
.cs-map { position: absolute; z-index: 1; right: -14px; bottom: -44px; width: 272px; aspect-ratio: 819 / 931; pointer-events: none; }
.cs-map img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* 선 — 서울(19.2%, 22.5%)에서 둥글게 퍼진다. 스크립트가 .is-armed 로 접었다가 .is-play 로 펼친다 */
.cs-map__arcs {
  -webkit-mask-image: radial-gradient(circle at 19.2% 22.5%, #000 var(--cs-r), transparent calc(var(--cs-r) + 14%));
  mask-image: radial-gradient(circle at 19.2% 22.5%, #000 var(--cs-r), transparent calc(var(--cs-r) + 14%));
}
.cs-map.is-armed .cs-map__arcs { --cs-r: -16%; }   /* 번진 가장자리(14%)까지 완전히 접히게 */
.cs-map.is-armed.is-play .cs-map__arcs { --cs-r: 150%; transition: --cs-r 2.8s cubic-bezier(.5, .1, .4, 1) .2s; }   /* 처음엔 천천히 → 퍼지다 → 끝에서 멎는다 */

/* ④ 연락 — 먹색 카드, 왼쪽 글 + 연락 칸, 오른쪽 3D 헤드셋 */
.cs-tile--call {
  padding: 44px 48px; color: #fff;
  background:
    radial-gradient(60% 70% at 88% 40%, rgba(58, 122, 245, .22), rgba(58, 122, 245, 0) 70%),
    linear-gradient(180deg, #202229 0%, #131418 100%);
}
.cs-tile--call .cs-sub { color: rgba(255, 255, 255, .6); }
.cs .cs-tile--call .cs-tit { color: #fff; }
.cs-headset { position: absolute; z-index: 1; right: 40px; top: 50%; width: 236px; height: auto; transform: translateY(-50%) rotate(-6deg); pointer-events: none; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .35)); }
.cs-ch { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 10px; width: 330px; margin-top: 34px; }
.cs-ch__item {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 44px 13px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); color: #fff; transition: background-color .2s;
}
.cs-ch__ic { flex: none; display: block; width: 46px; height: 46px; }
.cs-ch__ic--kakao { display: grid; place-items: center; border-radius: 13px; background: #fee500; }
.cs-ch__ic--kakao img { display: block; width: 30px; height: 30px; }
.cs-ch__txt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cs-ch__label { font-size: 13.5px; font-weight: 600; line-height: 1.3; color: rgba(255, 255, 255, .6); }
.cs-ch__val { font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: .005em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-ch__arr { position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); transition: transform .2s; }
.cs-ch__arr svg { display: block; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cs-ch__item:hover { background: rgba(255, 255, 255, .14); }
.cs-ch__item:hover .cs-ch__arr { transform: translate(3px, -50%); }
.cs-ch__item:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 3px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1199px) {
  .cs__inner { padding: 0 40px; }
  .cs-grid { grid-template-rows: 420px 400px; }
  .cs-tile { padding: 34px 32px 0; }
  .cs .cs-tit { font-size: 26px; }
  .cs-sub { font-size: 16px; }
  .cs-tile--agent { padding: 40px 40px 0; }
  .cs-phone { --s: .5791; width: 260px; right: 22px; top: 160px; }
  .cs-map { width: 240px; }
  .cs-tile--call { padding: 36px 40px; }
  .cs-headset { width: 190px; right: 24px; }
  .cs-ch { width: 300px; }
  .cs-ch__val { font-size: 18px; }
}
@media (max-width: 899px) {
  section.cs { margin-top: -48px; padding: 88px 0 96px; border-radius: 48px 48px 0 0; }
  .cs__grab { top: 16px; width: 40px; }
  .cs .cs__title { margin-bottom: 36px; font-size: 32px; }
  .cs-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 12px; }
  .cs-tile--agent, .cs-tile--consult, .cs-tile--as, .cs-tile--call { grid-column: auto; }
  .cs-tile--agent { height: 460px; }
  .cs-tile--agent .cs-tile__photo {                    /* 사진은 아래 70% 에만 — 위 가장자리를 흰 판에 녹여 얼굴이 글 밑으로 */
    top: auto; height: 70%; object-position: 72% 28%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  }
  .cs-tile--agent::before { display: none; }
  .cs-tile--consult { height: 460px; }
  .cs-phone { --s: .6460; width: 290px; left: 50%; right: auto; top: 156px; transform: translateX(-50%); }
  .cs-tile--as { height: 440px; }
  .cs-map { width: 260px; }
  .cs-tile--call { padding: 34px 32px 36px; }
  .cs-headset { width: 150px; right: 18px; top: 24px; transform: rotate(-6deg); }
  .cs-ch { width: auto; }
}
@media (max-width: 599px) {
  section.cs { margin-top: -36px; padding: 72px 0 80px; border-radius: 36px 36px 0 0; }
  .cs__inner { padding: 0 20px; }
  .cs .cs__title { margin-bottom: 30px; font-size: 26px; }
  .cs-tile { padding: 28px 24px 0; border-radius: 22px; }
  .cs .cs-tit { font-size: 22px; }
  .cs-sub { margin-bottom: 8px; font-size: 15px; }
  .cs-tile--agent { height: 420px; padding: 28px 24px 0; }
  .cs-tile--consult { height: 420px; }
  .cs-phone { --s: .6014; width: 270px; top: 132px; }
  .cs-tile--as { height: 400px; }
  .cs-steps { flex-direction: row; gap: 12px; margin-top: 20px; }
  .cs-steps::before { display: none; }
  .cs-step { gap: 6px; font-size: 14px; }
  .cs-step__no { width: 22px; height: 22px; font-size: 11px; }
  .cs-map { width: 230px; bottom: -36px; }
  .cs-tile--call { padding: 28px 22px 26px; }
  .cs-headset { width: 104px; right: 14px; top: 20px; }
  .cs-ch { margin-top: 24px; }
  .cs-ch__val { font-size: 18px; }
}

/* 움직임 줄이기 — 대화·순서·선 모두 다 보인 상태 그대로 */
@media (prefers-reduced-motion: reduce) {
  .kk.is-armed .kk-msg { display: flex; animation: none; }
  .cs-steps.is-armed .cs-step { color: #171717; }
  .cs-steps.is-armed .cs-step__no { background: #171717; color: #fff; box-shadow: none; }
  .cs-map.is-armed .cs-map__arcs { --cs-r: 150%; transition: none; }
}
