/* ── WORK INDEX — 풀스크린 가로 캐러셀 (Design Canada 스타일) ── */

/* body padding-top:68px → nav.css 에서 처리. 이 페이지는 사진이 화면 맨 위까지 올라가고
   네비/헤더/필터가 그 위에 투명하게 뜨는 구조라 오프셋을 없앤다. */
html body { padding-top: 0 !important; background: #0a0a0a; }

/* ── 페이지 래퍼 ─────────────────────────────────────────── */
.wk-page { position: relative; }

/* 사진 위쪽 가독성을 위한 상단 스크림(그라데이션), 헤더·필터 뒤에 깔림 */
.wk-top-scrim {
    position: fixed; top: 0; left: 0; right: 0; height: 220px;
    z-index: 900;
    background: linear-gradient(to bottom, rgba(0,0,0,.7) 0%, rgba(0,0,0,.25) 60%, transparent 100%);
    pointer-events: none;
}

/* 첫 로드 시: 검은 화면 위에 라인이 위→아래로 다 그려진 뒤 콘텐츠가 드러남 (designcanada.com 참고) */
.wk-intro-overlay {
    position: fixed; inset: 0;
    background: #000;
    z-index: 800;
    animation: wk-intro-overlay-fade .5s ease 1.3s forwards;
}
@keyframes wk-intro-overlay-fade {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* 캐러셀이 마지막→처음으로 돌아갈 때 빠른 되감기 대신 블랙 페이드로 전환 */
.wk-fade-overlay {
    position: fixed; inset: 0;
    background: #000;
    z-index: 850;
    opacity: 0;
    pointer-events: none;
    transition: opacity .9s ease;
}
.wk-fade-overlay.show { opacity: 1; }

.wk-intro-line {
    position: fixed; top: 0; left: 33.334vw;
    width: 2px; height: 0;
    background: rgba(255,255,255,.5);
    z-index: 801;
    pointer-events: none;
    animation: wk-intro-line-draw 1s cubic-bezier(.65,0,.35,1) .3s both,
               wk-intro-line-fade .4s ease 1.8s forwards;
}
@keyframes wk-intro-line-draw {
    from { height: 0; }
    to   { height: 100%; }
}
@keyframes wk-intro-line-fade {
    to { opacity: 0; visibility: hidden; }
}

.wk-intro-line-head {
    position: fixed; left: 33.334vw; top: 0;
    width: 8px; height: 8px;
    background: #fff;
    transform: translate(-50%, -50%);
    z-index: 802;
    pointer-events: none;
    animation: wk-intro-line-head-move 1s cubic-bezier(.65,0,.35,1) .3s both,
               wk-intro-line-fade .4s ease 1.8s forwards;
}
@keyframes wk-intro-line-head-move {
    from { top: 0; }
    to   { top: 100%; }
}

/* ── 페이지 헤더 — 첫 화면 좌측 여백(캐러셀 시작 스페이서) 안에 세로로 배치,
   스크롤해서 사진이 나오면 자연스럽게 사라짐(work.js가 opacity 계산) ── */
.wk-hero {
    position: fixed; left: 0; top: 50%; z-index: 500;
    width: 33.334vw;
    transform: translateY(-50%);
    background: transparent;
    padding: 0 2.2rem;
    transition: opacity .25s ease;
}
.wk-hero-inner {
    display: flex; flex-direction: column; align-items: flex-end; text-align: right;
    clip-path: inset(0 0 0 100%);
    animation: wk-hero-reveal .7s cubic-bezier(.65,0,.35,1) 1.3s both;
}
@keyframes wk-hero-reveal {
    from { clip-path: inset(0 0 0 100%); }
    to   { clip-path: inset(0 0 0 0); }
}
.wk-hero-label {
    display: block;
    font-size: var(--fs-12); font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #fff; opacity: .6;
    margin-bottom: .6rem;
}
.wk-hero h1 {
    font-size: clamp(1.9rem, 2.9vw, 2.5rem);
    font-weight: 800; letter-spacing: -.01em; color: #fff;
    line-height: 1.15; margin: 0 0 .9rem;
}
.wk-hero-sub {
    display: block; font-size: var(--fs-14); font-weight: 400; color: rgba(255,255,255,.65);
    line-height: 1.5; margin-bottom: 1rem;
}
.wk-count-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    color: rgba(255,255,255,.7);
    font-size: var(--fs-12); font-weight: 400;
    margin-top: .35rem;
}

/* ── 키워드 필터 사이드 패널 (우측, 메뉴 드로어 .pm-nav-drawer/.pm-dw-* 스타일 재사용) ── */
.wk-filter-panel-title {
    display: flex; align-items: center; gap: 10px;
    font-size: var(--fs-14); font-weight: 700; color: var(--text);
}
#wkFilterPanel .pm-dw-close { color: var(--text); }

/* .pm-dw-link-top 은 원래 <a>용이라 <button> 기본 스타일 리셋이 필요 */
button.pm-dw-link-top.wk-tag {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(var(--text-rgb), 0.06);
    cursor: pointer;
    font-family: 'Noto Sans KR', -apple-system, sans-serif;
}
button.pm-dw-link-top.wk-tag i { color: var(--accent-hover); }

/* ── 캐러셀 섹션 — 화면 전체(맨 위까지) 풀블리드, 헤더/네비는 위에 오버레이 ── */
.wk-carousel-section {
    position: fixed; inset: 0;
    z-index: 1;
    background: #000;
}

.wk-carousel {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    background: #000;
}
.wk-carousel::-webkit-scrollbar { display: none; }
/* 첫/마지막 슬라이드도 중앙 정렬될 수 있도록 여백 스페이서 */
.wk-carousel::before,
.wk-carousel::after {
    content: '';
    flex: 0 0 33.334vw;
}

.wk-slide {
    position: relative;
    flex: 0 0 33.334vw;
    height: 100%;
    scroll-snap-align: center;
    cursor: pointer;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,.08);
}
.wk-slide.wk-hidden { display: none; }

