/**
 * ================================================================================
 *  バンドサイト汎用スタイル管理ファイル
 * ================================================================================
 * 
 * ファイル概要:
 *   このファイルは全ページで共通する基本スタイルを定義しています。
 *   CSS変数、基本要素スタイル、ヘッダー・フッターデザイン、レスポンシブ対応を含みます。
 * 
 * 主な機能:
 *   - CSS変数による色・フォント管理（:root セクション）
 *   - HTML全体のベーススタイル定義
 *   - ナビゲーション（ハンバーガーメニュー）スタイル
 *   - フッターレイアウト・SNSアイコンスタイル
 * 
 * 外部依存関係:
 *   - functions.php: CSS変数が動的に出力されます（:root内）
 *   - contact-tabs.js, live-archive.js など: クリックイベント等で.openクラスを操作
 *   - header.php: ヘッダーHTMLの構造定義
 * 
 * 保守ノート:
 *   - CSS変数の更新時は functions.php の出力ロジックを確認してください
 *   - ハンバーガーメニュー表示/非表示は JavaScript で制御されています
 *   - レスポンシブデザイン対応：モバイルファースト設計
 * 
 * ================================================================================
 */

/*
* =====================================
*  BASE STYLES - 基本スタイル
* =====================================
*/

:root {
    /* CSS変数の仕組み:
       これらの変数は PHP（functions.php）から動的に出力されます。
       必要に応じて PHP→CSS の連携を確認してください。
       ※ --color-secondary など、ここに記載されていない変数がある場合、
          PHP側の出力ロジックをチェックしてください
    */
    --color-background: #fff;
    --color-text: #000;
    --font-main: 'Montserrat', 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    --font-heading: 'Montserrat', 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
    --header-height: 60px;
    --section-width: 70%;
    --section-width-mobile: 90%;

    /* ========================================
       フォントサイズ定義 (clamp()による流動スケーリング)
       min/preferred(vw)/max の3パラメータで、375px～1920pxの帯域で
       滑らかにスケーリング
       ======================================== */
    /* 見出し */
    --fs-h1: clamp(2.25rem, 5vw, 3.5rem);
    --fs-h2: clamp(1.5rem, 3vw, 2rem);
    --fs-h3: clamp(1.125rem, 2.5vw, 1.5rem);
    --fs-h4: clamp(1rem, 1.5vw, 1.2rem);
    --fs-h5: clamp(0.875rem, 1.2vw, 1rem);
    --fs-h6: clamp(0.75rem, 1vw, 0.9rem);

    /* フロントページのセクションタイトルサイズ（ちょっと大き） */
    --fs-front-section-title: clamp(2rem, 3.5vw, 2.25rem);

    /* 本文・UI */
    --fs-body: clamp(0.875rem, 1.1vw, 1rem);
    --fs-small: clamp(0.75rem, 0.9vw, 1rem);

    /* コンポーネント固有 */
    --fs-tab: clamp(1rem, 1.2vw, 1.5rem);
    --fs-label: clamp(0.95rem, 0.9vw, 1rem);
    --fs-date-archive: clamp(1.25rem, 4vw, 2.5rem);
    --fs-date-front: clamp(1.3rem, 2.5vw, 1.5rem);
    --fs-modal-close: clamp(2.5rem, 5vw, 5rem);
    --fs-input: clamp(0.85rem, 1vw, 0.9rem);
    --fs-info: clamp(0.85rem, 1vw, 0.95rem);

    /* フロントページ個別リンクタイトルサイズ */
    --fs-front-link-title: clamp(1rem, 2.5vw, 1.5rem);

    --fs-single-title: clamp(1.125rem, 2.5vw, 1.5rem);

    background-color: var(--site-background-color);
    color: var(--site-text-color);
    font-family: var(--font-main);
}


html {
    height: 100%;
    font-size: 16px;
    font-family: var(--font-main);
    /* font-display: swap 最適化 - フォールバックとのサイズ差を補正 */
    font-size-adjust: 0.95;
}

/* 最新ブラウザでのさらなる最適化（@supports対応） */
@supports (font-size-adjust: from-font) {
    html {
        font-size-adjust: from-font;
    }
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    font-weight: 400;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
    margin: 10px 0;
}

h3 {
    font-size: var(--fs-h3);
}

h4 {
    font-size: var(--fs-h4);
}

h5 {
    font-size: var(--fs-h5);
}

h6 {
    font-size: var(--fs-h6);
}

a {
    color: var(--site-text-color);
}


p {
    font-size: var(--fs-body);
}

/* サイト全体の幅を80%にし中央寄せ */
.site-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    margin: 0 auto;
}

/* ========================================
   HEADER NAVIGATION - ヘッダー・ナビゲーション
   ======================================== */

