html {
    scroll-behavior: smooth;
}

body {
    font-family: sans-serif;
    margin: 0;
    background-color: #fff;
    color: #333;
    line-height: 1.8;
}

/* ▼▼▼【ここから追加】カスタムフォントの読み込み ▼▼▼ */
@font-face {
    font-family: 'tomfont';
    /* フォントに名前を付ける */
    src: url('../font/tomfont2.woff2') format('woff2'),
        url('../font/tomfont2.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ▲▲▲【ここまで追加】▲▲▲ */


h1,
h3,
.logo-font {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-weight: 800;
}

h2,
nav a {
    font-family: 'tomfont', sans-serif;
    /* M PLUS Rounded 1c から tomfont に変更 */
    letter-spacing: 0.08em;
}


header {
    /* 背景と追従の設定だけを残す */
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1001;
}

.header-container {
    /* フッターの .footer-info と同じ設定 */
    max-width: 960px;
    margin: 0 auto;

    /* 元のheaderから持ってきた設定 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    /* 左右の余白は維持 */
}

.logo img {
    height: 50px;
    width: auto;
}

/* ヘッダーメニュー */
nav a {
    margin: 0 9px;
    text-decoration: none;
    color: #555;
    font-weight: bold;
    font-size: 1.35em;
    /* transformとcolorの両方をアニメーションさせるように変更 */
    transition: transform 0.3s ease-in-out, color 0.2s ease-in-out;
    position: relative;
    top: 10px;
    letter-spacing: 0.05em;
}

nav a:hover {
    /* マウスが乗った時の動き */
    transform: scale(1.15) rotate(-5deg);

    /* パキッと分かれたカラフルな文字色 */
    background: linear-gradient(45deg,
            #FF6B6B 25%,
            #FFD93D 25% 50%,
            #6BCB77 50% 75%,
            #4D96FF 75%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

nav a:last-child {
    margin-right: 0px;
}

section {
    padding: 80px 20px;
    text-align: center;
    scroll-margin-top: 100px;
}

section h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    letter-spacing: 0.05em;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 5px;
    background: linear-gradient(90deg, #FF6B6B, #FFD93D, #6BCB77, #4D96FF);
}

#hero {
    padding: 0;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6;
    overflow: hidden;
    border-radius: 10px;
    margin: 20px 0;
}

.slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-size: 1.5em;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.slider-container:hover .slider-btn {
    opacity: 1;
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    padding: 0;
}

.dot.active {
    background-color: white;
}


/* FOOTER */
footer {
    background-color: #fff;
    color: #333;
    padding: 30px 40px;
}

.footer-character-area {
    text-align: center;
    margin-bottom: 20px;
}

.footer-character-area .character-img {
    height: 130px;
    width: auto;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* ③ フッターアイコンのスタイル */
.sns-links a {
    margin-right: 15px;
    display: inline-block;
    /* アニメーションのため */
    transition: transform 0.2s ease;
    /* ホバー時の動きを滑らかに */
}

.sns-links a:hover {
    transform: scale(1.1);
    /* ホバー時に少し大きくする */
}

.sns-links a img {
    height: 30px;
    /* アイコンの高さを指定 */
    vertical-align: middle;
    /* 中央揃えを綺麗に */
}

.copyright {
    margin: 0;
    font-size: 0.9em;
    color: #777;
}


/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility .3s, opacity .3s;
}

.modal.is-visible {
    visibility: visible;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform .3s;
}

.modal.is-visible .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8em;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
}

/* ① ABOUTポップアップのスタイル */
#about-modal .modal-content {
    width: 70vw;
    /* 画面の70%の幅に */
    max-width: 600px;
    /* ただし最大幅は600pxに */
}

.about-character-img {
    height: 80px;
}

#about-modal h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    margin-top: -2px;
    letter-spacing: 0.05em;
}

#about-modal .about-container {
    font-size: 0.9em;
    line-height: 1.8;
}

#about-modal .about-container p {
    margin-bottom: 1em;
}

.modal-sns-links {
    text-align: center;
    /* アイコンを中央揃えにする */
    margin-top: 30px;
    /* 上のテキストとの間に余白を追加 */
}

/* CONTACTポップアップ */
.modal .contact-button {
    background: none;
    color: #333;
    font-size: 2em;
    /* 少し大きくして見栄えを調整 */
    text-decoration: none;
    padding: 10px;
    display: inline-block;
    margin-top: 10px;
    font-family: 'tomfont', sans-serif;
    /* tomfont を適用 */
    font-weight: normal;
    /* tomfontは太字指定なしでも太いのでnormalに */
    transition: color 0.2s ease-in-out;
    /* 色が戻る時のアニメーション */
}

.modal .contact-button:hover {
    animation: pulse-bounce 0.4s ease;
    /* 既存の跳ねる動きはそのまま */
    /* ↓ヘッダーと同じ虹色効果を追加 */
    background: linear-gradient(45deg,
            #FF6B6B 25%,
            #FFD93D 25% 50%,
            #6BCB77 50% 75%,
            #4D96FF 75%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===================================
// サイトマップとバナーリンク
// =================================== */

/* --- 全体を囲むコンテナ --- */
.site-extras {
    background-color: #1a1a1a; /* 背景を真っ黒より少し柔らかいダークグレーに */
    color: #fff;               /* このエリアの基本文字色を白に */
    padding: 20px 0;
    border-top: 1px solid #333; /* 境界線の色を調整 */
}

/* --- 各セクションの共通スタイル --- */
#sitemap, #bookmarks {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 40px;
    text-align: center;
}

#sitemap h2, #bookmarks h2 {
    font-family: 'tomfont', sans-serif;
    font-size: 2em;
    color: #fff; /* 見出しの文字色を白に */
    margin-bottom: 30px;
    letter-spacing: 0.08em;
}

