@charset "UTF-8";

/* --- 変数定義（色を一括管理） --- */
:root {
    --color-bg-base: #f5f5f0;       /* ベース背景色 */
    --color-bg-white: #ffffff;      /* 白背景 */
    --color-text-main: #3e2723;     /* メイン文字色（濃い茶色） */
    --color-text-sub: #5d4037;      /* サブ文字色 */
    --color-accent: #a1887f;        /* アクセント（ラインなど） */
    --font-main: 'Noto Serif JP', serif;
}

html {
    scroll-behavior: smooth;
}

/* 全体の設定 */
body {
    font-family: var(--font-main);
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    margin: 0;
    line-height: 2.2;
    letter-spacing: 0.05em;
}

/* --- ヘッダー（初期状態：一番上にいる時） --- */
header {
    width: 100%;
    height: 80px; /* 最初は少しゆったりと */
    
    /* ▼ ここがポイント：最初は背景を「ほぼ透明」にする */
    background-color: rgba(255, 255, 255, 0.2); 
    /* すりガラス効果（お好みで。なしにするとクリアになります） */
    backdrop-filter: blur(3px);
    
    /* 影はなし */
    box-shadow: none;

    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    
    /* ▼ アニメーションの設定：0.6秒かけて、ふわっと変化させる */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- ヘッダー（スクロール時：クラスがついた時） --- */
header.scrolled {
    /* ▼ 背景をしっかり白くする */
    background-color: rgba(255, 255, 255, 0.98);
    
    /* 下に影をつけて「浮いている感」を出す */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    
    /* すりガラスは消す（または強める） */
    backdrop-filter: none;
    
    /* 高さを少し縮めてスマートに */
    height: 60px; 
}

.header-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ヘッダー監視用の目印 */
#header-sentinel {
    width: 100%;
    height: 1px;       /* 1pxだけ高さを確保 */
    background: transparent; /* 透明 */
    position: absolute;
    top: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.4em; 
    color: var(--color-text-main);
    white-space: nowrap;
    position: relative;
    padding-bottom: 8px;
    padding-left: 0.4em; 
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background-color: var(--color-accent);
}

/* --- ナビゲーション --- */
.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    text-decoration: none;
    color: var(--color-text-sub);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s;
}

.nav-list a:hover::after {
    width: 100%;
}

/* --- ハンバーガーボタン --- */
.hamburger {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 200;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-main);
    position: absolute;
    transition: 0.3s;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 22px; }

.hamburger.active span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* --- メインビジュアル --- */
#hero {
    background-image: url("images/hero.jpg");
    background-size: cover;
    background-position: center 20%; 
    padding-top: 80px;
    height: 70vh; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.3); 
    color: #ffffff;
}

#hero h2 {
    font-size: 2.5rem;
    letter-spacing: 0.3em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

#hero p {
    font-size: 1.2rem;
    margin-top: 10px;
}

/* --- コンセプト --- */
#concept {
    padding: 80px 20px;
    background-color: var(--color-bg-base);
    display: flex;
    justify-content: center;
}

.concept-inner {
    max-width: 800px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
}

.vertical-text {
    writing-mode: vertical-rl;
    font-size: 1.8rem;
    letter-spacing: 0.4em;
    color: var(--color-text-main);
    line-height: 1.5;
    flex-shrink: 0;
}

.concept-text {
    font-size: 1rem;
    line-height: 2.2;
    color: var(--color-text-sub);
    padding-top: 1rem;
}

/* --- お品書き --- */
#menu {
    padding: 100px 20px;
    background-color: #fdfdfb;
}

