/* =========================================
   ART DIRECTION: Echizen Cinematic (Final Optimized)
   ========================================= */

/* 1. Base Setup & Reset */
*, *::before, *::after {
    box-sizing: border-box; /* レイアウト崩れ防止の必須設定 */
}

:root {
    /* Color Palette */
    --c-midnight: #0a1118;
    --c-ocean: #152538;
    --c-sand: #f4f1ea;
    --c-copper: #c49a6c;
    --c-ink: #2b2b2b;
    --c-white: #ffffff;
    
    /* Typography */
    --f-jp: 'Zen Old Mincho', 'Shippori Mincho', serif;
    --f-en: 'Cinzel', serif;
    
    /* Easing */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    margin: 0; padding: 0;
    font-family: var(--f-jp);
    color: var(--c-ink);
    background-color: var(--c-midnight);
    transition: background-color 1s var(--ease-in-out), color 1s;
    overflow-x: hidden; /* 横スクロール防止 */
    line-height: 2;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

/* メニュー展開時のスクロールロック */
body.menu-open {
    overflow: hidden;
    height: 100vh;
}

/* Theme Switching Logic */
body[data-theme="dark"] { background-color: var(--c-ocean); color: var(--c-white); }
body[data-theme="light"] { background-color: var(--c-sand); color: var(--c-ink); }
body[data-theme="warm"] { background-color: #e8e2d2; color: #4a3b32; }
body[data-theme="black"] { background-color: #000; color: #888; }

/* Noise Texture */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 9999; opacity: 0.4;
}

/* Typography Utils */
.en-font { font-family: var(--f-en); letter-spacing: 0.1em; }
.vertical-text { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0.15em; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { width: 100%; display: block; height: auto; }
.white-text { color: var(--c-white) !important; }

/* =========================================
   HEADER & NAV (Fixed)
   ========================================= */
#header {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 30px 20px; /* 余白調整 */
    display: flex; justify-content: space-between; align-items: flex-start;
    z-index: 1000; mix-blend-mode: exclusion; color: #fff;
    pointer-events: none; /* ヘッダーエリア全体はクリック透過 */
}
#header .logo-area, 
#header .header-controls {
    pointer-events: auto; /* ボタン類だけクリック有効 */
}

.logo-img { width: 180px; height: auto; display: block; }

.header-controls { display: flex; gap: 30px; align-items: center; }

/* Hamburger Menu (High Visibility) */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50px;
    height: 24px;
    cursor: pointer;
    z-index: 10001; /* 最前面 */
    position: relative;
}

.bar {
    width: 100%;
    height: 3px; /* 太くして視認性確保 */
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5); /* 影をつけて白背景対策 */
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ハンバーガーのアニメーション */
#global-menu.active ~ #header .hamburger .bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
#global-menu.active ~ #header .hamburger .bar:nth-child(2) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Global Menu Overlay */
#global-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 900; pointer-events: none; opacity: 0; transition: opacity 0.6s;
    display: flex; justify-content: center; align-items: center;
    background: rgba(10,17,24,0.98);
}
#global-menu.active { opacity: 1; pointer-events: auto; }

