/* --- Base Styles --- */
:root {
    --bg: #fdfdfd;
    --gray: #a0a0a0;
    --text: #1a1a1a;
    --font-sans: 'Suisse BP Int\'l', sans-serif; /* ロゴ・名前・Index用 */
    --font-serif: 'EB Garamond', serif;          /* 本文・キャプション用 */
}

body { 
    margin: 0; 
    background: var(--bg); 
    color: var(--text); 
    font-family: var(--font-sans); 
    -webkit-font-smoothing: antialiased;
    animation: fadeInPage 0.8s ease forwards;
}

@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Splash Screen --- */
#splash-screen {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;             /* 常に中央揃えを有効にするために flex */
    
    /* ★ 垂直方向の中央に配置 */
    align-items: center; 
    /* 左端から並べる */
    justify-content: flex-start; 
}

.splash-logo { 
    color: #fff; 
    font-family: var(--font-sans);
    text-transform: none;
    line-height: 1;
    
    /* PC設定: ナビバーの左余白 40px に合わせる */
    padding-left: 40px; 
    font-size: 20px; 
    letter-spacing: 0.0em; 
}

/* スプラッシュのフェードアウト（2.0s でゆったりと） */
.fade-out { 
    opacity: 0; 
    transition: opacity 2.5s ease-in-out; 
    pointer-events: none; 
}

/* --- Mobile Styles (Splash / Vertical Center) --- */
@media (max-width: 768px) {
    #splash-screen {
        /* ★ モバイルでも垂直中央を維持（flex-start から変更） */
        align-items: center; 
        padding-top: 0; /* 上の余白をリセット */
    }

    .splash-logo {
        /* ★ モバイル設定: 左余白 20px / サイズ 16px */
        padding-left: 20px;
        font-size: 14px;
        letter-spacing: 0.01em;
        margin-top: 0; /* 位置調整をリセット */
    }
}

/* --- Navbar --- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; height: 100px;
    display: flex; align-items: center; padding: 0 40px; 
    box-sizing: border-box; z-index: 3000; background: var(--bg);
}

.logo { 
    flex: 1; text-align: left; text-decoration: none; color: var(--text); 
    font-size: 20px; letter-spacing: 0.0em; white-space: nowrap; font-family: var(--font-sans);
}

.nav-switcher {
    position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px; font-size: 20px; white-space: nowrap;
}

/* ナビゲーション中央のスプリット線 (/) */
.nav-divider-horizontal {
    color: var(--gray) !important; /* 黒からグレーへ */
    font-weight: 300;               /* 少し細くするとより繊細になります */
    margin: 0 0px;                  /* 左右の余白微調整 */
    user-select: none;              /* 選択不可にしてUI部品としての質感を出す */
}

.nav-links { flex: 1; display: flex; justify-content: flex-end; list-style: none; gap: 20px; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--text); font-size: 20px; transition: color 0.3s ease; }
.nav-links a.active { color: var(--gray); pointer-events: none; }
.nav-links a:hover { color: var(--gray) !important; }

/* --- Info Content --- */
#info-content { 
    padding: 140px 40px; 
    max-width: 850px; 
    line-height: 1.1; 
    font-size: 20px; 
    box-sizing: border-box; 
}

.info-about { 
    font-family: var(--font-serif) !important; 
}

.info-name { 
    font-family: var(--font-sans) !important; 
}

.contact-section { margin-top: 60px; }
.contact-section a { color: inherit; text-decoration: none; transition: color 0.3s ease; }
.contact-section a:hover { color: var(--gray) !important; }

.contact-section .label {
    color: var(--gray);
    font-size: 0.55em;
    display: inline-block;
    margin-bottom: 5px;
}

