:root {
    --wind-particle-color: #FFFFFF;
    --wind-particle-count: 5;
    /* 風の数 */
}

.overlap-trigger {
    height: 500vh;
    position: relative;
}

.sticky-view {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.slide-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bg-zoom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
    transform: scale(1.1);
}

.main1 {
    background-image: url('../images/main1.jpg');
}

.main2 {
    background-image: url('../images/main2.jpg');
}

.main3 {
    background-image: url('../images/main3.jpg');
}

.main4 {
    background-image: url('../images/main4.jpg');
}


.text-panel {
    align-self: flex-start;
    width: 45%;
    max-width: 600px;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 60px;
    z-index: 20000;
}

.text-panel.is-left {
    background: linear-gradient(to right,
            var(--base-bg-color) 0%,
            color-mix(in srgb, var(--base-bg-color), transparent 2%) 15%,
            color-mix(in srgb, var(--base-bg-color), transparent 8%) 30%,
            color-mix(in srgb, var(--base-bg-color), transparent 20%) 45%,
            color-mix(in srgb, var(--base-bg-color), transparent 40%) 60%,
            color-mix(in srgb, var(--base-bg-color), transparent 65%) 75%,
            color-mix(in srgb, var(--base-bg-color), transparent 85%) 88%,
            color-mix(in srgb, var(--base-bg-color), transparent 95%) 95%,
            transparent 100%) !important;
}

.text-panel.is-right {
    align-self: flex-end;
    margin-left: auto;
    background: linear-gradient(to left,
            var(--base-bg-color) 0%,
            color-mix(in srgb, var(--base-bg-color), transparent 2%) 15%,
            color-mix(in srgb, var(--base-bg-color), transparent 8%) 30%,
            color-mix(in srgb, var(--base-bg-color), transparent 20%) 45%,
            color-mix(in srgb, var(--base-bg-color), transparent 40%) 60%,
            color-mix(in srgb, var(--base-bg-color), transparent 65%) 75%,
            color-mix(in srgb, var(--base-bg-color), transparent 85%) 88%,
            color-mix(in srgb, var(--base-bg-color), transparent 95%) 95%,
            transparent 100%) !important;
}


.text-panel p {
    max-width: 420px;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}




/* --- MAIN TITLE --- */
.main-title {
    font-weight: 900;
    font-size: clamp(1.0rem, 10vw, 1.8rem);
    letter-spacing: 0.5em;

    text-shadow:
        0 0 30px var(--base-bg-color),
        -1px -1px 3px var(--base-bg-color),
        1px 1px 3px var(--base-bg-color);

    margin: 0;
    display: inline-block;
    white-space: nowrap;
}


/* 1ページ目専用パネルの配置設定 */
#first-page-header-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 300px;
    margin: 0;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 1500;
    pointer-events: none;

    background: linear-gradient(to bottom,
            var(--base-bg-color) 0%,
            var(--base-bg-color) 30%,
            color-mix(in srgb, var(--base-bg-color), transparent 10%) 45%,
            color-mix(in srgb, var(--base-bg-color), transparent 25%) 55%,
            color-mix(in srgb, var(--base-bg-color), transparent 60%) 70%,
            transparent 100%);
}

#first-page-header-panel .main-title {
    pointer-events: auto;
    margin-top: 80px;
    display: inline-block;
    white-space: nowrap;
    text-align: right;
}

.dark-section {
    background-color: var(--base-bg-color);
}

/* GALLERYセクション（特殊）のみ共通余白を上書きして広げる */
.dark-section .page-inner {
    max-width: none;
    padding: 100px 0;
}

/* --- ABOUT --- */
.about-image {
    flex: 0 0 220px;
}

.about-image img {
    width: 100%;
    height: auto;
    filter: grayscale(10%);
    margin-top: 10px;
}

.about-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    margin-bottom: 10px !important;
}

/* scroll to next */
.scroll-indicator {
    position: fixed;
    top: 65%;
    left: 0;
    width: 100%;
    z-index: 100;
    text-align: center;
    pointer-events: none;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 20;
    transition: bottom 0.5s ease;
    /* 全体を上下に動かすアニメーション（px指定） */
    animation: bounceIndicator 3s ease-in-out infinite;
    text-shadow: 0 0 5px var(--base-bg-color);
}

.scroll-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    opacity: 0.7;
    text-shadow: 0 0 5px var(--base-bg-color);
}

.scroll-arrow {
    width: 2px;
    height: 35px;
    background: var(--base-text-color);
    position: relative;
    /* 矢印の高さだけをpxで伸ばすアニメーション */
    animation: stretchArrow 3s ease-in-out infinite;
    text-shadow: 0 0 5px var(--base-bg-color);
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--base-text-color);
    border-bottom: 2px solid var(--base-text-color);
    transform: rotate(45deg);
    text-shadow: 0 0 5px var(--base-bg-color);
}

/* 1. 全体（文字＋矢印）を上下に動かす */
@keyframes bounceIndicator {

    0%,
    100% {
        transform: translateY(0px) scaleY(1);
        opacity: 0.1;
    }

    50% {
        transform: translateY(15px) scaleY(1.1);
        opacity: 1;
    }
}