.menu-links {
    position: relative; 
    display: flex; flex-direction: column; gap: 20px; 
    text-align: center; 
    overflow-y: auto; max-height: 100vh; padding: 40px 20px;
    /* スクロールバー非表示 */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.menu-links::-webkit-scrollbar { display: none; }

.menu-item { font-size: 1.4rem; color: #fff; font-family: var(--f-jp); opacity: 0; transform: translateY(20px); transition: 0.5s; }
#global-menu.active .menu-item { opacity: 1; transform: translateY(0); }
.menu-item .num { font-family: var(--f-en); font-size: 0.9rem; color: var(--c-copper); margin-right: 15px; vertical-align: middle; }
.menu-item .en { display: block; font-size: 0.8rem; font-family: var(--f-en); color: #888; margin-top: 0px; }

/* Language Toggle (Optional) */
#lang-toggle {
    background: none; border: none; color: #fff; font-family: var(--f-en);
    cursor: pointer; font-size: 0.9rem; letter-spacing: 0.1em;
}
.current-lang { font-weight: bold; border-bottom: 1px solid #fff; }
.next-lang { opacity: 0.5; }

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section { 
    height: 100vh; position: relative; overflow: hidden; 
    display: flex; align-items: center; justify-content: center; 
    background-image: url('assets/img/top1-1-min-300x300.jpg');
    background-size: cover;
    background-position: center;
    background-color: var(--c-ocean);
}
.video-container { position: absolute; inset: 0; z-index: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.video-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); }

.hero-text-wrapper { position: relative; z-index: 10; display: flex; gap: 60px; height: 60vh; align-items: flex-start; }
.main-copy { font-size: clamp(2rem, 5vw, 4rem); color: #fff; height: 100%; line-height: 1.6; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.en-vertical { font-size: 0.4em; opacity: 0.8; margin-left: 20px; font-family: var(--f-en); }
.sub-copy-area { writing-mode: vertical-rl; text-orientation: upright; color: #fff; font-size: 1.1rem; letter-spacing: 0.2em; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }

.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    color: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0.7;
}
.scroll-indicator .line { width: 1px; height: 80px; background: #fff; animation: scrollAnim 2s infinite; }
@keyframes scrollAnim { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* =========================================
   LAYOUT UTILS
   ========================================= */
.content-section { padding: 150px 0; position: relative; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

.fluid-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.reverse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; direction: rtl; }
.reverse-grid > * { direction: ltr; }

.sticky-content { position: sticky; top: 100px; }

.chapter-label { display: block; color: var(--c-copper); margin-bottom: 20px; font-size: 0.9rem; }
.section-title { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 40px; line-height: 1.4; font-weight: 500; }
.section-title .lang-en { display: block; font-family: var(--f-en); font-size: 0.5em; color: var(--c-copper); margin-top: 10px; letter-spacing: 0.05em; }

.prose-text { font-size: 1.05rem; margin-bottom: 40px; text-align: justify; }

.art-frame { position: relative; overflow: hidden; border-radius: 2px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }
.art-frame img { transition: transform 1.5s var(--ease-out); width: 100%; }
.art-frame:hover img { transform: scale(1.05); }

/* =========================================
   HORIZONTAL SCROLL (Dining)
   ========================================= */
.horizontal-scroll-wrapper { display: flex; align-items: center; overflow-x: auto; padding: 0 40px 100px; gap: 60px; }
.horizontal-scroll-wrapper::-webkit-scrollbar { display: none; }
.intro-block { min-width: 300px; flex-shrink: 0; }

.gallery-track { display: flex; gap: 40px; }
.gallery-card { min-width: 350px; position: relative; }
.card-img { height: 450px; overflow: hidden; margin-bottom: 20px; border-radius: 2px; }
.card-img img { height: 100%; width: 100%; object-fit: cover; transition: 0.6s; }
.gallery-card:hover .card-img img { transform: scale(1.1); }
.card-caption h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 5px; }

/* =========================================
   BUTTONS & FOOTER
   ========================================= */
.cta-button {
    display: inline-block; margin-top: 40px; padding: 15px 50px;
    background: var(--c-copper); color: #fff; border-radius: 50px;
    font-size: 1.1rem; position: relative; overflow: hidden; transition: background 0.3s;
}
.cta-button:hover { background: #a37e55; }

footer { padding: 100px 40px 40px; background: #000; color: #888; text-align: center; }
.footer-cta h2 { font-size: clamp(2rem, 5vw, 4rem); color: #fff; margin-bottom: 60px; line-height: 1.2; }
.address { margin-bottom: 60px; line-height: 2; }
.copyright { font-size: 0.8rem; opacity: 0.5; border-top: 1px solid #333; padding-top: 30px; display: inline-block; width: 100%; max-width: 600px; }

/* =========================================
   ANIMATION & LOADER
   ========================================= */
.fade-up { opacity: 0; transform: translateY(30px); transition: 1s var(--ease-out); }
.fade-up.in-view { opacity: 1; transform: translateY(0); }
.delay-2 { transition-delay: 0.2s; }

#loader {
    position: fixed; inset: 0; background: var(--c-midnight); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: transform 0.8s var(--ease-in-out);
}
#loader.loaded { transform: translateY(-100%); }
.loader-content { text-align: center; color: var(--c-copper); }
.vertical-line { width: 1px; height: 0; background: var(--c-copper); margin: 0 auto 20px; animation: growLine 1.5s forwards; }
.loader-text { opacity: 0; animation: fadeIn 1s forwards 1s; letter-spacing: 0.3em; }

@keyframes growLine { to { height: 60px; } }
@keyframes fadeIn { to { opacity: 1; } }

/* =========================================
   MULTI-LANGUAGE (Display Control)
   ========================================= */
.lang-en { display: none; }
body.en-mode .lang-jp { display: none; }
body.en-mode .lang-en { display: block; }
body.en-mode .lang-en.en-vertical { display: inline-block; }

/* =========================================
   SUB-PAGE STYLES (Under Layers)
   ========================================= */
.page-hero {
    height: 50vh; min-height: 400px; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background-size: cover; background-position: center; background-color: var(--c-ocean);
    margin-bottom: 0;
}
.page-hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.page-title-area { position: relative; z-index: 10; text-align: center; color: #fff; }
.page-title { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 15px; font-family: var(--f-jp); letter-spacing: 0.1em; }
.page-subtitle { display: block; font-family: var(--f-en); color: var(--c-copper); letter-spacing: 0.2em; font-size: 1rem; text-transform: uppercase; }

.breadcrumb {
    position: absolute; bottom: 20px; left: 40px; z-index: 10;
    font-size: 0.8rem; color: rgba(255,255,255,0.7); font-family: var(--f-en);
}
.breadcrumb a { border-bottom: 1px solid transparent; }
.breadcrumb a:hover { border-bottom: 1px solid #fff; }

.page-content { background: var(--c-sand); padding: 80px 0; color: var(--c-ink); }

.season-header { text-align: center; margin: 80px 0 60px; padding: 20px; border-top: 1px solid var(--c-copper); border-bottom: 1px solid var(--c-copper); }
.season-title { font-size: 2rem; font-family: var(--f-jp); color: var(--c-ocean); margin-bottom: 10px; }
.season-sub { font-family: var(--f-en); color: var(--c-copper); letter-spacing: 0.1em; }

/* Plan Block */
.plan-block {
    background: #fff; margin-bottom: 60px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden; border-radius: 4px;
}
.plan-header { padding: 30px 40px; border-bottom: 1px solid #eee; background: #fafafa; }
.plan-tag { display: inline-block; background: var(--c-copper); color: #fff; padding: 5px 15px; font-size: 0.8rem; margin-bottom: 10px; border-radius: 50px; }
.plan-tag.red { background: #b93b3b; }
.plan-name { font-size: 1.6rem; font-family: var(--f-jp); color: var(--c-ink); margin-bottom: 0; }

.plan-body { display: grid; grid-template-columns: 4fr 6fr; gap: 0; align-items: stretch; }
.plan-img { width: 100%; height: 100%; min-height: 300px; background: #f0f0f0; }
.plan-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.plan-details { padding: 40px; }
.plan-desc { margin-bottom: 30px; line-height: 1.8; }

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th { width: 25%; text-align: left; padding: 15px 0; color: var(--c-copper); font-weight: normal; vertical-align: top; border-bottom: 1px solid #eee; }
.detail-table td { padding: 15px 0 15px 20px; border-bottom: 1px solid #eee; }
.price-text { font-size: 1.4rem; font-weight: bold; color: var(--c-ink); }
.menu-list { font-size: 0.95rem; color: #555; line-height: 1.8; }
.suspend-note { color: #d9534f; font-weight: bold; margin-bottom: 10px; display: block; }

/* Grid Layouts */
.content-h2 { font-size: 1.8rem; color: var(--c-ocean); border-bottom: 2px solid var(--c-copper); padding-bottom: 15px; margin: 60px 0 30px; font-family: var(--f-jp); }
.col-2-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 60px; }
.col-2-layout img { width: 100%; border-radius: 2px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* Instagram */
.instagram-wrapper {
    width: 100%; max-width: 600px; margin: 0 auto;
    background: #fff; border-radius: 4px; overflow: hidden;
}
.instagram-wrapper iframe { width: 100% !important; height: 460px !important; display: block; }

/* Responsive Adjustments */
@media (max-width: 900px) {
    .fluid-grid, .reverse-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-text-wrapper { flex-direction: column; align-items: center; text-align: center; }
    .vertical-text, .sub-copy-area { writing-mode: horizontal-tb; height: auto; }
    .logo-img { width: 160px; }
    .horizontal-scroll-wrapper { flex-direction: column; overflow: visible; padding: 0 20px; }
    .gallery-track { flex-direction: column; width: 100%; }
    .gallery-card { min-width: 100%; }
    .plan-body { grid-template-columns: 1fr; }
    .plan-img { height: 250px; }
    .plan-details { padding: 25px; }
    .detail-table th, .detail-table td { display: block; width: 100%; padding: 5px 0; border: none; }
    .detail-table th { margin-top: 15px; font-weight: bold; }
    .col-2-layout { grid-template-columns: 1fr; gap: 30px; }
    .page-hero { height: 40vh; }
    .header-controls { gap: 15px; }
}