/* ============================================================
   product-intro-v2.css — /product_intro 전용 (히어로 모션 + 서비스 카드 + 상담)
   Scope: templates/product_intro.html 에서만 로드. 선택자는 모두 .pi- 프리픽스.
   기준: /price(price.css), /useGuide(guide.css)의 화이트·블랙 + #463eea.

   영역 5개 — 히어로(텍스트) / 서비스 카드 캐러셀 / 요청 선택 / 함께 만든 브랜드 / 상담.
   구 버전 static/css/product-intro.css 는 건드리지 않았다.
   ============================================================ */

.pi-page {
   --pi-brand: #463eea;
   --pi-brand-dark: #362eca;
   --pi-brand-soft: #eeedfd;
   --pi-ink: #111114;
   --pi-ink-sec: #43434a;
   --pi-ink-muted: #6f7078;
   --pi-bg: #ffffff;
   --pi-bg-soft: #f7f7f9;
   --pi-line: #e5e5ea;
   --pi-line-soft: #efeff2;
   --pi-ease: cubic-bezier(0.22, 1, 0.36, 1);
   --pi-shell: 1180px;
   --pi-gutter: 40px;

   font-family:
      Pretendard,
      'Noto Sans KR',
      system-ui,
      -apple-system,
      BlinkMacSystemFont,
      sans-serif;
   font-size: 16px;
   line-height: 1.6;
   color: var(--pi-ink);
   background: var(--pi-bg);
   -webkit-font-smoothing: antialiased;
}
.pi-page *,
.pi-page *::before,
.pi-page *::after {
   box-sizing: border-box;
}
.pi-page :where(h1, h2, h3, p, ul, li, figure, figcaption, fieldset, legend) {
   margin: 0;
   padding: 0;
}
.pi-page :where(ul) {
   list-style: none;
}
.pi-page :where(fieldset) {
   border: 0;
   min-width: 0;
}
.pi-page :where(h1, h2) {
   font-weight: 700;
   letter-spacing: -0.02em;
   word-break: keep-all;
}
.pi-page :where(p, li, span, b) {
   word-break: keep-all;
}
.pi-page :focus-visible {
   outline: 2px solid var(--pi-brand);
   outline-offset: 3px;
   border-radius: 4px;
}
.pi-shell {
   width: 100%;
   max-width: var(--pi-shell);
   margin: 0 auto;
   padding: 0 var(--pi-gutter);
}

/* ── 버튼 ─────────────────────────────────────── */
.pi-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   min-height: 48px;
   padding: 12px 26px;
   border: 1px solid transparent;
   border-radius: 999px;
   font-family: inherit;
   font-size: 15px;
   font-weight: 600;
   text-decoration: none;
   cursor: pointer;
   transition:
      background-color 0.18s var(--pi-ease),
      color 0.18s var(--pi-ease);
}
.pi-btn--primary {
   background: var(--pi-brand);
   color: #fff;
}
.pi-btn--primary:hover {
   background: var(--pi-brand-dark);
   color: #fff;
}

/* ════════ A. 첫 화면 ════════ */
.pi-hero {
   padding: clamp(40px, 5vw, 76px) 0 clamp(36px, 4vw, 60px);
}
.pi-hero h1 {
   font-size: clamp(30px, 3.6vw, 46px);
   line-height: 1.25;
   font-weight: 800;
   margin-bottom: 16px;
}
.pi-hero__text {
   width: 100%;
}
.pi-hero h1 br {
   display: none;
}
.pi-hero__desc {
   font-size: clamp(15px, 1.5vw, 18px);
   color: var(--pi-ink-muted);
   margin-bottom: 28px;
   max-width: 640px;
}

/* ════════ B. 제공 서비스 — 타이틀 카드 캐러셀 ════════
   카드 안에는 모션이 없다. 서비스명과 타이틀 문구만 항상 보인다. */
.pi-svc {
   padding: clamp(40px, 4.5vw, 68px) 0;
   border-top: 1px solid var(--pi-line);
}
.pi-svc__inner {
   position: relative;
}
.pi-svc__title {
   font-size: clamp(24px, 2.8vw, 34px);
   margin-bottom: 26px;
}

