/* =========================================================================
   基本設定・変数定義
   ========================================================================= */
:root {
    /* 紙っぽいベージュ × 茶文字（添付テーマ寄せ） */
    --bg-main: #efe2cf;
    --panel-bg: #f6ecd9;
    --text-main: #4a3a2f;
    --text-muted: rgba(74, 58, 47, 0.72);

    /* 罫線（カレンダー風） */
    --border: rgba(74, 58, 47, 0.45);
    --border-soft: rgba(74, 58, 47, 0.22);

    /* 差し色（くすみ系） */
    --accent: #d47c7c;      /* やさしい赤 */
    --accent-blue: #6b86d6; /* やさしい青 */
    --accent-soft: rgba(212, 124, 124, 0.18);

    /* フォント */
    --font-heading: 'M PLUS Rounded 1c', sans-serif;
    --font-body: 'Zen Maru Gothic', sans-serif;

    /* アニメーション */
    --transition-smooth: all 0.25s ease;
}

/* =========================================================================
   リセット & ベース
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
    background-image: none;
}

/* うっすら紙感（主張しすぎない） */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 55%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.12), transparent 60%),
        radial-gradient(circle at 40% 90%, rgba(0, 0, 0, 0.04), transparent 55%);
    opacity: 0.55;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sp-only {
    display: none;
}

@media (max-width: 768px) {
    .sp-only {
        display: block;
    }
}

/* =========================================================================
   共通コンポーネント
   ========================================================================= */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Glassmorphism パネル */
.glass-panel {
    background: var(--panel-bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 40px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: none;
}

/* スクロールアニメーション用クラス */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

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

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* =========================================================================
   ヘッダー & ナビゲーション
   ========================================================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(239, 226, 207, 0.96);
    transition: var(--transition-smooth);
    border-bottom: 2px solid var(--border);
}

.header.scrolled {
    box-shadow: none;
    padding: 10px 0;
}

.header:not(.scrolled) {
    padding: 20px 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
}

.logo a {
    display: inline-flex;
    gap: 0.02em;
    color: var(--text-main);
}

.logo a span {
    display: inline-block;
}

/* 1文字ずつ：緑→黄→紫→黄緑→赤→青 */
.logo a span:nth-child(1) { color: #1f6a52; } /* 緑 */
.logo a span:nth-child(2) { color: #d2a23a; } /* 黄 */
.logo a span:nth-child(3) { color: #6a4aa3; } /* 紫 */
.logo a span:nth-child(4) { color: #6e9a3b; } /* 黄緑 */
.logo a span:nth-child(5) { color: #b1544c; } /* 赤 */
.logo a span:nth-child(6) { color: #2e4c86; } /* 青 */

.global-nav ul {
    display: flex;
    gap: 30px;
}

.global-nav a {
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
    padding: 5px 0;
}

.global-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

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

.sns-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.sns-link:hover {
    color: var(--accent);
    transform: none;
}

.global-nav .sns-link::after {
    display: none;
}

/* モバイル用ハンバーガーメニュー */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    position: absolute;
    left: 0;
    transition: var(--transition-smooth);
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 8px;
}

.hamburger span:nth-child(3) {
    top: 16px;
}

.hamburger.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* モバイル用メニューパネル */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-main);
    z-index: 99;
    padding: 100px 40px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.04);
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-menu.is-active {
    right: 0;
}

.mobile-menu ul li {
    margin-bottom: 20px;
}

.mobile-menu a {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    display: block;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}

@media (max-width: 768px) {
    .global-nav {
        display: none;
    }

    .hamburger {
        display: block;
    }
}

/* =========================================================================
   ヒーローセクション
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 20px 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    z-index: -1;
}

/* ふわふわ動く虹色の装飾図形 */
.rainbow-decoration {
    display: none;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: -50px;
    left: -50px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: 10%;
    right: -100px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 20%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -50px) scale(1.1);
    }
}

.hero-content {
    max-width: 500px;
    z-index: 2;
    margin-right: auto;
    margin-left: 5vw;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    background: transparent;
    display: inline-block;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
}

/* 虹色のアニメーションテキスト */
.hero-title span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-title span:hover {
    transform: none;
    color: var(--text-main);
}

.hero-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-muted);
}

