@charset "UTF-8";

body.works-page {
    background-color: #f4f4f4;
    color: #1a1a1a;
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    width: 100vw; height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    
    /* ★追加: オーバーレイ位置ズレ防止 */
    transform: none !important;
    filter: none !important;
    perspective: none !important;
}

/* ★追加: Sketchページ同様のオーバーレイ固定設定 */
body.works-page .overlay-section {
    position: fixed !important;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 2500; /* ヘッダー(3000)より下 */
}

#works-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1; pointer-events: none;
}

/* --- スプリットレイアウト --- */
.split-container {
    display: grid;
    grid-template-columns: 45% 55%;
    width: 100%;
    min-height: 100vh;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

body.page-transition .split-container {
    transform: translateX(-45%);
}

/* --- 左カラム：リスト --- */
.list-column {
    padding: 160px 60px 100px;
    box-sizing: border-box;
    background: #f4f4f4;
    z-index: 10;
    transition: opacity 0.5s ease;
}
body.page-transition .list-column { opacity: 0.5; }

.works-main-title {
    font-size: clamp(60px, 8vw, 120px);
    font-weight: 900; line-height: 0.9; letter-spacing: -0.03em;
    color: #1a1a1a; margin: 0 0 80px 0;
}

.works-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 0;
}

.work-item {
    padding: 40px 0;
    border-top: 1px solid #ccc;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.3s ease;
    position: relative;
}
.work-item:last-child { border-bottom: 1px solid #ccc; }

.work-item:hover, .work-item.active {
    opacity: 1; border-color: #1a1a1a;
}
.work-item.active { transform: translateX(10px); }

.work-item::after {
    content: '→'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    font-size: 24px; font-weight: 300; opacity: 0; transition: all 0.3s ease;
}
.work-item:hover::after { opacity: 1; right: -30px; }

.mobile-thumb-box { display: none; }

.item-year { display: block; font-family: monospace; font-size: 12px; color: #666; margin-bottom: 5px; }
.item-title { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: #1a1a1a; margin-bottom: 10px; }
.item-tags { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.05em; }
.works-footer { margin-top: 100px; font-size: 11px; color: #aaa; }


/* --- 右カラム：プレビュー --- */
.preview-column {
    position: relative;
    background: #e8e8e8;
    height: 100vh;
    position: sticky; top: 0; 
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-frame {
    width: 80%; height: 80%;
    position: relative;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}

.preview-media {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.15));
    transition: opacity 0.4s ease;
}

.preview-media img,
.preview-media video {
    max-width: 100%; max-height: 100%; 
    object-fit: contain; display: block;
}

.preview-caption {
    position: absolute; bottom: -40px; left: 0;
    font-size: 12px; font-family: monospace; color: #666;
    opacity: 0; transition: opacity 0.3s;
}
.preview-frame:hover .preview-caption { opacity: 1; }


/* =========================================================
   Mobile Responsive
   ========================================================= */
@media (max-width: 768px) {
    .split-container { grid-template-columns: 1fr; transform: none !important; }
    .preview-column { display: none; }
    
    .list-column { padding: 120px 20px 80px; }
    
    .works-main-title { font-size: 60px; margin-bottom: 40px; }

    .works-list {
        display: grid;
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .work-item {
        padding: 0; border: none;
        opacity: 1; transform: none !important;
        display: flex; flex-direction: column; gap: 15px;
    }
    .work-item:last-child { border: none; }
    .work-item::after { display: none; }

    .mobile-thumb-box {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;
        background: #ddd;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }
    
    .mobile-thumb-media {
        width: 100%; height: 100%;
        object-fit: cover; display: block;
    }

    .item-title { font-size: 24px; margin-bottom: 5px; }
    .item-year { font-size: 11px; margin-bottom: 2px; opacity: 0.7; }
    
    .work-item:active .mobile-thumb-box { transform: scale(0.98); }
}