/* 캐러셀 트랙 */
.pi-cards {
   display: flex;
   gap: 20px;
   overflow-x: auto;
   overscroll-behavior-x: contain;
   scroll-snap-type: x mandatory;
   padding-inline: var(--pi-gutter);
   padding-bottom: 6px;
   scrollbar-width: none;
   -ms-overflow-style: none;
}
.pi-cards::-webkit-scrollbar {
   display: none;
}
.pi-cards:focus-visible {
   outline: 2px solid var(--pi-brand);
   outline-offset: 6px;
}
/* 마우스로 잡아끌어 넘길 수 있다 (JS가 붙었을 때만 커서를 바꾼다) */
.pi-cards.pi-drag {
   cursor: grab;
}
.pi-cards.pi-drag.is-dragging {
   cursor: grabbing;
   scroll-snap-type: none;
   user-select: none;
}
.pi-card {
   position: relative;
   flex: 0 0 31%;
   scroll-snap-align: start;
   display: flex;
   flex-direction: column;
   aspect-ratio: 4 / 3;
   padding: 26px 26px 24px;
   border-radius: 14px;
   border: 1px solid var(--pi-line);
   background: #fff;
   transition:
      border-color 0.2s var(--pi-ease),
      background-color 0.2s var(--pi-ease);
}
.pi-card:hover {
   border-color: #cfcedb;
   background: #fcfcfd;
}

/* 서비스명 — 카드에서 먼저 읽히도록 키우고 아래에 구분선을 둔다 */
.pi-tc__name {
   position: relative;
   display: block;
   padding-bottom: 14px;
   font-size: clamp(15px, 1.5vw, 17px);
   font-weight: 700;
   letter-spacing: -0.02em;
   color: var(--pi-ink);
}
.pi-tc__name::after {
   content: '';
   position: absolute;
   left: 0;
   bottom: 0;
   width: 100%;
   height: 1px;
   background: var(--pi-line);
}
/* 왼쪽 끝의 짧은 강조 선만 등장 모션을 갖는다 */
.pi-tc__name::before {
   content: '';
   position: absolute;
   left: 0;
   bottom: 0;
   z-index: 1;
   width: 34px;
   height: 1px;
   background: var(--pi-brand);
   transform: scaleX(1);
   transform-origin: left center;
}
.pi-tc__stage {
   display: flex;
   flex: 1 1 auto;
   min-height: 0;
   align-items: center;
}
.pi-tc__final {
   width: fit-content;
   max-width: 100%;
   font-size: clamp(25px, 2.7vw, 36px);
   font-weight: 800;
   line-height: 1.26;
   letter-spacing: -0.035em;
   color: var(--pi-ink);
}
.pi-tc__final em {
   font-style: normal;
   color: var(--pi-brand);
}
.pi-tc__pair {
   width: fit-content;
   max-width: 100%;
   display: flex;
   flex-direction: column;
   gap: 6px;
   font-size: clamp(25px, 2.7vw, 36px);
   font-weight: 800;
   line-height: 1.26;
   letter-spacing: -0.035em;
   color: var(--pi-ink);
}
.pi-tc__pair .pi-tc__it:last-child {
   color: var(--pi-brand);
}

/* 등장 모션 — JS가 붙고 reduced-motion 이 아닐 때만.
   카드가 처음 보일 때 한 번, 짧게. 이후에는 정지 상태를 유지한다. */
.pi-cards.pi-reveal .pi-card {
   opacity: 0;
   transform: translateY(10px);
   transition:
      opacity 0.5s var(--pi-ease),
      transform 0.5s var(--pi-ease),
      border-color 0.2s var(--pi-ease),
      background-color 0.2s var(--pi-ease);
}
.pi-cards.pi-reveal .pi-tc__name::before {
   transform: scaleX(0);
   transition: transform 0.55s var(--pi-ease) 0.18s;
}
.pi-cards.pi-reveal .pi-card.is-in {
   opacity: 1;
   transform: none;
}
.pi-cards.pi-reveal .pi-card.is-in .pi-tc__name::before {
   transform: scaleX(1);
}

/* ── 캐러셀 조작 ─────────────────────────────── */
.pi-cards__nav {
   display: flex;
   align-items: center;
   gap: 10px;
   margin-top: 16px;
}
.pi-cards__nav[hidden] {
   display: none;
}
.pi-nav__btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 40px;
   height: 40px;
   padding: 0;
   border: 1px solid var(--pi-line);
   border-radius: 50%;
   background: #fff;
   color: var(--pi-ink-sec);
   cursor: pointer;
   transition:
      border-color 0.18s var(--pi-ease),
      color 0.18s var(--pi-ease);
}
.pi-nav__btn svg {
   width: 18px;
   height: 18px;
}
.pi-nav__btn:hover:not(:disabled) {
   border-color: var(--pi-ink);
   color: var(--pi-ink);
}
.pi-nav__btn:disabled {
   opacity: 0.32;
   cursor: default;
}
.pi-nav__pos {
   font-size: 13px;
   font-weight: 600;
   color: var(--pi-ink-muted);
   font-variant-numeric: tabular-nums;
}
.pi-note {
   margin-top: 14px;
   font-size: 13px;
   color: var(--pi-ink-muted);
}
@media (min-width: 769px) {
   .pi-cards__nav {
      position: absolute;
      top: 0;
      right: var(--pi-gutter);
      margin-top: 0;
   }
   .pi-svc__title {
      padding-right: 150px;
   }
}
/* 플로팅 문의 버튼은 >=1025px 에서 우하단에 고정된다. 옆 말풍선까지 포함한
   왼쪽 끝을 기준으로 트랙의 오른쪽 끝만 당겨 카드 글자가 아래를 지나지 않게 한다.
   왼쪽 기준선은 다른 섹션과 같게 유지한다. */
