@charset "UTF-8";

/* =========================================
   Base Setup (Ryokan Style)
   ========================================= */
:root {
    --bg-color: #f4f3ef; /* 和紙色 */
    --text-main: #2b2b2b; /* 墨色 */
    --text-muted: #6e6e6e;
    --accent: #8c3a3a;    /* 弁柄色（落ち着いた赤） */
    --brand: #2f4f4f;     /* 鉄色（深い緑青） */
    --font-serif: 'Zen Old Mincho', serif;
    --font-sans: 'Zen Kaku Gothic New', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-serif);
    line-height: 2.2;
    letter-spacing: 0.1em;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.5s ease; }
img { width: 100%; height: 100%; object-fit: cover; display: block; }
ul { list-style: none; }

/* 縦書きクラス */
.tategaki {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.3em;
    line-height: 2.5;
}

/* フェードアニメーション */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Header
   ========================================= */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 1.5rem 3rem;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100;
    transition: background 0.5s;
}
.header.scrolled {
    background: rgba(244, 243, 239, 0.95);
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex; flex-direction: column; align-items: flex-start;
    line-height: 1.2;
}
.logo span { font-size: 0.8rem; font-weight: 400; margin-top: 5px; letter-spacing: 0.2em; }

.nav ul { display: flex; gap: 3rem; }
.nav a { font-size: 0.95rem; position: relative; }
.nav a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 1px;
    background: var(--brand); transition: 0.3s;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }

.btn-reserve-nav {
    border: 1px solid var(--text-main);
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}
.btn-reserve-nav:hover { background: var(--text-main); color: #fff; }

.hamburger { display: none; cursor: pointer; }
.hamburger span { display: block; width: 30px; height: 1px; background: #333; margin: 8px 0; }

/* =========================================
   Hero Section (Top Page)
   ========================================= */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    animation: kenburns 30s infinite alternate;
}
@keyframes kenburns {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.hero-content {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 2;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.2);
    padding: 3rem 4rem;
    border: 1px solid rgba(255,255,255,0.3);
    
    writing-mode: vertical-rl;
    text-orientation: upright;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    width: auto;
    height: auto;
    max-height: 80vh;
}

.hero-title {
    font-size: 2.8rem;
    margin: 0;
    height: auto;
    white-space: nowrap;
}

.hero-sub {
    font-size: 1.2rem;
    margin: 0;
    height: auto;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.8);
    padding-right: 2rem;
}

/* =========================================
   Layout & Components
   ========================================= */
.section { padding: 8rem 5%; }
.container { max-width: 1100px; margin: 0 auto; }

/* 和風見出し */
.section-title-area {
    display: flex; justify-content: flex-end;
    margin-bottom: 5rem;
    position: relative;
}
.section-title {
    font-size: 2.2rem;
    height: auto;
    white-space: nowrap;
    border-right: 2px solid var(--brand);
    padding-right: 1.5rem;
    margin-right: 2rem;
}
.section-subtitle {
    font-size: 0.9rem;
    height: 150px;
    color: var(--text-muted);
    padding-top: 1rem;
}

/* 2カラムレイアウト */
.ryokan-card {
    display: flex; gap: 4rem; margin-bottom: 8rem; align-items: center;
}
.ryokan-card:nth-child(even) { flex-direction: row-reverse; }
.ryokan-img {
    width: 55%; height: 450px; overflow: hidden; position: relative;
}
.ryokan-img img { transition: transform 0.8s; }
.ryokan-card:hover .ryokan-img img { transform: scale(1.05); }

.ryokan-text {
    width: 45%; padding: 2rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: relative; top: 30px;
}
.ryokan-text h3 { font-size: 1.6rem; margin-bottom: 2rem; color: var(--brand); }
.btn-link {
    display: inline-block; border-bottom: 1px solid var(--accent);
    color: var(--accent); margin-top: 2rem; font-size: 0.9rem;
}

/* =========================================
   Sub Pages Header (見切れ修正版)
   ========================================= */
.page-header {
    /* 固定高さ(height)をやめ、最小高さ(min-height)に変更 */
    min-height: 60vh;
    position: relative;
    margin-bottom: 5rem;
    overflow: hidden;
    
    /* Flexboxで中央配置（これなら文字数が増えても親要素が広がる） */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 上下に余白を持たせて窮屈さを解消 */
    padding: 6rem 0;
}
.page-header-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; filter: brightness(0.6);
    z-index: 0;
}

.page-title-wrap {
    /* absolute配置をやめ、Flexアイテムとして配置 */
    position: relative;
    z-index: 2;
    color: #fff; text-shadow: 0 0 10px rgba(0,0,0,0.5);
    
    /* 縦書き設定 */
    writing-mode: vertical-rl;
    text-orientation: upright;
    
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center;
    gap: 2rem;
    
    width: auto;
    height: auto;
}

.page-title {
    font-size: 3rem;
    height: auto;
    white-space: nowrap;
    margin: 0;
}

.page-title-wrap span {
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    writing-mode: horizontal-tb; 
    margin-top: 1rem;
}

/* Cuisine / Rooms List */
.item-list { display: grid; grid-template-columns: 1fr; gap: 6rem; }
.item-card { display: flex; flex-direction: column; gap: 1.5rem; }
.item-img { height: 500px; }
.item-content { text-align: center; max-width: 600px; margin: -50px auto 0; background: #fff; padding: 3rem; position: relative; }
.item-title { font-size: 1.6rem; margin-bottom: 1rem; color: var(--brand); }

/* Form */
.form-wrapper {
    background: #fff; padding: 4rem; border: 1px solid #e0e0e0;
    max-width: 700px; margin: 0 auto;
}
input, textarea, select {
    width: 100%; padding: 1rem; border: 1px solid #ccc;
    background: #fafafa; font-family: var(--font-serif);
    margin-bottom: 2rem;
}
.btn-submit {
    background: var(--brand); color: #fff; width: 100%; padding: 1.2rem; border: none;
    font-family: var(--font-serif); font-size: 1.1rem; cursor: pointer;
}

/* Footer */
.footer {
    background: #1a1a1a; color: #aaa; padding: 5rem 5%; text-align: center;
}
.footer-logo { font-size: 2rem; color: #fff; margin-bottom: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .nav { display: none; }
    .hamburger { display: block; }
    
    .hero-content { padding: 2rem; gap: 1.5rem; }
    .hero-title { font-size: 2rem; }
    .hero-sub { font-size: 1rem; padding-right: 1.5rem; }
    
    .page-title { font-size: 2rem; }
    
    .ryokan-card { flex-direction: column; gap: 0; }
    .ryokan-card:nth-child(even) { flex-direction: column; }
    .ryokan-img { width: 100%; height: 300px; }
    .ryokan-text { width: 90%; margin: -30px auto 0; top: 0; }
    .section-title-area { justify-content: flex-start; }
}