.wk-slide-photo {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    pointer-events: none;
    filter: grayscale(1) brightness(.42) contrast(1.05);
    transform: scale(1.0);
    transition: filter .6s ease, transform .8s ease;
}
.wk-slide.is-active .wk-slide-photo {
    filter: grayscale(.7) brightness(1) contrast(1.05);
}
.wk-slide.is-active:hover .wk-slide-photo {
    transform: scale(1.05);
}

.wk-slide-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.25) 42%, transparent 68%);
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}
.wk-slide.is-active .wk-slide-scrim { opacity: 1; }

/* 우상단 엔진 아이콘 — 활성 슬라이드만 노출 */
.wk-slide-icon {
    position: absolute; top: 22px; right: 22px;
    width: 38px; height: 38px;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.wk-slide-icon svg { width: 100%; height: 100%; overflow: visible; }
.wk-slide.is-active .wk-slide-icon { opacity: .92; }

.wk-icon-bar {
    fill: #fff;
    transform-box: fill-box;
    transform-origin: 50% 50%;
    transform: scale(0);
    opacity: 0;
    transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .3s ease;
}
.wk-slide.is-active .wk-icon-bar { opacity: 1; transform: scale(1); }
.wk-slide.is-active .wk-icon-bar.b1 { transition-delay: 0s; }
.wk-slide.is-active .wk-icon-bar.b2 { transition-delay: .07s; }
.wk-slide.is-active .wk-icon-bar.b3 { transition-delay: .14s; }
.wk-slide.is-active .wk-icon-bar.b4 { transition-delay: .21s; }
.wk-slide.is-active .wk-icon-bar.b5 { transition-delay: .28s; }

.wk-icon-stroke {
    stroke: #fff;
    stroke-width: 46;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    opacity: 0;
    transition: stroke-dashoffset .55s cubic-bezier(.22,1,.36,1), opacity .15s ease;
}
.wk-slide.is-active .wk-icon-stroke { opacity: 1; stroke-dashoffset: 0; }
.wk-slide.is-active .wk-icon-stroke.s1 { transition-delay: 0s; }
.wk-slide.is-active .wk-icon-stroke.s2 { transition-delay: .09s; }
.wk-slide.is-active .wk-icon-stroke.s3 { transition-delay: .09s; }
.wk-slide.is-active .wk-icon-stroke.s4 { transition-delay: .18s; }
.wk-slide.is-active .wk-icon-stroke.s5 { transition-delay: .18s; }

/* 하단 정보 — 활성 슬라이드만 노출, 좌→우로 열리는 슬라이드 리빌 효과 */
.wk-slide-info {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 2rem 1.6rem 1.6rem;
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.1s cubic-bezier(.65,0,.35,1);
    pointer-events: none;
}
.wk-slide.is-active .wk-slide-info { clip-path: inset(0 0 0 0); pointer-events: auto; }

.wk-slide-eyebrow {
    font-size: var(--fs-12); color: #fff;
    letter-spacing: .03em; margin-bottom: .5rem;
}
.wk-slide-rule {
    display: block; height: 1px; width: 100%;
    background: #fff;
    margin: .6rem 0;
}
.wk-slide-title {
    font-size: clamp(1.05rem, 1.3vw, 1.35rem);
    font-weight: 800; color: #fff;
    line-height: 1.2; letter-spacing: -.01em;
    margin: 0;
    text-wrap: balance;
}
.wk-slide-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wk-slide-num {
    font-size: var(--fs-12); color: #fff;
    font-variant-numeric: tabular-nums; letter-spacing: .04em;
    white-space: nowrap;
}
.wk-slide-plus {
    color: #fff; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 600; line-height: 1;
    transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.wk-slide:hover .wk-slide-plus { transform: rotate(135deg); }

/* 좌우 내비게이션 화살표 */
.wk-nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; width: 44px; height: 44px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(0,0,0,.35); color: #fff;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.wk-nav-arrow:hover { background: rgba(0,0,0,.65); border-color: #fff; }
.wk-nav-arrow.prev { left: 20px; }
.wk-nav-arrow.next { right: 20px; }
/* 순수 도형으로 그리는 화살표 — 폰트 글리프 광학 오차 없이 정확히 중앙 정렬 */
.wk-nav-arrow::before {
    content: '';
    width: 9px; height: 9px;
    border-top: 2px solid #fff; border-right: 2px solid #fff;
}
.wk-nav-arrow.prev::before { transform: rotate(-135deg); margin-left: 4px; }
.wk-nav-arrow.next::before { transform: rotate(45deg); margin-right: 4px; }

/* 빈 상태 */
.wk-empty {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: rgba(255,255,255,.6); font-size: var(--fs-16);
    background: #000;
}

/* ── 디테일 뷰 모달 (네비게이션 없이 이미지·제목만) ────────── */
.wk-modal {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,.97);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    clip-path: inset(50% 0 50% 0);
    transition: opacity .4s ease, clip-path .5s cubic-bezier(.65,0,.35,1), visibility 0s linear .5s;
}
.wk-modal.open {
    opacity: 1; visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: opacity .3s ease, clip-path .5s cubic-bezier(.65,0,.35,1);
}

.wk-modal-close {
    position: fixed; top: 20px; right: 24px; z-index: 2010;
    width: 40px; height: 40px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.05); color: #fff;
    font-size: 22px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.wk-modal-close:hover { background: rgba(255,255,255,.15); border-color: #fff; }

.wk-modal-viewer {
    position: relative;
    flex: 1; width: 100%; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 90px 100px 20px;
}
.wk-modal-img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    opacity: 0;
    transition: opacity .35s ease;
}
.wk-modal-img.loaded { opacity: 1; }

.wk-modal-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 5; width: 44px; height: 44px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.05); color: #fff;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.wk-modal-arrow:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.wk-modal-arrow.prev { left: 20px; }
.wk-modal-arrow.next { right: 20px; }
.wk-modal-arrow::before {
    content: '';
    width: 9px; height: 9px;
    border-top: 2px solid #fff; border-right: 2px solid #fff;
}
.wk-modal-arrow.prev::before { transform: rotate(-135deg); margin-left: 4px; }
.wk-modal-arrow.next::before { transform: rotate(45deg); margin-right: 4px; }

