/* ═══════════════════════════════════════════════════════════
   GALLERY HERO — Curtain Reveal + Hover Expand Hybrid
   ═══════════════════════════════════════════════════════════ */

.page-gallery-landing {
  background: #f1ede6 url("./assets/gallery-01.webp") center top / cover no-repeat !important;
  color: #fff;
  font-family: var(--font--primary);
}

html:has(body.page-gallery-landing) {
  background: #f1ede6 url("./assets/gallery-01.webp") center top / cover no-repeat;
}

.page-gallery-landing .site-header-prd,
.page-gallery-landing .site-header-prd.is-scrolled {
  background: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.page-gallery-landing .site-header-prd .brand-logo img {
  filter: none !important;
  mix-blend-mode: normal !important;
}

.page-gallery-landing main {
  background: #f1ede6 url("./assets/gallery-01.webp") center top / cover no-repeat;
}

/* ── 스크롤 공간: pin 구간 ── */
.gh {
  position: relative;
  width: 100%;
  height: 300vh;
  background: #f1ede6 url("./assets/gallery-01.webp") center top / cover no-repeat;
}

/* ── 고정 뷰포트 ── */
.gh__viewport {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  background: #f1ede6 url("./assets/gallery-01.webp") center center / cover no-repeat;
}

/* ══════════════════════════════
   Phase 1: 풀스크린
   ══════════════════════════════ */
.gh__full {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #f1ede6 url("./assets/gallery-01.webp") center center / cover no-repeat;
  -webkit-clip-path: inset(0 0 0 0);
  clip-path: inset(0 0 0 0);
}

.gh__full-img {
  position: absolute;
  inset: 0;
  background: #f1ede6 url("./assets/gallery-01.webp") center center / cover no-repeat;
}

.gh__interior-reveal {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  background: #f1ede6 url("./assets/gallery-03.webp") right center / cover no-repeat;
  -webkit-clip-path: inset(0 0 0 100%);
  clip-path: inset(0 0 0 100%);
  pointer-events: none;
}

.gh__interior-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}

.gh__interior-reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.16) 0%,
    rgba(0, 0, 0, 0.04) 45%,
    rgba(0, 0, 0, 0) 100%
  );
}

.gh__full-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh__full::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.34) 0%,
    rgba(0, 0, 0, 0.12) 45%,
    rgba(0, 0, 0, 0.02) 100%
  );
  z-index: 1;
}

.gh__full-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 4rem calc(3.5rem + var(--safe-right)) calc(4rem + var(--safe-bottom)) calc(3.5rem + var(--safe-left));
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.gh__full-title {
  font-family: var(--font--primary);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.gh__full-sub {
  font-family: var(--font--primary);
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.8;
  max-width: min(100%, 34rem);
}

/* 스크롤 안내 */
.gh__scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 2.5rem;
  gap: 0.6rem;
}

.gh__scroll-cue span {
  font-family: var(--font--tertiary);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.gh__scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.gh__scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  animation: ghScrollPulse 2s ease-in-out infinite;
}

@keyframes ghScrollPulse {
  0% {
    top: -100%;
  }

  50%,
  100% {
    top: 100%;
  }
}

/* ══════════════════════════════
   Phase 2: 좌우 분할 패널
   ══════════════════════════════ */
.gh__split {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 4;
}

/* 패널 공통 */
.gh__panel {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  -webkit-clip-path: inset(0 0 0 0);
  clip-path: inset(0 0 0 0);
}

.gh__panel--left {
  flex: 1 1 100%;
  background: #f1ede6 url("./assets/gallery-02.webp") 18% center / cover no-repeat;
}

.gh__panel--right {
  flex: 1 1 0%;
  background: #f1ede6 url("./assets/gallery-03.webp") center center / cover no-repeat;
  -webkit-clip-path: inset(0 0 0 100%);
  clip-path: inset(0 0 0 100%);
}

/* 패널 이미지 */
.gh__panel-img {
  position: absolute;
  inset: 0;
  background: inherit;
}

.gh__panel-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.gh__panel--left .gh__panel-img img {
  object-position: 18% center;
}

/* 패널 오버레이 */
.gh__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.1) 48%,
    rgba(0, 0, 0, 0.02) 100%
  );
  transition: background 0.5s ease;
}

