@import url('../root.css');

/* 共通スタイル */
.section-title-area,
.section-reverse-title-area {
    text-align: center;
    color: #555555;
    margin-top: 220px;

    .section-title,
    .section-reverse-title {
        h2 {
            font-size: var(--font-large);
            letter-spacing: 5px;
        }
    }

    .section-sub-title,
    .section-reverse-sub-title {
        p {
            font-size: var(--font-small);
            color: #666666;
        }
    }
}

.custom-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-item.visible {
    opacity: 1;
    z-index: 1;
}

.slider-img {
    width: 95%;
    height: 100%;
    margin: 0 auto;
    object-fit: cover;
    display: block;
    filter: brightness(50%);
}

.main-section,
.main-reverse-section {
    max-width: var(--media-max-width);
    width: 80%;
    margin: 0 auto;

    .main-content-area,
    .main-reverse-content-area {
        display: flex;
        margin-top: 50px;
        gap: 30px;
        color: #666666;

        .main-content-img,
        .main-reverse-content-img {
            width: 50%;
            margin: 0 auto;

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

        .main-content-text,
        .main-reverse-content-text {
            width: 45%;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;

            .link-area {
                width: auto;
                margin-left: auto;
            }


            p {}

            .main-content-text-title,
            .main-reverse-content-text-title {
                text-align: center;
                font-size: var(--font-large);
            }

            .font-text,
            .font-reverse-text {
                margin-top: 60px;
                font-size: var(--font-xs);
                line-height: 3;
                color: #333333;
            }

            .font-medium {
                font-size: 20px;
                margin: 20px 0;
                text-align: center;
            }

            .link {
                display: grid;
                place-items: end;
                margin-top: 80px;
                color: #000000;
                text-align: right;
                text-decoration: underline;
                text-underline-offset: 10px;
                font-size: var(--font-xs);
            }
        }
    }
}

/* ロードアニメーション */
.loading-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    z-index: 9999999999;
    opacity: 1;
    transition: opacity 1.5s ease-out;
}

.loading-area.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', '游ゴシック Medium', YuGothic, YuGothicM, 'Hiragino Kaku Gothic ProN', メイリオ, Meiryo, sans-serif;
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: bold;
    color: transparent;
    -webkit-text-stroke: 1px #8C0404;
    letter-spacing: 0.3em;
}

@media screen and (max-width: 768px) {
    .loading-text {
        font-size: clamp(1.5rem, 4vw, 2rem);
        letter-spacing: 0.2em;
    }

    .loading-text::before {
        font-size: inherit;
    }
}

.loading-text::before {
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    width: 0;
    color: #8C0404;
    animation: textSlide 5s ease-out infinite;
    content: "株式会社Sky Next";
    white-space: nowrap;
    display: inline-block;
    font-size: inherit;
}

@keyframes textSlide {
    0% {
        -webkit-text-stroke: 1px black;
        width: 0;
    }
    50% {
        -webkit-text-stroke: 1px black;
        width: 100%;
    }
    100% {
        width: 100%;
        -webkit-text-stroke: 1px black;
    }
}

/*  フォントサイズ20px→16px */
.font-text {}

main {
    width: 100%;

    /* メインビジュアル */
    .main-visual {
        position: relative;
        width: 100%;
        margin-top: 100px;

        .main-visual-area {
            width: 96%;

            .main-visual-img {
                height: 100%;

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

        }

        .main-visual-text {
            width: 100%;
            position: absolute;
            transform: translate(-50%, -50%);
            top: 60%;
            left: 50%;
            color: #fff;
            text-align: center;

            h1 {
                font-size: 30px;

                .phone-only {
                    display: none;
                }
            }
        }


        .main-visual-contact {
            position: absolute;
            top: 40%;
            right: 0%;
            z-index: 111111;

            p {
                writing-mode: vertical-rl;
                background-color: #8C0404;
                color: #fff;
                padding: 20px 20px;

            }
        }
    }

    /* メインコンテンツ */
    .main-content {
        width: 100%;
        margin-top: 100px;

        /* 経営理念 */
        .philosophy-area {
            width: 70%;
            margin: 0 auto;

            .philosophy-title-area {
                text-align: center;
                color: #555555;

                .philosophy-title {
                    h2 {
                        font-size: var(--font-large);
                    }
                }

                .philosophy-sub-title {

                    p {
                        font-size: var(--font-small);
                        color: #666666;
                    }
                }
            }

            .philosophy-text {
                width: 65%;
                margin: 0 auto;
                margin-top: 65px;

                p {
                    width: 100%;
                    font-size: var(--font-small);
                    font-weight: 600;
                    line-height: 3;
                    color: var(--font-color);

                }
            }
        }
    }
    .main-visual-area {
        position: relative;
        width: 100%;
        height: 600px;
        overflow: hidden;
    }

    .custom-slider {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .slider-item {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 1.5s ease-in-out;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .slider-item.visible {
        opacity: 1;
        z-index: 1;
    }

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

    .main-visual-text {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 20px;
        color: white;
        text-align: center;
        z-index: 2;
    }
}