.hero-image-container {
    position: absolute;
    right: 5vw;
    top: 50%;
    transform: translateY(-50%);
    width: 45vw;
    max-width: 600px;
    height: 70vh;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
    z-index: 1;
    border: 2px solid var(--border);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-image:hover {
    transform: scale(1.01);
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto 40px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-image-container {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 90vw;
        height: 50vh;
        margin: 0 auto;
    }
}

/* =========================================================================
   About セクション
   ========================================================================= */
.about {
    background: none;
}

.about-content {
    display: flex;
    justify-content: center;
}

.about-text-box {
    text-align: center;
    max-width: 800px;
    padding: 60px 40px;
}

.about-lead {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 30px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .about-lead {
        font-size: 1.4rem;
    }

    .about-text-box {
        padding: 40px 20px;
    }
}

/* =========================================================================
   お知らせ・Instagram セクション
   ========================================================================= */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.instagram-post {
    display: block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: none;
    border: 2px solid var(--border);
}

.instagram-img-container {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.instagram-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.instagram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 58, 47, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.instagram-post:hover .instagram-img-container img {
    transform: scale(1.1);
}

.instagram-post:hover .instagram-overlay {
    opacity: 1;
}

.text-center {
    text-align: center;
}

.mt-40 {
    margin-top: 40px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text-main);
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: none;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
}

.btn-primary:hover {
    transform: none;
    box-shadow: none;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =========================================================================
   Access セクション
   ========================================================================= */
.access {
    background: none;
}

.card-layout {
    padding: 0;
}

.info-details {
    display: flex;
    flex-wrap: wrap;
}

.info-list {
    flex: 1;
    min-width: 300px;
    padding: 50px;
}

.info-list dt {
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--border);
    display: inline-block;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-list dd {
    margin-bottom: 25px;
    font-size: 1.05rem;
}

.info-list dd:last-child {
    margin-bottom: 0;
}

.info-list dd a {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.highlight-badge {
    display: inline-block;
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.20);
    color: var(--text-main);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid var(--border-soft);
}

.map-placeholder {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.20);
    position: relative;
    border-left: 1px solid var(--border);
}

.map-placeholder iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0 10px 10px 0;
}

@media (max-width: 768px) {
    .info-list {
        padding: 30px 20px;
    }

    .map-placeholder {
        height: 300px;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .map-placeholder iframe {
        border-radius: 0 0 10px 10px;
    }
}

/* =========================================================================
   フッター
   ========================================================================= */
.footer {
    background: transparent;
    color: var(--text-main);
    text-align: center;
    padding: 60px 20px 30px;
    position: relative;
    border-top: 2px solid var(--border);
}

.footer-decoration {
    display: none;
}

.footer-brand h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.footer-sns {
    margin-bottom: 40px;
}

.footer-sns .sns-link {
    color: var(--text-main);
    opacity: 1;
}

.footer-sns .sns-link:hover {
    opacity: 1;
    color: var(--accent);
    transform: translateY(-2px);
}

/* =========================================================================
   相互リンク
   ========================================================================= */
.links-panel {
    max-width: 900px;
    margin: 0 auto;
}

.links-lead {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1rem;
}

.link-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 2px solid var(--border-soft);
    border-radius: 14px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.18);
    transition: var(--transition-smooth);
}

.link-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.32);
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(74, 58, 47, 0.12);
}

.link-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.link-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
}

.link-url {
    color: var(--text-muted);
    font-size: 0.85rem;
    word-break: break-all;
}