/* 2. 矢印の高さだけをpx指定で伸ばす */
@keyframes stretchArrow {

    0%,
    100% {
        height: 35px;
    }

    50% {
        height: 40px;
    }
}


/* --- Gallery Section --- */
.gallery-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
    margin: 0 auto 50px;
    width: 100%;
    /* ★重要：画面幅の90%に絞ることで左右に5%ずつの余白を強制 */
    max-width: 90vw;
    box-sizing: border-box;
}

.gallery-nav-item {
    background: none;
    border: none;
    color: var(--base-text-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: 0.4s;
    position: relative;
    padding-bottom: 0px;
    white-space: nowrap;
    /* overflowは指定しない（アンダーバーを見せるため） */
    /* 修正箇所：高さを自動にし、中身を厳密に上下中央へ */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1; 
    height: auto;   
    padding: 5px 0; 
}

/* 追加：文字ラベル自体にoverflow: hiddenをかける */
.nav-text-label {
    position: relative;
    overflow: hidden; /* これでシマーを文字幅に閉じ込める */
    display: block;
}

/* 最新バッジ（赤い丸） */
.gallery-nav-item.is-new::before {
    content: "";
    display: block; /* 左側に配置 */
    width: 5px;
    height: 5px;
    background-color: #e63946;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
    /* 位置の微調整：垂直中央からさらに2px上に */
    transform: translateY(-1px); 
}

/* シマー専用のアニメーション要素（index.jsで追加される .shimmer-layer 用） */
.shimmer-layer {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: skewX(-25deg);
    animation: shimmer 4s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        left: -150%;
    }

    30% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.gallery-nav-item.active {
    /*font-weight: bold;*/
    font-weight: 400;
    opacity: 1;
}

.gallery-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--base-text-color);
}

.gallery-slider-wrapper {
    width: 100%;
    overflow: hidden;
}

.gallery-slider {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 0 15vw;
}

.gallery-item {
    flex: 0 0 70vw;
    margin: 0 20px;
    opacity: 0.3;
    transition: 0.8s;
}

.gallery-item.active {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 60vh;
    object-fit: cover;
}

/* Play/Pause Controls */
.gallery-controls {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    /* 重なりに関わらずクリックを有効化 */
}

.gallery-control-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--base-text-color);
    opacity: var(--header-icon-opacity);
}

.gallery-control-btn:hover {
    opacity: 1;
}

.gallery-control-btn svg {
    fill: currentColor;
}


/* タイトルパネル（台紙とメインタイトル）のフェードアウト設定 */
/* JSで動的に制御するため、transitionを少し短く（または削除）して追従性を上げる */
#first-page-header-panel {
    transition: visibility 0.3s ease;
    pointer-events: auto;
}

/* 透明になったらクリックできないようにする */
#first-page-header-panel[style*="opacity: 0"] {
    pointer-events: none;
}

/* Gallery Snap */
.gallery-overlap-trigger {
    position: relative;
    width: 100%;
}

.sticky-gallery {
    width: 100%;
    height: 100vh;
    z-index: 5;
    display: flex;
    flex-direction: column;
    /* ★縦に並べる（これでメニューが広がる場所ができる） */
    align-items: center;
    /* 横方向の中央揃え */
    justify-content: center;
    /* 縦方向の中央揃え */
}


/* スライドの重なり順 */
#layer1 {
    z-index: 4;
}

#layer2 {
    z-index: 3;
}

#layer3 {
    z-index: 2;
}

#layer4 {
    z-index: 1;
}

/* アイコンの初期非表示状態（JSで制御されるもの） */
.music-icon .icon-off,
#gallery-play-pause .icon-on {
    display: none;
}

/* CONTACTセクションのメールアドレス用（クラスを追加して制御） */
.contact-email {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.1em;
}



@media screen and (max-width: 768px) {
    .main-title {
        font-size: 1.2rem;
    }

    .gallery-nav {
        padding: 0 20px;
        gap: 10px 20px;
    }

    .gallery-slider {
        padding: 0 10vw;
    }

    .gallery-item {
        flex: 0 0 80vw;
    }

    .gallery-item img {
        height: 40vh;
    }

    /* ABOUTセクションのPhotographer紹介をスマホで縦並びにする */
    .section-sub-container {
        flex-direction: column;
        gap: 30px;
    }


    .text-panel.is-left,
    .text-panel.is-right {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: auto;
        background: linear-gradient(to top,
                var(--base-bg-color) 0%,
                color-mix(in srgb, var(--base-bg-color), transparent 2%) 35%,
                color-mix(in srgb, var(--base-bg-color), transparent 5%) 60%,
                transparent 100%) !important;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        padding: 60px 30px 80px 30px;
        text-align: left;
        z-index: 10;
        transform: none !important;
    }

    .text-panel p {
        max-width: 100%;
        font-size: 0.9rem;
        line-height: 1.7;
        margin: 0;
        text-align: left;
    }


    .about-section {
        padding: 80px 0;
    }


    .about-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .about-name {
        max-width: 100%;
        text-align: center;
        font-size: 1.0rem;
    }

}