.wk-modal-foot {
    flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: center;
    max-width: 640px; margin: 0 auto;
    padding: .5rem 1.5rem 1rem;
    text-align: center;
}
.wk-modal-eyebrow {
    font-size: var(--fs-12); font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #fff; opacity: .6;
    margin-bottom: .5rem;
}
.wk-modal-title {
    color: #fff; font-weight: 800; letter-spacing: -.01em;
    font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.2;
}
.wk-modal-rule {
    display: block; height: 1px; width: 64px;
    background: #fff; margin: .75rem 0;
}
.wk-modal-desc {
    color: rgba(255,255,255,.72); font-size: var(--fs-14); line-height: 1.6;
    margin-bottom: .6rem;
}
.wk-modal-counter { color: #fff; font-size: var(--fs-12); font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.wk-modal-thumbs {
    flex: 0 0 auto;
    display: flex; gap: .5rem;
    padding: .75rem 1rem 1.25rem;
    max-width: 92vw; overflow-x: auto; scrollbar-width: none;
}
.wk-modal-thumbs::-webkit-scrollbar { display: none; }
.wk-modal-thumb {
    flex-shrink: 0; width: 56px; height: 56px;
    border-radius: 4px; overflow: hidden; cursor: pointer;
    border: 2px solid transparent; opacity: .5;
    transition: opacity .2s ease, border-color .2s ease;
}
.wk-modal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-modal-thumb:hover { opacity: .8; }
.wk-modal-thumb.active { opacity: 1; border-color: #fff; }

/* ── 반응형 ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .wk-slide, .wk-carousel::before, .wk-carousel::after { flex-basis: 66vw; }
}
@media (max-width: 600px) {
    .wk-slide, .wk-carousel::before, .wk-carousel::after { flex-basis: 86vw; }
    .wk-hero-inner { padding: 0 1rem; }
    .wk-slide-info { padding: 1.4rem 1.1rem 1.1rem; }
    .wk-nav-arrow { width: 38px; height: 38px; font-size: 20px; }
    .wk-modal-viewer { padding: 70px 56px 12px; }
    .wk-modal-arrow { width: 36px; height: 36px; }
    .wk-modal-arrow.prev { left: 8px; }
    .wk-modal-arrow.next { right: 8px; }
}
