/* B안 상세 페이지 공통 (/b/franchise/, /b/management/, /b/marketing/)
   b-hero.css · b-sections.css 다음에 읽는다. 진주빛 바탕 + 인디고 포인트, 흰 카드, 알약 버튼 */

/* ---------- 첫 화면 ---------- */
.d-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: -72px;
  padding-top: 72px;
  background: var(--page);
}

.d-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(3rem, 7vh, 5.5rem) clamp(3.5rem, 8vh, 6rem);
}

.d-hero-copy > * {
  animation: b-rise var(--duration-slow) var(--ease-out-expo) both;
}

.d-hero-copy > :nth-child(2) {
  animation-delay: 80ms;
}

.d-hero-copy > :nth-child(3) {
  animation-delay: 160ms;
}

.d-hero-copy > :nth-child(n + 4) {
  animation-delay: 240ms;
}

.d-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--brand-deep);
  font-size: var(--text-small);
  font-weight: 700;
}

.d-title {
  color: var(--ink);
  font-size: clamp(2.125rem, 1.3rem + 3.6vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.05em;
}

/* 글이 긴 제목(마케팅) — 두 줄에 들어가도록 조금 작게 */
.d-title.is-long {
  font-size: clamp(2rem, 1.25rem + 2.7vw, 3.125rem);
}

.d-title em,
.d-h2 em {
  font-style: normal;
  background: linear-gradient(100deg, #3a5bc7 10%, #2a49b8 55%, #1f3484 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.d-lead {
  margin-top: 22px;
  color: var(--ink-2);
  font-size: var(--text-lead);
  line-height: 1.7;
}

.d-lead strong {
  color: var(--ink);
}

.d-checks-inline {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.d-checks-inline li,
.d-checklist li {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.55;
}

.d-checks-inline li::before,
.d-checklist li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-tint);
}

.d-checks-inline li::after,
.d-checklist li::after {
  content: '';
  position: absolute;
  left: 9px;
  top: calc(0.2em + 5px);
  width: 5px;
  height: 9px;
  border: solid var(--brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.d-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* 첫 화면 오른쪽 유리 카드 */
.d-hero-card {
  position: relative;
  padding: 30px 26px 26px;
  border-radius: 28px;
  animation: b-rise 1s var(--ease-out-expo) 300ms both;
}

.d-hero-card-icon {
  position: absolute;
  right: 20px;
  top: -64px;
  width: 128px;
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(28, 40, 96, 0.2));
  animation: d-float 6s ease-in-out 1.2s infinite;
}

@keyframes d-float {
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

.d-hero-card .label-en {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
}

.d-hero-card h2 {
  margin-top: 10px;
  color: var(--ink);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.d-hero-card > p {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: var(--text-small);
}

/* 카드 안 칩 목록 */
.d-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5em), 1fr));
  gap: 8px;
  margin-top: 18px;
}

.d-chip-grid li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 700;
}

.d-chip-grid img {
  flex: none;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* 카드 안 숫자 목록 (비용·진단 항목) */
.d-facts {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--line);
}

.d-facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.86);
}

.d-facts dt {
  color: var(--ink-2);
  font-size: var(--text-small);
  font-weight: 600;
}

.d-facts dd {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: right;
}

.d-facts dd small {
  margin-left: 4px;
  color: var(--ink-3);
  font-size: var(--text-xs);
  font-weight: 600;
}

.d-card-note {
  margin-top: 12px;
  color: var(--brand-deep);
  font-size: var(--text-small);
  font-weight: 700;
}

@media (max-width: 900px) {
  .d-hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .d-hero-card {
    max-width: 560px;
    margin-top: 48px;
  }
}

@media (max-width: 720px) {
  .d-hero .b-hero-veil {
    background: linear-gradient(180deg, rgba(246, 247, 249, 0.82) 0%, rgba(246, 247, 249, 0.55) 60%, rgba(246, 247, 249, 0.2) 100%);
  }

  .d-hero-inner {
    padding-block: 28px 48px;
  }

  .d-actions .btn {
    width: 100%;
  }

  .d-hero-card {
    padding: 26px 18px 20px;
  }

  .d-hero-card-icon {
    top: -52px;
    width: 96px;
  }
}

/* ---------- 구역 공통 ---------- */
.d-sec {
  position: relative;
}

.d-sec.is-white {
  background: var(--white);
}

