/* 허브 B안 메인 (/b/) 2차 시안 — 실적 카드, 서비스 5가지 목록, 전화 상담 시트.
   b-hero.css · b-sections.css 다음에 읽는다 */

/* ---------- 첫 화면: 유리 카드 문구 + 실적 카드 자리 ---------- */
.b-hero-card-title.is-statement {
  color: var(--ink);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.04em;
}

.b-hero-card-title.is-statement em {
  font-style: normal;
  color: var(--brand);
}

.b-hero-inner {
  grid-template-areas:
    'copy card'
    'actions card'
    'stats card';
}

@media (max-width: 1099px) {
  .b-hero-inner {
    grid-template-areas:
      'copy'
      'card'
      'actions'
      'stats';
  }

  /* 위 유리 카드와 같은 폭으로 맞춘다 */
  .b-stats {
    max-width: 760px;
  }
}

/* ---------- 실적 카드 ---------- */
.b-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
  padding: 18px 8px;
  border-radius: 24px;
  animation: b-rise var(--duration-slow) var(--ease-out-expo) 420ms both;
}

.b-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  padding: 0 12px;
}

.b-stat + .b-stat {
  border-left: 1px solid rgba(122, 131, 153, 0.25);
}

/* 숫자가 칸을 넘칠 만큼 글자가 크면(b-fit.js) 위아래 두 줄로 */
.b-stats.is-stacked {
  grid-template-columns: minmax(0, 1fr);
  padding: 6px 8px;
}

.b-stats.is-stacked .b-stat {
  justify-content: flex-start;
  padding: 12px 14px;
}

.b-stats.is-stacked .b-stat + .b-stat {
  border-left: 0;
  border-top: 1px solid rgba(122, 131, 153, 0.25);
}

.b-stat-icon {
  flex: none;
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(28, 40, 96, 0.14));
}

.b-stat-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.b-stat-text b {
  color: var(--brand);
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.b-stat-text > span {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* 슬롯머신 숫자: 자릿수마다 0~9 띠가 위로 돌다가 제자리에 멈춘다 (띠와 움직임은 b-home.js 가 만든다) */
.odo {
  display: inline-flex;
}

.odo-digit,
.odo-sym {
  display: inline-block;
  height: 1.2em;
  line-height: 1.2em;
}

.odo-digit {
  overflow: hidden;
}

.odo-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.odo-strip > span {
  display: block;
  height: 1.2em;
}

/* 만족도 고리: 숫자와 함께 0에서 만족도(%)까지 차오른다 */
.b-stat-ring {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
}

.b-stat-ring svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.b-stat-ring circle {
  fill: none;
  stroke-width: 4;
}

.b-stat-ring .track {
  stroke: rgba(122, 131, 153, 0.18);
}

.b-stat-ring .bar {
  stroke: var(--brand);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 98)); /* 스크립트가 없을 때의 최종 모습. 움직임은 b-home.js 가 그린다 */
}

.b-stat-ring img {
  position: absolute;
  inset: 13px;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.b-stats.is-in .b-stat-icon,
.b-stats.is-in .b-stat-ring img {
  animation: stat-pop 900ms var(--ease-spring) both;
}

@keyframes stat-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .b-stats {
    padding: 14px 4px;
  }

  .b-stat {
    gap: 10px;
    padding: 0 8px;
  }

  .b-stat-icon {
    width: 44px;
    height: 44px;
  }

  .b-stat-ring {
    width: 50px;
    height: 50px;
  }

  .b-stat-ring img {
    inset: 10px;
    width: 30px;
    height: 30px;
  }

  .b-stat-text b {
    font-size: 1.5rem;
  }

  .b-stat-text > span {
    font-size: 0.8125rem;
  }
}

/* ---------- 서비스 5가지: 왼쪽 제목(따라 내려옴) + 오른쪽 목록 ---------- */
.b-svc-split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.b-svc-head {
  position: sticky;
  top: 120px;
  margin-bottom: 0;
}

.b-svc-list {
  display: grid;
  gap: 12px;
}

.b-row {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  padding: 16px 22px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  transition: transform var(--duration-normal) var(--ease-out-expo), box-shadow var(--duration-normal) ease,
    border-color var(--duration-normal) ease;
}

.b-row:hover {
  border-color: rgba(42, 73, 184, 0.2);
  box-shadow: 0 18px 40px rgba(28, 40, 96, 0.1);
  transform: translateY(-3px);
}

.b-row:active {
  transform: scale(0.985);
}

.b-row-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 96px;
  height: 76px;
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.b-row-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(28, 40, 96, 0.12));
  transition: transform var(--duration-slow) var(--ease-spring);
}

.b-row:hover .b-row-icon img {
  transform: translateY(-4px) rotate(-5deg) scale(1.06);
}

.b-row-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.b-row-text strong {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.35;
}