@media (min-width: 1025px) {
   .pi-cards {
      margin-right: clamp(0px, calc(772px - 50vw), 178px);
   }
   .pi-cards__nav {
      right: calc(var(--pi-gutter) + clamp(0px, calc(772px - 50vw), 178px));
   }
}

/* ════════ C. 요청 선택 ════════ */
.pi-try {
   padding: clamp(40px, 4.5vw, 68px) 0;
   background: var(--pi-bg-soft);
   border-top: 1px solid var(--pi-line);
}
.pi-try__title {
   font-size: clamp(22px, 2.5vw, 30px);
   margin-bottom: 8px;
}
.pi-try__desc {
   font-size: clamp(14px, 1.4vw, 16px);
   color: var(--pi-ink-muted);
   margin-bottom: 26px;
}
.pi-pick {
   display: grid;
   grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
   gap: clamp(24px, 3vw, 44px);
   align-items: start;
}
/* 선택 목록 — 큰 카드가 아니라 구분선 목록 */
.pi-pick__list {
   display: none;
   flex-direction: column;
   border-top: 1px solid var(--pi-line);
}
.pi-pick-ready .pi-pick__list {
   display: flex;
}
.pi-pick__btn {
   position: relative;
   padding: 16px 14px 16px 16px;
   border: 0;
   border-bottom: 1px solid var(--pi-line);
   background: transparent;
   font-family: inherit;
   font-size: clamp(15px, 1.5vw, 17px);
   font-weight: 600;
   letter-spacing: -0.01em;
   color: var(--pi-ink-sec);
   text-align: left;
   cursor: pointer;
   transition:
      color 0.2s var(--pi-ease),
      background-color 0.2s var(--pi-ease);
}
.pi-pick__btn::before {
   content: '';
   position: absolute;
   left: 0;
   top: 10px;
   bottom: 10px;
   width: 2px;
   border-radius: 2px;
   background: var(--pi-brand);
   transform: scaleY(0);
   transform-origin: center;
   transition: transform 0.22s var(--pi-ease);
}
.pi-pick__btn:hover {
   color: var(--pi-ink);
}
/* 선택 상태는 색과 표시를 함께 쓴다 */
.pi-pick__btn.is-on {
   color: var(--pi-brand);
   background: #fff;
}
.pi-pick__btn.is-on::before {
   transform: scaleY(1);
}
.pi-pick__side {
   min-width: 0;
}
@media (min-width: 769px) {
   /* 요청 항목이 많아 목록이 길어지므로 안내는 스크롤을 따라 붙는다 */
   .pi-pick__side {
      position: sticky;
      top: 96px;
   }
}
.pi-pick__panels {
   min-width: 0;
}
/* JS 없을 때는 세 안내가 그대로 이어서 읽힌다 */
.pi-pick__panel + .pi-pick__panel {
   margin-top: 18px;
   padding-top: 18px;
   border-top: 1px solid var(--pi-line);
}
/* JS가 붙으면 같은 칸에 겹쳐 두어 선택해도 높이가 흔들리지 않는다 */
.pi-pick-ready .pi-pick__panels {
   display: grid;
}
.pi-pick-ready .pi-pick__panel {
   grid-area: 1 / 1;
   margin-top: 0;
   padding-top: 0;
   border-top: 0;
   opacity: 0;
   visibility: hidden;
   transition:
      opacity 0.25s var(--pi-ease),
      transform 0.25s var(--pi-ease);
   transform: translateY(4px);
}
.pi-pick-ready .pi-pick__panel.is-on {
   opacity: 1;
   visibility: visible;
   transform: translateY(0);
}
.pi-pick-ready .pi-pick__q {
   display: none;
}
.pi-pick__q {
   font-size: 15px;
   font-weight: 700;
   color: var(--pi-ink);
   margin-bottom: 8px;
}
.pi-pick__svc {
   font-size: 13px;
   font-weight: 700;
   color: var(--pi-brand);
   margin-bottom: 8px;
}
.pi-pick__lead {
   font-size: clamp(17px, 1.8vw, 22px);
   font-weight: 700;
   line-height: 1.42;
   letter-spacing: -0.02em;
   color: var(--pi-ink);
}
.pi-pick__cond {
   margin-top: 10px;
   font-size: 13px;
   line-height: 1.55;
   color: var(--pi-ink-muted);
}
.pi-pick__cta {
   margin-top: 22px;
}

