/* === Reset / Base ======================================================= */
* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'FunwariRound';
    src: url('../fonts/FUNWARI-ROUND.OTF') format('opentype');
    font-display: swap;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
}

/* === Vars =============================================================== */
:root {
    --header-h-pc: 350px;
    /* PCヘッダー高さ */
    --header-h-sp: 200px;
    /* SPヘッダー高さ */
}

/* === Layout ============================================================= */
.wrapper {
    min-height: 100vh;
    /* フッターを下へ */
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 0 20px;
}

/* === Header ============================================================= */
.cloud-header {
    position: relative;
    background-size: cover;
    text-align: center;
    z-index: 99;
}

/* 切れ目ぼかし */
.cloud-header::after {
    content: "";
    display: block;
    height: 1px;
}

/* 見出し(別用途) -------------------------------------------------------- */
.cloud-header .header-text {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.4rem;
    color: #fff;
    opacity: 0;
    animation: fadeInText 2s ease-out 1s forwards;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, .3);
}

@keyframes fadeInText {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 波線 --------------------------------------------------------------- */
.wave-line {
    width: 100%;
    height: 40px;
    background: url("../images/wave-line.png") no-repeat center;
    background-size: cover;
    margin-top: -10px;
}

.dotted-line {
    border-bottom: 20px dashed #fff4e1;
    width: 100%;
    margin: 20px 0;
}

/* ロゴ --------------------------------------------------------------- */
.logo-area {
    margin-bottom: 1rem;
}

.logo-img {
    display: block;
    width: 100%;
    height: var(--header-h-pc);
    object-fit: cover;
    /* 歪み防止 */
    margin: 0 auto;
    padding: 0;
}

.pc-logo {
    display: block;
}

.mobile-logo {
    display: none;
}

/* === HERO (画像上のテキスト) =========================================== */
/* 画像の上に文字を重ねる土台 */
.cloud-header .logo-area {
    position: relative;
}

/* テキストレイヤー（全ページ） */
.hero-copy {

    font-family: 'FunwariRound';
    src: url('../fonts/FUNWARI-ROUND.OTF') format('opentype');
    font-display: swap;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4em;
    z-index: 2;
    pointer-events: none;
    text-align: center;
    padding: 0 4vw;
}

/* タイトルは常時表示（他ページも） */
.hero-title {
    font-family: 'FunwariRound', "M PLUS Rounded 1c", system-ui, sans-serif;
    font-weight: 700;
    margin: .1em 2rem 4rem;
    color: #fff;
    font-size: clamp(36px, 8vw, 88px);
    letter-spacing: .3em;
    text-transform: uppercase;
    text-shadow: 9px 5px 18px rgba(138, 222, 225, .84);
}

/* キャッチ／サブ／ラインはデフォ非表示（＝他ページでは出さない） */
.hero-catch,
.hero-sub,
.hero-line {
    display: none;
}

/* トップページだけ表示したい場合（header に .is-top が付く想定） */
.cloud-header.is-top .hero-catch,
.cloud-header.is-top .hero-sub,
.cloud-header.is-top .hero-line {
    display: block;
}

.hero-catch {
    margin: 3rem 0 0;
    color: #fff;
    font-size: clamp(14px, 2.6vw, 22px);
    font-weight: 500;
    text-shadow: 1px 4px 4px rgba(22, 107, 143, .35);
}

.hero-sub {
    margin: 0;
    color: #fff;
    font-size: clamp(11px, 2vw, 18px);
    font-weight: 400;
    text-shadow: 2px 4px 8px rgba(31, 161, 217, .89);
    white-space: nowrap;
}

.hero-line {
    width: min(64%, 720px);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, .6);
    margin: .6em 0 0;
}

/* === Navigation ========================================================= */
.main-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    z-index: 1002;
    position: relative;
}

.main-nav li a {
    font-size: 1.2rem;
    color: #615ff8;
    text-decoration: none;
    font-weight: 500;
    padding: .5rem .8rem;
    transition: color .2s ease, transform .2s ease;
}

/* PC hover アニメ */
@media (min-width:768px) {
    .main-nav li a {
        transform: rotate(8deg);
    }

    .main-nav li a:hover {
        color: #d2bdfb;
        transform: rotate(8deg) scale(1.05);
    }
}

/* アクセシビリティ */
.main-nav a:focus-visible,
.menu-toggle:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ハンバーガー・トグル */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

.menu-toggle {
    display: none;
    /* SPで表示 */
    font-size: 2rem;
    background: none;
    border: none;
    color: #f5a1a1;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
    cursor: pointer;
}

/* ドロップダウン */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background: #add8e6;
    border: 1px solid #add8e6;
    list-style: none;
    padding: 0;
    margin: 0;
    top: 100%;
    left: 0;
    z-index: 9999;
}

.dropdown.show .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: .5rem 1rem;
    white-space: nowrap;
}

.only-mobile {
    display: none;
}

.only-desktop {
    display: block;
}

