/* ==========================================================================
   共通変数
   ========================================================================== */
:root {
    --color-navy: #002b6b;
    --color-red: #e60012;
    --color-white: #ffffff;
    --color-silver: #bfc0c0;
    --font-mincho: 'Shippori Mincho B1', 'Hiragino Mincho ProN', serif;
    --header-height: 108px;
}

/* ==========================================================================
   ロゴ
   ========================================================================== */
.logo-wordmark {
    display: block;
    width: 209px;
    height: auto;
}

/* ==========================================================================
   ボタン
   ========================================================================== */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: var(--btn-width, 240px);
    height: 56px;
    padding: 0 24px;
    background-color: var(--color-red);
    color: var(--color-white);
    font-family: var(--font-mincho);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.95;
    text-decoration: none;
    word-break: break-word;
    flex-shrink: 0;
    transition: background-color .2s;

    &:hover {
        background-color: #b9000e;
    }

    .btn-primary__label {
        flex: 1 0 0;
        min-width: 0;
    }

    .btn-primary__arrow {
        font-size: 20px;
        width: 20px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
    color: var(--color-white);

    .site-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 80px;
        height: 100%;
    }

    .site-header__title {
        line-height: 1;
    }

    .site-header__logo {
        display: block;
        flex-shrink: 0;
    }

    .site-header__right {
        display: flex;
        align-items: center;
        gap: 40px;
        flex-shrink: 0;
    }

    .site-header__nav {
        ul {
            display: flex;
            align-items: center;
            gap: 40px;
        }

        a {
            font-family: var(--font-mincho);
            font-weight: 700;
            font-size: 16px;
            line-height: 1.45;
            color: var(--color-white);
            white-space: nowrap;
            /* 写真の上でも読めるよう薄い影を付ける */
            text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
        }
    }

    .site-header__mobile {
        display: none;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        padding: 0 40px;
    }

    .site-header__mobile-logo {
        display: block;
        flex-shrink: 0;
    }

    .site-header__menu-btn {
        background: none;
        border: none;
        cursor: pointer;
        width: 32px;
        height: 32px;
        padding: 0;
        flex-shrink: 0;

        img {
            width: 100%;
            height: 100%;
        }
    }

    .site-header__drawer {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 16px 40px 32px;
        background: #063460 url("../images/page/blue-paper.jpg") center / 700px auto;

        ul {
            margin-bottom: 24px;
        }

        li a {
            display: block;
            padding: 16px 0;
            border-bottom: 1px solid rgba(255, 255, 255, .3);
            font-family: var(--font-mincho);
            font-weight: 700;
            font-size: 16px;
        }

        .btn-primary {
            --btn-width: 100%;
        }
    }
}

/* ==========================================================================
   下層ページ見出し帯
   ========================================================================== */
.c-page-header {
    position: relative;
    isolation: isolate;
    padding-block: calc(55px + var(--header-height)) 100px;
    color: var(--color-white);
    background: #063460 url("../images/page/blue-paper.jpg") center / 700px auto;
    font-family: var(--font-mincho);

    &::after {
        content: "";
        position: absolute;
        z-index: -1;
        inset: auto 0 0;
        height: 95px;
        background: url("../images/page/title-wave.jpg") center bottom / 100% 100% no-repeat;
    }

    .c-page-header__inner {
        width: 84%;
        max-width: 1200px;
        margin-inline: auto;
    }

    .c-page-header__label {
        font: 13px/1.5 Georgia, serif;
        letter-spacing: .07em;
        margin-bottom: 8px;
    }

    .c-page-header__title {
        font-size: 44px;
        font-weight: 500;
        letter-spacing: .13em;
        line-height: 1.5;
    }
}

.c-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 16px;
    font-size: 12px;

    a:hover {
        text-decoration: underline;
        text-underline-offset: 5px;
    }
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta {
    position: relative;
    background-image: url("../images/cta-bg.png");
    background-size: 270px 96px;
    background-position: left top;
    overflow: hidden;

    .cta__wave {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        aspect-ratio: 2201 / 647;
        z-index: 0;
        pointer-events: none;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center bottom;
        }
    }

    /* PCは下層ページのコンテンツ幅（.container）と揃える */
    .cta__inner {
        width: min(calc(100% - 160px), 1200px);
        margin: 0 auto;
        padding: 140px 0 230px;
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
        position: relative;
        z-index: 1;
    }

    .cta__label {
        font-family: var(--font-mincho);
        font-weight: 400;
        font-size: 13px;
        line-height: 1.95;
        color: var(--color-navy);
        word-break: break-word;
    }

    .cta__content {
        display: flex;
        justify-content: space-between;
        gap: 100px;
        align-items: flex-end;
        width: 100%;
        overflow: hidden;
        word-break: break-word;

        .btn-primary {
            --btn-width: 300px;
            flex-shrink: 0;
        }
    }

    .cta__copy {
        display: flex;
        flex-direction: column;
        gap: 32px;
        flex: 0 1 800px;
        min-width: 0;
        color: var(--color-navy);
    }

    .cta__title {
        font-family: var(--font-mincho);
        font-weight: 700;
        font-size: 56px;
        line-height: 1.45;
    }

    .cta__text {
        font-family: var(--font-mincho);
        font-weight: 400;
        font-size: 16px;
        line-height: 1.95;
    }
}