.menu-container {
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #d7ccc8;
    padding: 40px;
    background-color: var(--color-bg-white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 0.5em;
    color: var(--color-text-main);
    margin-bottom: 50px;
    border-bottom: 1px solid #d7ccc8;
    display: inline-block;
    width: 100%;
    padding-bottom: 10px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
    border-bottom: 1px dotted #d7ccc8;
    padding-bottom: 10px;
}

.item-name {
    font-size: 1.1rem;
    color: var(--color-text-sub);
    font-weight: bold;
}

.item-price {
    font-size: 1rem;
    color: #8d6e63;
}

.menu-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-top: 30px;
}

/* --- ギャラリー（PC版レイアウト） --- */
#gallery {
    padding: 100px 20px;
    background-color: var(--color-bg-base);
}

.gallery-grid {
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.gallery-slider {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 150px;
    gap: 15px;
    transition: transform 0.5s ease-in-out;
}

.gallery-item.main {
    grid-column: span 2;
    grid-row: span 2;
}

/* 親枠の設定 */
.gallery-item {
    /* ▼ 画像が拡大した時に、枠からはみ出た部分を隠す */
    overflow: hidden; 
    border-radius: 4px; /* 角丸もここで管理すると綺麗です */
    cursor: pointer;    /* マウスを乗せた時に指マークにする */
}

/* 画像の設定 */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    
    /* ▼ トランジション設定（0.5秒かけて変化） */
    transition: transform 0.5s ease;
}

/* ▼ マウスが乗った時（ホバー時）の設定 */
.gallery-item:hover img {
    /* 1.1倍に拡大する */
    transform: scale(1.1);
}

/* --- アクセス --- */
#access {
    padding: 80px 20px;
    background-color: var(--color-bg-white);
    text-align: center;
}

.access-info {
    max-width: 500px;
    margin: 0 auto;
    line-height: 2;
    color: var(--color-text-sub);
    border: 1px double #d7ccc8;
    padding: 30px;
}

.address {
    font-weight: bold;
    margin-bottom: 20px;
}

#map {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 0;
    filter: grayscale(100%) sepia(20%) contrast(90%);
}

#map iframe {
    width: 100% !important;
    height: 400px;
    border: 1px solid #d7ccc8;
}

/* --- フッター --- */
footer {
    background-color: var(--color-text-main);
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    border-top: 5px solid var(--color-accent);
}

/* --- スクロールアニメーション共通設定 --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.5s, transform 1.5s;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* ギャラリーアイテムのフェード設定（PC版） */
.gallery-grid .fade-in {
    transform: translateY(20px);
    transition: opacity 1.0s ease, transform 1.0s ease;
}

/* --- レスポンシブ対応 (768px以下) --- */
@media (max-width: 768px) {
    /* ナビゲーション */
    .hamburger {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        transition: 0.5s;
        z-index: 150;
        padding-top: 100px;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .nav-list a {
        font-size: 0.7rem;
    }

    /* コンセプト */
    .concept-inner {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .vertical-text {
        writing-mode: horizontal-tb;
        font-size: 1.5rem;
        letter-spacing: 0.3em;
    }
    .concept-text {
        text-align: center;
    }

    /* 地図 */
    #map iframe {
        height: 300px;
    }

    /* --- ギャラリー：スマホ版（スライドショーモード） --- */
    .gallery-grid {
        position: relative;
        height: 350px;
        overflow: hidden;
    }

    .gallery-slider {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
    }

    /* スマホ版ではPCのfade-in設定を無効化し、独自のスライドアニメーションを優先 */
    .gallery-slider .gallery-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        
        /* スライドアニメーション用の初期状態 */
        opacity: 0;
        visibility: hidden;
        z-index: 0;
        
        /* transitionをここで再定義することで !important を回避 */
        transition: opacity 2.0s ease-in-out, visibility 2.0s ease-in-out;
        transform: none; /* 下からふわっと出る動きを打ち消し */
    }

    .gallery-item img {
        height: 100%;
    }

    /* アクティブなスライド（JSで付与） */
    .gallery-slider .gallery-item.active-slide {
        opacity: 1;
        visibility: visible;
        z-index: 1;
    }
}