/* ════════ D. 함께 만든 브랜드 ════════
   메인(.owf2-trust)의 카드 레이아웃을 그대로 따른다.
   4:3 카드에 배경 이미지를 덮고 아래쪽 그라데이션 위에 브랜드명을 얹는다. */
.pi-trust {
   padding: clamp(40px, 4.5vw, 68px) 0;
   border-top: 1px solid var(--pi-line);
}
.pi-trust__title {
   font-size: clamp(24px, 2.8vw, 34px);
   line-height: 1.32;
   margin-bottom: 26px;
}
.pi-trust__logos {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 14px;
}
.pi-trust__logo {
   position: relative;
   display: block;
   aspect-ratio: 4 / 3;
   border-radius: 16px;
   overflow: hidden;
   border: 1px solid var(--pi-line);
   background-size: cover;
   background-position: center;
   text-decoration: none;
}
.pi-trust__logo::before {
   content: '';
   position: absolute;
   inset: 0;
   background: linear-gradient(to bottom, rgba(17, 17, 20, 0) 40%, rgba(17, 17, 20, 0.72) 100%);
   transition: background 0.3s var(--pi-ease);
}
.pi-trust__logo:hover::before {
   background: linear-gradient(to bottom, rgba(17, 17, 20, 0.05) 30%, rgba(17, 17, 20, 0.82) 100%);
}
.pi-trust__logo-name {
   position: absolute;
   left: 16px;
   bottom: 14px;
   z-index: 1;
   color: #fff;
   font-size: 14px;
   font-weight: 700;
}
.pi-trust__more {
   margin-top: 24px;
}
.pi-trust__more a {
   display: inline-flex;
   align-items: center;
   min-height: 48px;
   padding: 0 24px;
   border: 1px solid var(--pi-line);
   border-radius: 999px;
   background: #fff;
   font-size: 15px;
   font-weight: 600;
   color: var(--pi-ink-sec);
   text-decoration: none;
   transition:
      border-color 0.2s var(--pi-ease),
      color 0.2s var(--pi-ease);
}
.pi-trust__more a:hover {
   border-color: var(--pi-ink);
   color: var(--pi-ink);
}
@media (min-width: 768px) {
   .pi-trust__logos {
      grid-template-columns: repeat(4, 1fr);
   }
}

/* ════════ D. 마지막 안내 ════════ */
.pi-final {
   padding: clamp(44px, 5vw, 76px) 0 clamp(64px, 7vw, 104px);
   border-top: 1px solid var(--pi-line);
}
.pi-final h2 {
   font-size: clamp(22px, 2.5vw, 30px);
   margin-bottom: 10px;
}
.pi-final__desc {
   font-size: clamp(14px, 1.4vw, 16px);
   color: var(--pi-ink-muted);
   margin-bottom: 24px;
}
.pi-final__links {
   display: flex;
   flex-wrap: wrap;
   gap: 8px 22px;
   margin-top: 18px;
}
.pi-final__links a {
   display: inline-flex;
   align-items: center;
   min-height: 44px;
   font-size: 15px;
   font-weight: 600;
   color: var(--pi-ink-sec);
   text-decoration: underline;
   text-underline-offset: 4px;
}
.pi-final__links a:hover {
   color: var(--pi-brand);
}

/* ════════ 반응형 ════════ */
@media (max-width: 1080px) {
   .pi-page {
      --pi-gutter: 28px;
   }
}

/* base.css의 @media (max-width: 768px)에서 #layoutSidenav_content 상단 여백이
   0이 되는데 공통 헤더(.top-nav)는 fixed 72px다. /price · /useGuide 와 같은
   방식으로 이 지점부터 상단 여백을 직접 확보한다. */
@media (max-width: 768px) {
   .pi-page {
      --pi-gutter: 20px;
   }
   .pi-hero {
      padding-top: calc(72px + 30px);
   }

   /* 요청 선택: 목록 아래에 안내 */
   .pi-pick {
      grid-template-columns: minmax(0, 1fr);
      gap: 20px;
   }

   /* 서비스 카드: 한 장 + 다음 카드가 살짝 보이게 */
   .pi-cards {
      gap: 12px;
   }
   .pi-card {
      flex: 0 0 87%;
      aspect-ratio: 5 / 4;
      padding: 22px 22px 20px;
   }

   .pi-trust__logos {
      gap: 10px;
   }
   .pi-trust__logo-name {
      left: 10px;
      bottom: 9px;
      font-size: 12px;
   }

   /* 플로팅 문의 버튼(우하단 20px)과 겹치지 않도록 마지막 CTA에 여백 */
   .pi-final {
      padding-bottom: 116px;
   }
}

/* ════════ reduced-motion: 결과 상태 고정 ════════ */
@media (prefers-reduced-motion: reduce) {
   .pi-page *,
   .pi-page *::before,
   .pi-page *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
   }
}