/* ==========================================================================
   フッター
   ========================================================================== */
.footer {
    background: #063460 url("../images/page/blue-paper.jpg") center / 700px auto;

    .footer__inner {
        max-width: 1440px;
        margin: 0 auto;
        padding: 100px 100px 9px;
        display: flex;
        flex-direction: column;
        gap: 80px;
    }

    .footer__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .footer__company {
        display: flex;
        flex-direction: column;
        gap: 16px;
        flex-shrink: 0;
    }

    .footer__logo {
        display: block;
    }

    .footer__address {
        font-family: var(--font-mincho);
        font-weight: 400;
        font-size: 14px;
        line-height: 1.95;
        color: var(--color-white);
        word-break: break-word;
    }

    .footer__nav {
        ul {
            display: flex;
            gap: 32px;
        }

        a {
            font-family: var(--font-mincho);
            font-weight: 700;
            font-size: 16px;
            line-height: 1.45;
            color: var(--color-white);
            white-space: nowrap;
        }
    }

    .footer__bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;

        p, a, small {
            font-family: var(--font-mincho);
            font-weight: 400;
            font-size: 12px;
            line-height: 1.95;
            color: var(--color-white);
        }
    }
}

/* ==========================================================================
   ローディング（セッション内の初回アクセス時のみ表示）
   全体 2.4 秒：0.2〜1.0 秒でロゴがフェードイン → 1.6〜2.4 秒で背景ごとフェードアウト
   ========================================================================== */
.site-loading {
    display: none;
}

html.is-loading {
    overflow: hidden;

    .site-loading {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #063460 url("../images/page/blue-paper.jpg") center / 700px auto;
        animation: site-loading-out 2.4s linear forwards;
    }

    .site-loading__logo {
        width: 280px;
        max-width: 64vw;
        height: auto;
        opacity: 0;
        animation: site-loading-logo-in 2.4s ease-out forwards;
    }
}

@keyframes site-loading-out {
    0%,
    66.667% {
        opacity: 1;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes site-loading-logo-in {
    0%,
    8.333% {
        opacity: 0;
    }

    41.667%,
    100% {
        opacity: 1;
    }
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width:1280px) {
    .cta {
        .cta__content {
            gap: 60px;
        }
    }
}

@media (max-width:1024px) {
    :root {
        --header-height: 96px;
    }

    .site-header {
        .site-header__inner {
            display: none;
        }

        .site-header__mobile {
            display: flex;
        }

        .site-header__drawer:not([hidden]) {
            display: block;
        }
    }

    .c-page-header {
        padding-block: calc(40px + var(--header-height)) 85px;

        &::after {
            height: 70px;
        }

        .c-page-header__inner {
            width: calc(100% - 80px);
        }

        .c-page-header__title {
            font-size: 38px;
        }
    }

    .cta {
        .cta__inner {
            width: auto;
            padding: 120px 48px 260px;
            gap: 4px;
        }

        .cta__content {
            flex-direction: column;
            align-items: flex-start;
            gap: 40px;

            .btn-primary {
                --btn-width: 340px;
            }
        }

        .cta__copy {
            flex: none;
        }

        .cta__title {
            font-size: 48px;
        }

        /* 右下基準で高さを固定し、左側をトリミングして装飾の表示領域を確保 */
        .cta__wave {
            aspect-ratio: auto;
            height: 300px;

            img {
                object-position: right bottom;
            }
        }
    }

    .footer {
        .footer__inner {
            padding: 80px 48px;
            gap: 40px;
        }

        .footer__top {
            flex-direction: column;
            align-items: flex-start;
            gap: 40px;
        }

        .footer__nav {
            display: none;
        }

        .footer__bottom p:first-child {
            display: none;
        }
    }
}

@media (max-width:767px) {
    .c-page-header {
        padding-block: calc(32px + var(--header-height)) 80px;

        &::after {
            height: 55px;
            background-size: auto 100%;
            background-position: right bottom;
        }

        .c-page-header__inner {
            width: calc(100% - 40px);
        }

        .c-page-header__title {
            font-size: 32px;
        }
    }

    .c-breadcrumb {
        font-size: 10px;
    }

    .cta {
        .cta__inner {
            padding-block: 100px 220px;
        }

        .cta__wave {
            height: 250px;
        }
    }
}

@media (max-width:640px) {
    :root {
        --header-height: 76px;
    }

    .site-header {
        .site-header__mobile {
            padding: 0 16px;
        }

        .site-header__mobile-logo {
            .logo-wordmark {
                width: 160px;
            }
        }

        .site-header__drawer {
            padding-inline: 16px;
        }
    }

    .cta {
        .cta__inner {
            padding: 80px 16px 180px;
        }

        .cta__wave {
            height: 200px;
        }

        .cta__title {
            font-size: 34px;
        }

        .cta__text {
            font-size: 16px;
        }

        .cta__content .btn-primary {
            --btn-width: 100%;
        }
    }

    .footer {
        .footer__inner {
            padding: 64px 16px;
        }
    }
}
