/* ========================================
   pillow-tech-hero
   ======================================== */

.pillow-tech-hero {
  --hero-end-height: 437px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.pillow-tech-hero__frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.pillow-tech-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center center;
  will-change: transform;
}

.pillow-tech-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: #000;
  opacity: 0;
  pointer-events: none;
}

.pillow-tech-hero__container {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillow-tech-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem; /* 14px */
  text-align: center;
  opacity: 0;
}

.pillow-tech-hero__title,
.pillow-tech-hero__desc {
  margin: 0;
  color: #fff;
  line-height: 150%;
}

@media (min-width: 48rem) and (max-width: 63.9375rem) {
  .pillow-tech-hero {
    --hero-end-height: 400px;
  }

  .pillow-tech-hero__title {
    font-size: 3rem; /* 48px */
    line-height: 100%;
  }

  .pillow-tech-hero__desc {
    font-size: 1.25rem; /* 20px */
  }
}

@media (max-width: 47.9375rem) {
  .pillow-tech-hero {
    --hero-end-height: 244px;
  }

  .pillow-tech-hero__title {
    font-size: 1.875rem; /* 30px */
    line-height: 100%;
  }

  .pillow-tech-hero__desc {
    display: none;
  }
}

/* ========================================
   pillow-tech-sleep-position
   ======================================== */

.pillow-tech-sleep-position {
  width: 100%;
  height: 67.5rem; /* 1080px */
  display: flex;
  align-items: center;
  background-color: var(--color-brand-light-2);
}

.pillow-tech-sleep-position__container {
  display: flex;
  flex-direction: column;
  gap: 3.125rem; /* 50px */
}

.pillow-tech-sleep-position__panel {
  display: grid;
  grid-template-columns: 6fr 4fr;
  grid-template-rows: 1fr auto;
  height: 36.625rem; /* 586px */
  border-radius: 1.875rem; /* 30px */
  overflow: hidden;
}

.pillow-tech-sleep-position__media {
  position: relative;
  grid-column: 1;
  grid-row: 1 / -1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.pillow-tech-sleep-position__content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 3.75rem 3.75rem 0; /* 60px */
  background-color: var(--color-white);
}

.pillow-tech-sleep-position__tabs {
  grid-column: 2;
  grid-row: 2;
  gap: 0.9375rem; /* 15px */
  padding: 1.25rem 3.75rem 3.75rem; /* 20px 60px 60px */
  background-color: var(--color-white);
}

.pillow-tech-sleep-position__title-mobile,
.pillow-tech-sleep-position__sub-title-mobile,
.pillow-tech-sleep-position__tab-label-mobile {
  display: none;
}

.pillow-tech-sleep-position__image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.pillow-tech-sleep-position__image-reveal {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  will-change: transform;
  pointer-events: none;
}

.pillow-tech-sleep-position__text {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 0;
}

.pillow-tech-sleep-position__panel-item {
  grid-area: 1 / 1;
  margin: 0;
  will-change: opacity, transform;
}

/* UA [hidden]{display:none} 덮어써서 페이드 전환이 보이게 함 */
.pillow-tech-sleep-position__panel-item[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.pillow-tech-sleep-position__panel-title {
  margin: 0;
  font-family: var(--font-suit);
  font-weight: 700;
  font-size: var(--fs-subtitle-md); /* 28px */
  line-height: 130%;
  color: var(--color-brand-dark);
}

.pillow-tech-sleep-position__panel-desc {
  margin: 1.25rem 0 0; /* 20px */
  font-family: var(--font-suit);
  font-weight: 300;
  font-size: var(--fs-body-03); /* 20px */
  line-height: 130%;
  color: var(--color-brand-dark);
}

.pillow-tech-sleep-position__tabs .btn-tab {
  position: relative;
  z-index: 1;
  font-family: var(--font-suit);
  font-weight: 500;
}

.pillow-tech-sleep-position__tabs .btn-tab:not(.is-active):hover {
  background-color: var(--color-white);
}

@media (max-width: 47.9375rem) {
  .pillow-tech-sleep-position__title-pc,
  .pillow-tech-sleep-position__sub-title-pc,
  .pillow-tech-sleep-position__tab-label-pc {
    display: none;
  }

  .pillow-tech-sleep-position__title-mobile,
  .pillow-tech-sleep-position__sub-title-mobile,
  .pillow-tech-sleep-position__tab-label-mobile {
    display: inline;
  }
}

@media (max-width: 63.9375rem) {
  .pillow-tech-sleep-position {
    height: auto;
    align-items: stretch;
    padding-top: 5rem; /* 80px */
    padding-bottom: 5rem; /* 80px */
  }

  .pillow-tech-sleep-position__heading .heading-3tier__desc {
    display: none;
  }

  .pillow-tech-sleep-position__panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    border-radius: 0;
    overflow: visible;
  }

  .pillow-tech-sleep-position__tabs {
    order: 1;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 0.5rem; /* 8px — mobile */
    margin: 0 0 0.875rem; /* 14px — 버튼 ↔ 이미지 (mobile) */
    padding: 0;
    background-color: transparent;
  }

  .pillow-tech-sleep-position__tabs .btn-tab {
    padding: 0.375rem 0.625rem; /* 6px 10px — mobile */
    font-weight: 500;
  }

  .pillow-tech-sleep-position__media {
    order: 2;
    flex: none;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 1.875rem; /* 30px */
  }

  .pillow-tech-sleep-position__content {
    order: 3;
    grid-column: auto;
    grid-row: auto;
    margin-top: 1.25rem; /* 20px — 이미지 ↔ 설명 */
    padding: 0;
    background-color: transparent;
  }

  .pillow-tech-sleep-position__panel-title {
    font-size: 1.375rem; /* 22px — mobile */
  }

  .pillow-tech-sleep-position__panel-desc {
    font-size: 1rem; /* 16px */
  }
}