.link-arrow {
    flex-shrink: 0;
    color: var(--accent);
    transition: var(--transition-smooth);
}

.link-card:hover .link-arrow {
    transform: translate(2px, -2px);
}

@media (max-width: 768px) {
    .link-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   活動・サービス / くんちゃん文庫
   ========================================================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.service-card {
    padding: 22px;
}

.service-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.service-text {
    color: var(--text-muted);
}

.external-link {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.external-link svg {
    margin-left: 3px;
    vertical-align: -2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.library-panel {
    max-width: 900px;
    margin: 0 auto;
}

.library-lead {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.library-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 16px;
    border-top: 2px solid var(--border-soft);
    padding-top: 16px;
}

.library-list dt {
    font-weight: 800;
    font-family: var(--font-heading);
}

.library-list dd {
    margin: 0;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .library-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   これまでの歩み（沿革）
   ========================================================================= */
.history-panel {
    max-width: 900px;
    margin: 0 auto;
}

.timeline {
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    padding: 18px 18px;
    border-top: 2px solid var(--border-soft);
}

.timeline-item:first-child {
    border-top: none;
}

.timeline-year {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-main);
}

.timeline-body p {
    margin: 0;
}

.timeline-body p + p {
    margin-top: 8px;
}

.history-note {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 2px solid var(--border-soft);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .timeline-year {
        padding-bottom: 6px;
    }
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* =========================================================================
   リニューアル追加分（写真・ギャラリー・モーダル等）
   ========================================================================= */
/* =========================================================================
   リニューアル用 追加スタイル
   ※ styles.css の後に読み込み、写真まわりの装飾だけを上書き・追加する
   ========================================================================= */

/* --- ヒーロー：PCでは画像をやや上寄りに配置 --- */
@media (min-width: 993px) {
    .hero-image-container {
        top: 22%;
    }
}

/* --- ヒーロー：写真の上に薄いベージュを重ねて文字を読みやすく --- */
.hero-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgba(239, 226, 207, 0.35) 0%,
        rgba(239, 226, 207, 0.05) 45%,
        rgba(239, 226, 207, 0) 100%
    );
    pointer-events: none;
}

/* --- About：本文の横に店内写真を添えて2カラムに --- */
.about-content {
    display: flex;
    gap: 36px;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
}

.about-text-box {
    flex: 1 1 380px;
    text-align: left;
    margin: 0;
}

.about-figure {
    flex: 1 1 320px;
    max-width: 420px;
    margin: 0;
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.about-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.about-figure:hover img {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .about-text-box {
        text-align: center;
    }
    .about-figure {
        max-width: 100%;
    }
}

/* --- 店内ギャラリー（新セクション） --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    margin: 0;
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel-bg);
}

.gallery-figure {
    position: relative;
    padding-top: 133%; /* 3:4 */
    overflow: hidden;
}

.gallery-figure img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-figure img {
    transform: scale(1.06);
}

.gallery-figure {
    cursor: zoom-in;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* --- 画像モーダル（ライトボックス） --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: rgba(74, 58, 47, 0.82);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-figure {
    margin: 0;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.96);
    transition: transform 0.3s ease;
}

.lightbox.is-open .lightbox-figure {
    transform: scale(1);
}

.lightbox-figure img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border: 3px solid var(--panel-bg);
    border-radius: 10px;
    background: var(--panel-bg);
}

.lightbox-caption {
    margin-top: 14px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

/* --- くんちゃん文庫：案内の横に絵本棚写真を添える --- */
.library-content {
    display: flex;
    gap: 30px;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.library-figure {
    flex: 0 0 38%;
    margin: 0;
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.library-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.library-figure:hover img {
    transform: scale(1.03);
}

.library-content .library-panel {
    flex: 1 1 auto;
    margin: 0;
}

@media (max-width: 860px) {
    .library-content {
        flex-direction: column;
    }
    .library-figure {
        flex: none;
        max-height: 320px;
    }
}
