/* ========================================
   カスタムフォント定義
   ======================================== */
.font-yuji {
    font-family: 'Yuji Syuku', serif;
}

.font-zen {
    font-family: 'Zen Kurenaido', serif;
}

.font-klee {
    font-family: 'Klee One', 'Yu Mincho', 'YuMincho', serif;
}

/* ========================================
   和柄背景パターン（カスタムデザイン）
   ======================================== */
.wa-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0,0,0,.1) 35px, rgba(0,0,0,.1) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(0,0,0,.05) 35px, rgba(0,0,0,.05) 70px);
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   装飾的な和柄の円
   ======================================== */
.wa-circle {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    pointer-events: none;
    z-index: 0;
}

.wa-circle-1 {
    top: 10%;
    right: -150px;
    animation: float 20s infinite ease-in-out;
}

.wa-circle-2 {
    bottom: 20%;
    left: -150px;
    animation: float 25s infinite ease-in-out reverse;
}

.wa-circle-3 {
    position: absolute;
    top: 50%;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 3px solid rgba(0,0,0,0.05);
    transform: translateY(-50%);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

/* ========================================
   ヒーローセクション
   ======================================== */
.hero {
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-logo {
    position: absolute;
    bottom: -10%;
    right: -5%;
    width: 60%;
    height: 80%;
    z-index: 1;
    opacity: 0;
    animation: logoFadeIn 2s ease-out 0.5s forwards;
}

.hero-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.15;
    filter: blur(1px);
}

/* 大きな背景ロゴ（左上／右下に少しだけ見える） */
.hero-logo-tl {
    /* 左上ロゴをもっと中心寄りに見せる（左と上のオフセットを小さく） */
    top: -20%;
    left: -10%;
    right: auto;
    bottom: auto;
    width: 170%;
    height: 170%;
    z-index: 0;
    opacity: 0.14;
    transform: rotate(-6deg) translate(6%, 6%);
}

.hero-logo-br {
    /* 右下ロゴはさらにフレームアウトさせる（より外側へ） */
    bottom: -55%;
    right: -60%;
    left: auto;
    top: auto;
    width: 180%;
    height: 180%;
    z-index: 0;
    opacity: 0.10;
    transform: rotate(6deg) translate(10%, 10%);
}

.hero-logo-tl .hero-logo-img,
.hero-logo-br .hero-logo-img {
    opacity: 0.08; /* 背景として控えめに */
    filter: blur(2px) saturate(0.9);
}

@keyframes logoFadeIn {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hero-content {
    z-index: 2;
    animation: slideUp 1.5s ease-out;
    position: relative;
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    text-shadow: 3px 3px 10px rgba(0,0,0,0.7);
    letter-spacing: 0.2em;
}

.hero h1 {
    margin-bottom: 0.8rem; /* タイトルとサブタイトルの間隔を少し広げる */
}
.hero .subtitle {
    color: #fff;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}

.hero .subtitle {
    margin-top: 0.8rem; /* タイトルとの行間を確保 */
}

.hero .catchphrase {
    color: #fff;
    font-size: clamp(1.6rem, 4.2vw, 2.7rem);
    margin-bottom: 2.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    /* 行書体風の筆文字を優先（Google Font: Yuji Syuku が読み込まれています） */
    font-family: 'Yuji Syuku', 'Zen Kurenaido', serif;
    letter-spacing: 0.3em;
    font-weight: 400;
    line-height: 1.4;
}
    .hero .catchphrase {
        color: #fff;
        /* 文字を大きく（少し太めに見えるように） */
        font-size: clamp(2.05rem, 5.2vw, 3.9rem);
        margin-bottom: 3.6rem; /* マージンを増やす */
        text-shadow: 2px 2px 10px rgba(0,0,0,0.85);
        /* 行書体風に表示（PC/モバイル共通で適用） */
        font-family: 'Yuji Syuku', 'Zen Kurenaido', serif;
        letter-spacing: 0.33em;
        font-weight: 500;
        line-height: 1.35;
    }

/* ロゴをキャッチフレーズの上に配置 */
.catchphrase-with-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    z-index: 3; /* hero-content より上に来る */
}
    .catchphrase-with-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.2rem; /* 余白を少し広げる */
        position: relative;
        z-index: 3; /* hero-content より上に来る */
    }

.catchphrase-logo {
    width: clamp(72px, 8vw, 140px);
    height: auto;
    opacity: 0.95;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45));
}
    .catchphrase-logo {
        /* ほぼ2倍サイズに（元の clamp の最大を2倍に近づける） */
        width: clamp(144px, 16vw, 280px);
        height: auto;
        opacity: 0.95;
        filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
    }

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: #fff;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border: 3px solid #fff;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.1em;
}