@media (min-width: 48rem) and (max-width: 63.9375rem) {
  .pillow-tech-sleep-position__container {
    gap: 1.875rem; /* 30px — 3단 타이틀 ↔ 버튼 */
  }

  .pillow-tech-sleep-position__tabs {
    gap: 0.625rem; /* 10px */
    margin-bottom: 1.25rem; /* 20px — 버튼 ↔ 이미지 */
  }

  .pillow-tech-sleep-position__tabs .btn-tab {
    padding: 0.5rem 1rem; /* 8px 16px */
  }

  .pillow-tech-sleep-position__panel-title {
    font-size: 1.5rem; /* 24px — tablet 기존 */
  }
}

@media (max-width: 47.9375rem) {
  .pillow-tech-sleep-position__container {
    gap: 1.25rem; /* 20px — 3단 타이틀 ↔ 버튼 */
  }
}


/* ========================================
   pillow-tech-structure
   ======================================== */

.pillow-tech-structure {
  width: 100%;
  height: 100vh;
  background-color: var(--color-white);
}

.pillow-tech-structure .scroll-feature__hotspot {
  left: 32%;
  top: 62%;
}

@media (min-width: 48rem) and (max-width: 63.9375rem) {
  .pillow-tech-structure:has(> .scroll-feature) {
    height: 100vh;
  }

  .pillow-tech-structure .scroll-feature {
    height: 100%;
    min-height: 100vh;
    justify-content: center;
    padding-block: 2.5rem; /* 40px — pin 뷰포트 맞춤 */
    box-sizing: border-box;
  }

  .pillow-tech-structure .scroll-feature__media,
  .pillow-tech-structure .scroll-feature--media-end .scroll-feature__media {
    height: 40vh;
    flex: 0 0 40vh;
  }
}

@media (max-width: 47.9375rem) {
  .pillow-tech-structure,
  .pillow-tech-structure:has(> .scroll-feature) {
    height: auto;
    min-height: 0;
  }

  .pillow-tech-structure .scroll-feature {
    height: auto;
    min-height: 0;
    justify-content: flex-start;
    touch-action: pan-y;
    box-sizing: border-box;
  }

  .pillow-tech-structure .scroll-feature__feature-desc {
    max-width: 22.5rem; /* 360px */
    word-break: keep-all;
    text-wrap: balance;
  }
}

/* ========================================
   pillow-tech-zones
   ======================================== */

.pillow-tech-zones {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-brand-light-2);
}

.pillow-tech-zones__media {
  position: relative;
  width: 68.75rem; /* 1100px */
  max-width: 100%;
  line-height: 0;
}

.pillow-tech-zones__pillow,
.pillow-tech-zones__pillow-in {
  display: block;
  width: 100%;
  height: auto;
}

.pillow-tech-zones__pillow-in {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  will-change: opacity;
}

.pillow-tech-zones__callout {
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pillow-tech-zones__callout--center {
  left: 50%;
  top: 40%;
}

.pillow-tech-zones__callout--right {
  left: 78%;
  top: 48%;
}

.pillow-tech-zones__callout--left {
  left: 22%;
  top: 75%;
}

.pillow-tech-zones__callout-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.25rem; /* 20px */
  height: 1.25rem;
  border-radius: 50%;
  background-color: var(--color-brand-dark);
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: opacity;
}

.pillow-tech-zones__callout-line {
  position: absolute;
  left: 0;
  width: 1px;
  height: 12.5rem; /* 200px — center */
  background-color: var(--color-brand-dark);
  will-change: transform;
}

.pillow-tech-zones__callout--left .pillow-tech-zones__callout-line,
.pillow-tech-zones__callout--right .pillow-tech-zones__callout-line {
  height: 9.375rem; /* 150px */
}

.pillow-tech-zones__callout--up .pillow-tech-zones__callout-line {
  bottom: 0.625rem; /* 10px — from dot center to top edge */
  transform-origin: bottom center;
}