header.site-header {
    /* メインヘッダーのレイアウト定義
       - 高さ: 60px（固定、--header-height変数で管理）
       - 背景: CSS変数で管理
       - ナビゲーションボタンはハンバーガーメニュー形式
       - flex-shrink: 0 でヘッダーの圧縮を防ぐ
    */
    background-color: var(--header-background-color);
    color: var(--header-text-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-shrink: 0;
}

.site-title-wrap {
    text-align: left;
}

.site-header-nav-wrap {
    width: var(--section-width);
    margin: auto;
}

.site-header-nav-wrap button {
    right: calc((100% - var(--section-width)) / 2);
    /* right: 15%; */
}

.hamburger-menu {
    /* ハンバーガーメニューボタン
       - JavaScript で .open クラスの追加/削除により表示/非表示を制御
       - z-index: 100で、ナビゲーション（z-index: 99）よりも上に表示
       - 関連ファイル: contact-tabs.js, live-archive.js 等で操作
    */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 2vw;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.hamburger-bar {
    width: 28px;
    height: 3px;
    background-color: var(--header-text-color);
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ハンバーガーメニュー - 開かれた状態のアニメーション（バツ印） */
.hamburger-menu.open .hamburger-bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.hamburger-menu.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .hamburger-bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

.site-title {
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 0px;
}

.site-title a {
    color: var(--header-text-color);
    text-decoration: none;
}

.site-nav {
    /* サイトナビゲーションメニュー
       - デフォルト: display: none（非表示）
       - .open クラス追加時: display: flex（表示）
       - JavaScript で動的にクラス付与される
       - z-index: 99（ハンバーガーボタン 100 より下）
    */
    text-align: center;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--menu-background-color);
    width: 100%;
    max-width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 99;
}

/* メニュー展開アニメーション キーフレーム定義 */
@keyframes slideDownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-nav.open {
    display: flex;
    animation: slideDownFadeIn 0.4s ease-out;
}

.main-menu {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
    justify-content: center
}

.main-menu li {
    display: block;
    margin: 0 1em;
    opacity: 0;
    transform: translateY(-20px);
}

.site-nav.open .main-menu li {
    animation: slideDownFadeIn 0.4s ease-out forwards;
}

.main-menu a {
    color: var(--header-text-color);
    opacity: 1;
    text-decoration: none;
    font-size: 1rem;
    padding: 1em 0.5em;
    display: block;
}

/*
@media (min-width: 900px) {
    .site-nav {
        position: static;
        display: flex !important;
        background: none;
        width: auto;
        max-width: none;
        box-shadow: none;
        flex-direction: row;
        align-items: center;
    }
    .main-menu {
        flex-direction: row;
    }
    .main-menu li {
        margin: 0 1em;
    }
    .hamburger-menu {
        display: none;
    }
}
*/


/* ========================================
   FOOTER - フッター
   ======================================== */

/* フッターデザイン */
.site-footer {
    /* サイト全体のフッター定義
       - 高さ: 100px（固定）
       - 背景色: CSS変数で管理
       - Flexbox対応: スティッキーフッター実装
       - flex-shrink: 0 でフッターの圧縮を防ぐ
    */
    height: 100px;
    background: var(--footer-background-color);
    display: flex;
    align-items: center;
    width: 100%;
    flex-shrink: 0;
    margin-top: 30px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 70%;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
}

.footer-right {
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
}

.footer-left p {
    margin: 0;
    font-size: 16px;
    color: var(--footer-text-color);
}

/* FontAwesome SNSアイコン用 */
.sns-icon {
    /* footer.php で出力されるSNSソーシャルアイコン用スタイル
       - FontAwesome利用
       - ホバー時の不透明度変化でインタラクティブ表現
    */
    display: inline-block;
    font-size: 32px;
    color: var(--footer-text-color);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sns-icon:hover {
    opacity: 1;
}

/* ========================================
   MAIN CONTENT - メインコンテンツ
   ======================================== */

.site-main {
    flex: 1;
}

/* ========================================
   RESPONSIVE - スマートフォン対応メディアクエリ
   ======================================== */

/* スマートフォン向けメディアクエリ (768px以下) */
@media (max-width: 768px) {

    /* ヘッダーの調整 */
    header.site-header {
        height: 60px;
    }

    .site-title {
        font-size: 2.5rem;
    }

    .site-header-nav-wrap {
        width: 100%;
    }

    .hamburger-menu {
        right: 1.5vw;
    }

    .site-nav {
        right: 0;
        width: 100%;
        max-width: 100%;
    }

    .main-menu {
        flex-direction: column;
        width: 100%;
        padding: 1em 0;
    }

    .main-menu li {
        margin: 0;
        padding: 0.5em 1em;
        text-align: right;
    }

    .main-menu a {
        font-size: 1.25rem;
        padding: 0.5em 0;
    }


    .site-header-nav-wrap button {
        right: 5px;
    }

    /* フッターの調整 */
    .site-footer {
        height: auto;
        /* padding: 1.5rem 1rem; */
        margin-top: 60px;
    }

    .footer-inner {
        max-width: 100%;
        flex-direction: row;
        /* gap: 1rem; */
        padding: 0;
        justify-content: space-between;
    }

    .footer-left {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .footer-left p {
        font-size: 14px;
        margin: 0.5rem 0;
    }

    .footer-right {
        width: 100%;
        justify-content: center;
        gap: 1rem;
        font-size: 1.2rem;
    }

    .sns-icon {
        font-size: 24px;
    }


}

/* 超小型スマートフォン向けメディアクエリ (480px以下) */
@media (max-width: 480px) {
    .site-title {
        padding-left: 10px;
    }

    .site-title a {
        font-size: var(--fs-h1);
    }

    .site-footer {
        margin-top: 40px;
    }

    .footer-right {
        gap: 0.75rem;
        font-size: 1rem;
    }

    .sns-icon {
        font-size: 20px;
    }
}