.d-sec .b-head {
  max-width: 760px;
}

.d-sec .b-head.center {
  margin-inline: auto;
}

.d-num {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.d-h2 {
  color: var(--ink);
  font-size: var(--text-h2);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.05em;
}

.d-h3 {
  margin-top: 10px;
  color: var(--ink-2);
  font-size: var(--text-h3);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.d-text {
  max-width: 760px;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: var(--text-lead);
  line-height: 1.75;
}

.d-text + .d-text {
  margin-top: 12px;
}

.d-text strong {
  color: var(--ink);
}

/* 강조 한 줄 (굵은 결론 문장) */
.d-punch {
  max-width: 760px;
  margin-top: 28px;
  padding: 18px 22px;
  border-left: 3px solid var(--brand);
  border-radius: 0 16px 16px 0;
  background: var(--brand-soft);
  color: var(--ink);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.03em;
}

.d-punch small {
  display: block;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: var(--text-small);
  font-weight: 500;
}

.d-sec.is-white .d-punch {
  background: #f4f5f9;
}

.d-cta-row {
  margin-top: 32px;
}

/* ---------- 고민 목록: 말풍선처럼 ---------- */
.d-pains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.d-pains li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px 20px 20px 6px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.55;
}

.d-sec.is-white .d-pains li {
  background: #f6f7fa;
  border-color: #e9ecf3;
}

.d-pains li::before {
  content: '?';
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(140deg, #3a5bc7, #1f3484);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .d-pains {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 체크 목록 ---------- */
.d-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  max-width: 900px;
}

.d-checklist.is-single {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 720px) {
  .d-checklist {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 카드 묶음 ---------- */
.d-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}

.d-cards.is-two {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
}

.d-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
}

.d-sec.is-white .d-card {
  background: linear-gradient(160deg, #f3f5f9 0%, #f9fafc 100%);
  border-color: #e6e9f1;
}

.d-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.d-card-head img {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(28, 40, 96, 0.14));
}

.d-card-no {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(150deg, #3a5bc7 0%, #2a49b8 45%, #162257 100%);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: var(--shadow-blue);
}

.d-card h3 {
  color: var(--ink);
  font-size: var(--text-h3);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.04em;
}

.d-card > p {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: var(--text-small);
  line-height: 1.7;
}

.d-card ul {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.d-card li {
  position: relative;
  padding-left: 14px;
  color: var(--ink-2);
  font-size: var(--text-small);
  line-height: 1.55;
}

.d-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.d-note {
  margin-top: 18px;
  color: var(--ink-3);
  font-size: var(--text-xs);
  line-height: 1.6;
}

/* 세 가지 가치 (알약 셋) */
.d-values {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.d-values li {
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.d-values li b {
  color: var(--brand);
}

/* ---------- 비용 표 ---------- */
.d-price {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.d-price > div {
  padding: 24px 20px;
  border-radius: 22px;
  background: linear-gradient(150deg, #22357f 0%, #162257 70%, #0b1233 100%);
  color: var(--white);
}

.d-price dt {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-small);
  font-weight: 600;
}

.d-price dd {
  margin-top: 8px;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.d-price dd small {
  display: block;
  margin-top: 4px;
  color: var(--periwinkle);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0;
}

@media (max-width: 900px) {
  .d-price {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 진행 단계 ---------- */
.d-steps {
  display: grid;
  gap: 0;
  max-width: 820px;
  counter-reset: d-step;
}

.d-step {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  column-gap: 18px;
  padding-bottom: 26px;
}

/* 단계 사이를 잇는 세로선 */
.d-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 52px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--periwinkle), rgba(199, 206, 230, 0.2));
}

.d-step-no {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--brand);
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.d-step h3 {
  padding-top: 6px;
  color: var(--ink);
  font-size: var(--text-h3);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.d-step p {
  margin-top: 6px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ---------- 보장(환불) 패널 ---------- */
.d-guarantee {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: clamp(2rem, 1.4rem + 3vw, 3.5rem);
  border-radius: clamp(28px, 1.2rem + 1.6vw, 40px);
  background:
    radial-gradient(circle at 100% 0%, rgba(140, 156, 214, 0.45) 0%, rgba(140, 156, 214, 0) 45%),
    linear-gradient(130deg, #2a49b8 0%, #1f3484 45%, #162257 80%, #0b1233 100%);
  color: var(--white);
  overflow: hidden;
}

.d-guarantee .label-en {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

.d-guarantee h3 {
  margin-top: 12px;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.375rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.05em;
}

.d-guarantee h3 em {
  font-style: normal;
  color: #f1d48b;
}

.d-guarantee p {
  margin-top: 14px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.d-guarantee img {
  width: clamp(120px, 14vw, 180px);
  filter: drop-shadow(0 24px 30px rgba(3, 8, 40, 0.45));
}

@media (max-width: 720px) {
  .d-guarantee {
    grid-template-columns: minmax(0, 1fr);
  }

  .d-guarantee img {
    order: -1;
    width: 112px;
  }
}

/* ---------- 자주 묻는 질문 ---------- */
.d-faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.d-faq details {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  transition: box-shadow var(--duration-normal) ease;
}

.d-faq details[open] {
  box-shadow: 0 14px 34px rgba(28, 40, 96, 0.08);
}

.d-faq summary {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 20px 56px 20px 22px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.d-faq summary::-webkit-details-marker {
  display: none;
}

.d-faq summary::before {
  content: 'Q';
  flex: none;
  color: var(--brand);
  font-weight: 800;
}

.d-faq summary::after {
  content: '';
  position: absolute;
  right: 24px;
  top: 26px;
  width: 9px;
  height: 9px;
  border: solid var(--ink-3);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.d-faq details[open] summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}

.d-faq details > p {
  display: flex;
  gap: 12px;
  padding: 0 22px 22px;
  color: var(--ink-2);
  line-height: 1.7;
}

.d-faq details > p::before {
  content: 'A';
  flex: none;
  color: var(--ink-3);
  font-weight: 800;
}

/* ---------- 신청서 ---------- */
.d-apply-box {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.d-apply-head {
  position: sticky;
  top: 110px;
}

.d-apply-form {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(28, 40, 96, 0.08);
}

.d-apply-form .field:first-of-type {
  margin-top: 0;
}

.d-apply-form .field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}

.d-apply-form .input {
  background: #f1f4fa;
}

.d-apply-form .chip span {
  min-height: 42px;
  padding: 0 14px;
  font-size: var(--text-small);
}

.d-consent details {
  margin: 8px 0 0 32px;
  color: var(--ink-2);
  font-size: var(--text-xs);
}

.d-consent summary {
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

.d-consent dl {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f4f8;
  line-height: 1.6;
}

.d-consent dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 8px;
  padding: 2px 0;
}

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

.d-apply-form .btn-block {
  margin-top: 24px;
}

@media (max-width: 900px) {
  .d-apply-box {
    grid-template-columns: minmax(0, 1fr);
  }

  .d-apply-head {
    position: static;
  }
}

@media (max-width: 560px) {
  .d-apply-form .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 마지막 화면 ---------- */
.d-closing {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 1.6rem + 4vw, 5rem) clamp(1.5rem, 1rem + 4vw, 5rem);
  border-radius: clamp(28px, 1.2rem + 1.6vw, 40px);
  background:
    radial-gradient(circle at 0% 100%, rgba(140, 156, 214, 0.35) 0%, rgba(140, 156, 214, 0) 40%),
    linear-gradient(140deg, #22357f 0%, #162257 55%, #0b1233 100%);
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.d-closing .label-en {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
}

.d-closing h2 {
  margin-top: 14px;
  font-size: clamp(1.625rem, 1.15rem + 2vw, 2.625rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.05em;
}

.d-closing p {
  max-width: 640px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
}

.d-closing p strong {
  color: var(--white);
}

.d-closing .d-sign {
  margin-top: 24px;
  color: var(--periwinkle);
  font-weight: 700;
}

.d-closing .btn {
  margin-top: 32px;
}

/* ---------- 아래 고정 신청 바 ---------- */
.d-bar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 90;
  width: min(100% - 24px, 520px);
  transform: translate(-50%, calc(100% + 40px));
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.d-bar.is-shown {
  transform: translate(-50%, 0);
}

.d-bar .in {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 1px var(--line), 0 16px 44px rgba(28, 40, 96, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.d-bar .call {
  display: grid;
  place-items: center;
  min-width: 72px;
  border-radius: var(--radius-pill);
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 700;
}

.d-bar .btn {
  flex: 1;
  min-height: 52px;
}

.d-page .site-footer {
  padding-bottom: 130px;
}