.pillow-tech-zones__callout--down .pillow-tech-zones__callout-line {
  top: 0.625rem; /* 10px — from dot center to bottom edge */
  transform-origin: top center;
}

.pillow-tech-zones__callout-text {
  position: absolute;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: max-content;
  text-align: center;
  transform: translateX(-50%);
  line-height: 0;
}

.pillow-tech-zones__callout--up .pillow-tech-zones__callout-text {
  /* dot radius 10 + line 200 + gap 10 */
  bottom: calc(0.625rem + 12.5rem + 0.625rem);
}

.pillow-tech-zones__callout--down .pillow-tech-zones__callout-text {
  /* dot radius 10 + line 200 + gap 10 */
  top: calc(0.625rem + 12.5rem + 0.625rem);
}

.pillow-tech-zones__callout--right.pillow-tech-zones__callout--up .pillow-tech-zones__callout-text {
  /* dot radius 10 + line 150 + gap 10 */
  bottom: calc(0.625rem + 9.375rem + 0.625rem);
}

.pillow-tech-zones__callout--left.pillow-tech-zones__callout--down .pillow-tech-zones__callout-text {
  /* dot radius 10 + line 150 + gap 10 */
  top: calc(0.625rem + 9.375rem + 0.625rem);
}

.pillow-tech-zones__callout-name,
.pillow-tech-zones__callout-desc {
  margin: 0;
  font-family: var(--font-suit);
  font-size: var(--fs-body-02); /* 22px */
  line-height: 150%;
  color: var(--color-brand-dark);
}

.pillow-tech-zones__callout-name {
  font-weight: var(--fw-suit-bold); /* 600 */
}

.pillow-tech-zones__callout-desc {
  font-weight: 400;
  white-space: nowrap;
}

.pillow-tech-zones__char {
  display: inline-block;
  will-change: transform, opacity;
}

.pillow-tech-zones__footer {
  display: none;
}

@media (max-width: 63.9375rem) {
  .pillow-tech-zones {
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
    padding: 5rem var(--grid-margin); /* 80px */
    box-sizing: border-box;
    touch-action: pan-y;
  }

  .pillow-tech-zones__media {
    width: 100%;
  }

  .pillow-tech-zones__callout-line,
  .pillow-tech-zones__callout-text {
    display: none;
  }

  .pillow-tech-zones__callout-dot {
    opacity: 0;
  }

  .pillow-tech-zones__marker {
    z-index: 3;
    pointer-events: none;
    will-change: left, top, opacity;
  }

  .pillow-tech-zones__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 2.5rem; /* 40px */
    opacity: 0;
    pointer-events: none;
  }

  .pillow-tech-zones.is-ready .pillow-tech-zones__footer {
    opacity: 1;
    pointer-events: auto;
  }

  .pillow-tech-zones__caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem; /* 6px */
    text-align: center;
  }

  .pillow-tech-zones__caption-name,
  .pillow-tech-zones__caption-desc {
    margin: 0;
    font-family: var(--font-suit);
    line-height: 130%;
    color: var(--color-brand-dark);
  }

  .pillow-tech-zones__caption-name {
    font-weight: var(--fw-suit-bold); /* 600 */
  }

  .pillow-tech-zones__caption-desc {
    font-weight: 400;
  }

  .pillow-tech-zones__dots {
    margin-top: 1.25rem; /* 20px */
  }
}

@media (min-width: 48rem) and (max-width: 63.9375rem) {
  .pillow-tech-zones__callout-dot {
    width: 1.875rem; /* 30px */
    height: 1.875rem; /* 30px */
  }

  .pillow-tech-zones__caption-name {
    font-size: 1.5rem; /* 24px */
  }

  .pillow-tech-zones__caption-desc {
    font-size: 1.125rem; /* 18px */
  }
}

@media (max-width: 47.9375rem) {

  .pillow-tech-zones {
    height: 100%;
    justify-content: center;
    padding-inline: var(--grid-margin);
    box-sizing: border-box;
  }
  
  .pillow-tech-zones__callout-dot {
    width: 0.625rem; /* 10px */
    height: 0.625rem; /* 10px */
  }

  .pillow-tech-zones__caption-name {
    font-size: 1.25rem; /* 20px */
  }

  .pillow-tech-zones__caption-desc {
    font-size: 1rem; /* 16px */
  }
}

/* ========================================
   pillow-tech-products / pillow-tech-cta
   (레이아웃은 product-compare / section-cta 공통)
   ======================================== */

.pillow-tech-products {
  position: relative;
  z-index: 1;
}

.pillow-tech-products__title-mobile {
  display: none;
}

@media (max-width: 47.9375rem) {
  .pillow-tech-products__title-pc {
    display: none;
  }

  .pillow-tech-products__title-mobile {
    display: inline;
  }
}
