/** ##############################
 * Description of main.css
 * Created on : 2026/02/18
 * @version 1.00
 * @copyright Heaven-studio.com
 * @author Myazou3(Toshiyasu.Tkamoto)
 */
@charset "UTF-8";

/* =========================================
   1. ベーススタイル・共通設定
========================================= */
body, html {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    color: #333;
}

/* スマホ・PC共通：全画面背景を疑似要素で固定（iOSの背景バグ対策） */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: url('https://heaven-studio.com/img/back_image.png') no-repeat center center;
    background-size: cover;
    z-index: -1;
}

/* コンテンツセクションの共通設定（背景は少し透けさせる） */
.content-section {
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
#section1 { background: rgba(253, 253, 253, 0.85); }
#section2 { background: rgba(244, 244, 244, 0.85); }
#section3 { background: rgba(253, 253, 253, 0.85); }
#section4 { background: rgba(244, 244, 244, 0.85); }
#section5 { background: rgba(253, 253, 253, 0.85); }
#section6 { background: rgba(244, 244, 244, 0.85); }

/* メニューボタンの共通設定 */
.menu-item {
    cursor: pointer;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.menu-item.current {
    background: #333;
    color: #fff;
}

/* =========================================
   2. PC用レイアウト (画面幅769px以上)
========================================= */
@media (min-width: 769px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        overflow: hidden; /* PCは画面全体をスクロールさせない */
        font-size: 16px;
    }

    /* スマホ専用要素を非表示 */
    .sp-logo, .hamburger, .sp-menu {
        display: none !important;
    }

    /* PC用ロゴ（上部中央） */
    .pc-logo {
        position: absolute;
        top: 5px; left: 50%;
        transform: translateX(-50%);
        width: 250px;
    }

    /* メインレイアウト（左メニュー + 疑似スマホ + 右メニュー） */
    .pc-layout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 30px;
        width: 95%;
        max-width: 1400px;
    }

    /* PC用左右メニュー */
    .pc-menu {
        flex: 1;
        max-width: 200px;
    }
    .pc-menu .menu-item {
        padding: 15px 25px;
        margin: 15px 0;
        font-size: 16px;
    }

    /* 中央：疑似スマホ画面（最大幅750px） */
    .pseudo-sp-screen {
        width: 100%;
        max-width: 750px;
        height: 85vh;
        min-height: 600px; 
        background: rgba(255, 255, 255, 0.3); /* 枠内も少し透過させる */
        border: 12px solid #222;
        border-radius: 40px;
        overflow-y: scroll;
        position: relative;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    }
    .content-section {
        padding: 40px;
        min-height: 100%;
    }

    /* PC版：デザインに溶け込むスクロールバー */
    .pseudo-sp-screen::-webkit-scrollbar { 
        width: 5px; /* 極細スクロールバー */
    }
    .pseudo-sp-screen::-webkit-scrollbar-track { 
        background: rgba(244, 244, 244, 0.85);
        margin-top: 30px;    /* 上の角丸に被らないよう余白を確保 */
        margin-bottom: 30px; /* 下の角丸に被らないよう余白を確保 */
    }
    .pseudo-sp-screen::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.15); /* 背景と同化する薄さ */
        border-radius: 10px; 
    }
    .pseudo-sp-screen::-webkit-scrollbar-thumb:hover { 
        background: rgba(0, 0, 0, 0.3);
    }
}

/* =========================================
   3. スマホ用レイアウト (画面幅768px以下)
========================================= */
@media (max-width: 768px) {
    /* PC専用要素を非表示 */
    .pc-logo, .pc-menu {
        display: none !important;
    }
    
    body {
        overflow-x: hidden; /* 横揺れ防止 */
    }

    /* vwを用いたフォントサイズ・余白の最適化 */
    .content-section {
        padding: 8vw 5vw;
        min-height: 100vh;
    }
    /* セクション1の上部に余白を追加し、ロゴやメニューボタンと文字が被らないようにする */
    #section1 {
        padding-top: 25vw;
    }
    .content-section h2 {
        font-size: 6.5vw;
        margin-top: 0;
        margin-bottom: 4vw;
    }
    .content-section p {
        font-size: 4.2vw;
        line-height: 1.7;
    }

    /* スマホ用ロゴ（左上） */
    .sp-logo {
        position: absolute;
        top: 5px; left: 5px;
        width: 200px;
    }

    /* -----------------------------------------
       ハンバーガーボタン (サイズ・間隔すべて固定)
    ----------------------------------------- */
    .hamburger {
        position: fixed;
        top: 0; right: 0; 
        width: 40px;
        height: 40px;
        padding: 10px; 
        margin: 10px;  
        box-sizing: content-box; /* 全体で 80px × 80px の領域を確保 */
        z-index: 9999;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 10px; /* 線と線の間隔を10pxに固定 */
    }
    .hamburger span {
        display: block;
        width: 100%; 
        height: 4px; /* 線の太さを固定 */
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }
    /* 「×」へのアニメーション (間隔10px + 線の太さ4px = 14px移動) */
    .hamburger.active span:nth-child(1) { transform: translateY(14px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-14px) rotate(-45deg); }

    /* -----------------------------------------
       スマホ用 スライドインメニュー
    ----------------------------------------- */
    .sp-menu {
        position: fixed;
        top: 0; right: 0;
        width: 100%; height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        z-index: 9998;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        pointer-events: none; /* 非表示時の誤クリック防止 */
        transition: opacity 0.5s;
    }
    .sp-menu.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* メニュー項目の右からのスライドインアニメーション */
    .sp-menu .menu-item {
        font-size: 5vw;
        padding: 4vw 10vw;
        margin: 3vw 0;
        width: 60vw;
        transform: translateX(100vw);
        opacity: 0;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s;
    }
    .sp-menu.active .menu-item {
        transform: translateX(0);
        opacity: 1;
    }
    /* メニュー単位で順番に表示させるための遅延 */
    .sp-menu.active .menu-item:nth-child(1) { transition-delay: 0.1s; }
    .sp-menu.active .menu-item:nth-child(2) { transition-delay: 0.2s; }
    .sp-menu.active .menu-item:nth-child(3) { transition-delay: 0.3s; }
    .sp-menu.active .menu-item:nth-child(4) { transition-delay: 0.4s; }
    .sp-menu.active .menu-item:nth-child(5) { transition-delay: 0.5s; }
    .sp-menu.active .menu-item:nth-child(6) { transition-delay: 0.6s; }

    /* スマホ画面の枠設定解除 */
    .pseudo-sp-screen {
        width: 100%;
        height: auto;
    }
}