/* 基本設定 */
:root {
    --bg-color: #FFFBF5;
    --main-color: #A0D8B3;
    --accent-pink: #FFD3B6;
    --accent-salmon: #FFAAA5;
    --accent-blue: #B4E8E4;
    --text-color: #333;
    --light-bg-color: #e6f9ef;
    /* 少し色味を調整 */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Serif JP', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* モバイルメニュー表示時に背景をスクロールさせない */
body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

h1,
h2,
h3 {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.google-spinner-wrapper {
    width: 75px;
    height: 75px;
    animation: spinner-rotate 2s linear infinite;
}

.google-spinner {
    width: 100%;
    height: 100%;
}

.spinner-path {
    stroke-dasharray: 187;
    /* (円周 2 * π * r = 2 * 3.14 * 30 ≒ 188) */
    stroke-dashoffset: 0;
    transform-origin: center;
    animation:
        spinner-dash 1.5s ease-in-out infinite,
        spinner-color 6s ease-in-out infinite;
}

@keyframes spinner-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinner-dash {
    0% {
        stroke-dashoffset: 187;
    }

    50% {
        stroke-dashoffset: 46.75;
        /* 187 / 4 */
        transform: rotate(135deg);
    }

    100% {
        stroke-dashoffset: 187;
        transform: rotate(450deg);
    }
}

@keyframes spinner-color {

    0%,
    100% {
        stroke: var(--main-color);
    }

    /* 緑 */
    25% {
        stroke: var(--accent-blue);
    }

    /* 水色 */
    50% {
        stroke: var(--accent-pink);
    }

    /* ピンク */
    75% {
        stroke: var(--accent-salmon);
    }

    /* サーモン */
}

.loading-ring {
    width: 80px;
    height: 80px;
    border: 5px solid transparent;
    border-top-color: var(--main-color);
    border-right-color: var(--accent-pink);
    border-bottom-color: var(--accent-blue);
    border-radius: 50%;
    /* 2つのアニメーションを1つに統合 */
    animation:
        spin-pulse 2s ease-in-out infinite,
        color-change 4s linear infinite;
}

@keyframes spin-pulse {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(0.85);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes color-change {
    0% {
        border-top-color: var(--main-color);
        border-right-color: var(--accent-pink);
        border-bottom-color: var(--accent-blue);
    }

    25% {
        border-top-color: var(--accent-pink);
        border-right-color: var(--accent-blue);
        border-bottom-color: var(--main-color);
    }

    50% {
        border-top-color: var(--accent-blue);
        border-right-color: var(--main-color);
        border-bottom-color: var(--accent-pink);
    }

    75% {
        border-top-color: var(--accent-salmon);
        border-right-color: var(--accent-blue);
        border-bottom-color: var(--accent-pink);
    }

    100% {
        border-top-color: var(--main-color);
        border-right-color: var(--accent-pink);
        border-bottom-color: var(--accent-blue);
    }
}

.loading-x svg {
    width: 100px;
    height: 100px;
}

.loading-x line {
    stroke: #fff;
    /* 背景動画の上で見やすいように白に変更 */
    stroke-width: 8;
    /* 少し太くする */
    stroke-linecap: round;
}

/* ヘッダー */
#main-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 100;
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

#main-header.scrolled {
    background-color: rgba(255, 251, 245, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo-container {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 101;
}

.logo-small {
    font-size: 0.75em;
    color: #626262;
}

.logo-picfa {
    text-decoration: none;
    font-size: 0.75em;
    color: #626262;
}

.header-logo-bottom {
    color: var(--text-color);
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 101;
}

.pc-nav {
    display: block;
    /* PCでは表示 */
}

.pc-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.pc-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-family: 'M PLUS Rounded 1c', sans-serif;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.pc-nav a:hover {
    color: var(--main-color);
}

.pc-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--main-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.pc-nav a:hover:not(.header-btn)::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* メインビジュアル */
#main-visual {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #fff;
    /* テキストの基本色を白に */
}

/* YouTube背景動画のスタイル */
#video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: var(--color-surface);
}

#youtube-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9のアスペクト比 */
    min-height: 100vh;
    min-width: 177.78vh; /* 16:9のアスペクト比 */
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.7;
}

/* モバイル縦向けでの調整 */
@media (max-width: 480px) {
    .header-btn-disabled {
        padding: var(--space-10) var(--space-24);
        font-size: var(--font-size-sm);
    }
    
    #youtube-background {
        display: none;
    }
    
    #video-background {
        background: linear-gradient(135deg, var(--color-bg-3), var(--color-bg-2));
    }
}

/* タブレットでの調整 */
@media (max-width: 768px) {
    #youtube-background {
        display: none;
    }
    
    #video-background {
        background: linear-gradient(135deg, var(--color-bg-3), var(--color-bg-2));
    }
}

.title-container {
    position: relative;
    z-index: 1;
}

.main-title {
    font-size: 5rem;
    font-weight: 900;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin: 0;
    opacity: 0;
    /* JSで制御 */
}