.cta-button:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.3);
}

/* ========================================
   セクションタイトル（疑似要素使用）
   ======================================== */
.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 3rem;
    /* 行書体・習字風に太めで表示 */
    font-family: 'Yuji Syuku', 'Yuji Syuku', serif;
    font-weight: 700;
    position: relative;
    /* 中央揃え：幅を文字列に合わせてブロック化し margin:auto で中央へ */
    display: inline-block;
    width: 100%;
    margin: 0 auto;
    letter-spacing: 0.14em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    /* 下線はタイトルの幅に合わせる */
    /* 幅から左右の padding を差し引いて文字幅に合わせる */
    width: calc(100% - 1.2rem);
    height: 6px; /* 太めの線で習字風に強調 */
    background: #1a1a1a;
}

.section-title-white::after {
    background: #fff;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-top: 0rem;
    margin-bottom: 3rem;
    letter-spacing: 0.15em;
}

.section-subtitle {
    /* 習字風に行書体で太めに表示 */
    font-family: 'Yuji Syuku', 'Zen Kurenaido', serif;
    font-weight: 600;
}

.section-subtitle-white {
    color: #ccc;
}

/* ========================================
   チームカード（複雑なホバーエフェクト）
   ======================================== */
.team-card {
    background: #fff;
    border: 2px solid #1a1a1a;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    transition: left 0.5s ease;
    z-index: 0;
}

.team-card:hover::before {
    left: 0;
}

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

.team-card:hover * {
    color: #fff !important;
}

/* ========================================
   メンバー画像（カスタムホバーエフェクト）
   ======================================== */
.member-image {
    /* 固定の正方形コンテナにして常に完全な丸にする */
    width: 180px;
    height: 180px;
    border-radius: 50% !important;
    object-fit: cover;
    overflow: hidden;
    border: 5px solid #1a1a1a;
    margin: 0 auto 1.5rem !important;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    display: block !important;
}

.member-image:hover {
    transform: scale(1.05);
    filter: grayscale(0%);
    border-color: #666;
}

/* アコーディオン内のメンバー一覧を縦並びにする */
/* アコーディオン内のメンバー一覧（デフォルトはモバイル向け：縦並び） */
@media (max-width: 991px) {
    .accordion-content {
        width: 100%;
    }

    /* グリッド／フレックスで横並びになっている内包要素を強制的に縦並びに */
    .accordion-content .grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .accordion-content .flex {
        display: block !important;
    }

    /* 右罫線がついている場合、縦並びでは不要なので解除 */
    .accordion-content .border-r,
    .accordion-content [class*="border-r"] {
        border-right: none !important;
    }

    /* メンバー要素の余白と画像サイズを調整して縦並びで見やすくする */
    .accordion-content .text-center {
        padding: 0.75rem 0 !important;
    }

    .accordion-content .member-image {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 0.75rem !important;
    }
}

/* デスクトップ以上では、リーダー（代表・キャプテン）は2列表示、
   メンバー一覧も2列の丸いアイテムで表示 */