/* === Footer ============================================================= */
footer {
    background: linear-gradient(to bottom, #ffffff 10%, #9dd9f7);
    color: #3a3a3a;
    padding: 2rem 1.5rem;
    font-size: .9rem;
    text-align: center;
    line-height: 1.6;
    font-weight: 500;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0 auto;
    max-width: 1000px;
    padding: 1rem;
}

.footer-left,
.footer-center,
.footer-right {
    flex: 1 1 30%;
    text-align: center;
    min-width: 200px;
}

.footer-center p {
    font-weight: bold;
    color: #333;
    margin: .5rem 0;
}

.footer-left ul,
.footer-center ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-left a {
    color: #0b0b0b;
    text-decoration: none;
    font-weight: 500;
    font-size: .9rem;
    transition: color .2s ease, text-decoration-color .2s ease;
}

.footer-left a:hover {
    color: #0b0b0b;
    text-decoration: underline;
}

.footer-left a:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 6px;
    border-radius: 6px;
}

.footer-right p {
    margin: .2rem 0;
    font-size: .95rem;
    color: #3a3a3a;
}

.footer-right p:last-child {
    font-size: .85rem;
    font-style: italic;
    color: #070707;
}

/* === Page fade（thanks等） ============================================= */
.fade-page {
    opacity: 1;
    transition: opacity 2s ease;
}

.fade-page.fade-out {
    opacity: 0;
}

/* === Menu open scroll lock ============================================ */
body.active {
    overflow: hidden;
}

/* === Tablet+ (>=768px) ================================================= */
@media screen and (min-width:768px) {
    .only-mobile {
        display: none;
    }

    .only-desktop {
        display: block;
    }

    .menu-toggle {
        display: none;
    }

    .card-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .card {
        width: 100%;
    }

    .pc-logo {
        display: block;
        height: var(--header-h-pc);
    }

    .mobile-logo {
        display: none;
    }

    menu-illustration,
    .menu-illustration img {
        display: none;
    }


}

/* === Mobile (<=600px) ================================================== */
@media screen and (max-width:600px) {

    /* ★ ここが本題：モバイルは全ページで hero を非表示 */
    .cloud-header .hero-copy {
        display: none;
    }

    .wrapper {
        flex-direction: column;
    }

    /* Swiper（トップページ） */
    .swiper {
        padding-top: 100px;
    }

    .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .swiper-slide img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 24px;
        padding: .5rem;
        box-shadow: 0 8px 16px rgba(250, 186, 243, .6);
    }

    .swiper-button-prev,
    .swiper-button-next {
        font-size: 1.5rem;
        padding: 1.5rem;
    }

    .dotted-line {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .pc-logo {
        display: none;
    }

    .mobile-logo {
        display: block;
        height: auto;
    }

    /* 固定ヘッダ分の余白 */
    body {
        padding-top: var(--header-h-sp);
    }

    /* モバイルヘッダー固定 */
    .cloud-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: var(--header-h-sp);
    }

    /* モバイルメニュー（スライドイン） */
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        background: linear-gradient(to bottom, #fef6f9 0%, #d6f0fa 100%);
        z-index: 9999;
        transform: translateY(-100%);
        transition: transform .4s ease-in-out;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 2rem;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
        list-style: none;
        padding: 0;
        margin: 3rem 0 0;
    }

    .main-nav li a {
        display: block;
        background: #fff;
        border-radius: 12px;
        padding: 1rem;
        text-align: center;
        font-size: 1.1rem;
        color: #615ff8;
        box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
        text-decoration: none;
        font-weight: 600;
    }

    .menu-illustration {
        height: 40%;
        display: flex;
        justify-content: center;
        background-size: contain;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        flex: 1 1 100%;
        text-align: center;
    }

    .only-mobile {
        display: block;
    }

    .only-desktop {
        display: none;
    }

    .card-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .card {
        width: 100%;
    }

    .menu-illustration {
        display: flex;
    }

}

/* === Menu illustration: ふわふわ === */
.menu-illustration {
    align-items: flex-end;
    justify-content: center;
    /* 背景は使わないので消す（重複描画を防ぐ） */
    background: none !important;

}

.menu-illustration img {
    width: min(70vw, 380px);
    height: auto;
    transform-origin: 50% 90%;
    will-change: transform;
}

.top-main>section+section {
    margin-top: clamp(18px, 3vw, 28px);
}

/* 通常はアニメを有効化 */
@media (prefers-reduced-motion: no-preference) {
    @keyframes sway {
        0% {
            transform: rotate(-2deg) translateY(0);
        }

        50% {
            transform: rotate(2deg) translateY(-4px);
        }

        100% {
            transform: rotate(-2deg) translateY(0);
        }
    }

    .menu-illustration img {
        animation: sway 5.2s ease-in-out infinite;
    }
}

/* 動きを苦手設定の人は停止 
@media (prefers-reduced-motion: reduce) {
    .menu-illustration img {
        animation: none !important;
        transform: none !important;
    }*/

@media (max-width: 600px) {
    .menu-illustration img {
        display: block;
    }
}

@media (min-width: 601px) {
    .menu-illustration img {
        display: none;
    }
}