.copyright {
    margin-top: 90px;
    color: var(--gray);
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* --- Overlays --- */
.overlay-full { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: var(--bg); z-index: 4000; overflow-y: auto; padding: 120px 40px; box-sizing: border-box; 
}

.close-btn { 
    position: fixed; top: 35px; right: 40px; cursor: pointer; 
    font-size: 20px; z-index: 5000; font-family: var(--font-sans);
}

.cat-title { font-size: 13px; color: var(--gray); font-weight: 400; margin-bottom: 30px; }

/* --- Overview Grid --- */
/* --- Overview Grid (グリッド全体の均等な余白) --- */
.ov-grid { 
    display: grid; 
    /* PCでは7列。列の幅を均等（1fr）に */
    grid-template-columns: repeat(7, 1fr); 
    gap: 10px;                 /* ★タイトで均等な余白 (10px) */
    align-items: start;       /* ★画像をそれぞれのグリッドの上辺に揃える */
    margin-bottom: 70px; 
}

/* --- Overview Grid Item (画像コンテナ) --- */
.ov-item {
    position: relative;
    display: flex;             
    flex-direction: column;   /* 縦並び */
    align-items: center;       /* 左右中央（画像を横方向の中心に） */
    justify-content: flex-start; /* ★上辺（Top）に寄せる */
    overflow: hidden;
    background: var(--bg);     /* 背景色と同じ白 */
    width: 100%;               /* グリッドの幅いっぱい */
    /* ※ここには aspect-ratio（正方形）は指定しません。
       画像の高さによって、グリッドの「行」の高さが決まります。
    */
    cursor: pointer;
}

.ov-item img {
    /* ★画像の比率を尊重してトリミングしない */
    width: 100%;               /* 横幅をグリッドに合わせる */
    height: auto;              /* ★高さを自動計算して比率を保つ */
    display: block;
    object-fit: contain;        
    transition: opacity 0.5s ease;
}

/* --- Hover Caption (★画像のフレームの真ん中) --- */
.ov-caption {
    position: absolute;
    /* .ov-item（グリッドの枠）ではなく、画像そのものの中心を計算 */
    top: 0;
    left: 0;
    width: 100%;               
    height: 100%;              /* ★画像の高さ（親要素の高さ）に合わせる */
    
    /* ★Flexboxで画像の中心に配置 */
    display: flex;
    align-items: center;       /* 上下中央（画像の中心） */
    justify-content: center;    /* 左右中央（画像の中心） */
    
    color: var(--gray);
    font-size: 10px;           /* 小さめに */
    opacity: 0;
    transition: opacity 0.5s ease;
    text-align: center;
    padding: 10px;             /* 文字が端に寄らないよう少し余白 */
    box-sizing: border-box;    /* paddingを含めて計算 */
    pointer-events: none;      
    z-index: 2;
    font-family: var(--font-serif);
    letter-spacing: 0.05em;
}

/* ホバー時の挙動 */
@media (hover: hover) {
    .ov-item:hover img {
        opacity: 0.2;          /* 画像を薄く */
    }
    .ov-item:hover .ov-caption {
        opacity: 1;
    }
}

/* モバイル対応（5列） */
@media (max-width: 768px) {
    .ov-grid { 
        grid-template-columns: repeat(5, 1fr); 
        gap: 3px;             /* ★モバイルではさらにタイトに (3px) */
    }
    .ov-caption {
        font-size: 5px;
    }
}

/* --- Index List --- */
.idx-list { list-style: none; padding: 0; margin: 0 0 50px 0; max-width: 500px; }
.idx-list li { margin-bottom: 7px; }
.idx-list a {
    display: flex; justify-content: space-between; align-items: baseline;
    text-decoration: none; color: var(--text); font-size: 20px;
    font-family: var(--font-sans); transition: color 0.3s;
}
.idx-list a:hover { color: var(--gray) !important; }
.idx-count { color: var(--gray); font-size: 17px; margin-left: 20px; font-variant-numeric: tabular-nums; }

/* --- Hero / Slideshow --- */
.hero-wrapper { 
    position: relative; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; min-height: 100vh; width: 100%; 
}
.slide-controls { 
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    width: 85vw; height: 70vh; display: flex; z-index: 10; 
}
.click-area { flex: 1; cursor: pointer; display: flex; align-items: center; }
.click-area::after { 
    content: ''; width: 10px; height: 10px; border-top: 1px solid var(--gray); 
    border-right: 1px solid var(--gray); opacity: 0; transition: opacity 0.3s; 
}
.area-left { justify-content: flex-start; padding-left: 20px; }
.area-left::after { transform: rotate(-135deg); }
.area-right { justify-content: flex-end; padding-right: 20px; }
.area-right::after { transform: rotate(45deg); }
.click-area:hover::after { opacity: 0.5; }

.hero-image { max-width: 85vw; max-height: 70vh; object-fit: contain; opacity: 1; transition: opacity 0.6s ease-in-out; }
.hero-caption { 
    margin-top: 12px; font-size: 10px; color: var(--gray); text-align: center; 
    transition: opacity 0.6s ease-in-out; font-family: var(--font-serif);
}

/* 言語スイッチのスタイル */
.lang-switcher {
    margin-top: 40px;
    font-size: 13px;
    color: var(--gray);
    font-family: var(--font-sans);
}

.lang-btn {
    cursor: pointer;
    transition: color 0.3s;
}

.lang-btn.active {
    color: var(--text); /* 選択されている方を黒くする */
    pointer-events: none;
}

.lang-btn:hover {
    color: var(--text);
}

/* --- Language Specific Styles --- */

/* 英語（既存のサイズを維持） */
.lang-en {
    font-size: 20px;
    line-height: 1.1;
}

/* 日本語（サイズを小さく、文字間と行間を微調整） */
.lang-jp {
    font-size: 17px;             /* ★サイズを小さく */
    line-height: 1.1;             /* ★日本語は少し広めの行間が美しい */
    letter-spacing: 0.01em;       /* ★わずかに文字間をあけて可読性を確保 */
    font-family: "Yu Mincho", "MS Mincho", serif; /* きれいな明朝体指定 */
}

/* 日本語時の名前（英字より少しだけ大きく、でも全体とは調和させる） */
.info-name-jp {
    font-family: var(--font-sans);
    font-size: 20px;
    margin-bottom: 1.7em;
    letter-spacing: 0.0em;
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
    .navbar { 
        height: 60px; 
        padding: 0 20px !important; 
        justify-content: space-between !important;
    }
    
    /* モバイルではロゴを非表示 */
    .logo { display: none !important; }

    /* モバイルのスイッチ（左寄せ） */
    .nav-switcher { 
        position: static !important; 
        transform: none !important; 
        font-size: 14px !important; 
    }

    /* モバイルの右側（Infoのみ表示） */
    .nav-links { 
        display: flex !important; 
        justify-content: flex-end !important; 
    }

    /* 不要なリンクを物理的に排除 */
    #link-commissioned, 
    #link-personal { 
        display: none !important; 
        visibility: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 0 !important;
    }

    .nav-links a { font-size: 14px !important; }
    
    .close-btn { top: 20px; right: 20px; font-size: 14px; }
    
    .overlay-full { padding: 100px 20px !important; }
    .cat-title { font-size: 11px; margin-bottom: 15px !important; }
    .idx-list { max-width: 100%; }
    .idx-list a { font-size: 14px !important; margin-left: -1px; }
    .idx-count { font-size: 11px; }
    
    .ov-grid { grid-template-columns: repeat(5, 1fr); gap: 3px; }
    
    #info-content { padding: 100px 20px !important; font-size: 14px !important; line-height: 1.1 !important; }
    .copyright { margin-top: 60px !important; font-size: 11px !important; }
    
    .click-area::after { display: none !important; }

    /* モバイル対応 */
    .lang-switcher {
        margin-top: 30px;
        font-size: 11px;
    }
    .lang-en { font-size: 14px; }
    .lang-jp { 
        font-size: 12px;          /* ★モバイルでも英語より一回り小さく */
        line-height: 1.1;
    }
    .info-name-jp { font-size: 14px; }

}