@media (min-width: 992px) {
    /* メンバー一覧（leaders）を2列に調整：親の grid は既に md:grid-cols-2 を持つ */
    .members-grid {
        /* leaders は常に2列（追加メンバーが増えても2列のグリッドで折り返す） */
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        align-items: start;
    }

    /* アコーディオン内のメンバーリストを2列に */
    .accordion-content .grid {
        display: grid !important;
        /* メンバー一覧は2列で、要素数が増えても自動で折り返す */
        grid-template-columns: repeat(2, minmax(160px, 1fr)) !important;
        gap: 1.25rem !important;
    }

    /* 各メンバーカードを丸くし、中央揃え */
    .accordion-content .text-center {
        padding: 0.75rem !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .accordion-content .member-image {
        width: 140px !important;
        height: 140px !important;
        border-radius: 50% !important;
        margin: 0 0 0.75rem !important;
    }

    /* 保険：新しく追加されるメンバー要素が異なる構造でも適用されるように汎用ルール
       デスクトップでは正方形にして丸く表示（楕円化を防ぐ） */
    .accordion-content img,
    .members-grid img {
        width: 160px !important;
        height: 160px !important;
        max-width: none;
        object-fit: cover;
        border-radius: 50% !important;
        display: block;
        margin: 0 auto 0.75rem;
        overflow: hidden;
    }

    /* member-image を含むすべてのメンバー画像を同じサイズに揃える（マネージャーも含む） */
    .member-image,
    .members-grid .member-image,
    .accordion-content .member-image {
        width: 160px !important;
        height: 160px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        overflow: hidden !important;
        margin: 0 auto 1rem !important;
    }

/* 強制的に正方形にして丸く切るユーティリティ */
.circle-img {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.75rem;
}

    .accordion-content .member-name,
    .members-grid .member-name {
        text-align: center;
        font-weight: 600;
        margin-top: 0.25rem;
    }

    /* ヘッダー背景ロゴ（PC）：モバイルは現状維持、PCでは右寄せで一つだけ表示 */
    /* TL と BR デコレーションを非表示にして、main の .hero-logo を右側に配置 */
    .hero-logo-tl,
    .hero-logo-br {
        display: none !important;
    }

    .hero-logo {
        /* 画面右寄りに一つだけ見せる */
        position: absolute;
        top: 12%;
        right: 4%;
        left: auto;
        bottom: auto;
        width: 42%;
        height: auto;
        z-index: 0;
        opacity: 0.12;
        animation: none; /* アニメーションは不要 */
    }

    .hero-logo-img {
        opacity: 0.12;
        filter: blur(1px);
        object-fit: contain;
    }

    /* 罫線の調整：2列時に右側のカラムにのみ右ボーダーを残すなど、必要なら個別に対応 */
    .accordion-content .border-r,
    .accordion-content [class*="border-r"] {
        border-right: 1px solid rgba(0,0,0,0.06) !important;
    }
}

/* ========================================
   フォトギャラリー（複雑なオーバーレイ）
   ======================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2px;
    margin-top: 4rem;
}

.photo-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.photo-caption {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-caption {
    transform: translateY(0);
}

/* ========================================
   スポンサーグリッド
   ======================================== */
.sponsor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
    align-items: center;
    justify-items: center;
}

.sponsor-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
    min-height: 120px;
}

.sponsor-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.sponsor-item img {
    max-width: 100%;
    min-width: 100px;
    height: 100px;
    max-height: 100px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.sponsor-item:hover img {
    filter: grayscale(0%) brightness(1.2);
    opacity: 1;
}

.sponsor-item-ai img {
    min-width: 0;
    height: auto;
    max-height: none;
}

.sponsor-item-ai .sponsor-item-ai__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.sponsor-item-ai .sponsor-item-ai__icon {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.sponsor-item-ai .sponsor-item-ai__title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.sponsor-item-ai .sponsor-item-ai__by {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #4b5563;
    text-transform: lowercase;
}

.sponsor-item-ai .sponsor-item-ai__brand {
    width: 120px;
    height: auto;
    max-height: 48px;
    object-fit: contain;
}

.sponsor-item--jinconnect img,
.sponsor-item--mekabu img {
    min-width: 140px;
    height: 140px;
    max-height: 140px;
}

/* ========================================
   お問い合わせボタン
   ======================================== */
.contact-button {
    display: inline-block;
    padding: 1.5rem 4rem;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    border: 3px solid #fff;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.1em;
}

.contact-button:hover {
    background: #fff;
    color: #1a1a1a;
    transform: scale(1.05);
}

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

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

/* ========================================
   レスポンシブ調整
   ======================================== */
@media (max-width: 768px) {
    .hero .catchphrase {
        font-size: 1.2rem;
        letter-spacing: 0.15em;
    }

    .hero-logo {
        width: 80%;
        height: 60%;
        bottom: -5%;
        right: -10%;
    }

    .member-image {
        width: 150px;
        height: 150px;
        border-radius: 50% !important;
    }

    /* モバイルではユーティリティも小さく */
    .circle-img {
        width: 120px;
        height: 120px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sponsor-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* デスクトップ向け（大画面）で背景ロゴが大きすぎる場合の調整 */
@media (min-width: 1200px) {
    .hero-logo-tl {
        /* 小さくして中心寄りの見え方を控えめに */
        top: -15%;
        left: -5%;
        width: 120%;
        height: 120%;
        opacity: 0.10;
        transform: rotate(-6deg) translate(4%, 4%);
    }

    .hero-logo-br {
        /* 右下は少しだけ外側に出すが、全体は控えめに */
        bottom: -30%;
        right: -35%;
        width: 130%;
        height: 130%;
        opacity: 0.08;
        transform: rotate(6deg) translate(6%, 6%);
    }
}