.b-row-text small {
  color: var(--ink-3);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.b-row-go {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease,
    transform var(--duration-normal) var(--ease-out-expo);
}

.b-row-go::before,
.b-row-go::after {
  content: '';
  position: absolute;
  top: 50%;
}

.b-row-go::before {
  left: 14px;
  right: 14px;
  height: 1.8px;
  margin-top: -0.9px;
  background: currentColor;
}

.b-row-go::after {
  right: 14px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border: solid currentColor;
  border-width: 1.8px 1.8px 0 0;
  transform: rotate(45deg);
}

.b-row:hover .b-row-go {
  background: var(--brand);
  color: var(--white);
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .b-svc-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .b-svc-head {
    position: static;
    margin-bottom: clamp(2rem, 1.6rem + 2vw, 3rem);
  }
}

@media (max-width: 560px) {
  .b-svc-list {
    gap: 10px;
  }

  .b-row {
    gap: 14px;
    padding: 12px 14px 12px 10px;
    border-radius: 20px;
  }

  .b-row-icon {
    width: 70px;
    height: 60px;
    padding-right: 12px;
  }

  .b-row-icon img {
    width: 56px;
    height: 56px;
  }

  .b-row-text strong {
    font-size: 1.0625rem;
  }

  .b-row-text small {
    font-size: 0.8125rem;
  }

  .b-row-go {
    width: 34px;
    height: 34px;
  }

  .b-row-go::before {
    left: 10px;
    right: 10px;
  }

  .b-row-go::after {
    right: 10px;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
  }
}

/* ---------- 상담 시트: 전화번호 카드 + "또는" + 바로 아래 신청서 ---------- */
.call-sheet .sheet-head h2 {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.call-topics {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 700;
}

.call-sheet .sheet-head .call-lead {
  margin-top: 8px;
}

/* 번호 카드 전체가 전화 걸기 버튼 */
.call-number {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid #dfe4f2;
  border-radius: 22px;
  background: linear-gradient(160deg, #eef1fa 0%, #f9fafd 100%);
  transition: transform var(--duration-fast) ease, box-shadow var(--duration-normal) ease;
}

.call-number:hover {
  box-shadow: 0 14px 30px rgba(28, 40, 96, 0.12);
}

.call-number:active {
  transform: scale(0.98);
}

.call-icon {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(140deg, #3a5bc7, #1f3484);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}

/* 누를 수 있다는 걸 알리는 잔잔한 물결 */
.call-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(58, 91, 199, 0.5);
  animation: call-ripple 2.4s ease-out infinite;
}

@keyframes call-ripple {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

.call-number small {
  display: block;
  color: var(--ink-2);
  font-size: var(--text-small);
  font-weight: 600;
}

.call-number b {
  display: block;
  color: var(--ink);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

/* 또는 */
.call-or {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 8px;
  color: var(--ink-2);
  font-size: var(--text-small);
  font-weight: 700;
}

.call-or::before,
.call-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* 통화가 어려우신가요? 신청서 */
.call-form {
  padding: 22px 18px 4px;
  border-radius: 22px;
  background: #f3f5f9;
}

.call-form.is-done {
  padding-bottom: 18px;
}

.call-form-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.call-chat {
  flex: none;
  color: var(--ink);
}

.call-form-head h3 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.3;
}

.call-form-head p {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: var(--text-small);
  line-height: 1.5;
}

/* 아이콘이 들어간 입력칸 */
.icon-field {
  position: relative;
  display: block;
}

.call-form .field {
  margin-top: 10px;
}

.call-form .call-form-head + .field {
  margin-top: 18px;
}

.field-icon {
  position: absolute;
  left: 16px;
  top: 17px;
  display: grid;
  color: #3b4256;
  pointer-events: none;
}

.call-form .input {
  min-height: 56px;
  padding-left: 48px;
  border: 1px solid #e1e5ee;
  border-radius: 16px;
  background: var(--white);
  font-size: 1rem;
}

.call-form .input:focus {
  border-color: var(--brand);
}

.call-form .input[aria-invalid='true'] {
  border-color: #f04452;
}

.is-select .input {
  padding-right: 44px;
  color: var(--ink);
  cursor: pointer;
}

.is-select .input:invalid,
.is-select .input:has(option[value='']:checked) {
  color: var(--ink-3);
}

.is-select::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 22px;
  width: 9px;
  height: 9px;
  border: solid var(--ink-2);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

/* 살롱명: 입력칸 + 상황 선택 칩을 한 상자에 */
.call-salon {
  padding: 0 0 12px;
  border: 1px solid #e1e5ee;
  border-radius: 16px;
  background: var(--white);
}

.call-salon .input {
  border: 0;
  background: transparent;
}

.call-salon .input:focus {
  background: transparent;
}

.call-salon-chips {
  min-width: 0;
  margin: 0;
  padding: 0 12px;
  border: 0;
}

/* 글자 길이만큼 차지하고 줄을 꽉 채운다 (좁은 폰에서도 한 줄 안에서 끊기지 않게) */
.call-salon-chips .chips {
  gap: 6px;
}

.call-salon-chips .chip {
  flex: 1 1 auto;
}

.call-salon-chips .chip span {
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  font-size: var(--text-xs);
  white-space: nowrap;
}

/* 동의 */
.call-consents {
  margin-top: 16px;
}

.call-consent-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.call-consents .agree {
  flex: 1;
  margin-top: 0;
  color: var(--ink);
  font-size: 0.875rem;
}

.call-consents .agree.is-optional {
  margin-top: 12px;
}

.call-consents .agree small {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: var(--text-xs);
}

.call-more {
  flex: none;
  padding: 6px 12px;
  border: 1px solid #c9cfdd;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink-2);
  font-size: var(--text-xs);
  font-weight: 600;
}

.call-detail {
  margin: 10px 0 0 32px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--white);
  color: var(--ink-2);
  font-size: var(--text-xs);
  line-height: 1.6;
}

.call-detail > div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 8px;
  padding: 2px 0;
}

.call-detail dt {
  color: var(--ink-3);
  font-weight: 700;
}

.call-form .btn-block {
  margin: 18px 0 18px;
}

.call-sheet .sheet-body .call-form .btn-block {
  margin-top: 18px;
}

@media (max-width: 420px) {
  .call-number {
    gap: 14px;
    padding: 16px;
  }

  .call-icon {
    width: 52px;
    height: 52px;
  }

  .call-form {
    padding-inline: 12px;
  }

  .call-chat svg {
    width: 38px;
    height: 38px;
  }

  .call-form .input {
    font-size: 0.9375rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .call-icon::after {
    animation: none;
  }
}
