@charset "UTF-8";
/* =========================================================
   front.css — トップページ（front-page.php / section#page-top 配下）専用
   ※ is_front_page() のときのみ読込。共通は common.css
   ※ 記法：要素.クラスの入れ子＋&＋@mediaネスト（> は不使用）
   ========================================================= */

section#page-top {

    /* 全幅背景ブロック共通：縦余白＋内容を中央寄せ幅制限（div.innerが内容幅を担う） */
    div.fv,
    div.about,
    div.comment,
    div.event,
    div.news,
    div.contact,
    div.links {
        padding: 80px 24px;

        @media (max-width: 768px) {
            padding: 56px 16px;
        }

        div.inner {
            max-width: var(--bw);
            margin-inline: auto;
        }
    }

    /* ---------- ファーストビュー ---------- */
    div.fv {
        padding: 0;
        background: url(../img/fv_bg.jpg) center / cover no-repeat;
        height: 520px;

        @media (max-width: 960px) {
            height: 480px;
        }

        @media (max-width: 768px) {
            background: url(../img/fv_bg-sp.jpg) center / cover no-repeat;
            height: 560px;
        }

        div.fv-inner{
            max-width: 1280px;
            margin: 0 auto ;
            padding: 40px 20px 0;

            @media (max-width: 768px) {
                padding: 0 20px ;
            }

            h2.catch {
                text-indent: -9999px;
                width: 640px;
                height: 384px;
                background: url(../img/fv_catch.svg) center / contain no-repeat;
                filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #fff);

                @media (max-width: 960px) {
                    width: 480px;
                    height: 384px;
                }
                @media (max-width: 768px) {
                    width: 400px;
                    height: 240px;
                }
                @media (max-width: 480px) {
                    width: 320px;
                }
                @media (max-width: 375px) {
                    width: 280px;
                }
            }
        }


        --u: calc(100vw / 6);      /* 6枚モザイク1ブロック=画面幅ぴったり */

        .fv-slider {
            overflow: hidden;      /* 画面外のブロックをクリップ */
        }

        .fv-track {
            display: flex;
            width: max-content;
            animation: fv-marquee 50s linear infinite;   /* 右→左・無限。速度は調整可 */
            will-change: transform;

            @media (max-width: 768px) {
                animation-duration: 25s;   /* SPは速めに（小さいほど速い） */
            }

            @media (prefers-reduced-motion: reduce) {
                animation: none;
            }
        }

        .fv-set {
            display: flex;         /* A+B の2ブロック。これを2セット複製して -50% で一致 */
        }

        .fv-block {
            display: grid;
            /* 左(woman)=1fr+1fr / 中(people)=2fr / 右(man)=2fr ＝合計6ユニット */
            grid-template-columns: 1fr 1fr 2fr 2fr;
            grid-template-rows: 1fr 1fr;       /* 上下段 同じ高さ */
            gap: 16px;
            padding-right: 16px;             /* ブロック間ガター（隙間を全箇所均一に＝継ぎ目なし） */
            width: calc(var(--u) * 6);       /* 1ブロック=6u=画面幅 */
            height: 520px;
            box-sizing: content-box;         /* width=6u を維持（padは外側） */

            li {
                overflow: hidden;
                border-radius: 12px;

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

                &:nth-child(1) { grid-column: 4;     grid-row: 1 / 3; } /* 縦長右 */
                &:nth-child(2) { grid-column: 1 / 3; grid-row: 1; }     /* 横長左上 */
                &:nth-child(3) { grid-column: 3;     grid-row: 1; }
                &:nth-child(4) { grid-column: 3;     grid-row: 2; }
                &:nth-child(5) { grid-column: 1;     grid-row: 2; }
                &:nth-child(6) { grid-column: 2;     grid-row: 2; }
            }

            /* PC：manタイルにコピーを重ねて一緒に流す（SPはh2.catch側／.fv-copyは非表示） */
            .fv-man { position: relative; }

            .fv-copy {
                position: absolute;
                z-index: 2;
                top: 36px;
                left: 24px;          /* man画像の左半分（左の余白）に寄せる */
                width: 160px;
                height: 448px;
                background: url(../img/fv_catch.svg) center / contain no-repeat;
                filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #fff);

                @media (max-width: 768px) { display: none; }
            }

            /* SP：上段ミニモザイク／コピー帯(3行目を空ける)／下段ミニモザイク。1トラックのまま */
            @media (max-width: 768px) {
                grid-template-columns: 34vw 34vw;                 /* 2列 */
                grid-template-rows: 20vw 20vw 26vw 20vw 20vw;     /* 上2 / コピー帯 / 下2 */
                column-gap: 2vw;
                row-gap: 2vw;
                width: max-content;                               /* 全ブロック同一＝ループ継ぎ目維持 */
                height: auto;
                padding-right: 2vw;

                li {
                    &:nth-child(1) { grid-column: 2; grid-row: 1 / 3; }  /* 上段：縦長(右) */
                    &:nth-child(2) { grid-column: 1; grid-row: 1; }       /* 上段：左上 */
                    &:nth-child(3) { grid-column: 1; grid-row: 2; }       /* 上段：左下 */
                    &:nth-child(4) { grid-column: 1; grid-row: 4 / 6; }  /* 下段：縦長(左) */
                    &:nth-child(5) { grid-column: 2; grid-row: 4; }       /* 下段：右上 */
                    &:nth-child(6) { grid-column: 2; grid-row: 5; }       /* 下段：右下 */
                }
            }
        }
        /* ※SP(≤768)専用の組み替え・高さ調整は今回は入れない＝PC延長。後日別タスクで対応。 */
    }


    /* ---------- エントリーCTA ---------- */
    div.entry {
        margin-top: 40px;
        text-align: center;
        
        @media (max-width: 768px) {
            padding: 0 16px;
        }

        a.inner {
            display: block;
            text-decoration: none;
            color: inherit;
            background: linear-gradient(to right, rgba(97, 194, 207, 0.2), rgba(60, 150, 199, 0.3));
            border-radius: 999px;
            max-width: 720px;
            margin: 0 auto;
            padding: 24px 32px 16px 48px;
            box-shadow: 0 8px 0 0 #0c6ba2;
            transition: transform .15s ease, box-shadow .15s ease;

            &:hover {
                transform: translateY(-4px);
                box-shadow: 0 12px 0 0 #0c6ba2;

                /* span.button-arrow::after { transform: translateX(2px); } */
            }

            &:active {
                transform: translateY(6px);
                box-shadow: 0 2px 0 0 #0c6ba2;
            }

            @media (max-width: 768px) {
                padding: 24px 32px 16px ;
            }

            @media (max-width: 480px) {
                padding: 16px;
                border-radius: 20px;
            }

            p{
                font-size: 2rem;
                font-weight: 700;
                color: #0c6ba2;

                @media (max-width: 768px) {
                    font-size: 1.5rem;
                }

                @media (max-width: 480px) {
                    font-size: 1.25rem;
                }
            }

            dl {
                display: inline-flex;
                align-items: baseline;
                gap: 16px;

                @media (max-width: 480px) {
                    margin-top: 8px;
                    flex-direction: column;
                    align-items: center;
                    gap: 0;
                }

                dt {
                    background: #0c6ba2;
                    color: var(--c-white);
                    font-weight: 500;
                    padding: 2px 16px;
                    border-radius: 4px;
                }

                dd {
                    color: #0c6ba2;
                    font-size: 4rem;
                    font-weight: 600;
                    display: inline-flex;
                    gap: 12px;
                    align-items: baseline;
                    font-family: "Bebas Neue", sans-serif;
                    line-height: 1.5;

                    @media (max-width: 480px) {
                        font-size: 3rem;
                    }

                    span.week {
                        color: var(--c-white);
                        font-size: 0.875rem;
                        background: #0c6ba2;
                        border-radius: 50%;
                        width: 24px;
                        height: 24px;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                    }

                    span.from {
                        text-indent: -9999px;
                        display: block;
                        width: 16px;
                        height: 16px;
                        background: #0c6ba2;
                        clip-path: polygon(0 0 , 100% 50% , 0 100%);
                        position: relative;
                        top: 44px;
                    }
                }
            }

            span.button-arrow{

                @media (max-width: 768px){
                    width: 100%;
                    margin: 0 auto;
                    justify-content: center;
                }
            }
        }
    }

    /* ---------- CHESTとは？ ---------- */
    div.about {
        margin-top: 64px;
        padding: 80px 24px 40px;
        background: url(../img/loading_bg.jpg) center / cover no-repeat;
        color: var(--c-white);
        overflow: hidden;

        @media (max-width: 768px) {
            padding: 56px 16px 40px;
        }

        div.inner {
            position: relative;

            &::after {
                content: '';
                display: block;
                width: 216px;
                height: 216px;
                background: url(../img/logo-mark-line.svg) center / contain no-repeat;
                position: absolute;
                top: calc(50% - 24px);
                right: 40px;
                transform: translateY(-50%);

                @media (max-width: 960px) { opacity: .2; }
            }

            h2 {
                color: var(--c-white);
                font-style: italic;
                font-size: 1.5rem;
                font-weight: 600;
                display: flex;
                padding-bottom: 16px;

                span {
                    display: block;
                    text-indent: -9999px;
                    width: 172px;
                    height: 42px;
                    background: url(../img/logo-white.svg) center / contain no-repeat;
                }
            }

            div.explain {
                padding-top: 16px;
                border-top: 1px solid var(--c-white);
                max-width: 680px;

                p {
                    padding-top: 16px;
                    color: var(--c-white);
                    font-weight: 500;

                    span {
                        display: inline-block;
                    }
                }
            }

            a {
                display: block;
                width: fit-content;
                align-items: center;
                gap: 10px;
                margin-top: 28px;
                margin-left: auto;
                color: var(--c-white);
                font-weight: 700;
                padding: 8px 36px;
                border-radius: 999px;
                border: 1px solid var(--c-white);
                transition: .2s;

                &:hover {
                    background-color: var(--c-white);
                    color: var(--c-navy);
                }
            }

            img {
                position: absolute;
                right: 4%;
                bottom: 10%;
                width: 180px;
                opacity: .9;
                z-index: 0;
            }

            @media (max-width: 768px) {
                img {
                    position: static;
                    display: block;
                    margin: 24px auto 0;
                    width: 120px;
                }
            }
        }
    }

    /* ---------- コメント ---------- */
    div.comment {

        div.inner {

            div.flex-wrap {
                display: flex;
                align-items: end;
                gap: 40px;

                @media (max-width: 960px){
                    display: block;
                }

                p.explain{
                    @media (max-width: 960px){
                        margin-top: 16px;
                    }
                }
            }

            ul {
                margin-top: 40px;
                display: flex;
                justify-content: space-between;

                @media (max-width: 768px) {
                    flex-direction: column;
                    gap: 32px;
                }

                li {
                    width: calc((100% - 120px) / 3);

                    @media (max-width: 960px) {
                         width: calc((100% - 48px) / 3); 
                    }
                    @media (max-width: 768px) {
                         width: 100%; 
                    }

                    h3 {
                        font-size: 1.1rem;
                        margin: 4px 0 ;
                    }

                    p {
                        font-size: 1rem;
                        line-height: 1.8;
                        color: #555;
                    }
                    p.company,
                    p.position {
                        line-height: 1.25;
                        font-size: 0.875rem;
                    }
                    p.attribute {
                        font-size: 0.875rem;
                        color: var(--c-navy);
                        margin: 0 0 12px;     /* 名前の下・線(p.text border-top)の上 */
                    }
                    p.company {
                        margin-top: 16px;
                    }
                    p.text {
                        padding-top: 12px;
                        border-top: 1px solid #000;
                    }

                    img {
                        width: 100%;
                        aspect-ratio: 250 / 330;
                        object-fit: cover;
                        object-position: center;
                        border-radius: 16px;

                        @media (max-width: 768px) {
                            aspect-ratio: 1 / 1;
                       }
                    }
                }
            }
        }
    }

    /* ---------- イベント ---------- */
    div.event {
        background:
            linear-gradient(to right, rgba(97, 194, 207, 0.2), rgba(60, 150, 199, 0.3)),  /* ティール色味（entryと共通） */
            linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, .6)),  /* 白ベール＝波を薄く（数値を上げるほど薄く） */
            url(../img/event_bg.svg) center bottom -8px / cover no-repeat,
            var(--c-white);

        div.inner {

            ul {
                display: flex;
                justify-content: space-between;
                margin-top: 40px;

                li {
                    width: calc((100% - 32px) / 3);
                    background: var(--c-white);
                    border-radius: var(--radius);
                    box-shadow: var(--shadow);
                    position: relative;
                    transition: transform .25s ease, box-shadow .25s ease;

                    &:hover {
                        transform: translateY(-6px);
                        box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
                    }
                }

                @media (max-width: 768px) {
                    flex-direction: column;
                    gap: 24px;

                    li { width: 100%; }
                }
            }

            div {
                display: flex;
                flex-direction: column;

                figure {
                    margin: 0;
                    padding: 12px;
                    overflow: hidden;
                    
                    img {
                        aspect-ratio: 16 / 11;
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        border-radius: 4px;
                    }
                }

                div {
                    padding: 0 12px;

                    dl {
                        display: flex;
                        justify-content: center;
                        gap: 8px;
                        font-size: 1.25rem;
                        font-weight: 500;
                        line-height: 2;

                        @media (max-width: 480px) {
                            font-size: 1rem;
                        }
                    }

                    h3 {
                        padding-top: 12px;
                        border-top: 1px solid var(--c-text);
                        font-size: 1.25rem;
                        padding: 8px 0 32px;
                        line-height: 1.5;

                        @media (max-width: 480px) {
                            font-size: 1.125rem;
                        }
                    }
                }
            }

            p.label {
                position: absolute;
                left: 16px;
                top: 0;
                transform: translateY(-100%);
                width: fit-content;
                padding: 6px 24px;
                background: var(--c-navy);
                border-bottom: none;
                border-radius: 4px 4px 0 0;
                color: var(--c-white);
                font-weight: 700;
                letter-spacing: .05em;
                line-height: 1.6;

                @media (max-width: 768px) {
                    padding: 4px 16px;
                }
            }

            a.button-arrow {
                margin-top: 40px;
                display: flex;
                width: fit-content;
                margin-left: auto;        /* 右寄せ（display:flex+fit-contentで有効化） */
            }
        }
    }

    /* ---------- お知らせ ---------- */
    div.news {
        position: relative;

        /* 下部の背景装飾：右にはみ出し・下に少しかかる */
        &::after {
            content: "";
            position: absolute;
            z-index: 0;
            right: -40px;              /* 右へのはみ出しは維持 */
            top: 50%;                  /* お知らせリストの中央あたりに */
            transform: translateY(-50%) rotate(-6deg);   /* 若干左に傾ける（角度調整可） */
            width: min(1500px, 128vw); /* 1.5倍に拡大 */
            aspect-ratio: 1148 / 560;
            background: url(../img/bg-item.svg) center / contain no-repeat;
            pointer-events: none;
        }

        div.inner {
            position: relative;
            z-index: 1;

            ul {
                margin-top: 40px;
                display: flex;
                flex-direction: column;

                li {
                    border-bottom: 1px solid var(--c-grey);

                    a {
                        display: flex;
                        align-items: center;
                        gap: 24px;
                        padding: 20px 4px;
                        background: rgba(255, 255, 255, .7);   /* 各お知らせに薄い白（可読性確保・濃さ調整可） */
                        transition: opacity .2s;

                        &:hover {
                            opacity: .65;
                        }

                        @media (max-width: 480px) {
                            gap: 16px;
                        }
                    }
                }

                img {
                    display: block;
                    margin: 0;
                    width: 100%;
                    max-width: 320px;
                    flex-shrink: 0;
                    aspect-ratio: 320 / 180;
                    overflow: hidden;
                    border-radius: 8px;
                    object-fit: cover;

                    @media (max-width: 768px) {
                        max-width: 160px;
                    }

                    @media (max-width: 480px) {
                        border-radius: 4px;
                        max-width: 120px;
                    }
                }

                div {
                    time {
                        font-weight: 500;

                        @media (max-width: 480px) {
                            font-size: 0.875rem;
                        }
                    }

                    h3 {
                        font-size: 1.25rem;
                        font-weight: 600;
                        line-height: 1.5;

                        @media (max-width: 480px) {
                            font-size: 1rem;
                        }
                    }
                }
            }

            /* 一覧へボタン（カード内リンクと区別するためクラス指定） */
            a.more {
                display: block;
                width: fit-content;
                margin: 40px auto 0;
                border: 1px solid var(--c-navy);
                color: var(--c-navy);
                font-weight: 700;
                padding: 12px 40px;
                border-radius: 999px;
                transition: background .2s, color .2s;

                &:hover {
                    background: var(--c-navy);
                    color: var(--c-white);
                }
            }
        }
    }

    /* ---------- お問い合わせ ---------- */
    div.contact {
        text-align: center;

        div.inner {

            p {
                margin-top: 16px;
                font-size: 1.25rem;
                font-weight: 500;

                @media (max-width: 768px) {
                    font-size: 1rem;
                }
            }

            a.button-square {
                margin: 16px auto 0;
            }

            small {
                font-size: 1rem;
            }
        }
    }

    /* ---------- 関係事業リンク ---------- */
    div.links {
        background: var(--c-lavender2);
        position: relative;

        &::after{
            content: '';
            display: block;
            width: 184px;
            height: 184px;
            background: url(../img/symbol_color.svg) center / contain no-repeat;
            position: absolute;
            top: -128px;
            left: calc(50% + 240px);

            @media (max-width: 768px) { display: none; }
        }

        div.inner {

            h2 {
                width: fit-content;
                margin-inline: auto;
                position: relative;

                &::before,
                &::after {
                    content: '';
                    display: block;
                    width: 180px;
                    height: 1px;
                    background: var(--c-text);
                    position: absolute;
                    top: 50%;
                }
                &::before {
                    left: -200px;
                }
                &::after {
                    right: -200px;
                }
            }

            ul {
                margin-top: 16px;
                display: flex;
                flex-wrap: wrap;
                justify-content: center;
                gap: 24px;

                li {
                    max-width: 280px;

                    a {
                        display: block;
                    }

                    img {
                        height: 62px;          /* バナー高さ固定（PC） */
                        width: auto;
                        border: 1px solid var(--c-text);

                        @media (max-width: 768px) {
                            height: 56px;      /* SP */
                        }
                    }
                }
            }
        }
    }
}

/* ファーストビュー マーキー（右→左 無限ループ・2セット複製なので -50%＝1セットぶん＝継ぎ目なし） */
@keyframes fv-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