.main-title span {
    display: inline-block;
}

.main-title .title-x {
    background: linear-gradient(45deg, var(--accent-pink), #B0FFCB, #FFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* opacityとscaleはJSで制御 */
}

.title-picfa .title-ogi {
    font-family: 'Noto Serif JP', serif;
}

.subtitle {
    font-size: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 20px 0 30px;
    opacity: 0;
    /* JSでアニメーション */
}

/* メインビジュアルのボタン */
.main-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    margin: 5px;
}

.header-btn-disabled {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;
    border: none;
}

.header-btn-disabled, .btn-disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--main-color);
    color: #fff;
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-color);
}

/* コンテンツセクション */
.content-section {
    padding: 100px 0;
    background-color: rgb(255, 251, 245);
    z-index: 10;
}

.bg-light {
    background-color: var(--light-bg-color);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--main-color);
    position: relative;
    font-weight: 900;
    letter-spacing: 0.05em;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--main-color);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-text {
    font-size: 1.1rem;
    line-height: 2;
    text-align: center;
}

/* メッセージセクション */
.message-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.message-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(160, 216, 179, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(160, 216, 179, 0.2);
}

.message-from {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-top: 0;
    border-bottom: 2px solid var(--main-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* ギャラリーセクション */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* スマホ用に最小幅を調整 */
    gap: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #eee;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    filter: blur(10px);
    transform: scale(1);
    transition: opacity 0.5s, filter 0.7s, transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.gallery-item.loaded img {
    opacity: 1;
    filter: blur(0);
}

.gallery-item.loaded:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* フッター */
footer {
    padding: 60px 0;
    background-color: var(--light-bg-color);
    color: #555;
    z-index: 10;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
}

.footer-logo {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo-sub {
    font-size: 0.8em;
    color: var(--main-color);
    font-weight: 600;
    letter-spacing: 0.1em;
    display: block;
    margin-top: 2px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    /* スマホで折り返す */
    justify-content: center;
    gap: 15px 25px;
}

.footer-nav a {
    text-decoration: none;
    color: #555;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--main-color);
}

.footer-sns {
    display: flex;
    gap: 20px;
}

.footer-sns a {
    color: #555;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-sns a:hover {
    color: var(--main-color);
    transform: scale(1.1);
}

.footer-sns svg {
    fill: currentColor;
}

.copyright {
    font-size: 0.9rem;
    color: #888;
    margin-top: 20px;
}


/* ハンバーガーメニュー */
.hamburger-menu {
    display: none;
    /* PCでは非表示 */
    width: 30px;
    height: 21px;
    position: relative;
    cursor: pointer;
    z-index: 150;
    border: none;
    background: transparent;
    padding: 0;
}

.hamburger-menu span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

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

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

.hamburger-menu span:nth-child(3) {
    bottom: 0;
}

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

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

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

/* モバイル用ナビゲーション */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    /* 初期状態は画面外 */
    width: 100%;
    height: 100%;
    background-color: rgba(255, 251, 245, 0.98);
    backdrop-filter: blur(10px);
    z-index: 99;
    transition: right 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-nav.is-open {
    right: 0;
    /* アクティブ時に画面内に表示 */
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.mobile-nav li {
    margin-bottom: 40px;
}

.mobile-nav a {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}


/* スクロールアニメーション用 */
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================
   下層ページのスタイル
   =============================================== */

/* ページヘッダー（各ページ上部のタイトル部分） */
.page-header {
    padding: 160px 0 80px;
    background-color: var(--light-bg-color);
    text-align: center;
}

.page-title {
    font-size: 3rem;
    color: var(--main-color);
    margin: 0 0 10px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #777;
    margin: 0;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}


/* Aboutページ用 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
    text-align: center;
}

.detail-item {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(160, 216, 179, 0.1);
    display: inline-grid;
}

.detail-item h3 {
    margin: 0 auto;
    color: var(--main-color);
    font-size: 1.3rem;
}

.detail-item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
}


/* Membersページ用 */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.member-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.member-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    border-bottom: 5px solid var(--main-color);
}

.member-info {
    padding: 25px 30px;
}

.member-name {
    margin: 0 0 10px;
    font-size: 1.5rem;
    text-align: center;
}

.member-comment {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    text-align: center;
}


/* Galleryページ用 */
.gallery-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* .gallery-itemのスタイルは既存のものを流用 */

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

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

    .subtitle {
        font-size: 1.2rem;
    }

    .pc-nav {
        display: none;
    }

    /* PCナビを非表示 */
    .hamburger-menu {
        display: block;
    }

    /* ハンバーガーを表示 */

    .section-title {
        font-size: 2rem;
    }

    .content-section {
        padding: 80px 0;
    }

    .message-grid {
        grid-template-columns: 1fr;
    }

    .message-card {
        padding: 30px;
    }

    .page-header {
        padding: 120px 0 60px;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .footer-nav ul {
        display: grid;
    }
}