/* --- サイトマップのリスト --- */
.sitemap-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 30px;
    margin-bottom: -20px;
}

.sitemap-list a {
    text-decoration: none;
    color: #fff; /* リンクの文字色を白に */
    font-weight: bold;
    transition: color 0.2s;
}

.sitemap-list a:hover {
    color: #aaa; /* ホバー時の色を明るいグレーに */
}

/* --- バナーリンク --- */
.banner-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.banner-grid a img {
    display: inline-block;
    transition: opacity 0.3s;
}

.banner-grid a:hover img {
    opacity: 0.7;
}

.banner-grid img {
    height: 100px;
    width: auto;
    border-radius: 5px;
    vertical-align: middle;
}


/* ===================================
// サイトマップとバナーのスマホ表示用の設定
// =================================== */
@media screen and (max-width: 768px) {

    /* --- サイトマップのリストを縦積みに --- */
    .sitemap-list {
        flex-direction: column;
        gap: 20px;
    }

}

/* ② ぷるんとバウンドする動きの定義 */
@keyframes pulse-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@media screen and (max-width:768px) {

    /* 1. 万が一はみ出してもスクロールバーを非表示にする */
    body {
        overflow-x: hidden;
    }

    /* 2. 各セクションに左右の余白を持たせる */
    /* これがないと、中の要素が画面の端にくっついてしまいます */
    main>section {
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
        /* paddingを幅の計算に含める */
    }

    /* PC用のヘッダーメニューを非表示に */
    .pc-nav {
        display: none;
    }

    /* ハンバーガーボタンのスタイル */
    .hamburger-btn {
        display: block;
        /* スマホ表示のときだけ表示 */
        position: fixed;
        /* スクロールしても追従 */
        top: 25px;
        right: 25px;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1000;
        /* 一番手前に表示 */
    }

    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #555;
        /* 線の色 */
        border-radius: 2px;
        transition: transform 0.3s, opacity 0.3s;
        position: absolute;
        left: 0;
    }

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

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

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

    /* メニューが開いた時のボタン（×印）のスタイル */
    .hamburger-btn.is-open span:nth-child(1) {
        top: 18px;
        transform: rotate(45deg);
    }

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

    .hamburger-btn.is-open span:nth-child(3) {
        top: 18px;
        transform: rotate(-45deg);
    }


    /* スマホ用ナビゲーションメニューのスタイル */
    .sp-nav {
        font-size: small;
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        height: auto;
        /* 高さをコンテンツに合わせる */
        padding: 5px 0 25px;
        /* メニュー内の上下に余白を追加 */
        background-color: rgba(85, 85, 85, 0.98);
        backdrop-filter: blur(10px);
        z-index: 999;
        text-align: center;
        visibility: hidden;
        transform: translateY(-100%);
        /* ←画面の外（上）に隠す */
    }

    .sp-nav.is-opening {
        transition: transform 0.5s ease-in-out, visibility 0.5s ease-in-out;
    }

    /* メニューが開いた時のスタイル */
    .sp-nav.is-open {
        visibility: visible;
        transform: translateY(0);
        /* ←画面の内（上端）に表示 */
    }

    .sp-nav ul {
        list-style: none;
        padding: 0;
    }

    .sp-nav li {
        margin: 20px 0;
    }

    .sp-nav a {
        text-decoration: none;
        color: #ffffff;
        font-family: 'tomfont', sans-serif;
        /* ご指定のフォント */
        font-size: 2em;
        /* 文字サイズを大きめに */
        font-weight: bold;
        transition: color 0.2s;
    }

    /* ホバー時のスタイルも適用 */
    .sp-nav a:hover {
        background: linear-gradient(45deg,
                #FF6B6B 25%,
                #FFD93D 25% 50%,
                #6BCB77 50% 75%,
                #4D96FF 75%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    /* --- フッターのスマホ表示調整 --- */
    .footer-info {
        flex-direction: column; /* アイテムを縦に並べる */
        gap: 15px;              /* アイテム間の隙間を空ける */
    }

    .sns-links a:last-child {
        margin-right: 0; /* 最後のアイコンの右側の余白をなくして、完全な中央揃えにする */
    }

    /* --- モーダルのスマホ表示調整 --- */
    #about-modal .modal-content,
    #contact-modal .modal-content {
        width: 85%; /* 横幅を画面の85%に指定 */
        padding: 30px 20px; /* 内側の余白を調整 */
    }

    #contact-modal .contact-button {
        font-size: 6vw; /* 文字サイズを画面幅に連動させる */
        word-break: break-all; /* 長い単語（メアド）をはみ出さずに改行させる */
    }
}

/* --- 画面幅が769px以上の時に適用されるスタイル --- */
@media (min-width: 768px) {

    /* ハンバーガーボタンを非表示に */
    .hamburger-btn {
        display: none;
    }

    /* スマホ用メニューを非表示に */
    .sp-nav {
        display: none;
    }
}