/* 패널 텍스트 */
.gh__panel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 3rem calc(2.5rem + var(--safe-right)) calc(3rem + var(--safe-bottom)) calc(2.5rem + var(--safe-left));
  opacity: 0;
  visibility: hidden;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.gh__eyebrow {
  font-family: var(--font--primary);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  opacity: 1;
  margin-bottom: 0.7rem;
}

.gh__panel-title {
  font-family: var(--font--primary);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.gh__panel-desc {
  font-family: var(--font--primary);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.94);
  opacity: 1;
  max-width: 30rem;
}

/* CTA */
.gh__panel-cta {
  position: absolute;
  right: calc(2.5rem + var(--safe-right));
  bottom: calc(3rem + var(--safe-bottom));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.gh__panel-cta span {
  font-family: var(--font--primary);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.gh__panel-cta svg {
  width: 16px;
  height: 16px;
}

/* 구분선 */
.gh__divider {
  position: absolute;
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition:
    left 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.35s ease;
}

.gh__split.is-left-hover .gh__divider {
  left: 68%;
}

.gh__split.is-right-hover .gh__divider {
  left: 32%;
}

/* ══════════════════════════════
   Phase 2 완료 후: 호버 확대
   ══════════════════════════════ */
.gh--phase2 .gh__panel:hover .gh__panel-img img {
  transform: scale(1.06);
}

.gh--phase2 .gh__panel:hover::before {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.06) 45%,
    rgba(0, 0, 0, 0.01) 100%
  );
}

