/* ═══════════════════════════════════════════════════════════
   PRICING (단가 협상의 중요성) — pricing.css
   · #franchise-support 다음, 흰 배경(연노랑↔흰 교차).
   · 좌: 비교 2카드(일반 회색 / 다폰 골드) + 화살표 배지
   · 우: 100대 기준 수익 막대그래프 + +500만 원형
   · 애니메이션 4종(섹션 진입 시, scroll-reveal .is-revealed 트리거 / unobserve 금지):
     ① 차트 제목 introPop(인트로 재사용)  ② 비교카드 물결 차오름
     ③ 막대 scaleY 차오름  ④ +500만 원형 fly-in
   · 모든 수치 [확정필요] + 예시/추정 단서. 검정 풀배경·이모지 없음.
═══════════════════════════════════════════════════════════ */

.pricing {
  background: var(--white, #ffffff);
  scroll-margin-top: 80px;
}

/* ── 헤드 ── */
.pricing__head {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 52px;
}
.pricing__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold, #f0c000) 14%, #ffffff);
  border: 1px solid color-mix(in srgb, var(--gold, #f0c000) 40%, #ffffff);
  color: var(--gold-dark, #c9a000);
  font-size: 0.82rem;
  font-weight: 800;
  word-break: keep-all;
}
.pricing__badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold, #f0c000);
  color: #1a1a1a;
  font-size: 0.8rem;
  font-weight: 900;
  flex-shrink: 0;
}
.pricing__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.32;
  color: var(--color-text, #1a1a1a);
  margin: 0 0 12px;
  word-break: keep-all;
}
.pricing__sub {
  font-size: clamp(0.96rem, 1.5vw, 1.12rem);
  color: var(--color-text-sub, #555);
  margin: 0;
  word-break: keep-all;
}
.pricing__sub em {
  font-style: normal;
  font-weight: 800; /* "받는 리베이트"만 굵게 */
  color: var(--color-text, #1a1a1a);
  /* 보라 형광펜 — 글자 하단 ~38%만 덮는 반투명 하이라이트(밑줄선 아님) */
  background: linear-gradient(
    transparent 62%,
    rgba(124, 58, 237, 0.4) 62%
  );
  padding: 0 2px;
  border-radius: 2px;
}

/* ── 본문 그리드(좌 비교 / 우 차트) ── */
.pricing__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

/* ═══ 좌측 비교 2카드 ═══ */
.pricing__compare {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pcard {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 34px 38px;
  border: 1px solid;
}
.pcard--normal {
  background: #eef0f3;
  border-color: #e1e4e9;
}
.pcard--daphone {
  background: color-mix(in srgb, var(--gold, #f0c000) 12%, #ffffff);
  border-color: color-mix(in srgb, var(--gold, #f0c000) 38%, #ffffff);
}
/* 물결 차오름 레이어(숫자 뒤) */
.pcard__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
}
/* 일반 판매점 카드 — 물결 제거(정적 회색 유지) */
.pcard--normal .pcard__fill {
  display: none;
}
.pcard--daphone .pcard__fill {
  background: linear-gradient(
    180deg,
    rgba(240, 192, 0, 0.12) 0%,
    rgba(240, 192, 0, 0.32) 100%
  );
}
/* 수면 물결(흰 foam, 가로 드리프트 — 은은하게) */
.pcard__fill::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  width: 200%;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='10' viewBox='0 0 80 10'%3E%3Cpath d='M0 5 Q20 -1 40 5 T80 5 V10 H0 Z' fill='%23ffffff' fill-opacity='0.55'/%3E%3C/svg%3E")
    repeat-x;
  background-size: 80px 10px;
  animation: pricingWave 3.2s linear infinite;
}
.pcard__body {
  position: relative;
  z-index: 2; /* 숫자는 물결 위 — 가독성 우선 */
}
.pcard__name {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--color-text, #1a1a1a);
  word-break: keep-all;
}
.pcard--daphone .pcard__name {
  color: var(--gold-dark, #c9a000);
}
.pcard__metric {
  font-size: 1.18rem;
  margin: 0 0 6px;
  color: var(--color-text-sub, #555);
}
.pcard__metric strong {
  font-size: 1.74rem;
  font-weight: 900;
  color: var(--color-text, #1a1a1a);
}
.pcard--daphone .pcard__metric strong {
  color: var(--gold-dark, #c9a000);
}
.pcard__note {
  font-size: 0.98rem;
  color: var(--color-text-sub, #666);
  margin: 8px 0 0;
  word-break: keep-all;
}

/* 카드 사이 — 화살표 + 추가수익 배지 */
.pcard__between {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2px 0;
}
.pcard__arrow {
  display: inline-flex;
  color: var(--gold, #f0c000);
}
.pcard__plus {
  display: inline-block;
  background: var(--gold, #f0c000);
  color: #1a1a1a;
  font-size: 0.98rem;
  font-weight: 900;
  padding: 9px 18px;
  border-radius: 999px;
  word-break: keep-all;
}

/* ═══ 우측 차트 ═══ */
.pricing__chart {
  background: #fbfbfc;
  border: 1px solid #ececf0;
  border-radius: 22px;
  padding: 40px 40px 34px;
}
.pricing__chart-title {
  text-align: center;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--color-point-red, #e23b34); /* 다폰 레드 강조 */
  margin: 0 0 30px;
  word-break: keep-all;
  opacity: 0; /* introPop 전 숨김(애니 트리거 전) */
}
.pchart {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(36px, 7vw, 88px);
  height: 330px;
  padding: 0 8px;
}
.pbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 10px;
}
.pbar__val {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--color-text, #1a1a1a);
  white-space: nowrap;
  opacity: 0; /* 막대 차오른 뒤 등장 */
}
.pbar--daphone .pbar__val {
  color: var(--gold-dark, #c9a000);
}
.pbar__col {
  width: clamp(88px, 10vw, 132px);
  height: var(--h, 60%);
  border-radius: 12px 12px 0 0;
  transform: scaleY(0); /* 차오름 전 */
  transform-origin: bottom;
}
.pbar--normal .pbar__col {
  background: linear-gradient(180deg, #cfd4dc 0%, #aeb5c1 100%);
}
.pbar--daphone .pbar__col {
  background: linear-gradient(
    180deg,
    var(--gold, #f0c000) 0%,
    var(--gold-dark, #c9a000) 100%
  );
}
.pbar__label {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--color-text-sub, #555);
  word-break: keep-all;
  text-align: center;
}
.pbar--daphone .pbar__label {
  color: var(--gold-dark, #c9a000);
}

/* 우상향 화살표(정적 장식) */
.pchart__rise {
  position: absolute;
  left: 12%;
  top: 6%;
  width: 78%;
  color: color-mix(in srgb, var(--gold, #f0c000) 70%, #ffffff);
  pointer-events: none;
}
.pchart__rise svg {
  width: 100%;
  height: auto;
  display: block;
}

/* +500만 원형 — fly-in */
.pchart__badge {
  position: absolute;
  top: 4%;
  right: 2%;
  width: clamp(116px, 14vw, 148px);
  height: clamp(116px, 14vw, 148px);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(
    circle at 32% 28%,
    #ffe27a 0%,
    var(--gold, #f0c000) 62%,
    var(--gold-dark, #c9a000) 100%
  );
  color: #1a1a1a;
  box-shadow: 0 12px 26px rgba(240, 192, 0, 0.4);
  font-size: clamp(0.86rem, 1.4vw, 1rem);
  font-weight: 900;
  line-height: 1.15;
  opacity: 0; /* fly-in 전 */
}
.pchart__badge small {
  font-size: 0.7rem;
  font-weight: 700;
}
.pricing__chart-note {
  text-align: center;
  margin: 18px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-dark, #c9a000);
  word-break: keep-all;
}

/* ── 단서(예시/추정) ── */
.pricing__disclaimer {
  max-width: 1140px;
  margin: 28px auto 0;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #8a8a8a;
  word-break: keep-all;
}

/* ═══════════════════════════════════════════════════════════
   애니메이션 — 섹션 진입(scroll-reveal .is-revealed) 시 순서대로
═══════════════════════════════════════════════════════════ */
/* ① 차트 제목 쾅 — 인트로 introPop 재사용(scale 1.8→1, blur 4→0) */
.pricing.is-revealed .pricing__chart-title {
  animation: introPop 0.5s cubic-bezier(0.2, 0.9, 0.25, 1) 0.1s both;
}
/* ② 다폰 카드만 물결 차오름 — 더 천천히(일반 카드는 정적) */
.pricing.is-revealed .pcard--daphone .pcard__fill {
  animation: pricingFill 5.8s ease 0.75s both;
  --fill-h: 72%;
}
/* ③ 막대 차오름(scaleY, origin bottom — 리플로우 없음) — 더 천천히 */
.pricing.is-revealed .pbar--normal .pbar__col {
  animation: pricingBar 1.6s ease 1.15s both;
}
.pricing.is-revealed .pbar--daphone .pbar__col {
  animation: pricingBar 1.9s cubic-bezier(0.2, 0.8, 0.3, 1) 1.35s both;
}
.pricing.is-revealed .pbar--normal .pbar__val {
  animation: pricingFade 0.4s ease 2.8s both;
}
.pricing.is-revealed .pbar--daphone .pbar__val {
  animation: pricingFade 0.4s ease 3.3s both;
}
/* ④ +500만 원형 "팡!" — 인트로 카피 introPop 그대로 적용(scale 1.8→1, blur 4→0, 강한 ease-out).
   골드 막대 차오름이 top 도달하는 순간(1.35+1.9=3.25s)에 정확히 동기화 → 막대 끝에 딱 붙어 팡. */
.pricing.is-revealed .pchart__badge {
  animation: introPop 0.5s cubic-bezier(0.2, 0.9, 0.25, 1) 3.25s both;
}

@keyframes pricingWave {
  to {
    transform: translateX(-80px);
  }
}
@keyframes pricingFill {
  from {
    height: 0;
  }
  to {
    height: var(--fill-h, 66%);
  }
}
@keyframes pricingBar {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes pricingFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pricingPop {
  0% {
    opacity: 0;
    transform: scale(0.3);
    box-shadow: 0 0 0 rgba(240, 192, 0, 0);
  }
  62% {
    opacity: 1;
    transform: scale(1.15); /* 더 강한 오버슈트(펀치) */
    box-shadow: 0 14px 42px rgba(240, 192, 0, 0.6); /* 번쩍(그림자 버스트) */
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 12px 26px rgba(240, 192, 0, 0.4);
  }
}

/* ── prefers-reduced-motion: 전부 최종 상태 즉시(애니 없음) ── */
@media (prefers-reduced-motion: reduce) {
  .pricing__chart-title {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
  .pcard--daphone .pcard__fill {
    height: 72%;
  }
  .pcard__fill::before {
    animation: none;
  }
  .pbar__col {
    transform: scaleY(1);
  }
  .pbar__val {
    opacity: 1;
  }
  .pchart__badge {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   반응형 — 모바일 세로(44px 터치 여백)
═══════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .pricing__head {
    margin-bottom: 40px;
  }
  .pricing__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 560px;
  }
  .pchart {
    height: 290px;
  }
}