.gh--phase2 .gh__panel:hover .gh__panel-cta {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════
   Responsive
   ══════════════════════════════ */
@media (max-width: 1024px) {
  .gh__full-overlay {
    padding: 3rem calc(2rem + var(--safe-right)) calc(3rem + var(--safe-bottom)) calc(2rem + var(--safe-left));
  }

  .gh__panel-content {
    padding: 2.4rem calc(1.75rem + var(--safe-right)) calc(2.4rem + var(--safe-bottom)) calc(1.75rem + var(--safe-left));
  }

  .gh__panel-cta {
    right: calc(1.75rem + var(--safe-right));
    bottom: calc(2.25rem + var(--safe-bottom));
  }

  .gh__full-sub br,
  .gh__panel-desc br {
    display: none;
  }
}

@media (max-width: 768px) {
  .gh {
    height: 250vh;
  }

  .gh__full-overlay {
    padding: 2.5rem calc(1.5rem + var(--safe-right)) calc(2.5rem + var(--safe-bottom)) calc(1.5rem + var(--safe-left));
  }

  .gh__full-title {
    font-size: 1.8rem;
  }

  .gh__split {
    flex-direction: column;
  }

  .gh__panel--left {
    flex: 1 1 50%;
  }

  .gh__panel--right {
    flex: 1 1 50%;
    clip-path: inset(100% 0 0 0);
  }

  .gh__interior-reveal {
    clip-path: inset(100% 0 0 0);
  }

  .gh__panel-content {
    padding: 2rem calc(1.5rem + var(--safe-right)) calc(2rem + var(--safe-bottom)) calc(1.5rem + var(--safe-left));
  }

  .gh__panel-cta {
    right: calc(1.5rem + var(--safe-right));
    bottom: calc(2rem + var(--safe-bottom));
  }

  .gh--phase2 .gh__panel-cta {
    opacity: 1;
    transform: none;
  }

  .gh__divider {
    left: 8%;
    right: 8%;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 1px;
    transform: translateY(-50%);
  }}

@media (max-width: 480px) {
  .gh__panel-title {
    font-size: 1.3rem;
  }}

/* Mobile gallery resolved transition */
@media (max-width: 768px) {
  .gh.gh--mobile-fade-split {
    height: 145vh;
    height: 145svh;
    height: 145dvh;
    background: #f1ede6 url("./assets/gallery-01.webp") center center / cover no-repeat;
  }

  .gh.gh--mobile-fade-split .gh__viewport {
    position: sticky;
    top: 0;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
    min-height: 100svh !important;
    overflow: hidden;
    contain: layout paint;
    background: #f1ede6 url("./assets/gallery-01.webp") center center / cover no-repeat !important;
  }

  .gh.gh--mobile-fade-split .gh__full,
  .gh.gh--mobile-fade-split .gh__split,
  .gh.gh--mobile-fade-split .gh__interior-reveal {
    top: 0 !important;
    height: 100vh !important;
    height: 100svh !important;
    height: 100dvh !important;
  }

  .gh.gh--mobile-fade-split .gh__full {
    z-index: 5;
    pointer-events: none;
  }

  .gh.gh--mobile-fade-split .gh__split {
    z-index: 4;
    flex-direction: column;
    will-change: opacity;
  }

  .gh.gh--mobile-fade-split.gh--phase2 .gh__full {
    z-index: 1;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .gh.gh--mobile-fade-split.gh--phase2 .gh__split {
    z-index: 6;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
  }

  .gh.gh--mobile-fade-split:not(.gh--phase2) .gh__split {
    pointer-events: none;
  }

  .gh.gh--mobile-fade-split .gh__panel,
  .gh.gh--mobile-fade-split .gh__panel--left,
  .gh.gh--mobile-fade-split .gh__panel--right {
    flex: 0 0 50% !important;
    width: 100%;
    height: 50% !important;
    min-height: 0 !important;
    -webkit-clip-path: inset(0 0 0 0) !important;
    clip-path: inset(0 0 0 0) !important;
  }

  .gh.gh--mobile-fade-split .gh__divider {
    left: 0;
    right: 0;
    top: 50% !important;
    bottom: auto;
    width: 100%;
    height: 1px;
    transform: none;
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.18);
  }

  .gh.gh--mobile-fade-split .gh__full-img img,
  .gh.gh--mobile-fade-split .gh__panel-img img,
  .gh.gh--mobile-fade-split .gh__interior-reveal img {
    transform: none !important;
    transition: opacity 0.36s ease !important;
    filter: none;
    will-change: auto !important;
  }

  .gh.gh--mobile-fade-split .gh__panel::before {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.18) 0%,
      rgba(0, 0, 0, 0.06) 42%,
      rgba(0, 0, 0, 0) 100%
    ) !important;
  }

  .gh.gh--mobile-fade-split .gh__panel-content {
    left: 0;
    right: 0;
    bottom: calc(5.65rem + var(--safe-bottom));
    padding: 0 calc(1.35rem + var(--safe-right)) 0 calc(1.35rem + var(--safe-left));
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  .gh.gh--mobile-fade-split .gh__eyebrow {
    margin-bottom: 0.55rem;
    font-size: 0.66rem;
    letter-spacing: 0.28em;
  }

  .gh.gh--mobile-fade-split .gh__panel-title {
    margin-bottom: 0.66rem;
    font-size: clamp(1.22rem, 5.8vw, 1.55rem);
    line-height: 1.18;
  }

  .gh.gh--mobile-fade-split .gh__panel-desc,
  .gh.gh--mobile-fade-split .gh__panel-spec {
    max-width: min(27rem, calc(100vw - 2.7rem));
    margin-bottom: 0;
    font-size: 0.82rem;
    line-height: 1.62;
    font-weight: 500;
    letter-spacing: -0.02em;
    word-break: keep-all;
    overflow-wrap: normal;
    line-break: strict;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.44), 0 1px 1px rgba(0, 0, 0, 0.28);
  }

  .gh.gh--mobile-fade-split .gh__panel-cta {
    right: calc(1.2rem + var(--safe-right));
    bottom: calc(1.2rem + var(--safe-bottom));
    opacity: 1 !important;
    transform: none !important;
  }

  .gh.gh--mobile-fade-split .gh__panel-cta span {
    font-size: 0.62rem;
    letter-spacing: 0.2em;
  }

  .gh.gh--mobile-fade-split .gh__panel-cta svg {
    width: 14px;
    height: 14px;
  }
}

/* Mobile gallery no-zoom lock */
@media (max-width: 768px), (pointer: coarse) {
  .gh,
  .gh__viewport,
  .gh__full,
  .gh__full-img,
  .gh__full-img img,
  .gh__interior-reveal,
  .gh__interior-reveal img,
  .gh__split,
  .gh__panel,
  .gh__panel-img,
  .gh__panel-img img {
    transform: none !important;
    scale: none !important;
    translate: none !important;
    will-change: auto !important;
  }

  .gh__full-img img,
  .gh__interior-reveal img,
  .gh__panel-img img {
    transition-property: opacity !important;
  }

  .gh--phase2 .gh__panel:hover .gh__panel-img img {
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .gh.gh--mobile-leaving .gh__split {
    opacity: 0 !important;
    filter: blur(2px);
    transition:
      opacity 0.24s cubic-bezier(0.22, 0.86, 0.2, 1),
      filter 0.24s cubic-bezier(0.22, 0.86, 0.2, 1);
  }}